[PATCH 07/11] drm/msm: Use drm_driver_legacy_fb_format() for fbdev
Frej Drejhammar
frej.drejhammar at gmail.com
Sun Mar 17 18:01:32 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: Rob Clark <robdclark at gmail.com>
Cc: Abhinav Kumar <quic_abhinavk at quicinc.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
Cc: Sean Paul <sean at poorly.run>
Cc: Marijn Suijten <marijn.suijten at somainline.org>
Cc: David Airlie <airlied at gmail.com>
Cc: Daniel Vetter <daniel at ffwll.ch>
Cc: linux-arm-msm at vger.kernel.org
Cc: freedreno at lists.freedesktop.org
---
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/msm/msm_fbdev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
index 030bedac632d..05bedf210572 100644
--- a/drivers/gpu/drm/msm/msm_fbdev.c
+++ b/drivers/gpu/drm/msm/msm_fbdev.c
@@ -77,7 +77,9 @@ static int msm_fbdev_create(struct drm_fb_helper *helper,
uint32_t format;
int ret, pitch;
- format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth);
+ format = drm_driver_legacy_fb_format(dev,
+ sizes->surface_bpp,
+ sizes->surface_depth);
DBG("create fbdev: %dx%d@%d (%dx%d)", sizes->surface_width,
sizes->surface_height, sizes->surface_bpp,
--
2.44.0
More information about the Freedreno
mailing list