From: Jack Xiao Date: Thu, 19 Jun 2025 11:42:26 +0000 (+0800) Subject: drm/amdgpu/gfx_v12_1: add mqd_stride_size input parameter X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=364f168f6148277ba3344d1c54f9fdffea34816f;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu/gfx_v12_1: add mqd_stride_size input parameter mqd_stride_size is used to calculate the next mqd offset for cooperative dispatch. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index de8fb746daf1..91a9236d19d7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -774,6 +774,7 @@ struct amdgpu_mqd_prop { uint64_t eop_gpu_addr; uint32_t hqd_pipe_priority; uint32_t hqd_queue_priority; + uint32_t mqd_stride_size; bool allow_tunneling; bool hqd_active; uint64_t shadow_addr; diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c index 6a4ecded103a..0e57c367d981 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c @@ -2217,6 +2217,9 @@ static int gfx_v12_1_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_hqd_pipe_priority = prop->hqd_pipe_priority; mqd->cp_hqd_queue_priority = prop->hqd_queue_priority; + mqd->cp_mqd_stride_size = prop->mqd_stride_size ? prop->mqd_stride_size : + sizeof(struct v12_1_compute_mqd); + mqd->cp_hqd_active = prop->hqd_active; return 0;