[PATCH xserver 3/5] xf86-video-modesetting: Record non-desktop kernel property at PreInit time
Keith Packard
keithp at keithp.com
Fri Dec 8 05:56:03 UTC 2017
Save any value of the kernel non-desktop property in the xf86Output
structure to avoid non-desktop outputs in the default configuration.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
hw/xfree86/drivers/modesetting/drmmode_display.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index e10ba69f0..57601836c 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1776,6 +1776,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
drmmode_output_private_ptr drmmode_output;
char name[32];
int i;
+ Bool nonDesktop = FALSE;
drmModePropertyBlobPtr path_blob = NULL;
const char *s;
koutput =
@@ -1784,6 +1785,9 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
return 0;
path_blob = koutput_get_prop_blob(drmmode->fd, koutput, "PATH");
+ i = koutput_get_prop_idx(drmmode->fd, koutput, RR_PROPERTY_NON_DESKTOP);
+ if (i >= 0)
+ nonDesktop = koutput->prop_values[i] != 0;
drmmode_create_name(pScrn, koutput, name, path_blob);
@@ -1802,6 +1806,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
drmmode_output = output->driver_private;
drmmode_output->output_id = mode_res->connectors[num];
drmmode_output->mode_output = koutput;
+ output->non_desktop = nonDesktop;
return 1;
}
}
@@ -1852,6 +1857,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
output->interlaceAllowed = TRUE;
output->doubleScanAllowed = TRUE;
output->driver_private = drmmode_output;
+ output->non_desktop = nonDesktop;
output->possible_crtcs = 0x7f;
for (i = 0; i < koutput->count_encoders; i++) {
--
2.15.0.rc0
More information about the xorg-devel
mailing list