drm/rockchip: vop: limit maximum resolution to hardware capabilities
authorSascha Hauer <s.hauer@pengutronix.de>
Thu, 16 Feb 2023 10:24:44 +0000 (11:24 +0100)
committerHeiko Stuebner <heiko@sntech.de>
Thu, 9 Mar 2023 00:14:24 +0000 (01:14 +0100)
commit8e140cb60270ee8b5b41e80806323c668d8d4da9
tree22329f7d75ab84b0811fe5f7dfdadcc827168f00
parent22de25f83c6b9b2df45fa346b632dcb9b6f1acda
drm/rockchip: vop: limit maximum resolution to hardware capabilities

The different VOP variants support different maximum resolutions. Reject
resolutions that are not supported by a specific variant.

This hasn't been a problem in the upstream driver so far as 1920x1080
has been the maximum resolution supported by the HDMI driver and that
resolution is supported by all VOP variants. Now with higher resolutions
supported in the HDMI driver we have to limit the resolutions to the
ones supported by the VOP.

The actual maximum resolutions are taken from the Rockchip downstream
Kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[dropped the vdisplay > height check after talking to Sascha, as according to
 the vendor code "Actually vop hardware has no output height limit"
 (from vendor commit "drm/rockchip: vop: get rid of max_output.height check")
 and the height-check broke the px30-minievb display]

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230216102447.582905-2-s.hauer@pengutronix.de
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
drivers/gpu/drm/rockchip/rockchip_drm_vop.h
drivers/gpu/drm/rockchip/rockchip_drm_vop2.h
drivers/gpu/drm/rockchip/rockchip_vop_reg.c