diff options
author | Keith Packard <keithp@keithp.com> | 2018-07-11 19:07:59 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2018-07-12 18:10:08 +0200 |
commit | 612bda0a5e769f23478b364cf89620222cfac349 (patch) | |
tree | f24a455de238e7913c7bd3009ac26126a0af37a3 /src/drmmode_display.c | |
parent | 4b3e5f81c6032003237bb05c3ab96423c39524fc (diff) |
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 <keithp@keithp.com>
(Ported from xserver commit b91c787c4cd2d20685db69426c539938c556128a)
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
(Ported from amdgpu commit 14db71a606128c4a207f43298809af279b77e2a8)
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r-- | src/drmmode_display.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 03c850f8..27aa5a6c 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1975,6 +1975,9 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r drmModeEncoderPtr *kencoders = NULL; drmmode_output_private_ptr drmmode_output; drmModePropertyBlobPtr path_blob = NULL; +#if XF86_CRTC_VERSION >= 8 + Bool nonDesktop = FALSE; +#endif char name[32]; int i; const char *s; @@ -1985,6 +1988,13 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r path_blob = koutput_get_prop_blob(pRADEONEnt->fd, koutput, "PATH"); +#if XF86_CRTC_VERSION >= 8 + i = koutput_get_prop_idx(pRADEONEnt->fd, koutput, DRM_MODE_PROP_RANGE, + RR_PROPERTY_NON_DESKTOP); + if (i >= 0) + nonDesktop = koutput->prop_values[i] != 0; +#endif + kencoders = calloc(sizeof(drmModeEncoderPtr), koutput->count_encoders); if (!kencoders) { goto out_free_encoders; @@ -2014,6 +2024,9 @@ 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; +#if XF86_CRTC_VERSION >= 8 + output->non_desktop = nonDesktop; +#endif for (i = 0; i < koutput->count_encoders; i++) drmModeFreeEncoder(kencoders[i]); free(kencoders); @@ -2055,6 +2068,9 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r output->interlaceAllowed = TRUE; output->doubleScanAllowed = TRUE; output->driver_private = drmmode_output; +#if XF86_CRTC_VERSION >= 8 + output->non_desktop = nonDesktop; +#endif output->possible_crtcs = 0xffffffff; for (i = 0; i < koutput->count_encoders; i++) { |