Commit 7da1d76f authored by Matthew Auld's avatar Matthew Auld Committed by Rodrigo Vivi

drm/xe/mmio: grab mem_access in xe_mmio_ioctl

Any kind of device memory access should first ensure the device is not
suspended, mmio included.
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 2d3ab1fa
...@@ -483,6 +483,7 @@ int xe_mmio_ioctl(struct drm_device *dev, void *data, ...@@ -483,6 +483,7 @@ int xe_mmio_ioctl(struct drm_device *dev, void *data,
*/ */
reg = XE_REG(args->addr); reg = XE_REG(args->addr);
xe_device_mem_access_get(xe);
xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL); xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
if (args->flags & DRM_XE_MMIO_WRITE) { if (args->flags & DRM_XE_MMIO_WRITE) {
...@@ -526,6 +527,7 @@ int xe_mmio_ioctl(struct drm_device *dev, void *data, ...@@ -526,6 +527,7 @@ int xe_mmio_ioctl(struct drm_device *dev, void *data,
exit: exit:
xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL); xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL);
xe_device_mem_access_put(xe);
return ret; return ret;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment