Skip to contentSkip to conversation

drm: Clean up planes in atomic commit helper failure path

PATCH In review Laurent Pinchart 2 participants 2 messages Jan 2, 2017 – Jan 4, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: Clean up planes in atomic commit helper failure path

If waiting for fences fails for blocking commits, planes must be cleaned up before returning.

Fixes f6ce410a59a4 ("drm/fence: allow fence waiting to be interrupted by userspace")
---
 drivers/gpu/drm/drm_atomic_helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_atomic_helper.c +3 -1
index 2099868ee9f7..2bde19a64dd6 100644
@@ -1259,8 +1259,10 @@ int drm_atomic_helper_commit(struct drm_device *dev,
 
 	if (!nonblock) {
 		ret = drm_atomic_helper_wait_for_fences(dev, state, true);
-		if (ret)
+		if (ret) {
+			drm_atomic_helper_cleanup_planes(dev, state);
 			return ret;
+		}
 	}
 
 	/*
Signature · 8 lines
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 6 lines · Laurent Pinchart

If waiting for fences fails for blocking commits, planes must be cleaned up before returning.

Fixes f6ce410a59a4 ("drm/fence: allow fence waiting to be interrupted by userspace")

Nice catch. Applied to drm-misc-fixes, will send a pull to Dave soonish. -Daniel

Quoted 29 lines
---
 drivers/gpu/drm/drm_atomic_helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_atomic_helper.c +3 -1
index 2099868ee9f7..2bde19a64dd6 100644
@@ -1259,8 +1259,10 @@ int drm_atomic_helper_commit(struct drm_device *dev,
 
 	if (!nonblock) {
 		ret = drm_atomic_helper_wait_for_fences(dev, state, true);
-		if (ret)
+		if (ret) {
+			drm_atomic_helper_cleanup_planes(dev, state);
 			return ret;
+		}
 	}
 
 	/*
Signature · 8 lines
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel