[PATCH 10/11] drm/xe: Ensure all the inner access are using the _noresume variant

2024-03-14 Thread Rodrigo Vivi
At this point mem_access references should be only used as inner
points of the execution and a get with synchronous resume previously
called at an outer point.

So, before killing mem_acces in favor of direct accsess, let's
ensure that we first convert them towards the new _noresume
variant that will WARN us if no inner caller happened.

Signed-off-by: Rodrigo Vivi 
Reviewed-by: Matthew Auld 
---
 drivers/gpu/drm/xe/xe_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 0a51eddd264b..6ab402153242 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -671,7 +671,7 @@ void xe_device_mem_access_get(struct xe_device *xe)
if (xe_pm_read_callback_task(xe) == current)
return;
 
-   xe_pm_runtime_get(xe);
+   xe_pm_runtime_get_noresume(xe);
ref = atomic_inc_return(>mem_access.ref);
 
xe_assert(xe, ref != S32_MAX);
-- 
2.44.0



[PATCH 10/11] drm/xe: Ensure all the inner access are using the _noresume variant

2024-03-11 Thread Rodrigo Vivi
At this point mem_access references should be only used as inner
points of the execution and a get with synchronous resume previously
called at an outer point.

So, before killing mem_acces in favor of direct accsess, let's
ensure that we first convert them towards the new _noresume
variant that will WARN us if no inner caller happened.

Signed-off-by: Rodrigo Vivi 
Reviewed-by: Matthew Auld 
---
 drivers/gpu/drm/xe/xe_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 6c7850dd70b5..58815e9bf242 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -671,7 +671,7 @@ void xe_device_mem_access_get(struct xe_device *xe)
if (xe_pm_read_callback_task(xe) == current)
return;
 
-   xe_pm_runtime_get(xe);
+   xe_pm_runtime_get_noresume(xe);
ref = atomic_inc_return(>mem_access.ref);
 
xe_assert(xe, ref != S32_MAX);
-- 
2.44.0