]> git.dujemihanovic.xyz Git - linux.git/commitdiff
drm/xe: Change xe_guc_submit_stop return to void
authorHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Wed, 24 Apr 2024 04:19:11 +0000 (09:49 +0530)
committerMatthew Brost <matthew.brost@intel.com>
Fri, 26 Apr 2024 03:38:49 +0000 (20:38 -0700)
The function xe_guc_submit_stop consistently returns 0 without an error
state, prompting the caller to verify it, which is redundant.

Cc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240424041911.2184868-1-himal.prasad.ghimiray@intel.com
drivers/gpu/drm/xe/xe_gt.c
drivers/gpu/drm/xe/xe_guc.c
drivers/gpu/drm/xe/xe_guc.h
drivers/gpu/drm/xe/xe_guc_submit.c
drivers/gpu/drm/xe/xe_guc_submit.h
drivers/gpu/drm/xe/xe_uc.c
drivers/gpu/drm/xe/xe_uc.h

index e922e77f5010ea7e89b49bd16364d270724ddae6..a49e456b968de43170503f5fb83711b407712af7 100644 (file)
@@ -658,9 +658,7 @@ static int gt_reset(struct xe_gt *gt)
        xe_uc_stop_prepare(&gt->uc);
        xe_gt_pagefault_reset(gt);
 
-       err = xe_uc_stop(&gt->uc);
-       if (err)
-               goto err_out;
+       xe_uc_stop(&gt->uc);
 
        xe_gt_tlb_invalidation_reset(gt);
 
index 17438d5b18a408743b735c2a1fdba53021b097c7..0c9938e0ab8c6ceb4b50627f00026c5379edbc96 100644 (file)
@@ -885,17 +885,11 @@ void xe_guc_stop_prepare(struct xe_guc *guc)
        XE_WARN_ON(xe_guc_pc_stop(&guc->pc));
 }
 
-int xe_guc_stop(struct xe_guc *guc)
+void xe_guc_stop(struct xe_guc *guc)
 {
-       int ret;
-
        xe_guc_ct_stop(&guc->ct);
 
-       ret = xe_guc_submit_stop(guc);
-       if (ret)
-               return ret;
-
-       return 0;
+       xe_guc_submit_stop(guc);
 }
 
 int xe_guc_start(struct xe_guc *guc)
index 94f2dc5f6f90bade89eeb1eab8602a80cf52e7ba..a3c92b74a3d51337d6b1953d070cc6229e980771 100644 (file)
@@ -35,7 +35,7 @@ void xe_guc_print_info(struct xe_guc *guc, struct drm_printer *p);
 int xe_guc_reset_prepare(struct xe_guc *guc);
 void xe_guc_reset_wait(struct xe_guc *guc);
 void xe_guc_stop_prepare(struct xe_guc *guc);
-int xe_guc_stop(struct xe_guc *guc);
+void xe_guc_stop(struct xe_guc *guc);
 int xe_guc_start(struct xe_guc *guc);
 bool xe_guc_in_reset(struct xe_guc *guc);
 
index cd082b8523fa352d48c633d885a51b413c7b9dd3..d274a139010bb7548a32efaebc4ee85aa5408a15 100644 (file)
@@ -1519,7 +1519,7 @@ void xe_guc_submit_reset_wait(struct xe_guc *guc)
        wait_event(guc->ct.wq, !guc_read_stopped(guc));
 }
 
-int xe_guc_submit_stop(struct xe_guc *guc)
+void xe_guc_submit_stop(struct xe_guc *guc)
 {
        struct xe_exec_queue *q;
        unsigned long index;
@@ -1539,7 +1539,6 @@ int xe_guc_submit_stop(struct xe_guc *guc)
         * creation which is protected by guc->submission_state.lock.
         */
 
-       return 0;
 }
 
 static void guc_exec_queue_start(struct xe_exec_queue *q)
index fad0421ead36212c8b9fb4ff5bd320128659aae5..4275b7da9df5f908834e34dd002150464f8883a5 100644 (file)
@@ -16,7 +16,7 @@ int xe_guc_submit_init(struct xe_guc *guc);
 
 int xe_guc_submit_reset_prepare(struct xe_guc *guc);
 void xe_guc_submit_reset_wait(struct xe_guc *guc);
-int xe_guc_submit_stop(struct xe_guc *guc);
+void xe_guc_submit_stop(struct xe_guc *guc);
 int xe_guc_submit_start(struct xe_guc *guc);
 
 int xe_guc_sched_done_handler(struct xe_guc *guc, u32 *msg, u32 len);
index 4feb35c95a1caf1f5e2ee1e70e4eb76c43750e0f..0f6cfe06e6358d1615f2d65b564d339d0ee0b0f8 100644 (file)
@@ -215,13 +215,13 @@ void xe_uc_stop_prepare(struct xe_uc *uc)
        xe_guc_stop_prepare(&uc->guc);
 }
 
-int xe_uc_stop(struct xe_uc *uc)
+void xe_uc_stop(struct xe_uc *uc)
 {
        /* GuC submission not enabled, nothing to do */
        if (!xe_device_uc_enabled(uc_to_xe(uc)))
-               return 0;
+               return;
 
-       return xe_guc_stop(&uc->guc);
+       xe_guc_stop(&uc->guc);
 }
 
 int xe_uc_start(struct xe_uc *uc)
@@ -247,17 +247,13 @@ again:
 
 int xe_uc_suspend(struct xe_uc *uc)
 {
-       int ret;
-
        /* GuC submission not enabled, nothing to do */
        if (!xe_device_uc_enabled(uc_to_xe(uc)))
                return 0;
 
        uc_reset_wait(uc);
 
-       ret = xe_uc_stop(uc);
-       if (ret)
-               return ret;
+       xe_uc_stop(uc);
 
        return xe_guc_suspend(&uc->guc);
 }
index e4d4e3c99f0e7ad066e56a342e6f3247496c80b9..5dfa7725483d05c8ba37e3d79739425f1c749a63 100644 (file)
@@ -16,7 +16,7 @@ int xe_uc_fini_hw(struct xe_uc *uc);
 void xe_uc_gucrc_disable(struct xe_uc *uc);
 int xe_uc_reset_prepare(struct xe_uc *uc);
 void xe_uc_stop_prepare(struct xe_uc *uc);
-int xe_uc_stop(struct xe_uc *uc);
+void xe_uc_stop(struct xe_uc *uc);
 int xe_uc_start(struct xe_uc *uc);
 int xe_uc_suspend(struct xe_uc *uc);
 int xe_uc_sanitize_reset(struct xe_uc *uc);