All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm: Simplify fb refcounting rules around ->update_plane
Date: Tue, 22 Apr 2014 11:16:02 +0200	[thread overview]
Message-ID: <20140422091600.GA22133@ulmo> (raw)
In-Reply-To: <1398157633-31043-1-git-send-email-daniel.vetter@ffwll.ch>


[-- Attachment #1.1: Type: text/plain, Size: 1400 bytes --]

On Tue, Apr 22, 2014 at 11:07:13AM +0200, Daniel Vetter wrote:
[...]
> diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
> index e768d35ff22e..8db129c44fea 100644
> --- a/drivers/gpu/drm/drm_plane_helper.c
> +++ b/drivers/gpu/drm/drm_plane_helper.c
> @@ -175,22 +175,7 @@ int drm_primary_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
>  	set.connectors = connector_list;
>  	set.num_connectors = num_connectors;
>  
> -	/*
> -	 * set_config() adjusts crtc->primary->fb; however the DRM setplane
> -	 * code that called us expects to handle the framebuffer update and
> -	 * reference counting; save and restore the current fb before
> -	 * calling it.
> -	 *
> -	 * N.B., we call set_config() directly here rather than using
> -	 * drm_mode_set_config_internal.  We're reprogramming the same
> -	 * connectors that were already in use, so we shouldn't need the extra
> -	 * cross-CRTC fb refcounting to accomodate stealing connectors.
> -	 * drm_mode_setplane() already handles the basic refcounting for the
> -	 * framebuffers involved in this operation.
> -	 */
> -	tmpfb = plane->fb;
>  	ret = crtc->funcs->set_config(&set);
> -	plane->fb = tmpfb;

This makes tmpfb unused. Other than that this looks sane to me and it
doesn't make things worse from what I can tell:

Tested-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-04-22  9:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22  9:07 [PATCH] drm: Simplify fb refcounting rules around ->update_plane Daniel Vetter
2014-04-22  9:16 ` Thierry Reding [this message]
2014-04-22 10:06 ` Ville Syrjälä
2014-04-22 14:09   ` Daniel Vetter
2014-04-22 14:28     ` Ville Syrjälä
2014-04-22 14:37       ` Daniel Vetter
2014-04-22 14:19   ` Daniel Vetter
2014-04-23  1:08     ` Matt Roper
2014-04-23  6:36       ` Daniel Vetter
2014-04-23  6:41         ` Daniel Vetter
2014-04-23  8:30           ` [PATCH 1/2] " Daniel Vetter
2014-04-23  8:30             ` [PATCH 2/2] drm: Handle ->disable_plane failures correctly Daniel Vetter
2014-04-23 14:47               ` Matt Roper
2014-04-23 14:45             ` [PATCH 1/2] drm: Simplify fb refcounting rules around ->update_plane Matt Roper
2014-04-23 15:25               ` Daniel Vetter
2014-04-23 15:37                 ` [PATCH] " Daniel Vetter
2014-04-23 15:59                   ` Matt Roper

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=20140422091600.GA22133@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@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 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.