]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu: fix 64bit BAR detection
authorChristian König <christian.koenig@amd.com>
Sun, 7 Jan 2018 09:18:57 +0000 (10:18 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Jan 2018 20:44:54 +0000 (15:44 -0500)
Windows added by the BIOS are not marked as 64bit because they are
usually not changeable anyway.

This fixes large BAR support on my new Ryzen build system.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 357cd8bf2e55c42d4bf491ae4f6b61ceb3f54f30..9baf182d5418d36d131a93f97f00a24cf2015890 100644 (file)
@@ -626,7 +626,7 @@ int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev)
                root = root->parent;
 
        pci_bus_for_each_resource(root, res, i) {
-               if (res && res->flags & IORESOURCE_MEM_64 &&
+               if (res && res->flags & (IORESOURCE_MEM | IORESOURCE_MEM_64) &&
                    res->start > 0x100000000ull)
                        break;
        }