diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2022-11-23 14:53:48 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2022-11-24 16:07:52 +0300 |
commit | 559358282e5b43b1b01e7f6afac6e0beb33cb4a2 (patch) | |
tree | cff6627301e924a1882e47880e0fd09a1d393b74 /drivers/gpu/drm/mxsfb | |
parent | 36aff2eae40a68d510bd64549cd009ab3d81574b (diff) | |
download | linux-559358282e5b43b1b01e7f6afac6e0beb33cb4a2.tar.xz |
drm/fb-helper: Don't use the preferred depth for the BPP default
If no preferred value for bits-per-pixel has been given, fall back
to 32. Never use the preferred depth. The color depth is the number
of color/alpha bits per pixel, while bpp is the overall number of
bits in most cases.
Most noteworthy, XRGB8888 has a depth of 24 and a bpp value of 32.
Using depth for bpp would make the value 24 as well and format
selection in fbdev helpers fails. Unfortunately XRGB8888 is the most
common format and the old heuristic therefore fails for most of
the drivers (unless they implement the 24-bit RGB888 format).
Picking a bpp of 32 will later on result in a default depth of 24
and the format XRGB8888. As XRGB8888 is the default format for most
of the current and legacy graphics stack, all drivers must support
it. So it is the safe choice.
v2:
* fix commit-message typo (Javier)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20221123115348.2521-8-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/mxsfb')
0 files changed, 0 insertions, 0 deletions