dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Gustavo Padovan <gustavo@padovan.org>
Cc: intel-gfx@lists.freedesktop.org,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
	dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 02/10] drm/i915: remove leftover from pre-universal planes days
Date: Tue, 23 Sep 2014 10:52:20 +0300	[thread overview]
Message-ID: <20140923075220.GY12416@intel.com> (raw)
In-Reply-To: <1411424597-31662-2-git-send-email-gustavo@padovan.org>

On Mon, Sep 22, 2014 at 07:23:09PM -0300, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> 
> Now that universal planes are in place we don't need this plane unref on
> failures.
> 
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index bef37dc..2ef1836 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -8362,8 +8362,7 @@ static bool cursor_size_ok(struct drm_device *dev,
>  /*
>   * intel_crtc_cursor_set_obj - Set cursor to specified GEM object
>   *
> - * Note that the object's reference will be consumed if the update fails.  If
> - * the update succeeds, the reference of the old object (if any) will be
> + * If the update succeeds, the reference of the old object (if any) will be
>   * consumed.

The rest of this comment should be removed as well. With universal
planes the fb holds the gem obj reference so we don't frob with
gem obj references at all here.

With that fixed this patch is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>   */
>  static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
> @@ -8395,8 +8394,7 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
>  	stride = roundup_pow_of_two(width) * 4;
>  	if (obj->base.size < stride * height) {
>  		DRM_DEBUG_KMS("buffer is too small\n");
> -		ret = -ENOMEM;
> -		goto fail;
> +		return -ENOMEM;
>  	}
>  
>  	/* we only need to pin inside GTT if cursor is non-phy */
> @@ -8485,8 +8483,6 @@ fail_unpin:
>  	i915_gem_object_unpin_from_display_plane(obj);
>  fail_locked:
>  	mutex_unlock(&dev->struct_mutex);
> -fail:
> -	drm_gem_object_unreference_unlocked(&obj->base);
>  	return ret;
>  }
>  
> -- 
> 1.9.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2014-09-23  7:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22 22:23 [PATCH v2 01/10] drm/i915: Merge of visible and !visible paths for primary planes Gustavo Padovan
2014-09-22 22:23 ` [PATCH v2 02/10] drm/i915: remove leftover from pre-universal planes days Gustavo Padovan
2014-09-23  7:52   ` Ville Syrjälä [this message]
2014-09-22 22:23 ` [PATCH v2 03/10] drm/i915: move checks of intel_crtc_cursor_set_obj() out Gustavo Padovan
2014-09-23  8:03   ` [Intel-gfx] " Ville Syrjälä
2014-09-23 15:41     ` Gustavo Padovan
2014-09-23 16:08       ` Ville Syrjälä
2014-09-22 22:23 ` [PATCH v2 04/10] drm/i915: remove intel_crtc_cursor_set_obj() Gustavo Padovan
2014-09-22 22:23 ` [PATCH v2 05/10] drm/i915: split intel_crtc_page_flip() into check() and commit() Gustavo Padovan
2014-09-22 22:23 ` [PATCH v2 06/10] drm: add helper to get crtc timings Gustavo Padovan
2014-09-22 22:23 ` [PATCH v2 07/10] drm/i915: remove intel_pipe_set_base() Gustavo Padovan
2014-09-22 22:23 ` [PATCH v2 08/10] drm/i915: create a prepare step for primary planes updates Gustavo Padovan
2014-09-22 22:23 ` [PATCH v2 09/10] drm/i915: create a prepare phase for sprite plane updates Gustavo Padovan
2014-09-22 22:23 ` [PATCH v2 10/10] drm/i915: use intel_fb_obj() macros to assign gem objects Gustavo Padovan
2014-09-23  6:32 ` [PATCH v2 01/10] drm/i915: Merge of visible and !visible paths for primary planes Chris Wilson
2014-09-23  7:45 ` Ville Syrjälä

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=20140923075220.GY12416@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=gustavo@padovan.org \
    --cc=intel-gfx@lists.freedesktop.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 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).