Am Freitag, dem 11.03.2022 um 18:05 +0100 schrieb Marek Vasut: > 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 <[email protected]> > Cc: Alexander Stein <[email protected]> > Cc: Laurent Pinchart <[email protected]> > Cc: Lucas Stach <[email protected]> > Cc: Peng Fan <[email protected]> > Cc: Robby Cai <[email protected]> > Cc: Sam Ravnborg <[email protected]> > Cc: Stefan Agner <[email protected]>
Hm, I don't see any real benefit, but I also fail to see why it shouldn't be done so: Reviewed-by: Lucas Stach <[email protected]> > --- > 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) > {
