diff options
author | Rob Clark <robdclark@chromium.org> | 2021-11-09 10:11:04 -0800 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2021-11-28 09:56:47 -0800 |
commit | 5f3aee4ceb5b8607e9a4b752c2547667200e19e2 (patch) | |
tree | 934beb2681895656580507bbd893c791ac8b3c8d /drivers/gpu/drm/msm/msm_gpu.h | |
parent | c28e2f2b417ed747bfbc5f900c87f3ec9cc6b25e (diff) | |
download | lwn-5f3aee4ceb5b8607e9a4b752c2547667200e19e2.tar.gz lwn-5f3aee4ceb5b8607e9a4b752c2547667200e19e2.zip |
drm/msm: Handle fence rollover
Add some helpers for fence comparision, which handle rollover properly,
and stop open coding fence seqno comparisions.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Akhil P Oommen <akhilpo@codeaurora.org>
Link: https://lore.kernel.org/r/20211109181117.591148-5-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gpu.h')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gpu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h index 0078a925fb64..37b3ecb33cbd 100644 --- a/drivers/gpu/drm/msm/msm_gpu.h +++ b/drivers/gpu/drm/msm/msm_gpu.h @@ -262,7 +262,7 @@ static inline bool msm_gpu_active(struct msm_gpu *gpu) for (i = 0; i < gpu->nr_rings; i++) { struct msm_ringbuffer *ring = gpu->rb[i]; - if (ring->seqno > ring->memptrs->fence) + if (fence_after(ring->seqno, ring->memptrs->fence)) return true; } |