xorg-server-1.18.x and xorg-server-1.19.x: xf86Config.c / auto_gpu_device=1 failed to configure my Radeon 280X (commit: 69e4b8e602ecc7b69c75988a447ec5b509b22402)

wallak at free.fr wallak at free.fr
Sun Mar 12 22:50:56 UTC 2017


My radeon 280X was working properly while I was using xorg-server-1.17.x. I was unable to get this board working with xorg-server-1.18.x and xorg-server-1.19.x. 
Using the last xorg-server release the software was trying to configure a non connected video port (displayport) and failed; xorg.conf was configured to discard the non-connected video ports. This was necessary for the OpenGL layer to work on the main screen.

I finally 'bisect' the issue, and this is related to the commit 69e4b8e602ecc7b69c75988a447ec5b509b22402 adding to xf86Config.c a auto_gpu_device functionality. This 'auto_gpu_device' seems to be unreliable in my specific case.

Do you know what happened? Is this an issue specific to my config?


Here is my patch to get the 280X working again on xorg-server-1.19.2 (reversing commit 69e4b8e602ecc7b69c75988a447ec5b509b22402 and likely others):

---
 hw/xfree86/common/xf86Config.c | 32 +++++---------------------------
 1 file changed, 5 insertions(+), 27 deletions(-)

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 21daf1a0f..e942f1ddc 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1832,35 +1832,13 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
         screenp->device = NULL;
     }
 
-    if (auto_gpu_device && conf_screen->num_gpu_devices == 0 &&
-        xf86configptr->conf_device_lst) {
-        XF86ConfDevicePtr sdevice = xf86configptr->conf_device_lst->list.next;
-
-        for (i = 0; i < MAX_GPUDEVICES; i++) {
-            if (!sdevice)
-                break;
-
-            FIND_SUITABLE (XF86ConfDevicePtr, sdevice, conf_screen->scrn_gpu_devices[i]);
-            if (!conf_screen->scrn_gpu_devices[i])
-                break;
-            screenp->gpu_devices[i] = xnfcalloc(1, sizeof(GDevRec));
-            if (configDevice(screenp->gpu_devices[i], conf_screen->scrn_gpu_devices[i], TRUE, TRUE)) {
-                screenp->gpu_devices[i]->myScreenSection = screenp;
-            }
-            sdevice = conf_screen->scrn_gpu_devices[i]->list.next;
+    for (i = 0; i < conf_screen->num_gpu_devices; i++) {
+        screenp->gpu_devices[i] = xnfcalloc(1, sizeof(GDevRec));
+        if (configDevice(screenp->gpu_devices[i], conf_screen->scrn_gpu_devices[i], TRUE, TRUE)) {
+            screenp->gpu_devices[i]->myScreenSection = screenp;
         }
-        screenp->num_gpu_devices = i;
-
-    } else {
-        for (i = 0; i < conf_screen->num_gpu_devices; i++) {
-            screenp->gpu_devices[i] = xnfcalloc(1, sizeof(GDevRec));
-            if (configDevice(screenp->gpu_devices[i], conf_screen->scrn_gpu_devices[i], TRUE, TRUE)) {
-                screenp->gpu_devices[i]->myScreenSection = screenp;
-            }
-        }
-        screenp->num_gpu_devices = conf_screen->num_gpu_devices;
     }
-
+    screenp->num_gpu_devices = conf_screen->num_gpu_devices;
     screenp->options = conf_screen->scrn_option_lst;
 
     /*
-- 



Wallak,


More information about the xorg-devel mailing list