aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-06-10 10:48:09 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-06-10 11:19:44 -0400
commitb6f3eff7130bbdb3d3ca5b7bbff2384b362606b4 (patch)
tree02a24f172f00980146e34aa741f47d0116e0cada
parente596a02ccfc6503ae5c37b14c74b6b743eefe102 (diff)
drm/i915: Use FBINFO_STATE defines instead of 0 and 1
This makes, arguably, the condition on state easier to read. Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c6
-rw-r--r--drivers/gpu/drm/i915/intel_fb.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index b23cd63b9fda..381c9dd4ab60 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -546,7 +546,7 @@ static int i915_drm_freeze(struct drm_device *dev)
546 intel_opregion_fini(dev); 546 intel_opregion_fini(dev);
547 547
548 console_lock(); 548 console_lock();
549 intel_fbdev_set_suspend(dev, 1); 549 intel_fbdev_set_suspend(dev, FBINFO_STATE_SUSPENDED);
550 console_unlock(); 550 console_unlock();
551 551
552 return 0; 552 return 0;
@@ -590,7 +590,7 @@ void intel_console_resume(struct work_struct *work)
590 struct drm_device *dev = dev_priv->dev; 590 struct drm_device *dev = dev_priv->dev;
591 591
592 console_lock(); 592 console_lock();
593 intel_fbdev_set_suspend(dev, 0); 593 intel_fbdev_set_suspend(dev, FBINFO_STATE_RUNNING);
594 console_unlock(); 594 console_unlock();
595} 595}
596 596
@@ -659,7 +659,7 @@ static int __i915_drm_thaw(struct drm_device *dev)
659 * path of resume if possible. 659 * path of resume if possible.
660 */ 660 */
661 if (console_trylock()) { 661 if (console_trylock()) {
662 intel_fbdev_set_suspend(dev, 0); 662 intel_fbdev_set_suspend(dev, FBINFO_STATE_RUNNING);
663 console_unlock(); 663 console_unlock();
664 } else { 664 } else {
665 schedule_work(&dev_priv->console_resume_work); 665 schedule_work(&dev_priv->console_resume_work);
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index 7a77d4cf96c2..244060ad354b 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -275,7 +275,7 @@ void intel_fbdev_set_suspend(struct drm_device *dev, int state)
275 * been restored from swap. If the object is stolen however, it will be 275 * been restored from swap. If the object is stolen however, it will be
276 * full of whatever garbage was left in there. 276 * full of whatever garbage was left in there.
277 */ 277 */
278 if (!state && ifbdev->ifb.obj->stolen) 278 if (state == FBINFO_STATE_RUNNING && ifbdev->ifb.obj->stolen)
279 memset_io(info->screen_base, 0, info->screen_size); 279 memset_io(info->screen_base, 0, info->screen_size);
280 280
281 fb_set_suspend(info, state); 281 fb_set_suspend(info, state);