Commit b91c787c authored by Keith Packard's avatar Keith Packard Committed by Adam Jackson
Browse files

xf86-video-modesetting: Record non-desktop kernel property at PreInit time



Save any value of the kernel non-desktop property in the xf86Output
structure to avoid non-desktop outputs in the default configuration.

[Also bump randrproto requirement to a version that defines
RR_PROPERTY_NON_DESKTOP - ajax]
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@nwnk.net>
parent fabbaa8d
...@@ -742,7 +742,7 @@ LIBXSHMFENCE="xshmfence >= 1.1" ...@@ -742,7 +742,7 @@ LIBXSHMFENCE="xshmfence >= 1.1"
dnl Required modules dnl Required modules
XPROTO="xproto >= 7.0.31" XPROTO="xproto >= 7.0.31"
RANDRPROTO="randrproto >= 1.5.0" RANDRPROTO="randrproto >= 1.6.0"
RENDERPROTO="renderproto >= 0.11" RENDERPROTO="renderproto >= 0.11"
XEXTPROTO="xextproto >= 7.2.99.901" XEXTPROTO="xextproto >= 7.2.99.901"
INPUTPROTO="inputproto >= 2.3" INPUTPROTO="inputproto >= 2.3"
......
...@@ -1769,6 +1769,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r ...@@ -1769,6 +1769,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
drmmode_output_private_ptr drmmode_output; drmmode_output_private_ptr drmmode_output;
char name[32]; char name[32];
int i; int i;
Bool nonDesktop = FALSE;
drmModePropertyBlobPtr path_blob = NULL; drmModePropertyBlobPtr path_blob = NULL;
const char *s; const char *s;
koutput = koutput =
...@@ -1777,6 +1778,9 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r ...@@ -1777,6 +1778,9 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
return 0; return 0;
path_blob = koutput_get_prop_blob(drmmode->fd, koutput, "PATH"); path_blob = koutput_get_prop_blob(drmmode->fd, koutput, "PATH");
i = koutput_get_prop_idx(drmmode->fd, koutput, DRM_MODE_PROP_RANGE, RR_PROPERTY_NON_DESKTOP);
if (i >= 0)
nonDesktop = koutput->prop_values[i] != 0;
drmmode_create_name(pScrn, koutput, name, path_blob); drmmode_create_name(pScrn, koutput, name, path_blob);
...@@ -1795,6 +1799,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r ...@@ -1795,6 +1799,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
drmmode_output = output->driver_private; drmmode_output = output->driver_private;
drmmode_output->output_id = mode_res->connectors[num]; drmmode_output->output_id = mode_res->connectors[num];
drmmode_output->mode_output = koutput; drmmode_output->mode_output = koutput;
output->non_desktop = nonDesktop;
return 1; return 1;
} }
} }
...@@ -1845,6 +1850,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r ...@@ -1845,6 +1850,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
output->interlaceAllowed = TRUE; output->interlaceAllowed = TRUE;
output->doubleScanAllowed = TRUE; output->doubleScanAllowed = TRUE;
output->driver_private = drmmode_output; output->driver_private = drmmode_output;
output->non_desktop = nonDesktop;
output->possible_crtcs = 0x7f; output->possible_crtcs = 0x7f;
for (i = 0; i < koutput->count_encoders; i++) { for (i = 0; i < koutput->count_encoders; i++) {
......
...@@ -59,7 +59,7 @@ endforeach ...@@ -59,7 +59,7 @@ endforeach
add_global_arguments(common_wflags, language : 'c') add_global_arguments(common_wflags, language : 'c')
xproto_dep = dependency('xproto', version: '>= 7.0.31') xproto_dep = dependency('xproto', version: '>= 7.0.31')
randrproto_dep = dependency('randrproto', version: '>= 1.5.0') randrproto_dep = dependency('randrproto', version: '>= 1.6.0')
renderproto_dep = dependency('renderproto', version: '>= 0.11') renderproto_dep = dependency('renderproto', version: '>= 0.11')
xextproto_dep = dependency('xextproto', version: '>= 7.2.99.901') xextproto_dep = dependency('xextproto', version: '>= 7.2.99.901')
inputproto_dep = dependency('inputproto', version: '>= 2.3') inputproto_dep = dependency('inputproto', version: '>= 2.3')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment