Skip to contentSkip to conversation

drm/amdgpu/si: fix SI after doorbell rework

PATCH In review Alex Deucher 3 participants 4 messages Dec 3, 2018 – Dec 4, 2018 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/si: fix SI after doorbell rework

SI does not use doorbells, move asic doorbell init later asic check.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
index c75badfa5c4c..5a72906fdc6b 100644
@@ -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);
Signature · 6 lines
2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#2 lore raw
In reply to a message not in the archive

Ping?

Quoted 32 lines · Alex Deucher

SI does not use doorbells, move asic doorbell init later asic check.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
index c75badfa5c4c..5a72906fdc6b 100644
@@ -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);
--
Quoted 2 lines

2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Oak Zeng
#5 lore raw
In reply to a message not in the archive

Regards,
Oak

-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Tuesday, December 4, 2018 2:01 PM
To: amd-gfx list <[email protected]>; Zeng, Oak <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdgpu/si: fix SI after doorbell rework

Ping?

Quoted 31 lines · Alex Deucher

SI does not use doorbells, move asic doorbell init later asic check.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
index c75badfa5c4c..5a72906fdc6b 100644
@@ -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;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
+       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);
--
Quoted 2 lines

2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx