msm: kgsl: No fault tolerance if userspace sets a flag
If userspace requests no fault tolerance using context flag
KGSL_CONTEXT_NO_FAULT_TOLERANCE, do not attempt denial of
service detection and do not attempt fault tolerance when
a hang is detected.
Change-Id: I5de0e4ae6e8407365725c30fcb0e00a601460ebc
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c
index 5f53823..3e6b77c 100644
--- a/drivers/gpu/msm/adreno.c
+++ b/drivers/gpu/msm/adreno.c
@@ -1793,7 +1793,16 @@
*/
context->wait_on_invalid_ts = false;
- KGSL_FT_INFO(device, "Context found\n");
+ /*
+ * This flag will be set by userspace for contexts
+ * that do not want to be fault tolerant (ex: OPENCL)
+ */
+ if (adreno_context->flags & CTXT_FLAGS_NO_FAULT_TOLERANCE) {
+ KGSL_FT_ERR(device,
+ "No FT set for this context play good cmds\n");
+ goto play_good_cmds;
+ }
+
}
/*
@@ -2798,7 +2807,9 @@
return 1;
}
- if (long_ib_detected) {
+ if ((long_ib_detected) &&
+ (!(curr_context->flags &
+ CTXT_FLAGS_NO_FAULT_TOLERANCE))) {
curr_context->ib_gpu_time_used +=
KGSL_TIMEOUT_PART;
if (curr_context->ib_gpu_time_used >