linux/drivers/gpu/drm/ingenic
Paul Cercueil abec017c3d
drm/ingenic: ipu: Search for scaling coefs up to 102% of the screen
Increase the scaled image's theorical width/height until we find a
configuration that has valid scaling coefficients, up to 102% of the
screen's resolution. This makes sure that we can scale from almost
every resolution possible at the cost of a very small distorsion.
The CRTC_W / CRTC_H are not modified.

This algorithm was already in place but would not try to go above the
screen's resolution, and as a result would only work if the CRTC_W /
CRTC_H were smaller than the screen resolution. It will now try until it
reaches 102% of the screen's resolution.

Note that this algorithm exists mostly as a band-aid for a missing
functionality: it is not possible for userspace to request the closest
mode that would encapsulate the provided one, because the GEM buffer is
created beforehand. If there was a way to let the kernel tweak the mode,
I could write a better algorithm that would result in a better looking
picture.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20201105083905.8780-1-paul@crapouillou.net
2020-11-11 11:47:11 +00:00
..
ingenic-drm-drv.c drm: Use state helper instead of CRTC state pointer 2020-11-10 12:41:06 +01:00
ingenic-drm.h Revert "gpu/drm: ingenic: Add option to mmap GEM buffers cached" 2020-10-04 22:04:10 +02:00
ingenic-ipu.c drm/ingenic: ipu: Search for scaling coefs up to 102% of the screen 2020-11-11 11:47:11 +00:00
ingenic-ipu.h drm/ingenic: Add support for the IPU 2020-07-17 00:46:17 +02:00
Kconfig drm/ingenic: Add support for the IPU 2020-07-17 00:46:17 +02:00
Makefile drm/ingenic: Add support for the IPU 2020-07-17 00:46:17 +02:00