Skip to contentSkip to conversation

drm/amdgpu: fix sdma doorbell range setting

PATCH In review Evan Quan 4 participants 5 messages Aug 21, 2018 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Evan Quan

author
#0 lore raw

PATCH 1/1 drm/amdgpu: fix sdma doorbell range setting

Use the old doorbell range setting until the driver is able to support more sdma queues.

Change-Id I80fc067fc64878d3c7dc3d38bbe1c6c94bec397f
---
 drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c +1 -1
index 89ea92075b6b..2e65447637c6 100644
@@ -76,7 +76,7 @@ static void nbio_v7_4_sdma_doorbell_range(struct amdgpu_device *adev, int instan
 
 	if (use_doorbell) {
 		doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, OFFSET, doorbell_index);
-		doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, SIZE, 8);
+		doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, SIZE, 2);
 	} else
 		doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, SIZE, 0);
 
Signature · 6 lines
2.18.0

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

Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Evan Quan
Sent: 2018年8月21日 16:21
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>; Zhang, Hawking <[email protected]>
Subject: [PATCH] drm/amdgpu: fix sdma doorbell range setting

Use the old doorbell range setting until the driver is able to support more sdma queues.

Change-Id I80fc067fc64878d3c7dc3d38bbe1c6c94bec397f
---
 drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c +2 -1
index 89ea92075b6b..2e65447637c6 100644
@@ -76,7 +76,7 @@ static void nbio_v7_4_sdma_doorbell_range(struct amdgpu_device *adev, int instan
 
 	if (use_doorbell) {
 		doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, OFFSET, doorbell_index);
-		doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, SIZE, 8);
+		doorbell_range = REG_SET_FIELD(doorbell_range, 
+BIF_SDMA0_DOORBELL_RANGE, SIZE, 2);
 	} else
 		doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, SIZE, 0);

--
2.18.0

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

Reviewed-by Hawking Zhang
#4 lore raw
In reply to a message not in the archive

Alternatively, we could cherry-pick the change to the doorbell ranges from Shaoyun. Might also be useful to leave a comment here about the doorbell range for vega20 sdma.

Alex

________________________________
From: Zhang, Hawking
Sent: Tuesday, August 21, 2018 5:02:24 AM
To: Quan, Evan; [email protected]
Cc: Deucher, Alexander; Quan, Evan
Subject: RE: [PATCH] drm/amdgpu: fix sdma doorbell range setting

Regards,
Hawking
-----Original Message-----
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> On Behalf Of Evan Quan
Sent: 2018年8月21日 16:21
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>; Zhang, Hawking <[email protected]>
Subject: [PATCH] drm/amdgpu: fix sdma doorbell range setting

Use the old doorbell range setting until the driver is able to support more sdma queues.

Change-Id I80fc067fc64878d3c7dc3d38bbe1c6c94bec397f
---
 drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c +2 -1
index 89ea92075b6b..2e65447637c6 100644
@@ -76,7 +76,7 @@ static void nbio_v7_4_sdma_doorbell_range(struct amdgpu_device *adev, int instan
 
         if (use_doorbell) {
                 doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, OFFSET, doorbell_index);
-               doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, SIZE, 8);
+               doorbell_range = REG_SET_FIELD(doorbell_range,
+BIF_SDMA0_DOORBELL_RANGE, SIZE, 2);
         } else
                 doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, SIZE, 0);

--
2.18.0

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

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

#5 lore raw
In reply to a message not in the archive

[+Kent]

Which branch is this for?

amd-staging-drm-next doesn't have Shaoyun's other changes for changing the doorbell layout, so this change looks reasonable for amd-staging-drm-next.

Kent, we should not merge this change into amd-kfd-staging, because it would break KFD's 8 SDMA queues per engine. I'm preparing upstreaming Vega20 changes KFD. That will include reverting this commit.

Regards,
  Felix

Quoted 14 lines · Evan Quan

Use the old doorbell range setting until the driver is able to support more sdma queues.

Change-Id I80fc067fc64878d3c7dc3d38bbe1c6c94bec397f
---
 drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c +0 -0
index 89ea92075b6b..2e65447637c6 100644

drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c static void nbio_v7_4_sdma_doorbell_range(struct amdgpu_device *adev, int instan · line 82

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c +1 -1
@@ -76,7 +76,7 @@ static void nbio_v7_4_sdma_doorbell_range(struct amdgpu_device *adev, int instan
 
 	if (use_doorbell) {
 		doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, OFFSET, doorbell_index);
-		doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, SIZE, 8);
+		doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, SIZE, 2);
 	} else
 		doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, SIZE, 0);
 

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

#7 lore raw
In reply to a message not in the archive

Yes, this is for amd-staging-drm-next and ultimately upstream.

Alex

________________________________
From: Kuehling, Felix
Sent: Tuesday, August 21, 2018 4:10:07 PM
To: Quan, Evan; [email protected]; Russell, Kent
Cc: Deucher, Alexander; Zhang, Hawking
Subject: Re: [PATCH] drm/amdgpu: fix sdma doorbell range setting

[+Kent]

Which branch is this for?

amd-staging-drm-next doesn't have Shaoyun's other changes for changing the doorbell layout, so this change looks reasonable for amd-staging-drm-next.

Kent, we should not merge this change into amd-kfd-staging, because it would break KFD's 8 SDMA queues per engine. I'm preparing upstreaming Vega20 changes KFD. That will include reverting this commit.

Regards,
Felix

Quoted 14 lines · Evan Quan

Use the old doorbell range setting until the driver is able to support more sdma queues.

Change-Id I80fc067fc64878d3c7dc3d38bbe1c6c94bec397f
---
 drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c +0 -0
index 89ea92075b6b..2e65447637c6 100644

drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c static void nbio_v7_4_sdma_doorbell_range(struct amdgpu_device *adev, int instan · line 82

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c +1 -1
@@ -76,7 +76,7 @@ static void nbio_v7_4_sdma_doorbell_range(struct amdgpu_device *adev, int instan
 
       if (use_doorbell) {
               doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, OFFSET, doorbell_index);
-             doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, SIZE, 8);
+             doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, SIZE, 2);
       } else
               doorbell_range = REG_SET_FIELD(doorbell_range, BIF_SDMA0_DOORBELL_RANGE, SIZE, 0);
 

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