diff mbox

[01/13] drm/msm: Stop consulting plane->fb/crtc

Message ID 20180405151400.11326-1-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä April 5, 2018, 3:13 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We want to get rid of plane->fb/crtc on atomic drivers. Stop
looking at them.

v2: Catch the plane->crtc case too

Cc: Rob Clark <robdclark@gmail.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> #v1
---
 drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c  | 2 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Daniel Vetter April 5, 2018, 4:33 p.m. UTC | #1
On Thu, Apr 05, 2018 at 06:13:48PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> We want to get rid of plane->fb/crtc on atomic drivers. Stop
> looking at them.
> 
> v2: Catch the plane->crtc case too
> 
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: linux-arm-msm@vger.kernel.org
> Cc: freedreno@lists.freedesktop.org
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> #v1

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

fwiw, here's how I review these:

First load a quickfix list using the following grep line:

Ggrep '\(plane\|primary\|cursor\)\S*\(fb\|crtc\)' -- drivers/gpu/drm/

But that includes the plenty of hits that do use state structs. So then I
filter for stuff without a preceeding state using vim's regexes:

\(plane\|primary\|cursor\)\(\S*state\S*\)\@!\S*\(->\|\.\)\(fb\|crtc\)

I'm feeling really bad about all this :-)

Cheers, Daniel
> ---
>  drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c  | 2 +-
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
> index 6e5e1aa54ce1..99ead8e37c72 100644
> --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
> @@ -201,7 +201,7 @@ static void blend_setup(struct drm_crtc *crtc)
>  		int idx = idxs[pipe_id];
>  		if (idx > 0) {
>  			const struct mdp_format *format =
> -					to_mdp_format(msm_framebuffer_format(plane->fb));
> +					to_mdp_format(msm_framebuffer_format(plane->state->fb));
>  			alpha[idx-1] = format->alpha_enable;
>  		}
>  	}
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
> index a9f31da7d45a..f2361f79fdce 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
> @@ -526,7 +526,7 @@ static void mdp5_plane_atomic_async_update(struct drm_plane *plane,
>  	if (plane_enabled(new_state)) {
>  		struct mdp5_ctl *ctl;
>  		struct mdp5_pipeline *pipeline =
> -					mdp5_crtc_get_pipeline(plane->crtc);
> +					mdp5_crtc_get_pipeline(new_state->crtc);
>  		int ret;
>  
>  		ret = mdp5_plane_mode_set(plane, new_state->crtc, new_state->fb,
> -- 
> 2.16.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
index 6e5e1aa54ce1..99ead8e37c72 100644
--- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
+++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
@@ -201,7 +201,7 @@  static void blend_setup(struct drm_crtc *crtc)
 		int idx = idxs[pipe_id];
 		if (idx > 0) {
 			const struct mdp_format *format =
-					to_mdp_format(msm_framebuffer_format(plane->fb));
+					to_mdp_format(msm_framebuffer_format(plane->state->fb));
 			alpha[idx-1] = format->alpha_enable;
 		}
 	}
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
index a9f31da7d45a..f2361f79fdce 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
@@ -526,7 +526,7 @@  static void mdp5_plane_atomic_async_update(struct drm_plane *plane,
 	if (plane_enabled(new_state)) {
 		struct mdp5_ctl *ctl;
 		struct mdp5_pipeline *pipeline =
-					mdp5_crtc_get_pipeline(plane->crtc);
+					mdp5_crtc_get_pipeline(new_state->crtc);
 		int ret;
 
 		ret = mdp5_plane_mode_set(plane, new_state->crtc, new_state->fb,