diff options
| author | Hareesh Gundu <hareeshg@codeaurora.org> | 2017-04-14 18:36:20 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-04-23 23:47:46 -0700 |
| commit | d689330ab5ed8c58a51be496cfa6f4467663c7ff (patch) | |
| tree | 9e12c3e0828c3812f85cf3bfd7563393b95e0ad8 /drivers/gpu/msm/adreno_dispatch.c | |
| parent | 6cf6835d964a71fa857d03f8e2f28a581da3b3b2 (diff) | |
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>
Diffstat (limited to 'drivers/gpu/msm/adreno_dispatch.c')
| -rw-r--r-- | drivers/gpu/msm/adreno_dispatch.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/msm/adreno_dispatch.c b/drivers/gpu/msm/adreno_dispatch.c index f084ca9a62a1..54b8da5302e8 100644 --- a/drivers/gpu/msm/adreno_dispatch.c +++ b/drivers/gpu/msm/adreno_dispatch.c @@ -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; } |
