drm/amdgpu: add userqueue suspend/resume functions

This patch adds userqueue suspend/resume functions at
core MES V11 IP level.

V2: use true/false for queue_active status (Christian)
    added Christian's R-B

V3: reset/set queue status in mqd.create and mqd.destroy

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Reviewed-by: Christian Koenig <christian.koenig@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Arvind Yadav <arvind.yadav@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Shashank Sharma
2024-06-03 11:13:03 +02:00
committed by Alex Deucher
parent fb796c3087
commit 30e4d78138
2 changed files with 38 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ struct amdgpu_userq_obj {
struct amdgpu_usermode_queue {
int queue_type;
uint8_t queue_active;
uint64_t doorbell_handle;
uint64_t doorbell_index;
uint64_t flags;
@@ -57,6 +58,10 @@ struct amdgpu_userq_funcs {
struct amdgpu_usermode_queue *queue);
void (*mqd_destroy)(struct amdgpu_userq_mgr *uq_mgr,
struct amdgpu_usermode_queue *uq);
int (*suspend)(struct amdgpu_userq_mgr *uq_mgr,
struct amdgpu_usermode_queue *queue);
int (*resume)(struct amdgpu_userq_mgr *uq_mgr,
struct amdgpu_usermode_queue *queue);
};
/* Usermode queues for gfx */