From: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Keith Packard <keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH xf86-video-amdgpu 1/3] modesetting: Record non-desktop kernel property at PreInit time
Date: Mon, 9 Jul 2018 09:26:50 +0200 [thread overview]
Message-ID: <20180709072652.9727-1-michel@daenzer.net> (raw)
From: Keith Packard <keithp@keithp.com>
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>
---
configure.ac | 2 +-
src/drmmode_display.c | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 2593f52ca..a475f3713 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,7 +64,7 @@ AC_ARG_WITH(xorg-module-dir,
[moduledir="$libdir/xorg/modules"])
# Store the list of server defined optional extensions in REQUIRED_MODULES
-XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
+XORG_DRIVER_CHECK_EXT(RANDR, [randrproto >= 1.6.0])
XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
XORG_DRIVER_CHECK_EXT(XV, videoproto)
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 9364a885a..ca8a61785 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2595,6 +2595,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;
@@ -2607,6 +2610,13 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
path_blob = koutput_get_prop_blob(pAMDGPUEnt->fd, koutput, "PATH");
+#if XF86_CRTC_VERSION >= 8
+ i = koutput_get_prop_idx(pAMDGPUEnt->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;
@@ -2638,6 +2648,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]);
}
@@ -2681,6 +2694,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++) {
--
2.18.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next reply other threads:[~2018-07-09 7:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-09 7:26 Michel Dänzer [this message]
[not found] ` <20180709072652.9727-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-07-09 7:26 ` [PATCH xf86-video-amdgpu 2/3] modesetting: Create CONNECTOR_ID properties for outputs [v2] Michel Dänzer
2018-07-09 7:26 ` [PATCH xf86-video-amdgpu 3/3] Add RandR leases support Michel Dänzer
2018-07-09 16:14 ` [PATCH xf86-video-amdgpu 1/3] modesetting: Record non-desktop kernel property at PreInit time Keith Packard
[not found] ` <87o9fg4c9i.fsf-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
2018-07-09 16:20 ` Michel Dänzer
[not found] ` <af4f8c39-0936-dc48-ad67-96b108463619-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-07-13 2:26 ` Yu, Qiang
[not found] ` <CY4PR1201MB0117859F55CBFAFE76E560EF8F580-1iTaO6aE1DAP/tBwSbHU42rFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2018-07-13 8:41 ` [PATCH xf86-video-amdgpu] Hardcode "non-desktop" RandR property name Michel Dänzer
[not found] ` <20180713084151.6200-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-07-16 2:16 ` Yu, Qiang
2018-07-13 8:44 ` [PATCH xf86-video-amdgpu 1/3] modesetting: Record non-desktop kernel property at PreInit time Michel Dänzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180709072652.9727-1-michel@daenzer.net \
--to=michel-otuistvhuppr7s880joybq@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.