From: Daniel Vetter <daniel@ffwll.ch>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/core: Preserve the framebuffer after removing it.
Date: Wed, 9 Sep 2015 17:02:37 +0200 [thread overview]
Message-ID: <20150909150237.GN2767@phenom.ffwll.local> (raw)
In-Reply-To: <1441809657-11411-2-git-send-email-maarten.lankhorst@linux.intel.com>
On Wed, Sep 09, 2015 at 04:40:56PM +0200, Maarten Lankhorst wrote:
> Previously RMFB and fd close chose to disable any plane that had
> an active framebuffer from this file. If it was a primary plane the
> crtc was disabled. However the fbdev code or any system compositor
> should restore the planes anyway so there's no need to do it twice.
>
> The old fb_id is zero'd, so there's no danger of being able to
> restore the fb from fb_id.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
I think the current behaviour was just a side-effect of the original
implementation and not too intentional - with no refcounting for fbs they
_had_ to be synchronously reaped. And when I've done the conversion to
refcounting I kept this to avoid gettting tangled up in an ABI-change
mess.
But I don't the current behaviour makes much sense and worth an attemp to
rectify it. And as long as we still clear the fb ids there's no real
information leak either.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
But I do want other people's opinion before I pull this in.
-Daniel
> ---
> drivers/gpu/drm/drm_crtc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 9b9c4b41422a..626b0a57efbf 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -3327,7 +3327,7 @@ int drm_mode_rmfb(struct drm_device *dev,
> mutex_unlock(&dev->mode_config.fb_lock);
> mutex_unlock(&file_priv->fbs_lock);
>
> - drm_framebuffer_remove(fb);
> + drm_framebuffer_unreference(fb);
>
> return 0;
>
> @@ -3517,7 +3517,7 @@ void drm_fb_release(struct drm_file *priv)
> list_del_init(&fb->filp_head);
>
> /* This will also drop the fpriv->fbs reference. */
> - drm_framebuffer_remove(fb);
> + drm_framebuffer_unreference(fb);
> }
> }
>
> --
> 2.1.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-09-09 14:59 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 14:40 [PATCH 0/2] Preserve framebuffer during rmfb / drm fd close Maarten Lankhorst
2015-09-09 14:40 ` [PATCH 1/2] drm/core: Preserve the framebuffer after removing it Maarten Lankhorst
2015-09-09 14:51 ` Tvrtko Ursulin
2015-09-09 15:04 ` [Intel-gfx] " Daniel Vetter
2015-09-09 15:18 ` Tvrtko Ursulin
2015-09-09 15:29 ` [Intel-gfx] " Daniel Vetter
2015-09-09 15:47 ` Tvrtko Ursulin
2015-09-09 15:56 ` [Intel-gfx] " Daniel Vetter
2015-09-09 16:03 ` Tvrtko Ursulin
2015-09-09 16:07 ` Daniel Vetter
2015-09-09 16:15 ` Tvrtko Ursulin
2015-09-09 16:26 ` Maarten Lankhorst
2015-09-09 16:36 ` Tvrtko Ursulin
2015-09-09 19:06 ` [Intel-gfx] " Daniel Vetter
2015-09-10 9:07 ` Tvrtko Ursulin
2015-09-10 9:56 ` Daniel Vetter
2015-09-10 10:15 ` Tvrtko Ursulin
2015-09-22 14:53 ` David Herrmann
2015-09-22 15:21 ` Tvrtko Ursulin
2015-10-01 16:04 ` [Intel-gfx] " Vincent ABRIOU
2015-09-09 15:02 ` Daniel Vetter [this message]
2015-09-22 14:43 ` David Herrmann
2015-09-09 14:40 ` [PATCH 2/2] drm/core: Preserve the fb id on close Maarten Lankhorst
2015-09-22 14:55 ` David Herrmann
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=20150909150237.GN2767@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--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 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.