]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu/si: fix SI after doorbell rework
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 3 Dec 2018 02:47:42 +0000 (21:47 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Dec 2018 22:49:50 +0000 (17:49 -0500)
SI does not use doorbells, move asic doorbell init later
asic check.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=108920
Reviewed-by: Oak Zeng <Oak.Zeng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 9fd9f63adc0837e1dac071d6e0fec500a4465d3d..ef36cc59598597f6efac3ef68b57f04ec37dc67d 100644 (file)
@@ -515,7 +515,6 @@ void amdgpu_device_pci_config_reset(struct amdgpu_device *adev)
  */
 static int amdgpu_device_doorbell_init(struct amdgpu_device *adev)
 {
-       amdgpu_asic_init_doorbell_index(adev);
 
        /* No doorbell on SI hardware generation */
        if (adev->asic_type < CHIP_BONAIRE) {
@@ -529,6 +528,8 @@ static int amdgpu_device_doorbell_init(struct amdgpu_device *adev)
        if (pci_resource_flags(adev->pdev, 2) & IORESOURCE_UNSET)
                return -EINVAL;
 
+       amdgpu_asic_init_doorbell_index(adev);
+
        /* doorbell bar mapping */
        adev->doorbell.base = pci_resource_start(adev->pdev, 2);
        adev->doorbell.size = pci_resource_len(adev->pdev, 2);