mirror of
https://github.com/X11Libre/xf86-video-ati.git
synced 2026-03-24 01:24:43 +00:00
Use pRADEONEnt to find both screens of a GPU in radeon_mode_hotplug
Fixes misbehaviour when hotplugging DisplayPort connectors on secondary
GPUs.
Fixes: c801f9f10a ("Handle Zaphod mode correctly in radeon_mode_hotplug")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98626
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
35bec4937d
commit
9760ef33cb
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user