[PATCH xf86-video-ati 1/2] Only call drmmode_uevent_init if RandR is enabled

Deucher, Alexander Alexander.Deucher at amd.com
Wed Jan 9 14:27:00 UTC 2019


Series is:

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Michel Dänzer <michel at daenzer.net>
Sent: Wednesday, January 9, 2019 5:43:22 AM
To: amd-gfx at lists.freedesktop.org
Subject: [PATCH xf86-video-ati 1/2] Only call drmmode_uevent_init if RandR is enabled

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

There's no point in listening for hotplug events if RandR is disabled,
as there's no other mechanism for them to be propagated. We were already
mostly ignoring them in that case.

Inspired by
https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel/commit/1a489142c8e6a4828348cc9afbd0f430d3b1e2d8
(via https://bugs.freedesktop.org/109230#c11).

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/drmmode_display.c | 2 +-
 src/radeon_kms.c      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index d433e0611..e04a17d5e 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -3273,7 +3273,7 @@ restart_destroy:
         /* Check to see if a lessee has disappeared */
         drmmode_validate_leases(scrn);

-       if (changed && dixPrivateKeyRegistered(rrPrivKey)) {
+       if (changed) {
 #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0)
                 RRSetChanged(xf86ScrnToScreen(scrn));
 #else
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index bb6885fb9..67f42e0fe 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -349,13 +349,13 @@ static Bool RADEONCreateScreenResources_KMS(ScreenPtr pScreen)
             RROutputChanged(rrScrPriv->primaryOutput, FALSE);
             rrScrPriv->layoutChanged = TRUE;
         }
+
+       drmmode_uevent_init(pScrn, &info->drmmode);
     }

     if (!drmmode_set_desired_modes(pScrn, &info->drmmode, pScreen->isGPU))
         return FALSE;

-    drmmode_uevent_init(pScrn, &info->drmmode);
-
     if (info->r600_shadow_fb) {
         pixmap = pScreen->GetScreenPixmap(pScreen);

--
2.20.1

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20190109/1015b3c0/attachment-0002.html>


More information about the amd-gfx mailing list