Only call drmmode_uevent_init if RandR is enabled

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
1a489142c8
(via https://bugs.freedesktop.org/109230#c11).
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Michel Dänzer
2019-01-09 11:33:18 +01:00
committed by Michel Dänzer
parent 803f872f7d
commit 38db1bbcfc
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

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