diff options
| author | Sharat Masetty <smasetty@codeaurora.org> | 2017-07-28 16:00:02 +0530 |
|---|---|---|
| committer | Sharat Masetty <smasetty@codeaurora.org> | 2017-08-03 10:51:43 +0530 |
| commit | ddfc1dd716fd1cdec78776b5b0eb0ff3e95bea2d (patch) | |
| tree | 440c9fcff53f6715c3c13693d6875bfe9dc6a489 /kernel/locking/mutex-debug.c | |
| parent | ac8211566ba58dd2be22c399f559a44a09054bf4 (diff) | |
drm/msm: Fix race condition in the submit path
There is a race condition issue between the IRQ context trying to
trigger preemption and the user context trying to submit commands to
the GPU. The check in a5xx_flush() API only updates the wptr if the GPU is
not in preemption. In the cases where we move from PREEMPT_START to
PREEMPT_NONE there is a small window where the preempt state is still
in START but the CPU context switches to the user thread which is in
the a5xx_flush() call to update the wptr, but fails to update the wptr to
the GPU since the preempt state is not PREEMPT_NONE. This leads to a
GPU stall.
Introduce a new intermediate state PREEMPT_ABORT and
change preempt_trigger() to use gpu's current ring instead of the
ring retrieved from get_next_ring() while in this state.
Change-Id: I333e9de19824bd373901bbc8afc829de04635017
CRs-Fixed: 2081164
Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
Diffstat (limited to 'kernel/locking/mutex-debug.c')
0 files changed, 0 insertions, 0 deletions
