]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu/gfx_v12_1: add mqd_stride_size input parameter
authorJack Xiao <Jack.Xiao@amd.com>
Thu, 19 Jun 2025 11:42:26 +0000 (19:42 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Jan 2026 21:26:06 +0000 (16:26 -0500)
mqd_stride_size is used to calculate the next mqd offset
for cooperative dispatch.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c

index de8fb746daf17eecf30e5fba207c7de2ea51acf2..91a9236d19d7d2df795fbfb5eee934e9f29fae28 100644 (file)
@@ -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;
index 6a4ecded103aa6be3b42d13f696b658f90667dcb..0e57c367d98198b03567a30ebae5c9d057b2b435 100644 (file)
@@ -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;