drm/amdgpu/gfx11: set KMD_QUEUE for kernel gfx queues
Subsystems (3)
Alex Deucher
maintainerPATCH 1/2 drm/amdgpu/gfx11: set KMD_QUEUE for kernel gfx queues
From: Jesse Zhang <[email protected]>
Set KMD_QUEUE in the GFX MQD and kernel ring control registers so CP preserves kernel IB VMIDs instead of replacing them with the queue VMID. Use prop->kernel_queue to distinguish kernel and user MQDs.
--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +2 -0
@@ -3737,6 +3737,7 @@ static int gfx_v11_0_cp_gfx_resume(struct amdgpu_device *adev) rb_bufsz =order_base_2 (ring->ring_size /8 ); tmp =REG_SET_FIELD (0 ,CP_RB0_CNTL ,RB_BUFSZ , rb_bufsz); tmp =REG_SET_FIELD (tmp,CP_RB0_CNTL ,RB_BLKSZ , rb_bufsz -2 ); + tmp =REG_SET_FIELD (tmp,CP_RB0_CNTL ,KMD_QUEUE ,1 );WREG32_SOC15 (GC ,0 , regCP_RB0_CNTL, tmp);/* Initialize the ring buffer's write pointers */
@@ -4145,6 +4146,7 @@ static int gfx_v11_0_gfx_mqd_init(struct amdgpu_device *adev, void *m, tmp = regCP_GFX_HQD_CNTL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,RB_BUFSZ , rb_bufsz); tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,RB_BLKSZ , rb_bufsz -2 ); + tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,KMD_QUEUE , prop->kernel_queue);#ifdef __BIG_ENDIAN tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,BUF_SWAP ,1 );#endif
Signature · 1 line
2.56.0
Alex Deucher
maintainerPATCH 2/2 drm/amdgpu/gfx12: set KMD_QUEUE for kernel gfx queues
From: Jesse Zhang <[email protected]>
Set KMD_QUEUE in the GFX MQD and kernel ring control registers so CP preserves kernel IB VMIDs instead of replacing them with the queue VMID. Use prop->kernel_queue to distinguish kernel and user MQDs.
--- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +2 -0
@@ -2733,6 +2733,7 @@ static int gfx_v12_0_cp_gfx_resume(struct amdgpu_device *adev) rb_bufsz =order_base_2 (ring->ring_size /8 ); tmp =REG_SET_FIELD (0 ,CP_RB0_CNTL ,RB_BUFSZ , rb_bufsz); tmp =REG_SET_FIELD (tmp,CP_RB0_CNTL ,RB_BLKSZ , rb_bufsz -2 ); + tmp =REG_SET_FIELD (tmp,CP_RB0_CNTL ,KMD_QUEUE ,1 );WREG32_SOC15 (GC ,0 , regCP_RB0_CNTL, tmp);/* Initialize the ring buffer's write pointers */
@@ -3025,6 +3026,7 @@ static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m, tmp = regCP_GFX_HQD_CNTL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,RB_BUFSZ , rb_bufsz); tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,RB_BLKSZ , rb_bufsz -2 ); + tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,KMD_QUEUE , prop->kernel_queue);#ifdef __BIG_ENDIAN tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,BUF_SWAP ,1 );#endif
Signature · 1 line
2.56.0
Greg KH
maintainerRe: [PATCH 2/2] drm/amdgpu/gfx12: set KMD_QUEUE for kernel gfx queues
Quoted 39 lines · Alex Deucher
From: Jesse Zhang <[email protected]>
Set
KMD_QUEUEin the GFX MQD and kernel ring control registers so CP preserves kernel IB VMIDs instead of replacing them with the queue VMID. Useprop->kernel_queueto distinguish kernel and user MQDs.Signed-off-by Jesse Zhang <[email protected]>Reviewed-by Alex Deucher <[email protected]>Signed-off-by Alex Deucher <[email protected]>(cherry picked from commit 14741c01680a803050e949744089b57fa53e02f7)--- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +2
-0@@ -2733,6 +2733,7 @@ static int gfx_v12_0_cp_gfx_resume(struct amdgpu_device *adev) rb_bufsz =order_base_2 (ring->ring_size /8 ); tmp =REG_SET_FIELD (0 ,CP_RB0_CNTL ,RB_BUFSZ , rb_bufsz); tmp =REG_SET_FIELD (tmp,CP_RB0_CNTL ,RB_BLKSZ , rb_bufsz -2 ); + tmp =REG_SET_FIELD (tmp,CP_RB0_CNTL ,KMD_QUEUE ,1 );WREG32_SOC15 (GC ,0 , regCP_RB0_CNTL, tmp);/* Initialize the ring buffer's write pointers */ @@ -3025,6 +3026,7 @@ static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m, tmp = regCP_GFX_HQD_CNTL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,RB_BUFSZ , rb_bufsz); tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,RB_BLKSZ , rb_bufsz -2 ); + tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,KMD_QUEUE , prop->kernel_queue);#ifdef __BIG_ENDIAN tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,BUF_SWAP ,1 );#endif Signature · 1 line
2.56.0
What stable tree(s) are these for?
thanks,
greg k-h