summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@intel.com>2024-02-22 11:39:31 -0500
committerRodrigo Vivi <rodrigo.vivi@intel.com>2024-02-26 09:06:45 -0500
commitdb5a5a8338347ef43bb53ccab730cde326d030e8 (patch)
treefe58c214f1446268d30e006a6a6af5546eae72ea
parent5b2b3a0fbb287d862cb39469a0f4826d8073b30e (diff)
downloadlinux-stable-db5a5a8338347ef43bb53ccab730cde326d030e8.tar.gz
linux-stable-db5a5a8338347ef43bb53ccab730cde326d030e8.tar.bz2
linux-stable-db5a5a8338347ef43bb53ccab730cde326d030e8.zip
drm/xe: Replace dma_buf mem_access per direct xe_pm_runtime calls
Continue on the path to entirely remove mem_access helpers in favour of the direct xe_pm_runtime calls. This item is one of the direct outer bounds of the protection. Reviewed-by: Matthew Auld <matthew.auld@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240222163937.138342-8-rodrigo.vivi@intel.com
-rw-r--r--drivers/gpu/drm/xe/xe_dma_buf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_dma_buf.c b/drivers/gpu/drm/xe/xe_dma_buf.c
index da2627ed6ae7..5b26af21e029 100644
--- a/drivers/gpu/drm/xe/xe_dma_buf.c
+++ b/drivers/gpu/drm/xe/xe_dma_buf.c
@@ -16,6 +16,7 @@
#include "tests/xe_test.h"
#include "xe_bo.h"
#include "xe_device.h"
+#include "xe_pm.h"
#include "xe_ttm_vram_mgr.h"
#include "xe_vm.h"
@@ -33,7 +34,7 @@ static int xe_dma_buf_attach(struct dma_buf *dmabuf,
if (!attach->peer2peer && !xe_bo_can_migrate(gem_to_xe_bo(obj), XE_PL_TT))
return -EOPNOTSUPP;
- xe_device_mem_access_get(to_xe_device(obj->dev));
+ xe_pm_runtime_get(to_xe_device(obj->dev));
return 0;
}
@@ -42,7 +43,7 @@ static void xe_dma_buf_detach(struct dma_buf *dmabuf,
{
struct drm_gem_object *obj = attach->dmabuf->priv;
- xe_device_mem_access_put(to_xe_device(obj->dev));
+ xe_pm_runtime_put(to_xe_device(obj->dev));
}
static int xe_dma_buf_pin(struct dma_buf_attachment *attach)