From: Keith Packard <keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: michel-otUistvHUpPR7s880joybQ@public.gmane.org,
keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org
Subject: [PATCH xf86-video-amdgpu 1/3] xf86-video-modesetting: Record non-desktop kernel property at PreInit time
Date: Fri, 2 Mar 2018 20:49:29 -0800 [thread overview]
Message-ID: <20180303044931.6902-2-keithp@keithp.com> (raw)
In-Reply-To: <20180303044931.6902-1-keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
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>
Reviewed-by: Adam Jackson <ajax@nwnk.net>
---
src/drmmode_display.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 746e52a..b0fc7ea 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1980,6 +1980,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
drmModePropertyBlobPtr path_blob = NULL;
char name[32];
int i;
+ Bool nonDesktop = FALSE;
const char *s;
koutput =
@@ -1989,6 +1990,10 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
return 0;
path_blob = koutput_get_prop_blob(pAMDGPUEnt->fd, koutput, "PATH");
+ 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;
+
kencoders = calloc(sizeof(drmModeEncoderPtr), koutput->count_encoders);
if (!kencoders) {
@@ -2021,6 +2026,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;
for (i = 0; i < koutput->count_encoders; i++) {
drmModeFreeEncoder(kencoders[i]);
}
@@ -2064,6 +2070,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 = 0xffffffff;
for (i = 0; i < koutput->count_encoders; i++) {
--
2.16.2
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-03-03 4:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <[PATCH xf86-video-amdgpu 0/3] Add non-desktop and leasing support>
2018-03-03 4:49 ` (unknown), Keith Packard
[not found] ` <20180303044931.6902-1-keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
2018-03-03 4:49 ` Keith Packard [this message]
2018-03-03 4:49 ` [PATCH xf86-video-amdgpu 2/3] xf86-video-modesetting: Create CONNECTOR_ID properties for outputs [v2] Keith Packard
2018-03-03 4:49 ` [PATCH xf86-video-amdgpu 3/3] Add RandR leases with modesetting driver support [v6] Keith Packard
2018-03-05 10:02 ` Michel Dänzer
[not found] ` <82fc592b-f680-c663-1a0f-7b522ca932d2-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-03-05 16:41 ` Re: Keith Packard
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=20180303044931.6902-2-keithp@keithp.com \
--to=keithp-an4hjg94kolqt0dzr+alfa@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=michel-otUistvHUpPR7s880joybQ@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.