diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2023-02-16 11:24:44 +0100 |
---|---|---|
committer | Heiko Stuebner <heiko@sntech.de> | 2023-03-09 01:14:24 +0100 |
commit | 8e140cb60270ee8b5b41e80806323c668d8d4da9 (patch) | |
tree | 22329f7d75ab84b0811fe5f7dfdadcc827168f00 /drivers/gpu/drm/rockchip/rockchip_drm_vop.h | |
parent | 22de25f83c6b9b2df45fa346b632dcb9b6f1acda (diff) |
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
Diffstat (limited to 'drivers/gpu/drm/rockchip/rockchip_drm_vop.h')
-rw-r--r-- | drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h index 8502849833d9..5f56e0597df8 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h @@ -42,6 +42,11 @@ enum vop_data_format { VOP_FMT_YUV444SP, }; +struct vop_rect { + int width; + int height; +}; + struct vop_reg { uint32_t mask; uint16_t offset; @@ -225,6 +230,7 @@ struct vop_data { const struct vop_win_data *win; unsigned int win_size; unsigned int lut_size; + struct vop_rect max_output; #define VOP_FEATURE_OUTPUT_RGB10 BIT(0) #define VOP_FEATURE_INTERNAL_RGB BIT(1) |