aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-09-09 09:11:47 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2016-09-09 09:23:02 -0400
commit8af29b0c78ed11a3dd2a544f9df30be988d9de29 (patch)
tree2b0f91b24069e3f90bf002f3a8b0de45da3d386e /drivers/gpu/drm
parent70c2a24dbfd28eb9b905b369679b32a74361d7ac (diff)
drm/i915: Separate out reset flags from the reset counter
In preparation for introducing a per-engine reset, we can first separate the mixing of the reset state from the global reset counter. The loss of atomicity in updating the reset state poses a small problem for handling the waiters. For requests, this is solved by advancing the seqno so that a waiter waking up after the reset knows the request is complete. For pending flips, we still rely on the increment of the global reset epoch (as well as the reset-in-progress flag) to signify when the hardware was reset. The advantage, now that we do not inspect the reset state during reset itself i.e. we no longer emit requests during reset, is that we can use the atomic updates of the state flags to ensure that only one reset worker is active. v2: Mika spotted that I transformed the i915_gem_wait_for_error() wakeup into a waiter wakeup. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Arun Siluvery <arun.siluvery@linux.intel.com> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1470414607-32453-6-git-send-email-arun.siluvery@linux.intel.com Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-7-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c9
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c16
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h46
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c2
-rw-r--r--drivers/gpu/drm/i915/i915_gem_request.c13
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c103
-rw-r--r--drivers/gpu/drm/i915/intel_display.c25
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h4
8 files changed, 101 insertions, 117 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 1147b99a3120..24bf923a230f 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1287,6 +1287,15 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused)
1287 enum intel_engine_id id; 1287 enum intel_engine_id id;
1288 int j; 1288 int j;
1289 1289
1290 if (test_bit(I915_WEDGED, &dev_priv->gpu_error.flags))
1291 seq_printf(m, "Wedged\n");
1292 if (test_bit(I915_RESET_IN_PROGRESS, &dev_priv->gpu_error.flags))
1293 seq_printf(m, "Reset in progress\n");
1294 if (waitqueue_active(&dev_priv->gpu_error.wait_queue))
1295 seq_printf(m, "Waiter holding struct mutex\n");
1296 if (waitqueue_active(&dev_priv->gpu_error.reset_queue))
1297 seq_printf(m, "struct_mutex blocked for reset\n");
1298
1290 if (!i915.enable_hangcheck) { 1299 if (!i915.enable_hangcheck) {
1291 seq_printf(m, "Hangcheck disabled\n"); 1300 seq_printf(m, "Hangcheck disabled\n");
1292 return 0; 1301 return 0;
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 02c34d6996ea..47a676d859db 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1579,7 +1579,7 @@ static int i915_drm_resume(struct drm_device *dev)
1579 mutex_lock(&dev->struct_mutex); 1579 mutex_lock(&dev->struct_mutex);
1580 if (i915_gem_init_hw(dev)) { 1580 if (i915_gem_init_hw(dev)) {
1581 DRM_ERROR("failed to re-initialize GPU, declaring wedged!\n"); 1581 DRM_ERROR("failed to re-initialize GPU, declaring wedged!\n");
1582 atomic_or(I915_WEDGED, &dev_priv->gpu_error.reset_counter); 1582 set_bit(I915_WEDGED, &dev_priv->gpu_error.flags);
1583 } 1583 }
1584 mutex_unlock(&dev->struct_mutex); 1584 mutex_unlock(&dev->struct_mutex);
1585 1585
@@ -1741,20 +1741,13 @@ int i915_reset(struct drm_i915_private *dev_priv)
1741{ 1741{
1742 struct drm_device *dev = &dev_priv->drm; 1742 struct drm_device *dev = &dev_priv->drm;
1743 struct i915_gpu_error *error = &dev_priv->gpu_error; 1743 struct i915_gpu_error *error = &dev_priv->gpu_error;
1744 unsigned reset_counter;
1745 int ret; 1744 int ret;
1746 1745
1747 mutex_lock(&dev->struct_mutex); 1746 mutex_lock(&dev->struct_mutex);
1748 1747
1749 /* Clear any previous failed attempts at recovery. Time to try again. */ 1748 /* Clear any previous failed attempts at recovery. Time to try again. */
1750 atomic_andnot(I915_WEDGED, &error->reset_counter); 1749 __clear_bit(I915_WEDGED, &error->flags);
1751 1750 error->reset_count++;
1752 /* Clear the reset-in-progress flag and increment the reset epoch. */
1753 reset_counter = atomic_inc_return(&error->reset_counter);
1754 if (WARN_ON(__i915_reset_in_progress(reset_counter))) {
1755 ret = -EIO;
1756 goto error;
1757 }
1758 1751
1759 pr_notice("drm/i915: Resetting chip after gpu hang\n"); 1752 pr_notice("drm/i915: Resetting chip after gpu hang\n");
1760 1753
@@ -1791,6 +1784,7 @@ int i915_reset(struct drm_i915_private *dev_priv)
1791 goto error; 1784 goto error;
1792 } 1785 }
1793 1786
1787 clear_bit(I915_RESET_IN_PROGRESS, &error->flags);
1794 mutex_unlock(&dev->struct_mutex); 1788 mutex_unlock(&dev->struct_mutex);
1795 1789
1796 /* 1790 /*
@@ -1805,7 +1799,7 @@ int i915_reset(struct drm_i915_private *dev_priv)
1805 return 0; 1799 return 0;
1806 1800
1807error: 1801error:
1808 atomic_or(I915_WEDGED, &error->reset_counter); 1802 set_bit(I915_WEDGED, &error->flags);
1809 mutex_unlock(&dev->struct_mutex); 1803 mutex_unlock(&dev->struct_mutex);
1810 return ret; 1804 return ret;
1811} 1805}
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index f39bede7664c..dced7e72b625 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1405,9 +1405,10 @@ struct i915_gpu_error {
1405 * State variable controlling the reset flow and count 1405 * State variable controlling the reset flow and count
1406 * 1406 *
1407 * This is a counter which gets incremented when reset is triggered, 1407 * This is a counter which gets incremented when reset is triggered,
1408 * and again when reset has been handled. So odd values (lowest bit set) 1408 *
1409 * means that reset is in progress and even values that 1409 * Before the reset commences, the I915_RESET_IN_PROGRESS bit is set
1410 * (reset_counter >> 1):th reset was successfully completed. 1410 * meaning that any waiters holding onto the struct_mutex should
1411 * relinquish the lock immediately in order for the reset to start.
1411 * 1412 *
1412 * If reset is not completed succesfully, the I915_WEDGE bit is 1413 * If reset is not completed succesfully, the I915_WEDGE bit is
1413 * set meaning that hardware is terminally sour and there is no 1414 * set meaning that hardware is terminally sour and there is no
@@ -1422,10 +1423,11 @@ struct i915_gpu_error {
1422 * naturally enforces the correct ordering between the bail-out of the 1423 * naturally enforces the correct ordering between the bail-out of the
1423 * waiter and the gpu reset work code. 1424 * waiter and the gpu reset work code.
1424 */ 1425 */
1425 atomic_t reset_counter; 1426 unsigned long reset_count;
1426 1427
1427#define I915_RESET_IN_PROGRESS_FLAG 1 1428 unsigned long flags;
1428#define I915_WEDGED (1 << 31) 1429#define I915_RESET_IN_PROGRESS 0
1430#define I915_WEDGED (BITS_PER_LONG - 1)
1429 1431
1430 /** 1432 /**
1431 * Waitqueue to signal when a hang is detected. Used to for waiters 1433 * Waitqueue to signal when a hang is detected. Used to for waiters
@@ -3241,44 +3243,24 @@ i915_gem_find_active_request(struct intel_engine_cs *engine);
3241 3243
3242void i915_gem_retire_requests(struct drm_i915_private *dev_priv); 3244void i915_gem_retire_requests(struct drm_i915_private *dev_priv);
3243 3245
3244static inline u32 i915_reset_counter(struct i915_gpu_error *error)
3245{
3246 return atomic_read(&error->reset_counter);
3247}
3248
3249static inline bool __i915_reset_in_progress(u32 reset)
3250{
3251 return unlikely(reset & I915_RESET_IN_PROGRESS_FLAG);
3252}
3253
3254static inline bool __i915_reset_in_progress_or_wedged(u32 reset)
3255{
3256 return unlikely(reset & (I915_RESET_IN_PROGRESS_FLAG | I915_WEDGED));
3257}
3258
3259static inline bool __i915_terminally_wedged(u32 reset)
3260{
3261 return unlikely(reset & I915_WEDGED);
3262}
3263
3264static inline bool i915_reset_in_progress(struct i915_gpu_error *error) 3246static inline bool i915_reset_in_progress(struct i915_gpu_error *error)
3265{ 3247{
3266 return __i915_reset_in_progress(i915_reset_counter(error)); 3248 return unlikely(test_bit(I915_RESET_IN_PROGRESS, &error->flags));
3267} 3249}
3268 3250
3269static inline bool i915_reset_in_progress_or_wedged(struct i915_gpu_error *error) 3251static inline bool i915_terminally_wedged(struct i915_gpu_error *error)
3270{ 3252{
3271 return __i915_reset_in_progress_or_wedged(i915_reset_counter(error)); 3253 return unlikely(test_bit(I915_WEDGED, &error->flags));
3272} 3254}
3273 3255
3274static inline bool i915_terminally_wedged(struct i915_gpu_error *error) 3256static inline bool i915_reset_in_progress_or_wedged(struct i915_gpu_error *error)
3275{ 3257{
3276 return __i915_terminally_wedged(i915_reset_counter(error)); 3258 return i915_reset_in_progress(error) | i915_terminally_wedged(error);
3277} 3259}
3278 3260
3279static inline u32 i915_reset_count(struct i915_gpu_error *error) 3261static inline u32 i915_reset_count(struct i915_gpu_error *error)
3280{ 3262{
3281 return ((i915_reset_counter(error) & ~I915_WEDGED) + 1) / 2; 3263 return READ_ONCE(error->reset_count);
3282} 3264}
3283 3265
3284void i915_gem_reset(struct drm_device *dev); 3266void i915_gem_reset(struct drm_device *dev);
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index b00fb8548d50..87a4f3543f0b 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4525,7 +4525,7 @@ int i915_gem_init(struct drm_device *dev)
4525 * for all other failure, such as an allocation failure, bail. 4525 * for all other failure, such as an allocation failure, bail.
4526 */ 4526 */
4527 DRM_ERROR("Failed to initialize GPU, declaring it wedged\n"); 4527 DRM_ERROR("Failed to initialize GPU, declaring it wedged\n");
4528 atomic_or(I915_WEDGED, &dev_priv->gpu_error.reset_counter); 4528 set_bit(I915_WEDGED, &dev_priv->gpu_error.flags);
4529 ret = 0; 4529 ret = 0;
4530 } 4530 }
4531 4531
diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
index ec613fd5e01c..24eb4b1b7540 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.c
+++ b/drivers/gpu/drm/i915/i915_gem_request.c
@@ -233,16 +233,18 @@ void i915_gem_request_retire_upto(struct drm_i915_gem_request *req)
233 } while (tmp != req); 233 } while (tmp != req);
234} 234}
235 235
236static int i915_gem_check_wedge(unsigned int reset_counter, bool interruptible) 236static int i915_gem_check_wedge(struct drm_i915_private *dev_priv)
237{ 237{
238 if (__i915_terminally_wedged(reset_counter)) 238 struct i915_gpu_error *error = &dev_priv->gpu_error;
239
240 if (i915_terminally_wedged(error))
239 return -EIO; 241 return -EIO;
240 242
241 if (__i915_reset_in_progress(reset_counter)) { 243 if (i915_reset_in_progress(error)) {
242 /* Non-interruptible callers can't handle -EAGAIN, hence return 244 /* Non-interruptible callers can't handle -EAGAIN, hence return
243 * -EIO unconditionally for these. 245 * -EIO unconditionally for these.
244 */ 246 */
245 if (!interruptible) 247 if (!dev_priv->mm.interruptible)
246 return -EIO; 248 return -EIO;
247 249
248 return -EAGAIN; 250 return -EAGAIN;
@@ -331,7 +333,6 @@ i915_gem_request_alloc(struct intel_engine_cs *engine,
331 struct i915_gem_context *ctx) 333 struct i915_gem_context *ctx)
332{ 334{
333 struct drm_i915_private *dev_priv = engine->i915; 335 struct drm_i915_private *dev_priv = engine->i915;
334 unsigned int reset_counter = i915_reset_counter(&dev_priv->gpu_error);
335 struct drm_i915_gem_request *req; 336 struct drm_i915_gem_request *req;
336 u32 seqno; 337 u32 seqno;
337 int ret; 338 int ret;
@@ -340,7 +341,7 @@ i915_gem_request_alloc(struct intel_engine_cs *engine,
340 * EIO if the GPU is already wedged, or EAGAIN to drop the struct_mutex 341 * EIO if the GPU is already wedged, or EAGAIN to drop the struct_mutex
341 * and restart. 342 * and restart.
342 */ 343 */
343 ret = i915_gem_check_wedge(reset_counter, dev_priv->mm.interruptible); 344 ret = i915_gem_check_wedge(dev_priv);
344 if (ret) 345 if (ret)
345 return ERR_PTR(ret); 346 return ERR_PTR(ret);
346 347
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 82358d4e0cc2..ed172d7beecb 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2501,53 +2501,41 @@ static void i915_reset_and_wakeup(struct drm_i915_private *dev_priv)
2501 2501
2502 kobject_uevent_env(kobj, KOBJ_CHANGE, error_event); 2502 kobject_uevent_env(kobj, KOBJ_CHANGE, error_event);
2503 2503
2504 DRM_DEBUG_DRIVER("resetting chip\n");
2505 kobject_uevent_env(kobj, KOBJ_CHANGE, reset_event);
2506
2504 /* 2507 /*
2505 * Note that there's only one work item which does gpu resets, so we 2508 * In most cases it's guaranteed that we get here with an RPM
2506 * need not worry about concurrent gpu resets potentially incrementing 2509 * reference held, for example because there is a pending GPU
2507 * error->reset_counter twice. We only need to take care of another 2510 * request that won't finish until the reset is done. This
2508 * racing irq/hangcheck declaring the gpu dead for a second time. A 2511 * isn't the case at least when we get here by doing a
2509 * quick check for that is good enough: schedule_work ensures the 2512 * simulated reset via debugs, so get an RPM reference.
2510 * correct ordering between hang detection and this work item, and since
2511 * the reset in-progress bit is only ever set by code outside of this
2512 * work we don't need to worry about any other races.
2513 */ 2513 */
2514 if (i915_reset_in_progress(&dev_priv->gpu_error)) { 2514 intel_runtime_pm_get(dev_priv);
2515 DRM_DEBUG_DRIVER("resetting chip\n");
2516 kobject_uevent_env(kobj, KOBJ_CHANGE, reset_event);
2517
2518 /*
2519 * In most cases it's guaranteed that we get here with an RPM
2520 * reference held, for example because there is a pending GPU
2521 * request that won't finish until the reset is done. This
2522 * isn't the case at least when we get here by doing a
2523 * simulated reset via debugs, so get an RPM reference.
2524 */
2525 intel_runtime_pm_get(dev_priv);
2526 2515
2527 intel_prepare_reset(dev_priv); 2516 intel_prepare_reset(dev_priv);
2528 2517
2529 /* 2518 /*
2530 * All state reset _must_ be completed before we update the 2519 * All state reset _must_ be completed before we update the
2531 * reset counter, for otherwise waiters might miss the reset 2520 * reset counter, for otherwise waiters might miss the reset
2532 * pending state and not properly drop locks, resulting in 2521 * pending state and not properly drop locks, resulting in
2533 * deadlocks with the reset work. 2522 * deadlocks with the reset work.
2534 */ 2523 */
2535 ret = i915_reset(dev_priv); 2524 ret = i915_reset(dev_priv);
2536 2525
2537 intel_finish_reset(dev_priv); 2526 intel_finish_reset(dev_priv);
2538 2527
2539 intel_runtime_pm_put(dev_priv); 2528 intel_runtime_pm_put(dev_priv);
2540 2529
2541 if (ret == 0) 2530 if (ret == 0)
2542 kobject_uevent_env(kobj, 2531 kobject_uevent_env(kobj,
2543 KOBJ_CHANGE, reset_done_event); 2532 KOBJ_CHANGE, reset_done_event);
2544 2533
2545 /* 2534 /*
2546 * Note: The wake_up also serves as a memory barrier so that 2535 * Note: The wake_up also serves as a memory barrier so that
2547 * waiters see the update value of the reset counter atomic_t. 2536 * waiters see the updated value of the dev_priv->gpu_error.
2548 */ 2537 */
2549 wake_up_all(&dev_priv->gpu_error.reset_queue); 2538 wake_up_all(&dev_priv->gpu_error.reset_queue);
2550 }
2551} 2539}
2552 2540
2553static void i915_report_and_clear_eir(struct drm_i915_private *dev_priv) 2541static void i915_report_and_clear_eir(struct drm_i915_private *dev_priv)
@@ -2666,25 +2654,26 @@ void i915_handle_error(struct drm_i915_private *dev_priv,
2666 i915_capture_error_state(dev_priv, engine_mask, error_msg); 2654 i915_capture_error_state(dev_priv, engine_mask, error_msg);
2667 i915_report_and_clear_eir(dev_priv); 2655 i915_report_and_clear_eir(dev_priv);
2668 2656
2669 if (engine_mask) { 2657 if (!engine_mask)
2670 atomic_or(I915_RESET_IN_PROGRESS_FLAG, 2658 return;
2671 &dev_priv->gpu_error.reset_counter);
2672 2659
2673 /* 2660 if (test_and_set_bit(I915_RESET_IN_PROGRESS,
2674 * Wakeup waiting processes so that the reset function 2661 &dev_priv->gpu_error.flags))
2675 * i915_reset_and_wakeup doesn't deadlock trying to grab 2662 return;
2676 * various locks. By bumping the reset counter first, the woken 2663
2677 * processes will see a reset in progress and back off, 2664 /*
2678 * releasing their locks and then wait for the reset completion. 2665 * Wakeup waiting processes so that the reset function
2679 * We must do this for _all_ gpu waiters that might hold locks 2666 * i915_reset_and_wakeup doesn't deadlock trying to grab
2680 * that the reset work needs to acquire. 2667 * various locks. By bumping the reset counter first, the woken
2681 * 2668 * processes will see a reset in progress and back off,
2682 * Note: The wake_up serves as the required memory barrier to 2669 * releasing their locks and then wait for the reset completion.
2683 * ensure that the waiters see the updated value of the reset 2670 * We must do this for _all_ gpu waiters that might hold locks
2684 * counter atomic_t. 2671 * that the reset work needs to acquire.
2685 */ 2672 *
2686 i915_error_wake_up(dev_priv); 2673 * Note: The wake_up also provides a memory barrier to ensure that the
2687 } 2674 * waiters see the updated value of the reset flags.
2675 */
2676 i915_error_wake_up(dev_priv);
2688 2677
2689 i915_reset_and_wakeup(dev_priv); 2678 i915_reset_and_wakeup(dev_priv);
2690} 2679}
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 76d696b9b22f..7e725054ba58 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3646,15 +3646,26 @@ void intel_finish_reset(struct drm_i915_private *dev_priv)
3646 mutex_unlock(&dev->mode_config.mutex); 3646 mutex_unlock(&dev->mode_config.mutex);
3647} 3647}
3648 3648
3649static bool abort_flip_on_reset(struct intel_crtc *crtc)
3650{
3651 struct i915_gpu_error *error = &to_i915(crtc->base.dev)->gpu_error;
3652
3653 if (i915_reset_in_progress(error))
3654 return true;
3655
3656 if (crtc->reset_count != i915_reset_count(error))
3657 return true;
3658
3659 return false;
3660}
3661
3649static bool intel_crtc_has_pending_flip(struct drm_crtc *crtc) 3662static bool intel_crtc_has_pending_flip(struct drm_crtc *crtc)
3650{ 3663{
3651 struct drm_device *dev = crtc->dev; 3664 struct drm_device *dev = crtc->dev;
3652 struct intel_crtc *intel_crtc = to_intel_crtc(crtc); 3665 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
3653 unsigned reset_counter;
3654 bool pending; 3666 bool pending;
3655 3667
3656 reset_counter = i915_reset_counter(&to_i915(dev)->gpu_error); 3668 if (abort_flip_on_reset(intel_crtc))
3657 if (intel_crtc->reset_counter != reset_counter)
3658 return false; 3669 return false;
3659 3670
3660 spin_lock_irq(&dev->event_lock); 3671 spin_lock_irq(&dev->event_lock);
@@ -11533,10 +11544,8 @@ static bool __pageflip_finished_cs(struct intel_crtc *crtc,
11533{ 11544{
11534 struct drm_device *dev = crtc->base.dev; 11545 struct drm_device *dev = crtc->base.dev;
11535 struct drm_i915_private *dev_priv = to_i915(dev); 11546 struct drm_i915_private *dev_priv = to_i915(dev);
11536 unsigned reset_counter;
11537 11547
11538 reset_counter = i915_reset_counter(&dev_priv->gpu_error); 11548 if (abort_flip_on_reset(crtc))
11539 if (crtc->reset_counter != reset_counter)
11540 return true; 11549 return true;
11541 11550
11542 /* 11551 /*
@@ -12202,8 +12211,8 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
12202 if (ret) 12211 if (ret)
12203 goto cleanup; 12212 goto cleanup;
12204 12213
12205 intel_crtc->reset_counter = i915_reset_counter(&dev_priv->gpu_error); 12214 intel_crtc->reset_count = i915_reset_count(&dev_priv->gpu_error);
12206 if (__i915_reset_in_progress_or_wedged(intel_crtc->reset_counter)) { 12215 if (i915_reset_in_progress_or_wedged(&dev_priv->gpu_error)) {
12207 ret = -EIO; 12216 ret = -EIO;
12208 goto cleanup; 12217 goto cleanup;
12209 } 12218 }
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index c55b7ab2e9ed..8c089e339c29 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -706,8 +706,8 @@ struct intel_crtc {
706 706
707 struct intel_crtc_state *config; 707 struct intel_crtc_state *config;
708 708
709 /* reset counter value when the last flip was submitted */ 709 /* global reset count when the last flip was submitted */
710 unsigned int reset_counter; 710 unsigned int reset_count;
711 711
712 /* Access to these should be protected by dev_priv->irq_lock. */ 712 /* Access to these should be protected by dev_priv->irq_lock. */
713 bool cpu_fifo_underrun_disabled; 713 bool cpu_fifo_underrun_disabled;