Merge tag 'topic/drm-misc-2016-04-01' of git://anongit.freedesktop.org/drm-intel...
[linux-2.6-microblaze.git] / drivers / gpu / drm / radeon / radeon_drv.c
index ad136fc..5d44ed0 100644 (file)
@@ -321,6 +321,14 @@ static int radeon_pci_probe(struct pci_dev *pdev,
 {
        int ret;
 
+       /*
+        * Initialize amdkfd before starting radeon. If it was not loaded yet,
+        * defer radeon probing
+        */
+       ret = radeon_kfd_init();
+       if (ret == -EPROBE_DEFER)
+               return ret;
+
        /*
         * apple-gmux is needed on dual GPU MacBook Pro
         * to probe the panel if we're the inactive GPU.
@@ -579,8 +587,6 @@ static int __init radeon_init(void)
                return -EINVAL;
        }
 
-       radeon_kfd_init();
-
        /* let modprobe override vga console setting */
        return drm_pci_init(driver, pdriver);
 }