[Intel-gfx] [Patch 1/5]: DRM/I915: Add the crt save/restore function for VT switch
yakui_zhao
yakui.zhao at intel.com
Tue Mar 3 11:05:54 CET 2009
Subject: Patch DRM/i915: Add the crt save/restore function for VT switch
From: Zhao Yakui <yakui.zhao at intel.com>
Add the crt save/restore function for VT switch
Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
---
drivers/gpu/drm/i915/intel_crt.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
Index: linux-2.6/drivers/gpu/drm/i915/intel_crt.c
===================================================================
--- linux-2.6.orig/drivers/gpu/drm/i915/intel_crt.c 2009-03-03 11:47:39.000000000 +0800
+++ linux-2.6/drivers/gpu/drm/i915/intel_crt.c 2009-03-03 18:00:44.000000000 +0800
@@ -61,6 +61,26 @@
I915_WRITE(ADPA, temp);
}
+static void intel_crt_save(struct drm_connector *connector)
+{
+ struct drm_device *dev = connector->dev;
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ u32 temp;
+
+ temp = I915_READ(ADPA);
+ dev_priv->saveADPA = temp;
+}
+
+static void intel_crt_restore(struct drm_connector *connector)
+{
+ struct drm_device *dev = connector->dev;
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ u32 temp;
+
+ temp = dev_priv->saveADPA;
+ I915_WRITE(ADPA, temp);
+}
+
static int intel_crt_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{
@@ -225,6 +245,8 @@
};
static const struct drm_connector_funcs intel_crt_connector_funcs = {
+ .save = intel_crt_save,
+ .restore = intel_crt_restore,
.detect = intel_crt_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = intel_crt_destroy,
More information about the Intel-gfx
mailing list