drm/i915: give more distinctive names to ring hangcheck action enums
The short lowercase names are bound to collide. The default warnings don't even warn about shadowing. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
c8b5018b22
commit
f2f4d82faf
|
@ -2214,7 +2214,7 @@ static void i915_set_reset_status(struct intel_ring_buffer *ring,
|
||||||
offset = i915_gem_obj_offset(request->batch_obj,
|
offset = i915_gem_obj_offset(request->batch_obj,
|
||||||
request_to_vm(request));
|
request_to_vm(request));
|
||||||
|
|
||||||
if (ring->hangcheck.action != wait &&
|
if (ring->hangcheck.action != HANGCHECK_WAIT &&
|
||||||
i915_request_guilty(request, acthd, &inside)) {
|
i915_request_guilty(request, acthd, &inside)) {
|
||||||
DRM_ERROR("%s hung %s bo (0x%lx ctx %d) at 0x%x\n",
|
DRM_ERROR("%s hung %s bo (0x%lx ctx %d) at 0x%x\n",
|
||||||
ring->name,
|
ring->name,
|
||||||
|
|
|
@ -1826,10 +1826,10 @@ ring_stuck(struct intel_ring_buffer *ring, u32 acthd)
|
||||||
u32 tmp;
|
u32 tmp;
|
||||||
|
|
||||||
if (ring->hangcheck.acthd != acthd)
|
if (ring->hangcheck.acthd != acthd)
|
||||||
return active;
|
return HANGCHECK_ACTIVE;
|
||||||
|
|
||||||
if (IS_GEN2(dev))
|
if (IS_GEN2(dev))
|
||||||
return hung;
|
return HANGCHECK_HUNG;
|
||||||
|
|
||||||
/* Is the chip hanging on a WAIT_FOR_EVENT?
|
/* Is the chip hanging on a WAIT_FOR_EVENT?
|
||||||
* If so we can simply poke the RB_WAIT bit
|
* If so we can simply poke the RB_WAIT bit
|
||||||
|
@ -1841,24 +1841,24 @@ ring_stuck(struct intel_ring_buffer *ring, u32 acthd)
|
||||||
DRM_ERROR("Kicking stuck wait on %s\n",
|
DRM_ERROR("Kicking stuck wait on %s\n",
|
||||||
ring->name);
|
ring->name);
|
||||||
I915_WRITE_CTL(ring, tmp);
|
I915_WRITE_CTL(ring, tmp);
|
||||||
return kick;
|
return HANGCHECK_KICK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (INTEL_INFO(dev)->gen >= 6 && tmp & RING_WAIT_SEMAPHORE) {
|
if (INTEL_INFO(dev)->gen >= 6 && tmp & RING_WAIT_SEMAPHORE) {
|
||||||
switch (semaphore_passed(ring)) {
|
switch (semaphore_passed(ring)) {
|
||||||
default:
|
default:
|
||||||
return hung;
|
return HANGCHECK_HUNG;
|
||||||
case 1:
|
case 1:
|
||||||
DRM_ERROR("Kicking stuck semaphore on %s\n",
|
DRM_ERROR("Kicking stuck semaphore on %s\n",
|
||||||
ring->name);
|
ring->name);
|
||||||
I915_WRITE_CTL(ring, tmp);
|
I915_WRITE_CTL(ring, tmp);
|
||||||
return kick;
|
return HANGCHECK_KICK;
|
||||||
case 0:
|
case 0:
|
||||||
return wait;
|
return HANGCHECK_WAIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return hung;
|
return HANGCHECK_HUNG;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1926,16 +1926,16 @@ static void i915_hangcheck_elapsed(unsigned long data)
|
||||||
acthd);
|
acthd);
|
||||||
|
|
||||||
switch (ring->hangcheck.action) {
|
switch (ring->hangcheck.action) {
|
||||||
case wait:
|
case HANGCHECK_WAIT:
|
||||||
score = 0;
|
score = 0;
|
||||||
break;
|
break;
|
||||||
case active:
|
case HANGCHECK_ACTIVE:
|
||||||
score = BUSY;
|
score = BUSY;
|
||||||
break;
|
break;
|
||||||
case kick:
|
case HANGCHECK_KICK:
|
||||||
score = KICK;
|
score = KICK;
|
||||||
break;
|
break;
|
||||||
case hung:
|
case HANGCHECK_HUNG:
|
||||||
score = HUNG;
|
score = HUNG;
|
||||||
stuck[i] = true;
|
stuck[i] = true;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -37,7 +37,12 @@ struct intel_hw_status_page {
|
||||||
#define I915_READ_SYNC_0(ring) I915_READ(RING_SYNC_0((ring)->mmio_base))
|
#define I915_READ_SYNC_0(ring) I915_READ(RING_SYNC_0((ring)->mmio_base))
|
||||||
#define I915_READ_SYNC_1(ring) I915_READ(RING_SYNC_1((ring)->mmio_base))
|
#define I915_READ_SYNC_1(ring) I915_READ(RING_SYNC_1((ring)->mmio_base))
|
||||||
|
|
||||||
enum intel_ring_hangcheck_action { wait, active, kick, hung };
|
enum intel_ring_hangcheck_action {
|
||||||
|
HANGCHECK_WAIT,
|
||||||
|
HANGCHECK_ACTIVE,
|
||||||
|
HANGCHECK_KICK,
|
||||||
|
HANGCHECK_HUNG,
|
||||||
|
};
|
||||||
|
|
||||||
struct intel_ring_hangcheck {
|
struct intel_ring_hangcheck {
|
||||||
bool deadlock;
|
bool deadlock;
|
||||||
|
|
Loading…
Reference in a new issue