summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2025-11-18 19:44:00 +0300
committerMatt Roper <matthew.d.roper@intel.com>2025-11-19 22:58:58 +0300
commitfaa4b73bf75003ad89ed4d1afd3e9e59a48a63fd (patch)
tree0e98f1af54f6556d856035a380109bba3780aad0 /drivers
parent60a4661d12ca58c794337d09d26f3f57e235cd2d (diff)
downloadlinux-faa4b73bf75003ad89ed4d1afd3e9e59a48a63fd.tar.xz
drm/xe/bo: Use scope-based runtime PM
Use scope-based runtime power management in the BO code for consistency with other parts of the driver. v2: - Drop unnecessary 'ret' variable. (Gustavo) Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://patch.msgid.link/20251118164338.3572146-50-matthew.d.roper@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/xe/xe_bo.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index bbda20d7c089..465cf9fc7ce9 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -2032,13 +2032,9 @@ static int xe_bo_vm_access(struct vm_area_struct *vma, unsigned long addr,
struct ttm_buffer_object *ttm_bo = vma->vm_private_data;
struct xe_bo *bo = ttm_to_xe_bo(ttm_bo);
struct xe_device *xe = xe_bo_device(bo);
- int ret;
-
- xe_pm_runtime_get(xe);
- ret = ttm_bo_vm_access(vma, addr, buf, len, write);
- xe_pm_runtime_put(xe);
- return ret;
+ guard(xe_pm_runtime)(xe);
+ return ttm_bo_vm_access(vma, addr, buf, len, write);
}
/**