dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Marek Vasut <marex@denx.de>, dri-devel@lists.freedesktop.org
Cc: 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: Re: [PATCH v2 4/7] drm: mxsfb: Move mxsfb_get_fb_paddr() away from register IO functions
Date: Wed, 06 Apr 2022 21:45:59 +0200	[thread overview]
Message-ID: <5f7eb7a214ec0f219c4c9ce87e6c8c87bc7f0aeb.camel@pengutronix.de> (raw)
In-Reply-To: <20220311170601.50995-4-marex@denx.de>

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 <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>

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 <l.stach@pengutronix.de>

> ---
> 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)
>  {



  reply	other threads:[~2022-04-06 19:46 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 ` [PATCH v2 4/7] drm: mxsfb: Move mxsfb_get_fb_paddr() away from register IO functions Marek Vasut
2022-04-06 19:45   ` Lucas Stach [this message]
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=5f7eb7a214ec0f219c4c9ce87e6c8c87bc7f0aeb.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=marex@denx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).