* [PATCH] drm: Don't set the plane->fb to NULL on successfull set_plane
@ 2013-02-15 20:21 Daniel Vetter
2013-02-15 20:24 ` Jesse Barnes
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Daniel Vetter @ 2013-02-15 20:21 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter, DRI Development, Rob Clark
We need to clear the local variable to get the refcounting right
(since the reference drm_mode_setplane holds is transferred to the
plane->fb pointer). But should be done _after_ we update the pointer.
Breakage introduced in
commit 6c2a75325c800de286166c693e0cd33c3a1c5ec8
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Tue Dec 11 00:59:24 2012 +0100
drm: refcounting for sprite framebuffers
Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Rob Clark <rob@ti.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/drm_crtc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 826a5ca..1960418 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1982,9 +1982,9 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
plane_req->src_w, plane_req->src_h);
if (!ret) {
old_fb = plane->fb;
- fb = NULL;
plane->crtc = crtc;
plane->fb = fb;
+ fb = NULL;
}
drm_modeset_unlock_all(dev);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] drm: Don't set the plane->fb to NULL on successfull set_plane
2013-02-15 20:21 [PATCH] drm: Don't set the plane->fb to NULL on successfull set_plane Daniel Vetter
@ 2013-02-15 20:24 ` Jesse Barnes
2013-02-15 20:26 ` Ville Syrjälä
2013-02-19 15:37 ` Thierry Reding
2 siblings, 0 replies; 4+ messages in thread
From: Jesse Barnes @ 2013-02-15 20:24 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Rob Clark, Intel Graphics Development, DRI Development
On Fri, 15 Feb 2013 21:21:37 +0100
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> We need to clear the local variable to get the refcounting right
> (since the reference drm_mode_setplane holds is transferred to the
> plane->fb pointer). But should be done _after_ we update the pointer.
>
> Breakage introduced in
>
> commit 6c2a75325c800de286166c693e0cd33c3a1c5ec8
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date: Tue Dec 11 00:59:24 2012 +0100
>
> drm: refcounting for sprite framebuffers
>
> Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: Rob Clark <rob@ti.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/drm_crtc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 826a5ca..1960418 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -1982,9 +1982,9 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
> plane_req->src_w, plane_req->src_h);
> if (!ret) {
> old_fb = plane->fb;
> - fb = NULL;
> plane->crtc = crtc;
> plane->fb = fb;
> + fb = NULL;
> }
> drm_modeset_unlock_all(dev);
>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This will allow us to restore the sprite config in no-VT switch resumes.
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] drm: Don't set the plane->fb to NULL on successfull set_plane
2013-02-15 20:21 [PATCH] drm: Don't set the plane->fb to NULL on successfull set_plane Daniel Vetter
2013-02-15 20:24 ` Jesse Barnes
@ 2013-02-15 20:26 ` Ville Syrjälä
2013-02-19 15:37 ` Thierry Reding
2 siblings, 0 replies; 4+ messages in thread
From: Ville Syrjälä @ 2013-02-15 20:26 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Rob Clark, Intel Graphics Development, DRI Development
On Fri, Feb 15, 2013 at 09:21:37PM +0100, Daniel Vetter wrote:
> We need to clear the local variable to get the refcounting right
> (since the reference drm_mode_setplane holds is transferred to the
> plane->fb pointer). But should be done _after_ we update the pointer.
>
> Breakage introduced in
>
> commit 6c2a75325c800de286166c693e0cd33c3a1c5ec8
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date: Tue Dec 11 00:59:24 2012 +0100
>
> drm: refcounting for sprite framebuffers
>
> Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: Rob Clark <rob@ti.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/drm_crtc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 826a5ca..1960418 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -1982,9 +1982,9 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
> plane_req->src_w, plane_req->src_h);
> if (!ret) {
> old_fb = plane->fb;
> - fb = NULL;
> plane->crtc = crtc;
> plane->fb = fb;
> + fb = NULL;
> }
> drm_modeset_unlock_all(dev);
>
> --
> 1.7.10.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] drm: Don't set the plane->fb to NULL on successfull set_plane
2013-02-15 20:21 [PATCH] drm: Don't set the plane->fb to NULL on successfull set_plane Daniel Vetter
2013-02-15 20:24 ` Jesse Barnes
2013-02-15 20:26 ` Ville Syrjälä
@ 2013-02-19 15:37 ` Thierry Reding
2 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2013-02-19 15:37 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Rob Clark, Intel Graphics Development, DRI Development
[-- Attachment #1.1: Type: text/plain, Size: 1436 bytes --]
On Fri, Feb 15, 2013 at 09:21:37PM +0100, Daniel Vetter wrote:
> We need to clear the local variable to get the refcounting right
> (since the reference drm_mode_setplane holds is transferred to the
> plane->fb pointer). But should be done _after_ we update the pointer.
>
> Breakage introduced in
>
> commit 6c2a75325c800de286166c693e0cd33c3a1c5ec8
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date: Tue Dec 11 00:59:24 2012 +0100
>
> drm: refcounting for sprite framebuffers
>
> Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: Rob Clark <rob@ti.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/drm_crtc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 826a5ca..1960418 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -1982,9 +1982,9 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
> plane_req->src_w, plane_req->src_h);
> if (!ret) {
> old_fb = plane->fb;
> - fb = NULL;
> plane->crtc = crtc;
> plane->fb = fb;
> + fb = NULL;
> }
> drm_modeset_unlock_all(dev);
>
Ugh... and again I sent the same patch because I didn't look properly
and missed yours.
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-19 15:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-15 20:21 [PATCH] drm: Don't set the plane->fb to NULL on successfull set_plane Daniel Vetter
2013-02-15 20:24 ` Jesse Barnes
2013-02-15 20:26 ` Ville Syrjälä
2013-02-19 15:37 ` Thierry Reding
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.