[PATCH] drm: Don't return unsupported formats in drm_mode_legacy_fb_format

Frej Drejhammar frej.drejhammar at gmail.com
Tue Mar 12 19:31:00 UTC 2024


Hi Thomas,

Thomas Zimmermann <tzimmermann at suse.de> writes:

> Am 11.03.24 um 20:34 schrieb Frej Drejhammar:
>
>> What I can't really see is what "switch all fbdev code over to
>> drm_driver_legacy_fb_format" would entail [...]
>
> Your patch modifies drm_mode_legacy_fb_format() in a number of
> *_fbdev_*.c files. In those instances, the code could certainly use
> drm_driver_legacy_fb_format() instead.
>
> The fbdev files provide the base for the kernel framebuffer console
> and should behave like DRM clients in userspace;

That's the understanding I was missing, thank you for the explanation!
I'll work up a two-patch series during the week-end.

> About tilcdc: it uses fbdev-dma, which sets up an XRGB format
> [1]. Shouldn't this already fail? Do you see a framebuffer console?

I get the penguin, but I'm running this particular Beagleboard with a
serial console, so I don't know if the rest of the console works. From
some extra kprints I can see that (the unmodified)
drm_mode_legacy_fb_format() returns RG16 which means that the
framebuffer asked for a depth=16, bpp=16 format, and RG16 is one of the
supported formats, so the check that triggers the regression won't
trigger.

Best regards,

Frej


More information about the dri-devel mailing list