drm/amdgpu/gfx6: fix CSIB handling
Subsystems (2)
Alex Deucher
maintainerPATCH 1/6 drm/amdgpu/gfx6: fix CSIB handling
We shouldn't return after the last section.
We need to update the rest of the CSIB.
--- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +0 -2
@@ -2874,8 +2874,6 @@ static void gfx_v6_0_get_csb_buffer(struct amdgpu_device *adev, buffer[count++] =cpu_to_le32 (ext->reg_index -0xa000 );for (i =0 ; i < ext->reg_count; i++) buffer[count++] =cpu_to_le32 (ext->extent[i]); - }else { -return ; } } }
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 2/6 drm/amdgpu/gfx7: fix CSIB handling
We shouldn't return after the last section.
We need to update the rest of the CSIB.
--- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +0 -2
@@ -3906,8 +3906,6 @@ static void gfx_v7_0_get_csb_buffer(struct amdgpu_device *adev, buffer[count++] =cpu_to_le32 (ext->reg_index -PACKET3_SET_CONTEXT_REG_START );for (i =0 ; i < ext->reg_count; i++) buffer[count++] =cpu_to_le32 (ext->extent[i]); - }else { -return ; } } }
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 3/6 drm/amdgpu/gfx8: fix CSIB handling
In reply to Alex DeucherWe shouldn't return after the last section.
We need to update the rest of the CSIB.
--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -2
@@ -1248,8 +1248,6 @@ static void gfx_v8_0_get_csb_buffer(struct amdgpu_device *adev, PACKET3_SET_CONTEXT_REG_START);for (i =0 ; i < ext->reg_count; i++) buffer[count++] =cpu_to_le32 (ext->extent[i]); - }else { -return ; } } }
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 4/6 drm/amdgpu/gfx9: fix CSIB handling
In reply to Alex DeucherWe shouldn't return after the last section.
We need to update the rest of the CSIB.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -2
@@ -1648,8 +1648,6 @@ static void gfx_v9_0_get_csb_buffer(struct amdgpu_device *adev, PACKET3_SET_CONTEXT_REG_START);for (i =0 ; i < ext->reg_count; i++) buffer[count++] =cpu_to_le32 (ext->extent[i]); - }else { -return ; } } }
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 5/6 drm/amdgpu/gfx10: fix CSIB handling
In reply to Alex DeucherWe shouldn't return after the last section.
We need to update the rest of the CSIB.
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +0 -2
@@ -4322,8 +4322,6 @@ static void gfx_v10_0_get_csb_buffer(struct amdgpu_device *adev, PACKET3_SET_CONTEXT_REG_START);for (i =0 ; i < ext->reg_count; i++) buffer[count++] =cpu_to_le32 (ext->extent[i]); - }else { -return ; } } }
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 6/6 drm/amdgpu/gfx11: fix CSIB handling
In reply to Alex DeucherWe shouldn't return after the last section.
We need to update the rest of the CSIB.
--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +0 -2
@@ -861,8 +861,6 @@ static void gfx_v11_0_get_csb_buffer(struct amdgpu_device *adev, PACKET3_SET_CONTEXT_REG_START);for (i =0 ; i < ext->reg_count; i++) buffer[count++] =cpu_to_le32 (ext->extent[i]); - }else { -return ; } } }
Signature · 1 line
2.48.1
ping on this series?
Alex
Quoted 25 lines · Alex Deucher
We shouldn't return after the last section.
We need to update the rest of the CSIB.Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +0
-3@@ -2874,8 +2874,6 @@ static void gfx_v6_0_get_csb_buffer(struct amdgpu_device *adev, buffer[count++] =cpu_to_le32 (ext->reg_index -0xa000 );for (i =0 ; i < ext->reg_count; i++) buffer[count++] =cpu_to_le32 (ext->extent[i]); - }else { -return ; } } } --2.48.1
Quoted 2 lines · Alex Deucher
We shouldn't return after the last section.
We need to update the rest of the CSIB.
What is CSIB?
What happens if the other CSIB is not updated?
Thanks
Quoted 22 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +0
-2@@ -2874,8 +2874,6 @@ static void gfx_v6_0_get_csb_buffer(struct amdgpu_device *adev, buffer[count++] =cpu_to_le32 (ext->reg_index -0xa000 );for (i =0 ; i < ext->reg_count; i++) buffer[count++] =cpu_to_le32 (ext->extent[i]); - }else { -return ; } } }Signature · 1 line
2.48.1
Signature · 1 line
Rodrigo Siqueira
Quoted 6 lines · Rodrigo Siqueira
Quoted 2 lines · Alex Deucher
We shouldn't return after the last section.
We need to update the rest of the CSIB.What is CSIB?
Clear State Indirect Buffer. It provides the clear state that gets put into the hardware context if when user mode puts requests the clear state in their command buffer. Driver programs this explicitly when it sets up the kernel rings. Driver also provides a pointer to it which is used by the firmware to load the clear state in some cases.
Quoted 2 lines
What happens if the other CSIB is not updated?
The clear state packet submitted by userspace won't work as expected if the clear state is not properly initialized. In this case, I'm not sure if there is actually a function difference since the driver always initializes the clear state at kernel queue init time, but best to make sure the buffer pointed to by the RLC is correct.
Alex
Quoted 28 lines
Thanks
Quoted 20 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +0
-3@@ -2874,8 +2874,6 @@ static void gfx_v6_0_get_csb_buffer(struct amdgpu_device *adev, buffer[count++] =cpu_to_le32 (ext->reg_index -0xa000 );for (i =0 ; i < ext->reg_count; i++) buffer[count++] =cpu_to_le32 (ext->extent[i]); - }else { -return ; } } } --Quoted 2 lines
2.48.1
--
Rodrigo Siqueira
Rodrigo Siqueira
Reviewed-byQuoted 6 lines · Alex Deucher
Quoted 5 lines · Rodrigo Siqueira
Quoted 2 lines · Alex Deucher
We shouldn't return after the last section.
We need to update the rest of the CSIB.
Quoted 9 lines
Quoted 1 line
What is CSIB?
Clear State Indirect Buffer. It provides the clear state that gets put into the hardware context if when user mode puts requests the clear state in their command buffer. Driver programs this explicitly when it sets up the kernel rings. Driver also provides a pointer to it which is used by the firmware to load the clear state in some cases.
Thanks for the explanation.
Quoted 9 lines
Quoted 2 lines
What happens if the other CSIB is not updated?
The clear state packet submitted by userspace won't work as expected if the clear state is not properly initialized. In this case, I'm not sure if there is actually a function difference since the driver always initializes the clear state at kernel queue init time, but best to make sure the buffer pointed to by the RLC is correct.
Make sense.
This series is:
Thanks
Quoted 30 lines
Alex
Quoted 28 lines
Thanks
Quoted 20 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +0
-3@@ -2874,8 +2874,6 @@ static void gfx_v6_0_get_csb_buffer(struct amdgpu_device *adev, buffer[count++] =cpu_to_le32 (ext->reg_index -0xa000 );for (i =0 ; i < ext->reg_count; i++) buffer[count++] =cpu_to_le32 (ext->extent[i]); - }else { -return ; } } } --Quoted 2 lines
2.48.1
--
Rodrigo Siqueira
Signature · 1 line
Rodrigo Siqueira