intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 4/6] drm/i915: enable VT switchless resume
Date: Fri, 15 Feb 2013 13:07:48 -0800	[thread overview]
Message-ID: <1360962470-7451-5-git-send-email-jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <1360962470-7451-1-git-send-email-jbarnes@virtuousgeek.org>

With the other bits in place, we can do this safely.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/i915_drv.c |    9 ++++++---
 drivers/gpu/drm/i915/intel_fb.c |    3 +++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index c5b8c81..12a14e1 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -492,8 +492,6 @@ static int i915_drm_freeze(struct drm_device *dev)
 
 		cancel_delayed_work_sync(&dev_priv->rps.delayed_resume_work);
 
-		intel_modeset_disable(dev);
-
 		drm_irq_uninstall(dev);
 	}
 
@@ -569,9 +567,14 @@ static int __i915_drm_thaw(struct drm_device *dev)
 		mutex_unlock(&dev->struct_mutex);
 
 		intel_modeset_init_hw(dev);
-		intel_modeset_setup_hw_state(dev, false);
+
 		drm_irq_install(dev);
 		intel_hpd_init(dev);
+
+		/* Resume the modeset for every activated CRTC */
+		drm_modeset_lock_all(dev);
+		intel_modeset_setup_hw_state(dev, true);
+		drm_modeset_unlock_all(dev);
 	}
 
 	intel_opregion_init(dev);
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index 1c510da..987bc33 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -149,6 +149,9 @@ static int intelfb_create(struct intel_fbdev *ifbdev,
 	}
 	info->screen_size = size;
 
+	/* This driver doesn't need a VT switch to restore the mode on resume */
+	info->skip_vt_switch = true;
+
 //	memset(info->screen_base, 0, size);
 
 	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
-- 
1.7.9.5

  parent reply	other threads:[~2013-02-15 21:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-15 21:07 VT switchless resume v2 Jesse Barnes
2013-02-15 21:07 ` [PATCH 1/6] drm/i915: don't restore LVDS enable state blindly Jesse Barnes
2013-02-15 21:07 ` [PATCH 2/6] drm/i915: add sprite restore function v2 Jesse Barnes
2013-02-15 21:07 ` [PATCH 3/6] drm/i915: restore cursor and sprite state when forcing a config restore Jesse Barnes
2013-02-15 21:07 ` Jesse Barnes [this message]
2013-02-15 21:07 ` [PATCH 5/6] drm/i915: emit a hotplug event on resume Jesse Barnes
2013-02-15 21:07 ` [PATCH 6/6] drm/i915: remove disabled memset of framebuffer from intel_fb Jesse Barnes
  -- strict thread matches above, loose matches on Subject: below --
2013-02-15 20:42 VT switchless resume patches Jesse Barnes
2013-02-15 20:42 ` [PATCH 4/6] drm/i915: enable VT switchless resume Jesse Barnes
2013-02-15 21:14   ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360962470-7451-5-git-send-email-jbarnes@virtuousgeek.org \
    --to=jbarnes@virtuousgeek.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).