All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frej Drejhammar <frej.drejhammar@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Frej Drejhammar <frej.drejhammar@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Subject: [PATCH 03/11] drm/armada: Use drm_driver_legacy_fb_format() for fbdev
Date: Sun, 17 Mar 2024 19:01:28 +0100	[thread overview]
Message-ID: <599c1e1cf218bb9b9b5fb4f13022d9a507da42ca.1710698387.git.frej.drejhammar@gmail.com> (raw)
In-Reply-To: <cover.1710698386.git.frej.drejhammar@gmail.com>

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@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@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


  parent reply	other threads:[~2024-03-17 18:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-17 18:01 [PATCH 00/11] drm: Only try to set formats supported by the hardware Frej Drejhammar
2024-03-17 18:01 ` Frej Drejhammar
2024-03-17 18:01 ` [PATCH 01/11] drm: Only return supported formats from drm_driver_legacy_fb_format Frej Drejhammar
2024-03-17 18:01 ` [PATCH 02/11] drm/fbdev_generic: Use drm_driver_legacy_fb_format() for fbdev Frej Drejhammar
2024-03-17 18:01 ` Frej Drejhammar [this message]
2024-03-17 18:01 ` [PATCH 04/11] drm/exynos: " Frej Drejhammar
2024-03-17 18:01   ` Frej Drejhammar
2024-03-17 18:01 ` [PATCH 05/11] drm/gma500: " Frej Drejhammar
2024-03-17 18:01 ` [PATCH 06/11] drm/i915: " Frej Drejhammar
2024-03-17 18:01 ` [PATCH 07/11] drm/msm: " Frej Drejhammar
2024-03-17 18:01 ` [PATCH 08/11] drm/omapdrm: " Frej Drejhammar
2024-03-17 18:01 ` [PATCH 09/11] drm/radeon: " Frej Drejhammar
2024-03-17 18:01 ` [PATCH 10/11] drm/tegra: " Frej Drejhammar
2024-03-17 18:01 ` [PATCH 11/11] drm/xe: " Frej Drejhammar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=599c1e1cf218bb9b9b5fb4f13022d9a507da42ca.1710698387.git.frej.drejhammar@gmail.com \
    --to=frej.drejhammar@gmail.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.