diff options
| author | Rob Clark <[email protected]> | 2022-06-28 15:41:29 -0700 |
|---|---|---|
| committer | Rob Clark <[email protected]> | 2022-06-28 15:41:29 -0700 |
| commit | 1796c0255bae9d3d4528b8b3916182b2bc4e1e71 (patch) | |
| tree | 474ecb1ef87ad1bd1d41c62737da924db224f4a2 /drivers/gpu/drm/msm/msm_fence.c | |
| parent | b13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3 (diff) | |
| parent | 08de214138cdea438a0dfcb10d355a6650c6017c (diff) | |
Merge tag 'drm-msm-fixes-2022-06-28' into msm-next-staging
Merge v5.19 fixes to avoid merge conflicts
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_fence.c')
| -rw-r--r-- | drivers/gpu/drm/msm/msm_fence.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/msm_fence.c b/drivers/gpu/drm/msm/msm_fence.c index 3df255402a33..38e3323bc232 100644 --- a/drivers/gpu/drm/msm/msm_fence.c +++ b/drivers/gpu/drm/msm/msm_fence.c @@ -46,12 +46,14 @@ bool msm_fence_completed(struct msm_fence_context *fctx, uint32_t fence) (int32_t)(*fctx->fenceptr - fence) >= 0; } -/* called from workqueue */ +/* called from irq handler and workqueue (in recover path) */ void msm_update_fence(struct msm_fence_context *fctx, uint32_t fence) { - spin_lock(&fctx->spinlock); + unsigned long flags; + + spin_lock_irqsave(&fctx->spinlock, flags); fctx->completed_fence = max(fence, fctx->completed_fence); - spin_unlock(&fctx->spinlock); + spin_unlock_irqrestore(&fctx->spinlock, flags); } struct msm_fence { |