MLK-20304-1 drm/imx/hdp: add mode_fixup hook and better handling of DC and CS
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>
Fri, 9 Nov 2018 06:49:28 +0000 (08:49 +0200)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commitbb49707d7ff21c7c124c885d7d0f62f28069ca4c
tree278bd34927396a37fba9502c0e5ffdcc57de1694
parentff9bdc81330b621d0e29889f825e5c96370fcf05
MLK-20304-1 drm/imx/hdp: add mode_fixup hook and better handling of DC and CS

The HDMI sink may support different color depths for RGB and/or YUV
colorspaces. Currently, for mscale, 10-bit YUV420 is used only for
2160p@60. For the rest of modes 8-bit RGB is used.

This patch will add a mode_fixup() hook in the hdp_ops struct, allowing
each platform to perform a better handling of the various color depths
and colorspaces.

With the current patch, the RGB output will always be preferred to YUV
colorspaces, given the same color depth, since YUV colorspaces perform
UV subsampling, producing less quality. Also, whenever possible, better
color depth will be preferred (12-bit, 10-bit and, lastly, 8-bit).

The chosen colorspace and color depth will always be based on EDID's
Capability Map Data Block and YUV420 Video Data Block, as well as on
HDMI controller's known clock constraints.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
drivers/gpu/drm/imx/hdp/imx-hdmi.c
drivers/gpu/drm/imx/hdp/imx-hdmi.h
drivers/gpu/drm/imx/hdp/imx-hdp.c
drivers/gpu/drm/imx/hdp/imx-hdp.h