[PATCH 03/11] drm/armada: Use drm_driver_legacy_fb_format() for fbdev
Frej Drejhammar
frej.drejhammar at gmail.com
Sun Mar 17 18:01:28 UTC 2024
Switch to using drm_driver_legacy_fb_format() instead of
drm_mode_legacy_fb_format() to use the same logic as for the
DRM_IOCTL_MODE_ADDFB ioctl when selecting a framebuffer format.
Signed-off-by: Frej Drejhammar <frej.drejhammar at gmail.com>
Cc: Russell King <linux at armlinux.org.uk>
Cc: David Airlie <airlied at gmail.com>
Cc: Daniel Vetter <daniel at ffwll.ch>
---
This is an evolved version of the changes proposed in "drm: Don't
return unsupported formats in drm_mode_legacy_fb_format" [1] following
the suggestions of Thomas Zimmermann.
[1] https://lore.kernel.org/all/20240310152803.3315-1-frej.drejhammar@gmail.com/
---
drivers/gpu/drm/armada/armada_fbdev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/armada/armada_fbdev.c b/drivers/gpu/drm/armada/armada_fbdev.c
index d223176912b6..3a7258de323f 100644
--- a/drivers/gpu/drm/armada/armada_fbdev.c
+++ b/drivers/gpu/drm/armada/armada_fbdev.c
@@ -54,8 +54,9 @@ static int armada_fbdev_create(struct drm_fb_helper *fbh,
mode.width = sizes->surface_width;
mode.height = sizes->surface_height;
mode.pitches[0] = armada_pitch(mode.width, sizes->surface_bpp);
- mode.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
- sizes->surface_depth);
+ mode.pixel_format = drm_driver_legacy_fb_format(dev,
+ sizes->surface_bpp,
+ sizes->surface_depth);
size = mode.pitches[0] * mode.height;
obj = armada_gem_alloc_private_object(dev, size);
--
2.44.0
More information about the dri-devel
mailing list