summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@aura-online.co.uk>2010-02-25 19:10:19 -0500
committerAlex Deucher <alexdeucher@gmail.com>2010-02-25 21:02:52 -0500
commitf3e20b01c77f02bdf3483ceee27a1f00d240c33d (patch)
tree980ed4e22f72e4af692869045754940140b12205
parent1b7e9a2e50f77819b3aff4e37ba39eaec69ff932 (diff)
zaphod: Fix entity instance assignment.
Each screen needs to have a pointer back to its device's entity instance, Currently Screen1 is pointing to Screen0's instance so when it comes to match up the screen sections with the detected screens, Screen0 gets chosen in both cases. See bug 24523
-rw-r--r--src/radeon_probe.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/radeon_probe.c b/src/radeon_probe.c
index 42e72596..1429835e 100644
--- a/src/radeon_probe.c
+++ b/src/radeon_probe.c
@@ -183,13 +183,9 @@ radeon_get_scrninfo(int entity_num, void *pci_dev)
pPriv = xf86GetEntityPrivate(pEnt->index,
gRADEONEntityIndex);
- if (!pPriv->ptr) {
- int j;
- int instance = xf86GetNumEntityInstances(pEnt->index);
-
- for (j = 0; j < instance; j++)
- xf86SetEntityInstanceForScreen(pScrn, pEnt->index, j);
+ xf86SetEntityInstanceForScreen(pScrn, pEnt->index, xf86GetNumEntityInstances(pEnt->index) - 1);
+ if (!pPriv->ptr) {
pPriv->ptr = xnfcalloc(sizeof(RADEONEntRec), 1);
pRADEONEnt = pPriv->ptr;
pRADEONEnt->HasSecondary = FALSE;