[PATCH xf86-video-amdgpu 4/4] Call amdgpu_drm_abort_entry on failure to flip to a scanout pixmap

Michel Dänzer michel at daenzer.net
Wed Nov 30 07:42:03 UTC 2016


From: Michel Dänzer <michel.daenzer at amd.com>

Fixes leaking the corresponding struct amdgpu_drm_queue list entry in
that case.

(Ported from radeon commit e2942449171fe628a7726e59bcaab65e27d88563)

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/amdgpu_kms.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index f8556c9..b2d098a 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -714,6 +714,7 @@ amdgpu_prime_scanout_flip(PixmapDirtyUpdatePtr ent)
 					      0, drm_queue_seq, 0) != 0) {
 		xf86DrvMsg(scrn->scrnIndex, X_WARNING, "flip queue failed in %s: %s\n",
 			   __func__, strerror(errno));
+		amdgpu_drm_abort_entry(drm_queue_seq);
 		return;
 	}
 
@@ -985,6 +986,7 @@ amdgpu_scanout_flip(ScreenPtr pScreen, AMDGPUInfoPtr info,
 					      0, drm_queue_seq, 0) != 0) {
 		xf86DrvMsg(scrn->scrnIndex, X_WARNING, "flip queue failed in %s: %s\n",
 			   __func__, strerror(errno));
+		amdgpu_drm_abort_entry(drm_queue_seq);
 		return;
 	}
 
-- 
2.10.2



More information about the amd-gfx mailing list