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 2/3] modesetting: Create CONNECTOR_ID properties for outputs [v2]
Date: Mon, 9 Jul 2018 09:26:51 +0200 [thread overview]
Message-ID: <20180709072652.9727-2-michel@daenzer.net> (raw)
In-Reply-To: <20180709072652.9727-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
From: Keith Packard <keithp@keithp.com>
This lets a DRM client map between X outputs and kernel connectors.
v2:
Change CONNECTOR_ID to enum -- Adam Jackson <ajax@nwnk.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(Ported from xserver commit 023d4aba8d45e9e3630b944ecfb650c081799b96)
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
src/drmmode_display.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index ca8a61785..031d826af 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2192,6 +2192,28 @@ static void drmmode_output_create_resources(xf86OutputPtr output)
AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(output->scrn);
drmModePropertyPtr drmmode_prop, tearfree_prop;
int i, j, err;
+ Atom name;
+
+ /* Create CONNECTOR_ID property */
+ name = MakeAtom("CONNECTOR_ID", 12, TRUE);
+ if (name != BAD_RESOURCE) {
+ INT32 value = mode_output->connector_id;
+
+ err = RRConfigureOutputProperty(output->randr_output, name,
+ FALSE, FALSE, TRUE, 1, &value);
+ if (err != Success) {
+ xf86DrvMsg(output->scrn->scrnIndex, X_ERROR,
+ "RRConfigureOutputProperty error, %d\n", err);
+ }
+
+ err = RRChangeOutputProperty(output->randr_output, name,
+ XA_INTEGER, 32, PropModeReplace, 1,
+ &value, FALSE, FALSE);
+ if (err != Success) {
+ xf86DrvMsg(output->scrn->scrnIndex, X_ERROR,
+ "RRChangeOutputProperty error, %d\n", err);
+ }
+ }
drmmode_output->props =
calloc(mode_output->count_props + 1, sizeof(drmmode_prop_rec));
--
2.18.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent 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 [PATCH xf86-video-amdgpu 1/3] modesetting: Record non-desktop kernel property at PreInit time Michel Dänzer
[not found] ` <20180709072652.9727-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-07-09 7:26 ` Michel Dänzer [this message]
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-2-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.