All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: dri-devel@lists.freedesktop.org
Cc: Marek Vasut <marex@denx.de>, Peng Fan <peng.fan@nxp.com>,
	Alexander Stein <alexander.stein@ew.tq-group.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Sam Ravnborg <sam@ravnborg.org>, Robby Cai <robby.cai@nxp.com>
Subject: [PATCH v2 4/7] drm: mxsfb: Move mxsfb_get_fb_paddr() away from register IO functions
Date: Fri, 11 Mar 2022 18:05:58 +0100	[thread overview]
Message-ID: <20220311170601.50995-4-marex@denx.de> (raw)
In-Reply-To: <20220311170601.50995-1-marex@denx.de>

Move mxsfb_get_fb_paddr() out of the way, away from register IO functions.
This is a clean up. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Robby Cai <robby.cai@nxp.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Stefan Agner <stefan@agner.ch>
---
V2: No change
---
 drivers/gpu/drm/mxsfb/mxsfb_kms.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
index 015b289d93a3c..7b0abd0472aae 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
@@ -43,6 +43,21 @@ static u32 set_hsync_pulse_width(struct mxsfb_drm_private *mxsfb, u32 val)
 		mxsfb->devdata->hs_wdth_shift;
 }
 
+static dma_addr_t mxsfb_get_fb_paddr(struct drm_plane *plane)
+{
+	struct drm_framebuffer *fb = plane->state->fb;
+	struct drm_gem_cma_object *gem;
+
+	if (!fb)
+		return 0;
+
+	gem = drm_fb_cma_get_gem_obj(fb, 0);
+	if (!gem)
+		return 0;
+
+	return gem->paddr;
+}
+
 /*
  * Setup the MXSFB registers for decoding the pixels out of the framebuffer and
  * outputting them on the bus.
@@ -215,21 +230,6 @@ static int mxsfb_reset_block(struct mxsfb_drm_private *mxsfb)
 	return 0;
 }
 
-static dma_addr_t mxsfb_get_fb_paddr(struct drm_plane *plane)
-{
-	struct drm_framebuffer *fb = plane->state->fb;
-	struct drm_gem_cma_object *gem;
-
-	if (!fb)
-		return 0;
-
-	gem = drm_fb_cma_get_gem_obj(fb, 0);
-	if (!gem)
-		return 0;
-
-	return gem->paddr;
-}
-
 static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb,
 				     const u32 bus_format)
 {
-- 
2.34.1


  parent reply	other threads:[~2022-03-11 17:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11 17:05 [PATCH v2 1/7] drm: mxsfb: Simplify LCDIF clock handling Marek Vasut
2022-03-11 17:05 ` [PATCH v2 2/7] drm: mxsfb: Simplify LCDIF IRQ handling Marek Vasut
2022-04-06 19:41   ` Lucas Stach
2022-04-06 22:03     ` Marek Vasut
2022-04-07  8:01       ` Lucas Stach
2022-04-17  1:04         ` Marek Vasut
2022-03-11 17:05 ` [PATCH v2 3/7] drm: mxsfb: Wrap FIFO reset and comments into mxsfb_reset_block() Marek Vasut
2022-04-06 19:42   ` Lucas Stach
2022-03-11 17:05 ` Marek Vasut [this message]
2022-04-06 19:45   ` [PATCH v2 4/7] drm: mxsfb: Move mxsfb_get_fb_paddr() away from register IO functions Lucas Stach
2022-04-06 22:05     ` Marek Vasut
2022-04-07  9:47       ` Lucas Stach
2022-04-10 22:17         ` Marek Vasut
2022-04-11  9:46           ` Lucas Stach
2022-03-11 17:05 ` [PATCH v2 5/7] drm: mxsfb: Factor out mxsfb_set_mode() Marek Vasut
2022-04-06 19:47   ` Lucas Stach
2022-04-06 22:06     ` Marek Vasut
2022-03-11 17:06 ` [PATCH v2 6/7] drm: mxsfb: Reorder mxsfb_crtc_mode_set_nofb() Marek Vasut
2022-04-06 19:48   ` Lucas Stach
2022-03-11 17:06 ` [PATCH v2 7/7] drm: mxsfb: Factor out mxsfb_update_buffer() Marek Vasut
2022-04-06 19:49   ` Lucas Stach
2022-04-06 19:32 ` [PATCH v2 1/7] drm: mxsfb: Simplify LCDIF clock handling Lucas Stach
2022-04-06 21:45   ` Marek Vasut
2022-04-07  7:57     ` Lucas Stach
2022-04-17  1:05       ` Marek Vasut

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=20220311170601.50995-4-marex@denx.de \
    --to=marex@denx.de \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=peng.fan@nxp.com \
    --cc=robby.cai@nxp.com \
    --cc=sam@ravnborg.org \
    /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.