The short lowercase names are bound to collide. The default warnings don't even warn about shadowing.
Unified · Split
| @@ -2214,7 +2214,7 @@ static void i915_set_reset_status(struct intel_ring_buffer *ring, · 2213 unmodified lines | ||
| 2214 | 2214 | offset = i915_gem_obj_offset(request->batch_obj, |
| 2215 | 2215 | request_to_vm(request)); |
| 2216 | 2216 | |
| 2217 | − if (ring->hangcheck.action != wait && | |
| 2217 | + if (ring->hangcheck.action != HANGCHECK_WAIT && | |
| 2218 | 2218 | i915_request_guilty(request, acthd, &inside)) { |
| 2219 | 2219 | DRM_ERROR("%s hung %s bo (0x%lx ctx %d) at 0x%x\n", |
| 2220 | 2220 | ring->name, |
| @@ -1826,10 +1826,10 @@ ring_stuck(struct intel_ring_buffer *ring, u32 acthd) · 1825 unmodified lines | ||
| 1826 | 1826 | u32 tmp; |
| 1827 | 1827 | |
| 1828 | 1828 | if (ring->hangcheck.acthd != acthd) |
| 1829 | − return active; | |
| 1829 | + return HANGCHECK_ACTIVE; | |
| 1830 | 1830 | |
| 1831 | 1831 | if (IS_GEN2(dev)) |
| 1832 | − return hung; | |
| 1832 | + return HANGCHECK_HUNG; | |
| 1833 | 1833 | |
| 1834 | 1834 | /* Is the chip hanging on a WAIT_FOR_EVENT? |
| 1835 | 1835 | * 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 | 1841 | DRM_ERROR("Kicking stuck wait on %s\n", |
| 1842 | 1842 | ring->name); |
| 1843 | 1843 | I915_WRITE_CTL(ring, tmp); |
| 1844 | − return kick; | |
| 1844 | + return HANGCHECK_KICK; | |
| 1845 | 1845 | } |
| 1846 | 1846 | |
| 1847 | 1847 | if (INTEL_INFO(dev)->gen >= 6 && tmp & RING_WAIT_SEMAPHORE) { |
| 1848 | 1848 | switch (semaphore_passed(ring)) { |
| 1849 | 1849 | default: |
| 1850 | − return hung; | |
| 1850 | + return HANGCHECK_HUNG; | |
| 1851 | 1851 | case 1: |
| 1852 | 1852 | DRM_ERROR("Kicking stuck semaphore on %s\n", |
| 1853 | 1853 | ring->name); |
| 1854 | 1854 | I915_WRITE_CTL(ring, tmp); |
| 1855 | − return kick; | |
| 1855 | + return HANGCHECK_KICK; | |
| 1856 | 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 | 1926 | acthd); |
| 1927 | 1927 | |
| 1928 | 1928 | switch (ring->hangcheck.action) { |
| 1929 | − case wait: | |
| 1929 | + case HANGCHECK_WAIT: | |
| 1930 | 1930 | score = 0; |
| 1931 | 1931 | break; |
| 1932 | − case active: | |
| 1932 | + case HANGCHECK_ACTIVE: | |
| 1933 | 1933 | score = BUSY; |
| 1934 | 1934 | break; |
| 1935 | − case kick: | |
| 1935 | + case HANGCHECK_KICK: | |
| 1936 | 1936 | score = KICK; |
| 1937 | 1937 | break; |
| 1938 | − case hung: | |
| 1938 | + case HANGCHECK_HUNG: | |
| 1939 | 1939 | score = HUNG; |
| 1940 | 1940 | stuck[i] = true; |
| 1941 | 1941 | break; |
| @@ -37,7 +37,12 @@ struct intel_hw_status_page { · 36 unmodified lines | ||
| 37 | 37 | #define I915_READ_SYNC_0(ring) I915_READ(RING_SYNC_0((ring)->mmio_base)) |
| 38 | 38 | #define I915_READ_SYNC_1(ring) I915_READ(RING_SYNC_1((ring)->mmio_base)) |
| 39 | 39 | |
| 40 | −enum intel_ring_hangcheck_action { wait, active, kick, hung }; | |
| 40 | +enum intel_ring_hangcheck_action { | |
| 41 | + HANGCHECK_WAIT, | |
| 42 | + HANGCHECK_ACTIVE, | |
| 43 | + HANGCHECK_KICK, | |
| 44 | + HANGCHECK_HUNG, | |
| 45 | +}; | |
| 41 | 46 | |
| 42 | 47 | struct intel_ring_hangcheck { |
| 43 | 48 | bool deadlock; |