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

Vasily Khoruzhick anarsoul at gmail.com
Sun Jan 19 00:14:21 CET 2025


On Wed, Jan 15, 2025 at 2:48 AM Quentin Schulz <quentin.schulz at cherry.de> wrote:
>
> Hi Vasily,

Hey Quentin,

> > +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.

Yeah, I agree it is a hack, and yes, 4K works fine in Linux. I noticed
that some other drivers that use dw-hdmi in u-boot also limit max
pixel clock at 297MHz, so it might be a known but not documented
issue. I'll add a comment about that in v2.

> Maybe also add the formula in the comment?

htotal * vtotal * refresh_rate? That would require an explanation of
what htotal and vtotal is, and TBH if you know where to get htotal and
vtotal from, you know where to look for a pixel clock. I don't think
that rk3328_hdmi.c is a proper place for such an explanation.

> 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.

Yeah, or 4K displays at 30Hz which is exactly 297MHz.

I spent some time debugging this issue, unfortunately with no useful
result. This change at least allows my rock64 to show something on my
4K monitor, so it is an improvement.

Regards,
Vasily


More information about the U-Boot mailing list