All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH xf86-video-ati] Remove drmmode_terminate_leases
Date: Mon, 23 Jul 2018 18:56:14 +0200	[thread overview]
Message-ID: <20180723165614.27160-1-michel@daenzer.net> (raw)

From: Michel Dänzer <michel.daenzer@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.

(Ported from amdgpu commit 5f06d6b8ba570b500956ad26fee711d5ac427818)

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

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index ff098975f..60c1cdc18 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2522,26 +2522,6 @@ drmmode_terminate_lease(RRLeasePtr lease)
 
 #endif // XF86_LEASE_VERSION
 
-void
-drmmode_terminate_leases(ScrnInfoPtr pScrn)
-{
-#ifdef XF86_LEASE_VERSION
-	ScreenPtr screen = xf86ScrnToScreen(pScrn);
-	RADEONEntPtr pRADEONEnt = RADEONEntPriv(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(pRADEONEnt->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 4551e0c77..c5a55891a 100644
--- a/src/drmmode_display.h
+++ b/src/drmmode_display.h
@@ -227,8 +227,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);
 
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index c8a5726ad..36840ad36 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -2154,7 +2154,6 @@ static Bool RADEONCloseScreen_KMS(ScreenPtr pScreen)
     /* Clear mask of assigned crtc's in this generation */
     pRADEONEnt->assigned_crtcs = 0;
 
-    drmmode_terminate_leases(pScrn);
     drmmode_uevent_fini(pScrn, &info->drmmode);
     radeon_drm_queue_close(pScrn);
     radeon_cs_flush_indirect(pScrn);
-- 
2.18.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

             reply	other threads:[~2018-07-23 16:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-23 16:56 Michel Dänzer [this message]
     [not found] ` <20180723165614.27160-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-07-23 17:04   ` [PATCH xf86-video-ati] Remove drmmode_terminate_leases Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180723165614.27160-1-michel@daenzer.net \
    --to=michel-otuistvhuppr7s880joybq@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.