Only call drmmode_uevent_init if RandR is enabled
PATCH 1/2 Only call drmmode_uevent_init if RandR is enabled
From: Michel Dänzer <[email protected]>
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).
--- src/drmmode_display.c | 2 +- src/radeon_kms.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
src/drmmode_display.c +1 -1
@@ -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
src/radeon_kms.c +2 -2
@@ -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);
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190109104323.4524-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
PATCH 2/2 Only call drmmode_validate_leases if RandR is enabled
From: Michel Dänzer <[email protected]>
It would crash if RandR is disabled, e.g. because Xinerama is enabled.
Bugzilla: https://bugs.freedesktop.org/109230
--- src/drmmode_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
src/drmmode_display.c +2 -1
@@ -3100,7 +3100,8 @@ Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, }/* Validate leases on VT re-entry */ -drmmode_validate_leases (pScrn); +if (dixPrivateKeyRegistered (rrPrivKey)) +drmmode_validate_leases (pScrn);return TRUE; }
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
Reviewed-bySeries is:
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Michel Dänzer <[email protected]>
Sent: Wednesday, January 9, 2019 5:43:22 AM
To: [email protected]
Subject: [PATCH xf86-video-ati 1/2] Only call drmmode_uevent_init if RandR is enabled
From: Michel Dänzer <[email protected]>
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).
--- src/drmmode_display.c | 2 +- src/radeon_kms.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
src/drmmode_display.c +1 -1
@@ -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
src/radeon_kms.c +2 -2
@@ -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 [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx