diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2018-12-02 21:47:42 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-12-05 17:49:50 -0500 |
commit | 223577753b54acf0033de9585340909a0ef05e68 (patch) | |
tree | d321c9dfeebd76406d68d5b1f98f9167cbe69d13 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | de4aaab5cc9770a8c4dc13d9bfb6a83b06bba57e (diff) |
drm/amdgpu/si: fix SI after doorbell rework
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 9fd9f63adc08..ef36cc595985 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -515,7 +515,6 @@ void amdgpu_device_pci_config_reset(struct amdgpu_device *adev) | |||
515 | */ | 515 | */ |
516 | static int amdgpu_device_doorbell_init(struct amdgpu_device *adev) | 516 | static int amdgpu_device_doorbell_init(struct amdgpu_device *adev) |
517 | { | 517 | { |
518 | amdgpu_asic_init_doorbell_index(adev); | ||
519 | 518 | ||
520 | /* No doorbell on SI hardware generation */ | 519 | /* No doorbell on SI hardware generation */ |
521 | if (adev->asic_type < CHIP_BONAIRE) { | 520 | if (adev->asic_type < CHIP_BONAIRE) { |
@@ -529,6 +528,8 @@ static int amdgpu_device_doorbell_init(struct amdgpu_device *adev) | |||
529 | if (pci_resource_flags(adev->pdev, 2) & IORESOURCE_UNSET) | 528 | if (pci_resource_flags(adev->pdev, 2) & IORESOURCE_UNSET) |
530 | return -EINVAL; | 529 | return -EINVAL; |
531 | 530 | ||
531 | amdgpu_asic_init_doorbell_index(adev); | ||
532 | |||
532 | /* doorbell bar mapping */ | 533 | /* doorbell bar mapping */ |
533 | adev->doorbell.base = pci_resource_start(adev->pdev, 2); | 534 | adev->doorbell.base = pci_resource_start(adev->pdev, 2); |
534 | adev->doorbell.size = pci_resource_len(adev->pdev, 2); | 535 | adev->doorbell.size = pci_resource_len(adev->pdev, 2); |