drm/i915/vlv: reset DPIO on load and resume
Subsystems (2)
PATCH 1/1 drm/i915/vlv: reset DPIO on load and resume
This fixes resume on my test platform, since I think some DPIO bits need recalibration.
References: https://bugs.freedesktop.org/show_bug.cgi?id=69166
--- drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/gpu/drm/i915/intel_display.c +13 -0
@@ -1359,6 +1359,17 @@ static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv,assert_pch_hdmi_disabled (dev_priv, pipe,PCH_HDMID ); } +static void intel_init_dpio (struct drm_device *dev) +{ +struct drm_i915_private *dev_priv = dev->dev_private; + +if (!IS_VALLEYVIEW (dev)) +return ; + +/* Reset in case DPIO was stuck across suspend/resume or boot */ +I915_WRITE (DPIO_CTL ,I915_READ (DPIO_CTL ) |DPIO_RESET ); +} +static void vlv_enable_pll (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;
@@ -10279,6 +10290,8 @@ void intel_modeset_init_hw(struct drm_device *dev) {intel_prepare_ddi (dev); +intel_init_dpio (dev); +intel_init_clock_gating (dev);mutex_lock (&dev->struct_mutex);
Signature · 1 line
1.8.3.1
Quoted 32 lines · Jesse Barnes
This fixes resume on my test platform, since I think some DPIO bits need recalibration.
References: https://bugs.freedesktop.org/show_bug.cgi?id=69166
Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/gpu/drm/i915/intel_display.c +11
-0@@ -1359,6 +1359,17 @@ static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv,assert_pch_hdmi_disabled (dev_priv, pipe,PCH_HDMID ); } +static void intel_init_dpio (struct drm_device *dev) +{ +struct drm_i915_private *dev_priv = dev->dev_private; + +if (!IS_VALLEYVIEW (dev)) +return ; + +/* Reset in case DPIO was stuck across suspend/resume or boot */ +I915_WRITE (DPIO_CTL ,I915_READ (DPIO_CTL ) |DPIO_RESET ); +} +static void vlv_enable_pll (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;
drivers/gpu/drm/i915/intel_display.c void intel_modeset_init_hw(struct drm_device *dev) · line 10295
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +2
-0@@ -10279,6 +10290,8 @@ void intel_modeset_init_hw(struct drm_device *dev) {intel_prepare_ddi (dev); +intel_init_dpio (dev); +intel_init_clock_gating (dev);
Can't you just put this into the clock_gate function? I'd like to cut down a bit on our general clutter in the setup code since tbh I've completely lost the overview of what goes where ...
-Daniel
Quoted 9 lines
drivers/gpu/drm/i915/intel_display.c +0
-0mutex_lock (&dev->struct_mutex);Signature · 6 lines
1.8.3.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 36 lines · On Thu, 26 Sep 2013 23:51:52 +0200 Daniel Vetter <[email protected]> wrote:
Quoted 35 lines · Jesse Barnes
This fixes resume on my test platform, since I think some DPIO bits need recalibration.
References: https://bugs.freedesktop.org/show_bug.cgi?id=69166
Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/gpu/drm/i915/intel_display.c +11
-0@@ -1359,6 +1359,17 @@ static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv,assert_pch_hdmi_disabled (dev_priv, pipe,PCH_HDMID ); } +static void intel_init_dpio (struct drm_device *dev) +{ +struct drm_i915_private *dev_priv = dev->dev_private; + +if (!IS_VALLEYVIEW (dev)) +return ; + +/* Reset in case DPIO was stuck across suspend/resume or boot */ +I915_WRITE (DPIO_CTL ,I915_READ (DPIO_CTL ) |DPIO_RESET ); +} +static void vlv_enable_pll (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;@@ -10279,6 +10290,8 @@ void intel_modeset_init_hw(struct drm_device *dev) {intel_prepare_ddi (dev);
Quoted 7 lines
drivers/gpu/drm/i915/intel_display.c void intel_modeset_init_hw(struct drm_device *dev) · line 10295
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +2
-0+intel_init_dpio (dev); +intel_init_clock_gating (dev);Can't you just put this into the
clock_gatefunction? I'd like to cut down a bit on our general clutter in the setup code since tbh I've completely lost the overview of what goes where ...
Seemed more appropriate for modeset code, but of course it could go anywhere.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Quoted 47 lines · Jesse Barnes
Quoted 36 lines · On Thu, 26 Sep 2013 23:51:52 +0200 Daniel Vetter <[email protected]> wrote:
Quoted 35 lines · Jesse Barnes
This fixes resume on my test platform, since I think some DPIO bits need recalibration.
References: https://bugs.freedesktop.org/show_bug.cgi?id=69166
Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/gpu/drm/i915/intel_display.c +11
-0@@ -1359,6 +1359,17 @@ static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv,assert_pch_hdmi_disabled (dev_priv, pipe,PCH_HDMID ); } +static void intel_init_dpio (struct drm_device *dev) +{ +struct drm_i915_private *dev_priv = dev->dev_private; + +if (!IS_VALLEYVIEW (dev)) +return ; + +/* Reset in case DPIO was stuck across suspend/resume or boot */ +I915_WRITE (DPIO_CTL ,I915_READ (DPIO_CTL ) |DPIO_RESET ); +} +static void vlv_enable_pll (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;@@ -10279,6 +10290,8 @@ void intel_modeset_init_hw(struct drm_device *dev) {intel_prepare_ddi (dev);Quoted 7 lines
drivers/gpu/drm/i915/intel_display.c void intel_modeset_init_hw(struct drm_device *dev) · line 10295
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +2
-0+intel_init_dpio (dev); +intel_init_clock_gating (dev);Can't you just put this into the
clock_gatefunction? I'd like to cut down a bit on our general clutter in the setup code since tbh I've completely lost the overview of what goes where ...
Quoted 3 lines
Seemed more appropriate for modeset code, but of course it could go anywhere.
The patch below is doing the same thing, but reset in intel_uncore_sanitize. drm/i915: Send a DPIO cmnreset during driver load or system resume.
Same as Jesse patch, it solves the resume issue also. If usnig Jesse patch, I will remove the DPIO reset in intel_uncore_sanitize.
Quoted 6 lines
Signature · 5 lines
Jesse Barnes, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 16 lines · Jesse Barnes
This fixes resume on my test platform, since I think some DPIO bits need recalibration.
References: https://bugs.freedesktop.org/show_bug.cgi?id=69166
Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/gpu/drm/i915/intel_display.c +0
-0@@ -1359,6 +1359,17 @@ static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv,assert_pch_hdmi_disabled (dev_priv, pipe,PCH_HDMID ); }
drivers/gpu/drm/i915/intel_display.c static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv, · line 1370
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +9
-0+static void intel_init_dpio (struct drm_device *dev) +{ +struct drm_i915_private *dev_priv = dev->dev_private; + +if (!IS_VALLEYVIEW (dev)) +return ; + +/* Reset in case DPIO was stuck across suspend/resume or boot */ +I915_WRITE (DPIO_CTL ,I915_READ (DPIO_CTL ) |DPIO_RESET );
This will deassert the common lane reset, so the comment is confusing, as is the name we have given this bit.
Quoted 21 lines
drivers/gpu/drm/i915/intel_display.c +4
-0+} +static void vlv_enable_pll (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;@@ -10279,6 +10290,8 @@ void intel_modeset_init_hw(struct drm_device *dev) {intel_prepare_ddi (dev); +intel_init_dpio (dev); +intel_init_clock_gating (dev);mutex_lock (&dev->struct_mutex);Signature · 6 lines
1.8.3.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä Intel OTC
Quoted 18 lines · Ville Syrjälä
Quoted 17 lines · Jesse Barnes
This fixes resume on my test platform, since I think some DPIO bits need recalibration.
References: https://bugs.freedesktop.org/show_bug.cgi?id=69166
Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/gpu/drm/i915/intel_display.c +0
-0@@ -1359,6 +1359,17 @@ static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv,assert_pch_hdmi_disabled (dev_priv, pipe,PCH_HDMID ); }
Quoted 12 lines
drivers/gpu/drm/i915/intel_display.c static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv, · line 1370
Quoted 9 lines
drivers/gpu/drm/i915/intel_display.c +9
-0+static void intel_init_dpio (struct drm_device *dev) +{ +struct drm_i915_private *dev_priv = dev->dev_private; + +if (!IS_VALLEYVIEW (dev)) +return ; + +/* Reset in case DPIO was stuck across suspend/resume or boot */ +I915_WRITE (DPIO_CTL ,I915_READ (DPIO_CTL ) |DPIO_RESET );This will deassert the common lane reset, so the comment is confusing, as is the name we have given this bit.
And the commit subject and text is also confusing in the same way.
And we should do this after setting up the CRI clock.
Quoted 30 lines
Quoted 22 lines
drivers/gpu/drm/i915/intel_display.c +4
-0+} +static void vlv_enable_pll (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;@@ -10279,6 +10290,8 @@ void intel_modeset_init_hw(struct drm_device *dev) {intel_prepare_ddi (dev); +intel_init_dpio (dev); +intel_init_clock_gating (dev);mutex_lock (&dev->struct_mutex);Signature · 6 lines
1.8.3.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä Intel OTC
Quoted 32 lines · On Thu, 3 Oct 2013 19:38:26 +0300 Ville Syrjälä…
Quoted 18 lines · Ville Syrjälä
Quoted 17 lines · Jesse Barnes
This fixes resume on my test platform, since I think some DPIO bits need recalibration.
References: https://bugs.freedesktop.org/show_bug.cgi?id=69166
Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drivers/gpu/drm/i915/intel_display.c +0
-0@@ -1359,6 +1359,17 @@ static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv,assert_pch_hdmi_disabled (dev_priv, pipe,PCH_HDMID ); }Quoted 12 lines
drivers/gpu/drm/i915/intel_display.c static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv, · line 1370
Quoted 9 lines
drivers/gpu/drm/i915/intel_display.c +9
-0+static void intel_init_dpio (struct drm_device *dev) +{ +struct drm_i915_private *dev_priv = dev->dev_private; + +if (!IS_VALLEYVIEW (dev)) +return ; + +/* Reset in case DPIO was stuck across suspend/resume or boot */ +I915_WRITE (DPIO_CTL ,I915_READ (DPIO_CTL ) |DPIO_RESET );This will deassert the common lane reset, so the comment is confusing, as is the name we have given this bit.
Quoted 3 lines
And the commit subject and text is also confusing in the same way.
And we should do this after setting up the CRI clock.
So I'm still confused by this. The bit is called "CMNRST", which doesn't say anything to me about deasserting common lane reset, unless you mean setting it to 0, which the docs imply. But here we're setting it to on 1. But I guess you're talking about something than the other gunit register HAS?
At any rate, it's not confusing to me now, though it may become so if I try to read a few more docs...
Signature · 5 lines
Jesse Barnes, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx