Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1605199 > unrolled thread

[PATCH v3 3/3] drm: Clarify the role of plane_state argument to drm_simple update().

Started byEric Anholt <eric@anholt.net>
First post2017-03-21 00:40 +0100
Last post2017-03-21 08:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 3/3] drm: Clarify the role of plane_state argument to drm_simple update(). Eric Anholt <eric@anholt.net> - 2017-03-21 00:40 +0100
    Re: [PATCH v3 3/3] drm: Clarify the role of plane_state argument to  drm_simple update(). Daniel Vetter <daniel@ffwll.ch> - 2017-03-21 08:40 +0100

#1605199 — [PATCH v3 3/3] drm: Clarify the role of plane_state argument to drm_simple update().

FromEric Anholt <eric@anholt.net>
Date2017-03-21 00:40 +0100
Subject[PATCH v3 3/3] drm: Clarify the role of plane_state argument to drm_simple update().
Message-ID<tnf46-3s4-7@gated-at.bofh.it>
Like the atomic update hook it's wrapping, the plane_state is the old
one, and the new one is in plane->state.  Both msxfb and tinydrm use
it correctly, but I mistook it for the new state in pl111 due to its
naming.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 drivers/gpu/drm/drm_simple_kms_helper.c | 4 ++--
 include/drm/drm_simple_kms_helper.h     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c
index 16789faa9291..e084f9f8ca66 100644
--- a/drivers/gpu/drm/drm_simple_kms_helper.c
+++ b/drivers/gpu/drm/drm_simple_kms_helper.c
@@ -114,7 +114,7 @@ static int drm_simple_kms_plane_atomic_check(struct drm_plane *plane,
 }
 
 static void drm_simple_kms_plane_atomic_update(struct drm_plane *plane,
-					struct drm_plane_state *pstate)
+					struct drm_plane_state *old_pstate)
 {
 	struct drm_simple_display_pipe *pipe;
 
@@ -122,7 +122,7 @@ static void drm_simple_kms_plane_atomic_update(struct drm_plane *plane,
 	if (!pipe->funcs || !pipe->funcs->update)
 		return;
 
-	pipe->funcs->update(pipe, pstate);
+	pipe->funcs->update(pipe, old_pstate);
 }
 
 static int drm_simple_kms_plane_prepare_fb(struct drm_plane *plane,
diff --git a/include/drm/drm_simple_kms_helper.h b/include/drm/drm_simple_kms_helper.h
index fffbb95a0915..2d36538e4a17 100644
--- a/include/drm/drm_simple_kms_helper.h
+++ b/include/drm/drm_simple_kms_helper.h
@@ -72,7 +72,7 @@ struct drm_simple_display_pipe_funcs {
 	 * the hardware lacks vblank support entirely.
 	 */
 	void (*update)(struct drm_simple_display_pipe *pipe,
-		       struct drm_plane_state *plane_state);
+		       struct drm_plane_state *old_plane_state);
 
 	/**
 	 * @prepare_fb:
-- 
2.11.0

[toc] | [next] | [standalone]


#1605367 — Re: [PATCH v3 3/3] drm: Clarify the role of plane_state argument to drm_simple update().

FromDaniel Vetter <daniel@ffwll.ch>
Date2017-03-21 08:40 +0100
SubjectRe: [PATCH v3 3/3] drm: Clarify the role of plane_state argument to drm_simple update().
Message-ID<tnmyB-8M-11@gated-at.bofh.it>
In reply to#1605199
On Mon, Mar 20, 2017 at 04:36:15PM -0700, Eric Anholt wrote:
> Like the atomic update hook it's wrapping, the plane_state is the old
> one, and the new one is in plane->state.  Both msxfb and tinydrm use
> it correctly, but I mistook it for the new state in pl111 due to its
> naming.
> 
> Signed-off-by: Eric Anholt <eric@anholt.net>

We could do the same rename in mxsfb, and maybe extend the kernel-doc a
bit more to document the parameters. But this is a good change already, so

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/drm_simple_kms_helper.c | 4 ++--
>  include/drm/drm_simple_kms_helper.h     | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c
> index 16789faa9291..e084f9f8ca66 100644
> --- a/drivers/gpu/drm/drm_simple_kms_helper.c
> +++ b/drivers/gpu/drm/drm_simple_kms_helper.c
> @@ -114,7 +114,7 @@ static int drm_simple_kms_plane_atomic_check(struct drm_plane *plane,
>  }
>  
>  static void drm_simple_kms_plane_atomic_update(struct drm_plane *plane,
> -					struct drm_plane_state *pstate)
> +					struct drm_plane_state *old_pstate)
>  {
>  	struct drm_simple_display_pipe *pipe;
>  
> @@ -122,7 +122,7 @@ static void drm_simple_kms_plane_atomic_update(struct drm_plane *plane,
>  	if (!pipe->funcs || !pipe->funcs->update)
>  		return;
>  
> -	pipe->funcs->update(pipe, pstate);
> +	pipe->funcs->update(pipe, old_pstate);
>  }
>  
>  static int drm_simple_kms_plane_prepare_fb(struct drm_plane *plane,
> diff --git a/include/drm/drm_simple_kms_helper.h b/include/drm/drm_simple_kms_helper.h
> index fffbb95a0915..2d36538e4a17 100644
> --- a/include/drm/drm_simple_kms_helper.h
> +++ b/include/drm/drm_simple_kms_helper.h
> @@ -72,7 +72,7 @@ struct drm_simple_display_pipe_funcs {
>  	 * the hardware lacks vblank support entirely.
>  	 */
>  	void (*update)(struct drm_simple_display_pipe *pipe,
> -		       struct drm_plane_state *plane_state);
> +		       struct drm_plane_state *old_plane_state);
>  
>  	/**
>  	 * @prepare_fb:
> -- 
> 2.11.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web