From: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH xf86-video-ati 2/2] Use pRADEONEnt to find both screens of a GPU in radeon_mode_hotplug
Date: Wed, 9 Nov 2016 16:17:00 +0900 [thread overview]
Message-ID: <20161109071700.24235-2-michel@daenzer.net> (raw)
In-Reply-To: <20161109071700.24235-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
From: Michel Dänzer <michel.daenzer@amd.com>
Fixes misbehaviour when hotplugging DisplayPort connectors on secondary
GPUs.
Fixes: c801f9f10a5d ("Handle Zaphod mode correctly in radeon_mode_hotplug")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98626
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
src/drmmode_display.c | 23 ++++++++---------------
src/radeon_kms.c | 5 +++++
src/radeon_probe.h | 2 ++
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index fd5c80e..070979d 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2580,7 +2580,7 @@ radeon_mode_hotplug(ScrnInfoPtr scrn, drmmode_ptr drmmode)
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
RADEONEntPtr pRADEONEnt = RADEONEntPriv(scrn);
drmModeResPtr mode_res;
- int i, j, s;
+ int i, j;
Bool found;
Bool changed = FALSE;
int num_dvi = 0, num_hdmi = 0;
@@ -2617,20 +2617,13 @@ restart_destroy:
/* find new output ids we don't have outputs for */
for (i = 0; i < mode_res->count_connectors; i++) {
- found = FALSE;
-
- for (s = 0; !found && s < xf86NumScreens; s++) {
- ScrnInfoPtr loop_scrn = xf86Screens[s];
-
- if (strcmp(loop_scrn->driverName, scrn->driverName) ||
- RADEONEntPriv(loop_scrn) != pRADEONEnt)
- continue;
-
- found = drmmode_find_output(loop_scrn,
- mode_res->connectors[i],
- &num_dvi, &num_hdmi);
- }
- if (found)
+ if (drmmode_find_output(pRADEONEnt->primary_scrn,
+ mode_res->connectors[i],
+ &num_dvi, &num_hdmi) ||
+ (pRADEONEnt->secondary_scrn &&
+ drmmode_find_output(pRADEONEnt->secondary_scrn,
+ mode_res->connectors[i],
+ &num_dvi, &num_hdmi)))
continue;
if (drmmode_output_init(scrn, drmmode, mode_res, i, &num_dvi,
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 6927f58..ee2becd 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -1659,6 +1659,11 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
}
}
+ if (info->IsSecondary)
+ pRADEONEnt->secondary_scrn = pScrn;
+ else
+ pRADEONEnt->primary_scrn = pScrn;
+
info->PciInfo = xf86GetPciInfoForEntity(info->pEnt->index);
pScrn->monitor = pScrn->confScreen->monitor;
diff --git a/src/radeon_probe.h b/src/radeon_probe.h
index 258c7be..573d988 100644
--- a/src/radeon_probe.h
+++ b/src/radeon_probe.h
@@ -139,6 +139,8 @@ typedef struct
unsigned long fd_wakeup_registered; /* server generation for which fd has been registered for wakeup handling */
int fd_wakeup_ref;
unsigned int assigned_crtcs;
+ ScrnInfoPtr primary_scrn;
+ ScrnInfoPtr secondary_scrn;
#ifdef XSERVER_PLATFORM_BUS
struct xf86_platform_device *platform_dev;
#endif
--
2.10.2
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2016-11-09 7:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 7:16 [PATCH xf86-video-ati 1/2] Refactor radeon_mode_hotplug Michel Dänzer
[not found] ` <20161109071700.24235-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-11-09 7:17 ` Michel Dänzer [this message]
[not found] ` <20161109071700.24235-2-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-11-09 13:58 ` [PATCH xf86-video-ati 2/2] Use pRADEONEnt to find both screens of a GPU in radeon_mode_hotplug Deucher, Alexander
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=20161109071700.24235-2-michel@daenzer.net \
--to=michel-otuistvhuppr7s880joybq@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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.