drm/xe: Remove useless mem_access on PAT dumps
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 22 Feb 2024 16:39:37 +0000 (11:39 -0500)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 26 Feb 2024 14:06:46 +0000 (09:06 -0500)
PAT dumps are already protected by the xe_pm_runtime_{get,put}
around the debugfs call. So, these can be removed.

Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240222163937.138342-14-rodrigo.vivi@intel.com
drivers/gpu/drm/xe/xe_pat.c

index e148934d554b0d08beb23b9b08f534b7bff582e7..66d8e3dd823708fb3c65d3352abf0fb584a12927 100644 (file)
@@ -174,7 +174,6 @@ static void xelp_dump(struct xe_gt *gt, struct drm_printer *p)
        struct xe_device *xe = gt_to_xe(gt);
        int i, err;
 
-       xe_device_mem_access_get(xe);
        err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
        if (err)
                goto err_fw;
@@ -192,7 +191,6 @@ static void xelp_dump(struct xe_gt *gt, struct drm_printer *p)
        err = xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
 err_fw:
        xe_assert(xe, !err);
-       xe_device_mem_access_put(xe);
 }
 
 static const struct xe_pat_ops xelp_pat_ops = {
@@ -205,7 +203,6 @@ static void xehp_dump(struct xe_gt *gt, struct drm_printer *p)
        struct xe_device *xe = gt_to_xe(gt);
        int i, err;
 
-       xe_device_mem_access_get(xe);
        err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
        if (err)
                goto err_fw;
@@ -225,7 +222,6 @@ static void xehp_dump(struct xe_gt *gt, struct drm_printer *p)
        err = xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
 err_fw:
        xe_assert(xe, !err);
-       xe_device_mem_access_put(xe);
 }
 
 static const struct xe_pat_ops xehp_pat_ops = {
@@ -238,7 +234,6 @@ static void xehpc_dump(struct xe_gt *gt, struct drm_printer *p)
        struct xe_device *xe = gt_to_xe(gt);
        int i, err;
 
-       xe_device_mem_access_get(xe);
        err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
        if (err)
                goto err_fw;
@@ -256,7 +251,6 @@ static void xehpc_dump(struct xe_gt *gt, struct drm_printer *p)
        err = xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
 err_fw:
        xe_assert(xe, !err);
-       xe_device_mem_access_put(xe);
 }
 
 static const struct xe_pat_ops xehpc_pat_ops = {
@@ -269,7 +263,6 @@ static void xelpg_dump(struct xe_gt *gt, struct drm_printer *p)
        struct xe_device *xe = gt_to_xe(gt);
        int i, err;
 
-       xe_device_mem_access_get(xe);
        err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
        if (err)
                goto err_fw;
@@ -292,7 +285,6 @@ static void xelpg_dump(struct xe_gt *gt, struct drm_printer *p)
        err = xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
 err_fw:
        xe_assert(xe, !err);
-       xe_device_mem_access_put(xe);
 }
 
 /*
@@ -325,7 +317,6 @@ static void xe2_dump(struct xe_gt *gt, struct drm_printer *p)
        int i, err;
        u32 pat;
 
-       xe_device_mem_access_get(xe);
        err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
        if (err)
                goto err_fw;
@@ -370,7 +361,6 @@ static void xe2_dump(struct xe_gt *gt, struct drm_printer *p)
        err = xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
 err_fw:
        xe_assert(xe, !err);
-       xe_device_mem_access_put(xe);
 }
 
 static const struct xe_pat_ops xe2_pat_ops = {