Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+2 -6
+2 -6
drivers/gpu/drm/xe/xe_bo.c
··· 2032 2032 struct ttm_buffer_object *ttm_bo = vma->vm_private_data; 2033 2033 struct xe_bo *bo = ttm_to_xe_bo(ttm_bo); 2034 2034 struct xe_device *xe = xe_bo_device(bo); 2035 - int ret; 2036 2035 2037 - xe_pm_runtime_get(xe); 2038 - ret = ttm_bo_vm_access(vma, addr, buf, len, write); 2039 - xe_pm_runtime_put(xe); 2040 - 2041 - return ret; 2036 + guard(xe_pm_runtime)(xe); 2037 + return ttm_bo_vm_access(vma, addr, buf, len, write); 2042 2038 } 2043 2039 2044 2040 /**