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: Jordan Crouse <jcrouse@codeaurora.org>
This commit is contained in:
Jordan Crouse 2017-06-28 09:55:11 -06:00
parent abfc1cf3b3
commit c94c4109c3
3 changed files with 5 additions and 5 deletions

View file

@ -346,13 +346,13 @@ static void hangcheck_handler(unsigned long data)
uint32_t fence = ring->memptrs->fence; uint32_t fence = ring->memptrs->fence;
uint32_t submitted = gpu->funcs->submitted_fence(gpu, ring); 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! */ /* some progress has been made.. ya! */
gpu->hangcheck_fence[ring->id] = fence; ring->hangcheck_fence = fence;
} else if (fence < submitted) { } else if (fence < submitted) {
struct msm_gem_submit *submit; 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 * No progress done, but see if the current submit is
@ -378,7 +378,7 @@ static void hangcheck_handler(unsigned long data)
out: out:
/* if still more pending work, reset the hangcheck timer: */ /* 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); hangcheck_timer_reset(gpu);
/* workaround for missing irq: */ /* workaround for missing irq: */

View file

@ -145,7 +145,6 @@ struct msm_gpu {
#define DRM_MSM_HANGCHECK_PERIOD 500 /* in ms */ #define DRM_MSM_HANGCHECK_PERIOD 500 /* in ms */
#define DRM_MSM_HANGCHECK_JIFFIES msecs_to_jiffies(DRM_MSM_HANGCHECK_PERIOD) #define DRM_MSM_HANGCHECK_JIFFIES msecs_to_jiffies(DRM_MSM_HANGCHECK_PERIOD)
struct timer_list hangcheck_timer; struct timer_list hangcheck_timer;
uint32_t hangcheck_fence[MSM_GPU_MAX_RINGS];
struct work_struct recover_work; struct work_struct recover_work;
struct msm_snapshot *snapshot; struct msm_snapshot *snapshot;
}; };

View file

@ -50,6 +50,7 @@ struct msm_ringbuffer {
uint32_t submitted_fence; uint32_t submitted_fence;
spinlock_t lock; spinlock_t lock;
struct list_head submits; struct list_head submits;
uint32_t hangcheck_fence;
struct msm_memptrs *memptrs; struct msm_memptrs *memptrs;
uint64_t memptrs_iova; uint64_t memptrs_iova;