History

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.

Jani Nikula committed 13 years ago

Commit f2f4d821 parent c8b50183 files · +18 −13Browse files

Unified · Split

3 files
  1. drivers/gpu/drm/i915/i915_gem.c +1 −1
  2. drivers/gpu/drm/i915/i915_irq.c +11 −11
  3. drivers/gpu/drm/i915/intel_ringbuffer.h +6 −1
drivers/gpu/drm/i915/i915_gem.c+1−1
@@ -2214,7 +2214,7 @@ static void i915_set_reset_status(struct intel_ring_buffer *ring, · 2213 unmodified lines
2214 offset = i915_gem_obj_offset(request->batch_obj,2214 offset = i915_gem_obj_offset(request->batch_obj,
2215 request_to_vm(request));2215 request_to_vm(request));
2216 2216
2217 if (ring->hangcheck.action != wait &&2217 if (ring->hangcheck.action != HANGCHECK_WAIT &&
2218 i915_request_guilty(request, acthd, &inside)) {2218 i915_request_guilty(request, acthd, &inside)) {
2219 DRM_ERROR("%s hung %s bo (0x%lx ctx %d) at 0x%x\n",2219 DRM_ERROR("%s hung %s bo (0x%lx ctx %d) at 0x%x\n",
2220 ring->name,2220 ring->name,
drivers/gpu/drm/i915/i915_irq.c+11−11
@@ -1826,10 +1826,10 @@ ring_stuck(struct intel_ring_buffer *ring, u32 acthd) · 1825 unmodified lines
1826 u32 tmp;1826 u32 tmp;
1827 1827
1828 if (ring->hangcheck.acthd != acthd)1828 if (ring->hangcheck.acthd != acthd)
1829 return active;1829 return HANGCHECK_ACTIVE;
1830 1830
1831 if (IS_GEN2(dev))1831 if (IS_GEN2(dev))
1832 return hung;1832 return HANGCHECK_HUNG;
1833 1833
1834 /* Is the chip hanging on a WAIT_FOR_EVENT?1834 /* Is the chip hanging on a WAIT_FOR_EVENT?
1835 * If so we can simply poke the RB_WAIT bit1835 * If so we can simply poke the RB_WAIT bit
@@ -1841,24 +1841,24 @@ ring_stuck(struct intel_ring_buffer *ring, u32 acthd) · 5 unmodified lines
1841 DRM_ERROR("Kicking stuck wait on %s\n",1841 DRM_ERROR("Kicking stuck wait on %s\n",
1842 ring->name);1842 ring->name);
1843 I915_WRITE_CTL(ring, tmp);1843 I915_WRITE_CTL(ring, tmp);
1844 return kick;1844 return HANGCHECK_KICK;
1845 }1845 }
1846 1846
1847 if (INTEL_INFO(dev)->gen >= 6 && tmp & RING_WAIT_SEMAPHORE) {1847 if (INTEL_INFO(dev)->gen >= 6 && tmp & RING_WAIT_SEMAPHORE) {
1848 switch (semaphore_passed(ring)) {1848 switch (semaphore_passed(ring)) {
1849 default:1849 default:
1850 return hung;1850 return HANGCHECK_HUNG;
1851 case 1:1851 case 1:
1852 DRM_ERROR("Kicking stuck semaphore on %s\n",1852 DRM_ERROR("Kicking stuck semaphore on %s\n",
1853 ring->name);1853 ring->name);
1854 I915_WRITE_CTL(ring, tmp);1854 I915_WRITE_CTL(ring, tmp);
1855 return kick;1855 return HANGCHECK_KICK;
1856 case 0:1856 case 0:
1857 return wait;1857 return HANGCHECK_WAIT;
1858 }1858 }
1859 }1859 }
1860 1860
1861 return hung;1861 return HANGCHECK_HUNG;
1862}1862}
1863 1863
1864/**1864/**
@@ -1926,16 +1926,16 @@ static void i915_hangcheck_elapsed(unsigned long data) · 61 unmodified lines
1926 acthd);1926 acthd);
1927 1927
1928 switch (ring->hangcheck.action) {1928 switch (ring->hangcheck.action) {
1929 case wait:1929 case HANGCHECK_WAIT:
1930 score = 0;1930 score = 0;
1931 break;1931 break;
1932 case active:1932 case HANGCHECK_ACTIVE:
1933 score = BUSY;1933 score = BUSY;
1934 break;1934 break;
1935 case kick:1935 case HANGCHECK_KICK:
1936 score = KICK;1936 score = KICK;
1937 break;1937 break;
1938 case hung:1938 case HANGCHECK_HUNG:
1939 score = HUNG;1939 score = HUNG;
1940 stuck[i] = true;1940 stuck[i] = true;
1941 break;1941 break;
drivers/gpu/drm/i915/intel_ringbuffer.h+6−1
@@ -37,7 +37,12 @@ struct intel_hw_status_page { · 36 unmodified lines
37#define I915_READ_SYNC_0(ring) I915_READ(RING_SYNC_0((ring)->mmio_base))37#define I915_READ_SYNC_0(ring) I915_READ(RING_SYNC_0((ring)->mmio_base))
38#define I915_READ_SYNC_1(ring) I915_READ(RING_SYNC_1((ring)->mmio_base))38#define I915_READ_SYNC_1(ring) I915_READ(RING_SYNC_1((ring)->mmio_base))
39 39
40enum intel_ring_hangcheck_action { wait, active, kick, hung };40enum intel_ring_hangcheck_action {
41 HANGCHECK_WAIT,
42 HANGCHECK_ACTIVE,
43 HANGCHECK_KICK,
44 HANGCHECK_HUNG,
45};
41 46
42struct intel_ring_hangcheck {47struct intel_ring_hangcheck {
43 bool deadlock;48 bool deadlock;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t