From d6317290bfd8673d1cf3b6f8a12c72b3297eac36 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Mon, 16 Sep 2013 17:38:31 +0300 Subject: [PATCH] drm/i915: Pull intel_init_power_well() out of intel_modeset_init_hw() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The init and resume codepaths want to handel the power well in slightly different ways, so pull the power well init out from intel_modeset_init_hw() which gets called in both cases. Signed-off-by: Ville Syrjälä Reviewed-by: Paulo Zanoni Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_dma.c | 2 ++ drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/intel_display.c | 2 -- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index f4f98957ce47..1eaa0be392dc 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1324,6 +1324,8 @@ static int i915_load_modeset_init(struct drm_device *dev) INIT_WORK(&dev_priv->console_resume_work, intel_console_resume); + intel_init_power_well(dev); + intel_modeset_gem_init(dev); /* Always safe in the mode setting case. */ diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 75e7550064f4..6f385e1e9ed6 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -605,6 +605,8 @@ static int __i915_drm_thaw(struct drm_device *dev, bool restore_gtt_mappings) /* We need working interrupts for modeset enabling ... */ drm_irq_install(dev); + intel_init_power_well(dev); + intel_modeset_init_hw(dev); drm_modeset_lock_all(dev); diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 1a4232e446fe..1dd474ecc240 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -10273,8 +10273,6 @@ static void i915_enable_vga(struct drm_device *dev) void intel_modeset_init_hw(struct drm_device *dev) { - intel_init_power_well(dev); - intel_prepare_ddi(dev); intel_init_clock_gating(dev); -- 2.39.5