[PATCH v3 11/13] drm/fb-helper: Fix single-probe color-format selection

Linus Walleij linus.walleij at linaro.org
Mon May 15 08:59:28 UTC 2023


On Mon, May 15, 2023 at 10:17 AM Thomas Zimmermann <tzimmermann at suse.de> wrote:
> Am 15.05.23 um 10:01 schrieb Linus Walleij:

> > But the display is flickering like crazy so the updating frequency is
> > totally off, which is because it does not scale down the resolution,
> > the print used to be:
> >
> > Console: switching to colour frame buffer device 80x30
> > drm-clcd-pl111 c1000000.display: [drm] fb0: pl111drmfb frame buffer device
> >
> > It is now:
> >
> > Console: switching to colour frame buffer device 100x37
> > drm-clcd-pl111 c1000000.display: [drm] fb0: pl111drmfb frame buffer device
> >
> > 100x37! (i.e. 800x296), this display can only do 640x240.
> > Any idea what else is going wrong here? Or is this another regression
> > on top of the first regression ... I was under the impression that
> > your change was only about formats not resolutions.
>
> If your display only supports 640x240, you should filter out all the
> other modes in the driver, if necessary. To me, that seems fix-worthy in
> any case.

I think I found this, the bandwidth limit calculation in
drivers/gpu/drm/pl111/pl111_display.c was using the bpp from
the config and this was decreased from 16 to 15 and as it determined
cpp by dividing bpp/8 this decreased from 2 bytes to 1 byte.

Testing with DIV_ROUND_UP() in combination with the previous
fix!

Yours,
Linus Walleij


More information about the dri-devel mailing list