Skip to contentSkip to conversation

Update RandR CRTC state if set_mode_major fails in set_desired_modes

PATCH New Michel Dänzer 1 participant 1 message Apr 20, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Update RandR CRTC state if set_mode_major fails in set_desired_modes

From: Michel Dänzer <[email protected]>

Without this, RandR would report the CRTC and its outputs as enabled, even though they were actually off due to the failure.

---
 src/drmmode_display.c | 2 ++
 1 file changed, 2 insertions(+)
src/drmmode_display.c +2 -0
index dcfc9937e..d752e7138 100644
@@ -2729,6 +2729,8 @@ Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode,
 			} else {
 				xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 					   "Failed to set mode on CRTC %d\n", c);
+				RRCrtcSet(crtc->randr_crtc, NULL, crtc->x, crtc->y,
+					  crtc->rotation, 0, NULL);
 			}
 		} else {
 			crtc->mode = crtc->desiredMode;
Signature · 6 lines
2.17.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx