Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c94c4109 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

drm/msm: Move hangcheck fence to ringbuffer



hangcheck_fence was missed when all the ring specific members were
moved out of the gpu struct.

Change-Id: Ic0dedbad00a86d6657bc2a3e0e5bbdc5eae21ae6
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent abfc1cf3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -346,13 +346,13 @@ static void hangcheck_handler(unsigned long data)
	uint32_t fence = ring->memptrs->fence;
	uint32_t submitted = gpu->funcs->submitted_fence(gpu, ring);

	if (fence != gpu->hangcheck_fence[ring->id]) {
	if (fence != ring->hangcheck_fence) {
		/* some progress has been made.. ya! */
		gpu->hangcheck_fence[ring->id] = fence;
		ring->hangcheck_fence = fence;
	} else if (fence < submitted) {
		struct msm_gem_submit *submit;

		gpu->hangcheck_fence[ring->id] = fence;
		ring->hangcheck_fence = fence;

		/*
		 * No progress done, but see if the current submit is
@@ -378,7 +378,7 @@ static void hangcheck_handler(unsigned long data)

out:
	/* if still more pending work, reset the hangcheck timer: */
	if (submitted > gpu->hangcheck_fence[ring->id])
	if (submitted > ring->hangcheck_fence)
		hangcheck_timer_reset(gpu);

	/* workaround for missing irq: */
+0 −1
Original line number Diff line number Diff line
@@ -145,7 +145,6 @@ struct msm_gpu {
#define DRM_MSM_HANGCHECK_PERIOD 500 /* in ms */
#define DRM_MSM_HANGCHECK_JIFFIES msecs_to_jiffies(DRM_MSM_HANGCHECK_PERIOD)
	struct timer_list hangcheck_timer;
	uint32_t hangcheck_fence[MSM_GPU_MAX_RINGS];
	struct work_struct recover_work;
	struct msm_snapshot *snapshot;
};
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ struct msm_ringbuffer {
	uint32_t submitted_fence;
	spinlock_t lock;
	struct list_head submits;
	uint32_t hangcheck_fence;

	struct msm_memptrs *memptrs;
	uint64_t memptrs_iova;