intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/7] drm/i915: Do not use commit_plane for sprite planes.
Date: Thu, 7 Jan 2016 14:20:59 +0200	[thread overview]
Message-ID: <20160107122059.GU4437@intel.com> (raw)
In-Reply-To: <1452164052-21752-3-git-send-email-maarten.lankhorst@linux.intel.com>

On Thu, Jan 07, 2016 at 11:54:07AM +0100, Maarten Lankhorst wrote:
> Use update_plane and disable_plane directly.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/intel_atomic_plane.c | 12 +++++++++++-
>  drivers/gpu/drm/i915/intel_sprite.c       | 19 -------------------
>  2 files changed, 11 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
> index 856c3118bb87..969aa410deaa 100644
> --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
> @@ -194,8 +194,18 @@ static void intel_plane_atomic_update(struct drm_plane *plane,
>  	struct intel_plane *intel_plane = to_intel_plane(plane);
>  	struct intel_plane_state *intel_state =
>  		to_intel_plane_state(plane->state);
> +	struct drm_crtc *crtc = plane->state->crtc ?: old_state->crtc;
> +	struct drm_crtc_state *crtc_state =
> +		drm_atomic_get_existing_crtc_state(old_state->state, crtc);
>  
> -	intel_plane->commit_plane(plane, intel_state);
> +	if (intel_plane->commit_plane)
> +		intel_plane->commit_plane(plane, intel_state);
> +	else if (intel_state->visible)
> +		intel_plane->update_plane(plane,
> +					  to_intel_crtc_state(crtc_state),
> +					  intel_state);
> +	else
> +		intel_plane->disable_plane(plane, crtc);
>  }
>  
>  const struct drm_plane_helper_funcs intel_plane_helper_funcs = {
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 9f64289333e8..4d448b990c50 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -931,24 +931,6 @@ intel_check_sprite_plane(struct drm_plane *plane,
>  	return 0;
>  }
>  
> -static void
> -intel_commit_sprite_plane(struct drm_plane *plane,
> -			  struct intel_plane_state *state)
> -{
> -	struct intel_plane *intel_plane = to_intel_plane(plane);
> -
> -	if (state->visible) {
> -		struct intel_crtc_state *crtc_state =
> -			to_intel_crtc(state->base.crtc)->config;
> -
> -		intel_plane->update_plane(plane, crtc_state, state);
> -	} else {
> -		struct drm_crtc *crtc = state->base.crtc;
> -
> -		intel_plane->disable_plane(plane, crtc ?: plane->crtc);
> -	}
> -}
> -
>  int intel_sprite_set_colorkey(struct drm_device *dev, void *data,
>  			      struct drm_file *file_priv)
>  {
> @@ -1130,7 +1112,6 @@ intel_plane_init(struct drm_device *dev, enum pipe pipe, int plane)
>  	intel_plane->plane = plane;
>  	intel_plane->frontbuffer_bit = INTEL_FRONTBUFFER_SPRITE(pipe, plane);
>  	intel_plane->check_plane = intel_check_sprite_plane;
> -	intel_plane->commit_plane = intel_commit_sprite_plane;
>  	possible_crtcs = (1 << pipe);
>  	ret = drm_universal_plane_init(dev, &intel_plane->base, possible_crtcs,
>  				       &intel_plane_funcs,
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-01-07 12:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-07 10:54 [PATCH 0/7] Explicitly pass crtc_state and plane_state to plane update functions Maarten Lankhorst
2016-01-07 10:54 ` [PATCH 1/7] drm/i915: Use passed plane state for sprite planes, v4 Maarten Lankhorst
2016-01-07 12:15   ` Ville Syrjälä
2016-01-07 10:54 ` [PATCH 2/7] drm/i915: Do not use commit_plane for sprite planes Maarten Lankhorst
2016-01-07 12:20   ` Ville Syrjälä [this message]
2016-01-07 10:54 ` [PATCH 3/7] drm/i915: Remove some visibility checks from intel_crtc_update_cursor Maarten Lankhorst
2016-01-07 12:22   ` Ville Syrjälä
2016-01-07 10:54 ` [PATCH 4/7] drm/i915: Make disable_cursor_plane similar to commit_cursor_plane Maarten Lankhorst
2016-01-07 12:25   ` Ville Syrjälä
2016-01-07 10:54 ` [PATCH 5/7] drm/i915: Use the plane state for cursor updates Maarten Lankhorst
2016-01-07 12:29   ` Ville Syrjälä
2016-01-07 10:54 ` [PATCH 6/7] drm/i915: Use plane state for primary plane updates Maarten Lankhorst
2016-01-07 12:38   ` Ville Syrjälä
2016-01-07 10:54 ` [PATCH 7/7] drm/i915: Remove commit_plane function pointer Maarten Lankhorst
2016-01-07 12:39   ` Ville Syrjälä
2016-01-11  8:53 ` ✗ failure: Fi.CI.BAT Patchwork

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=20160107122059.GU4437@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    /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).