drm: Don't set the plane->fb to NULL on successfull set_plane
Subsystems (2)
PATCH 1/1 drm: Don't set the plane->fb to NULL on successfull set_plane
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 <[email protected]> Date: Tue Dec 11 00:59:24 2012 +0100
drm: refcounting for sprite framebuffers
--- drivers/gpu/drm/drm_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc.c +1 -1
@@ -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);
Signature · 1 line
1.7.10.4
Quoted 25 lines · On Fri, 15 Feb 2013 21:21:37 +0100 Daniel Vetter <[email protected]> wrote:
We need to clear the local variable to get the refcounting right (since the reference
drm_mode_setplaneholds is transferred to theplane->fbpointer). But should be done _after_ we update the pointer.Breakage introduced in
commit
6c2a75325c800de286166c693e0cd33c3a1c5ec8Author: Daniel Vetter <[email protected]> Date: Tue Dec 11 00:59:24 2012 +0100drm: refcounting for sprite framebuffers
Reported-by Jesse Barnes <[email protected]>Cc Jesse Barnes <[email protected]>Cc Rob Clark <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/drm_crtc.c +0
-0
drivers/gpu/drm/drm_crtc.c int drm_mode_setplane(struct drm_device *dev, void *data, · line 1990
Quoted 10 lines
drivers/gpu/drm/drm_crtc.c +1
-1@@ -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);
This will allow us to restore the sprite config in no-VT switch resumes.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Quoted 10 lines · Daniel Vetter
We need to clear the local variable to get the refcounting right (since the reference
drm_mode_setplaneholds is transferred to theplane->fbpointer). But should be done _after_ we update the pointer.Breakage introduced in
commit
6c2a75325c800de286166c693e0cd33c3a1c5ec8Author: Daniel Vetter <[email protected]> Date: Tue Dec 11 00:59:24 2012 +0100
Quoted 6 lines
drm: refcounting for sprite framebuffers
Reported-by Jesse Barnes <[email protected]>Cc Jesse Barnes <[email protected]>Cc Rob Clark <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Quoted 26 lines
--- drivers/gpu/drm/drm_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/drm_crtc.c +1
-1@@ -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);Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä Intel OTC
Quoted 25 lines · Daniel Vetter
We need to clear the local variable to get the refcounting right (since the reference
drm_mode_setplaneholds is transferred to theplane->fbpointer). But should be done _after_ we update the pointer.Breakage introduced in
commit
6c2a75325c800de286166c693e0cd33c3a1c5ec8Author: Daniel Vetter <[email protected]> Date: Tue Dec 11 00:59:24 2012 +0100drm: refcounting for sprite framebuffers
Reported-by Jesse Barnes <[email protected]>Cc Jesse Barnes <[email protected]>Cc Rob Clark <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/drm_crtc.c +0
-0
drivers/gpu/drm/drm_crtc.c int drm_mode_setplane(struct drm_device *dev, void *data, · line 1990
Quoted 10 lines
drivers/gpu/drm/drm_crtc.c +1
-1@@ -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.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx