[1/2] Only call drmmode_uevent_init if RandR is enabled

Submitted by Deucher, Alexander on Jan. 9, 2019, 2:27 p.m.

Details

Message ID BN6PR12MB18090CA1D25579CFF7BFCE3EF78B0@BN6PR12MB1809.namprd12.prod.outlook.com
State New
Headers show
Series "Series without cover letter" ( rev: 2 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Deucher, Alexander Jan. 9, 2019, 2:27 p.m.
Series is:

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

Patch hide | download patch | download mbox

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);