Skip to content

Commit

Permalink
drm/msm: Move update_fences()
Browse files Browse the repository at this point in the history
Small cleanup, update_fences() is used in the hangcheck path, but also
in the normal retire path.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
  • Loading branch information
Rob Clark committed Nov 5, 2020
1 parent 07ddf4c commit 2a86efb
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions drivers/gpu/drm/msm/msm_gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,20 @@ int msm_gpu_hw_init(struct msm_gpu *gpu)
return ret;
}

static void update_fences(struct msm_gpu *gpu, struct msm_ringbuffer *ring,
uint32_t fence)
{
struct msm_gem_submit *submit;

list_for_each_entry(submit, &ring->submits, node) {
if (submit->seqno > fence)
break;

msm_update_fence(submit->ring->fctx,
submit->fence->seqno);
}
}

#ifdef CONFIG_DEV_COREDUMP
static ssize_t msm_gpu_devcoredump_read(char *buffer, loff_t offset,
size_t count, void *data, size_t datalen)
Expand Down Expand Up @@ -410,20 +424,6 @@ static void msm_gpu_crashstate_capture(struct msm_gpu *gpu,
* Hangcheck detection for locked gpu:
*/

static void update_fences(struct msm_gpu *gpu, struct msm_ringbuffer *ring,
uint32_t fence)
{
struct msm_gem_submit *submit;

list_for_each_entry(submit, &ring->submits, node) {
if (submit->seqno > fence)
break;

msm_update_fence(submit->ring->fctx,
submit->fence->seqno);
}
}

static struct msm_gem_submit *
find_submit(struct msm_ringbuffer *ring, uint32_t fence)
{
Expand Down

0 comments on commit 2a86efb

Please sign in to comment.