hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/gpu/arm/bifrost/backend/gpu/mali_kbase_js_backend.c
....@@ -1,7 +1,7 @@
11 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
22 /*
33 *
4
- * (C) COPYRIGHT 2014-2021 ARM Limited. All rights reserved.
4
+ * (C) COPYRIGHT 2014-2022 ARM Limited. All rights reserved.
55 *
66 * This program is free software and is provided to you under the terms of the
77 * GNU General Public License version 2 as published by the Free Software
....@@ -91,7 +91,7 @@
9191 struct kbase_device *kbdev;
9292 struct kbasep_js_device_data *js_devdata;
9393 struct kbase_backend_data *backend;
94
- int s;
94
+ unsigned int s;
9595 bool reset_needed = false;
9696
9797 KBASE_DEBUG_ASSERT(timer != NULL);
....@@ -131,10 +131,15 @@
131131 } else {
132132 soft_stop_ticks =
133133 js_devdata->soft_stop_ticks;
134
+ if (kbase_is_quick_reset_enabled(kbdev)) {
135
+ hard_stop_ticks = 2;
136
+ gpu_reset_ticks = 3;
137
+ } else {
134138 hard_stop_ticks =
135139 js_devdata->hard_stop_ticks_ss;
136140 gpu_reset_ticks =
137141 js_devdata->gpu_reset_ticks_ss;
142
+ }
138143 }
139144
140145 /* If timeouts have been changed then ensure
....@@ -196,9 +201,10 @@
196201 int ms =
197202 js_devdata->scheduling_period_ns
198203 / 1000000u;
199
- dev_warn(kbdev->dev, "JS: Job Hard-Stopped (took more than %lu ticks at %lu ms/tick)",
200
- (unsigned long)ticks,
201
- (unsigned long)ms);
204
+ if (!kbase_is_quick_reset_enabled(kbdev))
205
+ dev_warn(kbdev->dev, "JS: Job Hard-Stopped (took more than %lu ticks at %lu ms/tick)",
206
+ (unsigned long)ticks,
207
+ (unsigned long)ms);
202208 kbase_job_slot_hardstop(atom->kctx, s,
203209 atom);
204210 #endif
....@@ -255,7 +261,11 @@
255261 }
256262 }
257263 if (reset_needed) {
258
- dev_err(kbdev->dev, "JS: Job has been on the GPU for too long (JS_RESET_TICKS_SS/DUMPING timeout hit). Issuing GPU soft-reset to resolve.");
264
+ if (kbase_is_quick_reset_enabled(kbdev))
265
+ dev_err(kbdev->dev, "quick reset");
266
+ else {
267
+ dev_err(kbdev->dev, "JS: Job has been on the GPU for too long (JS_RESET_TICKS_SS/DUMPING timeout hit). Issuing GPU soft-reset to resolve.");
268
+ }
259269
260270 if (kbase_prepare_to_reset_gpu_locked(kbdev, RESET_FLAGS_NONE))
261271 kbase_reset_gpu_locked(kbdev);
....@@ -365,4 +375,3 @@
365375
366376 backend->timeouts_updated = true;
367377 }
368
-