[PATCH 2/3] video: rockchip: rk3328: filter unsupported modes

Quentin Schulz quentin.schulz at cherry.de
Wed Jan 15 11:48:37 CET 2025


Hi Vasily,

On 1/14/25 6:24 AM, Vasily Khoruzhick wrote:
> While RK3328 is capable of 4K resolution, dw-hdmi driver in u-boot
> seems to have some issue with 4K. 1440p or lower works fine.
> 
> Limit max resolution by 2560x1440x60Hz, by filtering the modes with
> pixel clock > 297MHz
> 
> Fixes: f3ea872970d603 ("video: rockchip: Add rk3328 hdmi support")
> Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
> ---
>   drivers/video/rockchip/rk3328_hdmi.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/video/rockchip/rk3328_hdmi.c b/drivers/video/rockchip/rk3328_hdmi.c
> index 763669c09be..d02c58c44c5 100644
> --- a/drivers/video/rockchip/rk3328_hdmi.c
> +++ b/drivers/video/rockchip/rk3328_hdmi.c
> @@ -105,9 +105,16 @@ static int rk3328_hdmi_probe(struct udevice *dev)
>   	return 0;
>   }
>   
> +static bool rk3328_hdmi_mode_valid(struct udevice *dev,
> +				   const struct display_timing *timing)
> +{
> +	return timing->pixelclock.typ <= 297000000;
> +}
> +

This seems like a hack to me and I would feel better with it being 
documented as such in the code. Can you simply add a comment there 
stating that this is a work-around for resolutions above 4K that should 
be working (that's what I gathered from the commit log, does it work in 
Linux?) but aren't right now. Maybe also add the formula in the comment?

I also wonder what would happen if we have 120+Hz displays at lower 
resolutions, they would be filtered out as well. Is that an issue? /me 
shrugs.

I don't own an RK3328 device though, so...

Cheers,
Quentin


More information about the U-Boot mailing list