Skip to content

Commit fdea94a

Browse files
committed
drm/xe: Convert xe_gem_fault to use direct xe_pm_runtime calls
The gem page fault is one of the outer bound protections where we want to ensure that the hardware is in D0 before proceeding with memory access. Let's convert it towards the xe_pm_runtime functions directly so we can then convert the mem_access to be inner protection only and then Kill it for good. Reviewed-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 152c37b commit fdea94a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/xe/xe_bo.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "xe_gt.h"
2323
#include "xe_map.h"
2424
#include "xe_migrate.h"
25+
#include "xe_pm.h"
2526
#include "xe_preempt_fence.h"
2627
#include "xe_res_cursor.h"
2728
#include "xe_trace.h"
@@ -1107,7 +1108,7 @@ static vm_fault_t xe_gem_fault(struct vm_fault *vmf)
11071108
int idx;
11081109

11091110
if (needs_rpm)
1110-
xe_device_mem_access_get(xe);
1111+
xe_pm_runtime_get(xe);
11111112

11121113
ret = ttm_bo_vm_reserve(tbo, vmf);
11131114
if (ret)
@@ -1138,7 +1139,7 @@ static vm_fault_t xe_gem_fault(struct vm_fault *vmf)
11381139
dma_resv_unlock(tbo->base.resv);
11391140
out:
11401141
if (needs_rpm)
1141-
xe_device_mem_access_put(xe);
1142+
xe_pm_runtime_put(xe);
11421143

11431144
return ret;
11441145
}

0 commit comments

Comments
 (0)