All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@linux.ie>, Chen-Yu Tsai <wens@csie.org>
Cc: linux-arm-kernel@lists.infradead.org,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	thomas@vitsch.nl
Subject: Re: [PATCH 1/8] drm/sun4i: backend: Move line stride setup to buffer setup function
Date: Wed, 13 Dec 2017 17:03:02 +0100	[thread overview]
Message-ID: <1b65d7ce-99f9-7df5-56c5-829dc27b4b73@baylibre.com> (raw)
In-Reply-To: <bf7958df88df8014866fc2dcacfeb1bea45a5659.1513178989.git-series.maxime.ripard@free-electrons.com>

On 13/12/2017 16:33, Maxime Ripard wrote:
> Setup the line stride in the buffer setup function, since it's tied to the
> buffer itself, and is not needed when we do not set the buffer in the
> backend.
> 
> This is for example the case when using the frontend and then routing its
> output to the backend.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  drivers/gpu/drm/sun4i/sun4i_backend.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
> index 847eecbe4d14..c99d1a7e815a 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_backend.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
> @@ -141,7 +141,6 @@ int sun4i_backend_update_layer_coord(struct sun4i_backend *backend,
>  				     int layer, struct drm_plane *plane)
>  {
>  	struct drm_plane_state *state = plane->state;
> -	struct drm_framebuffer *fb = state->fb;
>  
>  	DRM_DEBUG_DRIVER("Updating layer %d\n", layer);
>  
> @@ -153,12 +152,6 @@ int sun4i_backend_update_layer_coord(struct sun4i_backend *backend,
>  						   state->crtc_h));
>  	}
>  
> -	/* Set the line width */
> -	DRM_DEBUG_DRIVER("Layer line width: %d bits\n", fb->pitches[0] * 8);
> -	regmap_write(backend->engine.regs,
> -		     SUN4I_BACKEND_LAYLINEWIDTH_REG(layer),
> -		     fb->pitches[0] * 8);
> -
>  	/* Set height and width */
>  	DRM_DEBUG_DRIVER("Layer size W: %u H: %u\n",
>  			 state->crtc_w, state->crtc_h);
> @@ -218,6 +211,13 @@ int sun4i_backend_update_layer_buffer(struct sun4i_backend *backend,
>  	u32 lo_paddr, hi_paddr;
>  	dma_addr_t paddr;
>  
> +	/* Set the line width */
> +	DRM_DEBUG_DRIVER("Layer line width: %d bits\n", fb->pitches[0] * 8);
> +	regmap_write(backend->engine.regs,
> +		     SUN4I_BACKEND_LAYLINEWIDTH_REG(layer),
> +		     fb->pitches[0] * 8);
> +
> +
>  	/* Get the start of the displayed memory */
>  	paddr = drm_fb_cma_get_gem_addr(fb, state, 0);
>  	DRM_DEBUG_DRIVER("Setting buffer address to %pad\n", &paddr);
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

WARNING: multiple messages have this Message-ID (diff)
From: narmstrong@baylibre.com (Neil Armstrong)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/8] drm/sun4i: backend: Move line stride setup to buffer setup function
Date: Wed, 13 Dec 2017 17:03:02 +0100	[thread overview]
Message-ID: <1b65d7ce-99f9-7df5-56c5-829dc27b4b73@baylibre.com> (raw)
In-Reply-To: <bf7958df88df8014866fc2dcacfeb1bea45a5659.1513178989.git-series.maxime.ripard@free-electrons.com>

On 13/12/2017 16:33, Maxime Ripard wrote:
> Setup the line stride in the buffer setup function, since it's tied to the
> buffer itself, and is not needed when we do not set the buffer in the
> backend.
> 
> This is for example the case when using the frontend and then routing its
> output to the backend.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  drivers/gpu/drm/sun4i/sun4i_backend.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
> index 847eecbe4d14..c99d1a7e815a 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_backend.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
> @@ -141,7 +141,6 @@ int sun4i_backend_update_layer_coord(struct sun4i_backend *backend,
>  				     int layer, struct drm_plane *plane)
>  {
>  	struct drm_plane_state *state = plane->state;
> -	struct drm_framebuffer *fb = state->fb;
>  
>  	DRM_DEBUG_DRIVER("Updating layer %d\n", layer);
>  
> @@ -153,12 +152,6 @@ int sun4i_backend_update_layer_coord(struct sun4i_backend *backend,
>  						   state->crtc_h));
>  	}
>  
> -	/* Set the line width */
> -	DRM_DEBUG_DRIVER("Layer line width: %d bits\n", fb->pitches[0] * 8);
> -	regmap_write(backend->engine.regs,
> -		     SUN4I_BACKEND_LAYLINEWIDTH_REG(layer),
> -		     fb->pitches[0] * 8);
> -
>  	/* Set height and width */
>  	DRM_DEBUG_DRIVER("Layer size W: %u H: %u\n",
>  			 state->crtc_w, state->crtc_h);
> @@ -218,6 +211,13 @@ int sun4i_backend_update_layer_buffer(struct sun4i_backend *backend,
>  	u32 lo_paddr, hi_paddr;
>  	dma_addr_t paddr;
>  
> +	/* Set the line width */
> +	DRM_DEBUG_DRIVER("Layer line width: %d bits\n", fb->pitches[0] * 8);
> +	regmap_write(backend->engine.regs,
> +		     SUN4I_BACKEND_LAYLINEWIDTH_REG(layer),
> +		     fb->pitches[0] * 8);
> +
> +
>  	/* Get the start of the displayed memory */
>  	paddr = drm_fb_cma_get_gem_addr(fb, state, 0);
>  	DRM_DEBUG_DRIVER("Setting buffer address to %pad\n", &paddr);
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

WARNING: multiple messages have this Message-ID (diff)
From: Neil Armstrong <narmstrong@baylibre.com>
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@linux.ie>, Chen-Yu Tsai <wens@csie.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, thomas@vitsch.nl
Subject: Re: [PATCH 1/8] drm/sun4i: backend: Move line stride setup to buffer setup function
Date: Wed, 13 Dec 2017 17:03:02 +0100	[thread overview]
Message-ID: <1b65d7ce-99f9-7df5-56c5-829dc27b4b73@baylibre.com> (raw)
In-Reply-To: <bf7958df88df8014866fc2dcacfeb1bea45a5659.1513178989.git-series.maxime.ripard@free-electrons.com>

On 13/12/2017 16:33, Maxime Ripard wrote:
> Setup the line stride in the buffer setup function, since it's tied to the
> buffer itself, and is not needed when we do not set the buffer in the
> backend.
> 
> This is for example the case when using the frontend and then routing its
> output to the backend.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  drivers/gpu/drm/sun4i/sun4i_backend.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
> index 847eecbe4d14..c99d1a7e815a 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_backend.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
> @@ -141,7 +141,6 @@ int sun4i_backend_update_layer_coord(struct sun4i_backend *backend,
>  				     int layer, struct drm_plane *plane)
>  {
>  	struct drm_plane_state *state = plane->state;
> -	struct drm_framebuffer *fb = state->fb;
>  
>  	DRM_DEBUG_DRIVER("Updating layer %d\n", layer);
>  
> @@ -153,12 +152,6 @@ int sun4i_backend_update_layer_coord(struct sun4i_backend *backend,
>  						   state->crtc_h));
>  	}
>  
> -	/* Set the line width */
> -	DRM_DEBUG_DRIVER("Layer line width: %d bits\n", fb->pitches[0] * 8);
> -	regmap_write(backend->engine.regs,
> -		     SUN4I_BACKEND_LAYLINEWIDTH_REG(layer),
> -		     fb->pitches[0] * 8);
> -
>  	/* Set height and width */
>  	DRM_DEBUG_DRIVER("Layer size W: %u H: %u\n",
>  			 state->crtc_w, state->crtc_h);
> @@ -218,6 +211,13 @@ int sun4i_backend_update_layer_buffer(struct sun4i_backend *backend,
>  	u32 lo_paddr, hi_paddr;
>  	dma_addr_t paddr;
>  
> +	/* Set the line width */
> +	DRM_DEBUG_DRIVER("Layer line width: %d bits\n", fb->pitches[0] * 8);
> +	regmap_write(backend->engine.regs,
> +		     SUN4I_BACKEND_LAYLINEWIDTH_REG(layer),
> +		     fb->pitches[0] * 8);
> +
> +
>  	/* Get the start of the displayed memory */
>  	paddr = drm_fb_cma_get_gem_addr(fb, state, 0);
>  	DRM_DEBUG_DRIVER("Setting buffer address to %pad\n", &paddr);
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-12-13 16:03 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1513181781-0808628882.0a9bc10eb7@prakkezator.vehosting.nl>
2017-12-13 15:33 ` [PATCH 0/8] drm/sun4i: Support the Display Engine frontend Maxime Ripard
2017-12-13 15:33   ` Maxime Ripard
2017-12-13 15:33   ` Maxime Ripard
2017-12-13 15:33   ` [PATCH 1/8] drm/sun4i: backend: Move line stride setup to buffer setup function Maxime Ripard
2017-12-13 15:33     ` Maxime Ripard
2017-12-13 15:33     ` Maxime Ripard
2017-12-13 16:03     ` Neil Armstrong [this message]
2017-12-13 16:03       ` Neil Armstrong
2017-12-13 16:03       ` Neil Armstrong
2017-12-13 15:33   ` [PATCH 2/8] drm/sun4i: backend: Allow a NULL plane pointer to retrieve the format Maxime Ripard
2017-12-13 15:33     ` Maxime Ripard
2017-12-13 15:33     ` Maxime Ripard
2017-12-13 16:03     ` Neil Armstrong
2017-12-13 16:03       ` Neil Armstrong
2017-12-13 16:03       ` Neil Armstrong
2017-12-13 15:33   ` [PATCH 3/8] drm/sun4i: sun4i_layer: Add a custom plane state Maxime Ripard
2017-12-13 15:33     ` Maxime Ripard
2017-12-13 15:33     ` Maxime Ripard
2017-12-13 16:05     ` Neil Armstrong
2017-12-13 16:05       ` Neil Armstrong
2017-12-13 16:05       ` Neil Armstrong
2017-12-13 15:33   ` [PATCH 4/8] drm/sun4i: crtc: Add a custom crtc atomic_check Maxime Ripard
2017-12-13 15:33     ` Maxime Ripard
2017-12-13 15:33     ` Maxime Ripard
2017-12-13 16:06     ` Neil Armstrong
2017-12-13 16:06       ` Neil Armstrong
2017-12-13 16:06       ` Neil Armstrong
2017-12-13 15:33   ` [PATCH 5/8] drm/sun4i: Add a driver for the display frontend Maxime Ripard
2017-12-13 15:33     ` Maxime Ripard
2017-12-13 15:33     ` Maxime Ripard
2017-12-13 16:10     ` Neil Armstrong
2017-12-13 16:10       ` Neil Armstrong
2017-12-13 16:10       ` Neil Armstrong
2017-12-16  7:00     ` kbuild test robot
2017-12-16  7:00       ` kbuild test robot
2017-12-16  7:00       ` kbuild test robot
2017-12-13 15:33   ` [PATCH 6/8] drm/sun4i: sun4i_layer: Wire in the frontend Maxime Ripard
2017-12-13 15:33     ` Maxime Ripard
2017-12-13 16:11     ` Neil Armstrong
2017-12-13 16:11       ` Neil Armstrong
2017-12-13 16:11       ` Neil Armstrong
2017-12-13 16:23     ` Thomas van Kleef
2017-12-13 16:23       ` Thomas van Kleef
2017-12-14 10:32       ` Maxime Ripard
2017-12-14 10:32         ` Maxime Ripard
2017-12-14 10:32         ` Maxime Ripard
2017-12-16  9:17     ` kbuild test robot
2017-12-16  9:17       ` kbuild test robot
2017-12-16  9:17       ` kbuild test robot
2017-12-13 15:33   ` [PATCH 7/8] drm/sun4i: sun4i_layer: Add a custom atomic_check for " Maxime Ripard
2017-12-13 15:33     ` Maxime Ripard
2017-12-13 15:33     ` Maxime Ripard
2017-12-13 16:12     ` Neil Armstrong
2017-12-13 16:12       ` Neil Armstrong
2017-12-13 16:12       ` Neil Armstrong
2017-12-13 15:33   ` [PATCH 8/8] ARM: dts: sun8i: a33 Enable our display frontend Maxime Ripard
2017-12-13 15:33     ` Maxime Ripard
2017-12-13 16:16   ` [PATCH 0/8] drm/sun4i: Support the Display Engine frontend Thomas van Kleef
2017-12-13 16:16     ` Thomas van Kleef
2017-12-14  8:35     ` Maxime Ripard
2017-12-14  8:35       ` Maxime Ripard
2017-12-14  8:35       ` Maxime Ripard

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=1b65d7ce-99f9-7df5-56c5-829dc27b4b73@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=thomas@vitsch.nl \
    --cc=wens@csie.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.