msm: kgsl: Allow draw context to perform only replay on recovery
Robust context attempts to perform a rendering that takes too long whether due to an infinite loop in a shader or even just a rendering operation that takes too long on the given hardware. This type of attempts can result into GPU faults. Robust context expect driver to replay IB instead skip IB and if it fails on replay context has to be invalidated. KGSL_CONTEXT_INVALIDATE_ON_FAULT flag allows draw context to execute only replay policy on GPU fault recovery instead of going to default recovery policy. User space has to set this flag during the context creation. Change-Id: If42dc5afc7d5ed1226b73ae5abfa2648d7acf2c3 Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
This commit is contained in:
parent
6cf6835d96
commit
d689330ab5
4 changed files with 11 additions and 0 deletions
|
@ -1041,6 +1041,13 @@ static void _set_ft_policy(struct adreno_device *adreno_dev,
|
|||
*/
|
||||
if (drawctxt->base.flags & KGSL_CONTEXT_NO_FAULT_TOLERANCE)
|
||||
set_bit(KGSL_FT_DISABLE, &cmdobj->fault_policy);
|
||||
/*
|
||||
* Set the fault tolerance policy to FT_REPLAY - As context wants
|
||||
* to invalidate it after a replay attempt fails. This doesn't
|
||||
* require to execute the default FT policy.
|
||||
*/
|
||||
else if (drawctxt->base.flags & KGSL_CONTEXT_INVALIDATE_ON_FAULT)
|
||||
set_bit(KGSL_FT_REPLAY, &cmdobj->fault_policy);
|
||||
else
|
||||
cmdobj->fault_policy = adreno_dev->ft_policy;
|
||||
}
|
||||
|
|
|
@ -346,6 +346,7 @@ adreno_drawctxt_create(struct kgsl_device_private *dev_priv,
|
|||
KGSL_CONTEXT_PER_CONTEXT_TS |
|
||||
KGSL_CONTEXT_USER_GENERATED_TS |
|
||||
KGSL_CONTEXT_NO_FAULT_TOLERANCE |
|
||||
KGSL_CONTEXT_INVALIDATE_ON_FAULT |
|
||||
KGSL_CONTEXT_CTX_SWITCH |
|
||||
KGSL_CONTEXT_PRIORITY_MASK |
|
||||
KGSL_CONTEXT_TYPE_MASK |
|
||||
|
|
|
@ -77,6 +77,7 @@ enum kgsl_event_results {
|
|||
{ KGSL_CONTEXT_PER_CONTEXT_TS, "PER_CONTEXT_TS" }, \
|
||||
{ KGSL_CONTEXT_USER_GENERATED_TS, "USER_TS" }, \
|
||||
{ KGSL_CONTEXT_NO_FAULT_TOLERANCE, "NO_FT" }, \
|
||||
{ KGSL_CONTEXT_INVALIDATE_ON_FAULT, "INVALIDATE_ON_FAULT" }, \
|
||||
{ KGSL_CONTEXT_PWR_CONSTRAINT, "PWR" }, \
|
||||
{ KGSL_CONTEXT_SAVE_GMEM, "SAVE_GMEM" }
|
||||
|
||||
|
|
|
@ -67,6 +67,8 @@
|
|||
#define KGSL_CONTEXT_TYPE_RS 4
|
||||
#define KGSL_CONTEXT_TYPE_UNKNOWN 0x1E
|
||||
|
||||
#define KGSL_CONTEXT_INVALIDATE_ON_FAULT 0x10000000
|
||||
|
||||
#define KGSL_CONTEXT_INVALID 0xffffffff
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue