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 <ma...@denx.de>
Cc: Alexander Stein <alexander.st...@ew.tq-group.com>
Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com>
Cc: Lucas Stach <l.st...@pengutronix.de>
Cc: Peng Fan <peng....@nxp.com>
Cc: Robby Cai <robby....@nxp.com>
Cc: Sam Ravnborg <s...@ravnborg.org>
Cc: Stefan Agner <ste...@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

Reply via email to