All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915: remove pre-atomic check from SKL update_primary_plane
Date: Thu, 1 Oct 2015 15:07:22 +0300	[thread overview]
Message-ID: <20151001120722.GD26517@intel.com> (raw)
In-Reply-To: <1443643545-3603-1-git-send-email-paulo.r.zanoni@intel.com>

On Wed, Sep 30, 2015 at 05:05:43PM -0300, Paulo Zanoni wrote:
> The comment suggests the check was there for some non-fully-atomic
> case, and I couldn't find a case where we wouldn't correctly
> initialize plane_state, so remove the check.
> 
> Let's leave a WARN there just in case.
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 34 +++++++++++++---------------------
>  1 file changed, 13 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index e547fe7..88657cb 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3131,27 +3131,19 @@ static void skylake_update_primary_plane(struct drm_crtc *crtc,
>  					       fb->pixel_format);
>  	surf_addr = intel_plane_obj_offset(to_intel_plane(plane), obj, 0);
>  
> -	/*
> -	 * FIXME: intel_plane_state->src, dst aren't set when transitional
> -	 * update_plane helpers are called from legacy paths.
> -	 * Once full atomic crtc is available, below check can be avoided.
> -	 */
> -	if (drm_rect_width(&plane_state->src)) {
> -		scaler_id = plane_state->scaler_id;
> -		src_x = plane_state->src.x1 >> 16;
> -		src_y = plane_state->src.y1 >> 16;
> -		src_w = drm_rect_width(&plane_state->src) >> 16;
> -		src_h = drm_rect_height(&plane_state->src) >> 16;
> -		dst_x = plane_state->dst.x1;
> -		dst_y = plane_state->dst.y1;
> -		dst_w = drm_rect_width(&plane_state->dst);
> -		dst_h = drm_rect_height(&plane_state->dst);
> -
> -		WARN_ON(x != src_x || y != src_y);
> -	} else {
> -		src_w = intel_crtc->config->pipe_src_w;
> -		src_h = intel_crtc->config->pipe_src_h;
> -	}
> +	WARN_ON(drm_rect_width(&plane_state->src) == 0);
> +
> +	scaler_id = plane_state->scaler_id;
> +	src_x = plane_state->src.x1 >> 16;
> +	src_y = plane_state->src.y1 >> 16;
> +	src_w = drm_rect_width(&plane_state->src) >> 16;
> +	src_h = drm_rect_height(&plane_state->src) >> 16;
> +	dst_x = plane_state->dst.x1;
> +	dst_y = plane_state->dst.y1;
> +	dst_w = drm_rect_width(&plane_state->dst);
> +	dst_h = drm_rect_height(&plane_state->dst);
> +
> +	WARN_ON(x != src_x || y != src_y);

I guess I should resurrect some of my primary plane cleanup patches
since no one else has taken the bait :(

Anyway the patch makes sense, well, assuming we've gotten better at
maintaining the plane state. Maarten might be able to answer that.
Me, I'm too lazy to look right now, so I'll give this an ack.

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

>  
>  	if (intel_rotation_90_or_270(rotation)) {
>  		/* stride = Surface height in tiles */
> -- 
> 2.5.3
> 
> _______________________________________________
> 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

      parent reply	other threads:[~2015-10-01 12:07 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23 15:52 [PATCH 0/7] FBC again: stolen + SKL fixes Paulo Zanoni
2015-09-23 15:52 ` [PATCH 1/7] drm/i915: fix CFB size calculation Paulo Zanoni
2015-09-23 16:58   ` Chris Wilson
2015-09-24 17:07   ` Ville Syrjälä
2015-09-23 15:52 ` [PATCH 2/7] drm/i915: don't use the first stolen page on Broadwell Paulo Zanoni
2015-09-23 16:55   ` Chris Wilson
2015-09-28  8:51     ` Daniel Vetter
2015-09-23 15:52 ` [PATCH 3/7] drm/i915: don't allocate fbcon from stolen memory if it's too big Paulo Zanoni
2015-09-23 16:54   ` Chris Wilson
2015-09-28  8:54     ` Daniel Vetter
2015-09-28  9:09       ` Chris Wilson
2015-09-29 14:26         ` Daniel Vetter
2015-10-08 20:19   ` Jesse Barnes
2015-10-09  7:34     ` Daniel Vetter
2015-09-23 15:52 ` [PATCH 4/7] drm/i915: export size_is_valid() from __intel_fbc_update() Paulo Zanoni
2015-09-23 17:09   ` Chris Wilson
2015-09-28  8:59     ` Daniel Vetter
2015-09-28 12:47       ` Ville Syrjälä
2015-09-28 13:13         ` Paulo Zanoni
2015-09-28 13:38           ` Ville Syrjälä
2015-09-28 13:32         ` Daniel Vetter
2015-09-23 15:52 ` [PATCH 5/7] drm/i915: fix FBC buffer size checks Paulo Zanoni
2015-09-23 16:59   ` Chris Wilson
2015-09-30 20:10     ` Zanoni, Paulo R
2015-09-23 15:52 ` [PATCH 6/7] drm/i915: use compute_page_offset() on SKL too Paulo Zanoni
2015-09-23 17:03   ` Chris Wilson
2015-09-24  9:55     ` Tvrtko Ursulin
2015-09-24 10:16       ` Chris Wilson
2015-09-24 17:10   ` Ville Syrjälä
2015-10-12 18:19     ` Hindman, Gavin
2015-10-12 21:01       ` Ville Syrjälä
2015-09-23 15:52 ` [PATCH 7/7] drm/i915: extract fbc_supported() Paulo Zanoni
2015-09-23 17:01   ` Chris Wilson
2015-09-28  8:57     ` Daniel Vetter
2015-09-30 20:05 ` [PATCH 1/3] drm/i915: remove pre-atomic check from SKL update_primary_plane Paulo Zanoni
2015-09-30 20:05   ` [PATCH 2/3] drm/i915: fix CFB size calculation Paulo Zanoni
2015-10-01 12:14     ` Ville Syrjälä
2015-10-01 12:23       ` Ville Syrjälä
2015-10-01 17:47         ` Zanoni, Paulo R
2015-10-01 18:11           ` Ville Syrjälä
2015-10-01 22:54             ` Zanoni, Paulo R
2015-10-01 22:55               ` Paulo Zanoni
2015-10-08 21:29                 ` Ville Syrjälä
2015-09-30 20:05   ` [PATCH 3/3] drm/i915: fix FBC buffer size checks Paulo Zanoni
2015-10-01 12:22     ` Ville Syrjälä
2015-10-01 18:04       ` Zanoni, Paulo R
2015-10-01 22:57         ` Paulo Zanoni
2015-10-09  7:36           ` Daniel Vetter
2015-10-01 12:07   ` Ville Syrjälä [this message]

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=20151001120722.GD26517@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@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 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.