diff mbox

[6/8] Move vlv_init_dpio around

Message ID 1366274775-10733-6-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter April 18, 2013, 8:46 a.m. UTC
I somewhat suspect that we should also do this on resume. So maybe move
this to the clock gating functions where we tend to do all such setup
stuff?

Also I still think s/vlv_init_dpio/vlv_reset_dpio/
---
 drivers/gpu/drm/i915/intel_display.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Jesse Barnes April 18, 2013, 3:13 p.m. UTC | #1
On Thu, 18 Apr 2013 10:46:13 +0200
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:

> I somewhat suspect that we should also do this on resume. So maybe move
> this to the clock gating functions where we tend to do all such setup
> stuff?
> 
> Also I still think s/vlv_init_dpio/vlv_reset_dpio/
> ---
>  drivers/gpu/drm/i915/intel_display.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 15bdbd0..df3132c 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -8805,6 +8805,7 @@ static void intel_setup_outputs(struct drm_device *dev)
>  			if (I915_READ(VLV_DISPLAY_BASE + DP_B) & DP_DETECTED)
>  				intel_dp_init(dev, VLV_DISPLAY_BASE + DP_B, PORT_B);
>  		}
> +		vlv_init_dpio(dev);
>  	} else if (SUPPORTS_DIGITAL_OUTPUTS(dev)) {
>  		bool found = false;
>  
> @@ -9679,9 +9680,6 @@ void intel_modeset_cleanup(struct drm_device *dev)
>  
>  	ironlake_teardown_rc6(dev);
>  
> -	if (IS_VALLEYVIEW(dev))
> -		vlv_init_dpio(dev);
> -
>  	mutex_unlock(&dev->struct_mutex);
>  
>  	/* Disable the irq before mode object teardown, for the irq might

5 and 6 snuck in and can be dropped.  I think we can drop the init_dpio
function altogether in fact.
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 15bdbd0..df3132c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8805,6 +8805,7 @@  static void intel_setup_outputs(struct drm_device *dev)
 			if (I915_READ(VLV_DISPLAY_BASE + DP_B) & DP_DETECTED)
 				intel_dp_init(dev, VLV_DISPLAY_BASE + DP_B, PORT_B);
 		}
+		vlv_init_dpio(dev);
 	} else if (SUPPORTS_DIGITAL_OUTPUTS(dev)) {
 		bool found = false;
 
@@ -9679,9 +9680,6 @@  void intel_modeset_cleanup(struct drm_device *dev)
 
 	ironlake_teardown_rc6(dev);
 
-	if (IS_VALLEYVIEW(dev))
-		vlv_init_dpio(dev);
-
 	mutex_unlock(&dev->struct_mutex);
 
 	/* Disable the irq before mode object teardown, for the irq might