summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2025-04-11 22:49:51 +0300
committerAlex Deucher <alexander.deucher@amd.com>2025-04-21 17:52:49 +0300
commit987718c5598a3044ecca1b6f774900df12927ed5 (patch)
treedecdbb6886170243f8b3c7f71641a7e86630185d /drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
parent9315860d05aa2604045a5d8f874cf1d36a70da89 (diff)
downloadlinux-987718c5598a3044ecca1b6f774900df12927ed5.tar.xz
drm/amdgpu/userq: move runpm handling into core userq code
Pull it out of the MES code and into the generic code. It's not MES specific and needs to be applied to all user queues regardless of the backend. Reviewed-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Shaoyun.liu <Shaoyun.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/mes_userqueue.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/mes_userqueue.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
index e3c3fc160b79..34f8f63747d5 100644
--- a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
+++ b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c
@@ -25,7 +25,6 @@
#include "amdgpu_gfx.h"
#include "mes_userqueue.h"
#include "amdgpu_userq_fence.h"
-#include <linux/pm_runtime.h>
#define AMDGPU_USERQ_PROC_CTX_SZ PAGE_SIZE
#define AMDGPU_USERQ_GANG_CTX_SZ PAGE_SIZE
@@ -294,12 +293,6 @@ static int mes_userq_mqd_create(struct amdgpu_userq_mgr *uq_mgr,
queue->userq_prop = userq_props;
- r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
- if (r < 0) {
- dev_err(adev->dev, "pm_runtime_get_sync() failed for userqueue mqd create\n");
- goto deference_pm;
- }
-
r = mqd_hw_default->init_mqd(adev, (void *)queue->mqd.cpu_ptr, userq_props);
if (r) {
DRM_ERROR("Failed to initialize MQD for userqueue\n");
@@ -327,9 +320,6 @@ free_ctx:
free_mqd:
amdgpu_userqueue_destroy_object(uq_mgr, &queue->mqd);
- pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-deference_pm:
- pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
free_props:
kfree(userq_props);
@@ -341,14 +331,9 @@ static void
mes_userq_mqd_destroy(struct amdgpu_userq_mgr *uq_mgr,
struct amdgpu_usermode_queue *queue)
{
- struct amdgpu_device *adev = uq_mgr->adev;
-
amdgpu_userqueue_destroy_object(uq_mgr, &queue->fw_obj);
kfree(queue->userq_prop);
amdgpu_userqueue_destroy_object(uq_mgr, &queue->mqd);
-
- pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
- pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
}
const struct amdgpu_userq_funcs userq_mes_funcs = {