LF-3058-2 drm/imx: dcss: kms: Reject unsupported HDR10 pipe configurations
authorLiu Ying <victor.liu@nxp.com>
Mon, 25 Jan 2021 02:44:55 +0000 (10:44 +0800)
committerLiu Ying <victor.liu@nxp.com>
Tue, 26 Jan 2021 09:03:13 +0000 (17:03 +0800)
commit85323bf5f52565809a13aac1e57803baf50e3a9e
tree107ea1b96d861448c49b5cdbb694ecc58a5016a4
parent23d732ea4a2258c9b0262474c0618dceb7e8da98
LF-3058-2 drm/imx: dcss: kms: Reject unsupported HDR10 pipe configurations

Some HDR10 pipe configurations are not supported by DCSS.
The general idea is to use atomic check to reject the unsupported cases
by searching the array dcss_cfg_table[] to see if a valid entry can be found
or not.  To do the atomic check correctly, we should track the output pipe
configurations, which is done by the newly introduced struct dcss_crtc_state.
The plane->atomic_check() function would finally check the input and output
pipe configurations by calling the helper function
dcss_plane_hdr10_pipe_cfg_is_supported().

Tested-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
drivers/gpu/drm/imx/dcss/dcss-crtc.c
drivers/gpu/drm/imx/dcss/dcss-dev.h
drivers/gpu/drm/imx/dcss/dcss-hdr10.c
drivers/gpu/drm/imx/dcss/dcss-kms.c
drivers/gpu/drm/imx/dcss/dcss-kms.h
drivers/gpu/drm/imx/dcss/dcss-plane.c