[PATCH xf86-video-amdgpu] Remove drmmode_terminate_leases

Michel Dänzer michel at daenzer.net
Wed Jul 18 16:29:04 UTC 2018


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

The RandR screen private is already freed when our CloseScreen runs, so
this can't do anything useful. This cleanup has to be done by the X
server itself.

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/amdgpu_kms.c      |  1 -
 src/drmmode_display.c | 20 --------------------
 src/drmmode_display.h |  2 --
 3 files changed, 23 deletions(-)

diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 39e047e29..d2ab7ee2b 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -1705,7 +1705,6 @@ static Bool AMDGPUCloseScreen_KMS(ScreenPtr pScreen)
 	/* Clear mask of assigned crtc's in this generation */
 	pAMDGPUEnt->assigned_crtcs = 0;
 
-	drmmode_terminate_leases(pScrn);
 	drmmode_uevent_fini(pScrn, &info->drmmode);
 	amdgpu_drm_queue_close(pScrn);
 
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 22220223e..1aefd199b 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -3063,26 +3063,6 @@ drmmode_terminate_lease(RRLeasePtr lease)
 
 #endif // XF86_LEASE_VERSION
 
-void
-drmmode_terminate_leases(ScrnInfoPtr pScrn)
-{
-#ifdef XF86_LEASE_VERSION
-	ScreenPtr screen = xf86ScrnToScreen(pScrn);
-	AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(pScrn);
-	rrScrPrivPtr scr_priv = rrGetScrPriv(screen);
-	RRLeasePtr lease, next;
-
-	xorg_list_for_each_entry_safe(lease, next, &scr_priv->leases, list) {
-		drmmode_lease_private_ptr lease_private = lease->devPrivate;
-		drmModeRevokeLease(pAMDGPUEnt->fd, lease_private->lessee_id);
-		free(lease_private);
-		lease->devPrivate = NULL;
-		RRLeaseTerminated(lease);
-		RRLeaseFree(lease);
-	}
-#endif
-}
-
 static const xf86CrtcConfigFuncsRec drmmode_xf86crtc_config_funcs = {
 	.resize = drmmode_xf86crtc_resize,
 #ifdef XF86_LEASE_VERSION
diff --git a/src/drmmode_display.h b/src/drmmode_display.h
index 0646752c2..8b949f79d 100644
--- a/src/drmmode_display.h
+++ b/src/drmmode_display.h
@@ -245,8 +245,6 @@ PixmapPtr drmmode_crtc_scanout_create(xf86CrtcPtr crtc,
 extern void drmmode_uevent_init(ScrnInfoPtr scrn, drmmode_ptr drmmode);
 extern void drmmode_uevent_fini(ScrnInfoPtr scrn, drmmode_ptr drmmode);
 
-extern void drmmode_terminate_leases(ScrnInfoPtr scrn);
-
 Bool drmmode_set_mode(xf86CrtcPtr crtc, struct drmmode_fb *fb,
 		      DisplayModePtr mode, int x, int y);
 
-- 
2.18.0



More information about the amd-gfx mailing list