drm/i915: use lower aux clock divider on non-ULT HSW
Subsystems (2)
PATCH 1/1 drm/i915: use lower aux clock divider on non-ULT HSW
Workaround to avoid intermittent aux channel failures, per spec change.
---
Untested.
--- drivers/gpu/drm/i915/intel_dp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +4 -1
@@ -344,7 +344,10 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,* Note that PCH attached eDP panels should use a 125MHz input * clock divider. */ -if (is_cpu_edp (intel_dp)) { +if (dev_priv->pch_id ==INTEL_PCH_LPT_DEVICE_ID_TYPE ) { +/* Workaround for non-ULT HSW */ + aux_clock_divider =74 ; + }else if (is_cpu_edp (intel_dp)) {if (HAS_DDI (dev)) aux_clock_divider =intel_ddi_get_cdclk_freq (dev_priv) >>1 ;else if (IS_VALLEYVIEW (dev))
Signature · 1 line
1.7.10.4
Hi
2013/4/8 Jani Nikula <[email protected]>:
Quoted 16 lines
Workaround to avoid intermittent aux channel failures, per spec change.
Signed-off-by Jani Nikula <[email protected]>---
Untested.
--- drivers/gpu/drm/i915/intel_dp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_dp.c +0
-0
drivers/gpu/drm/i915/intel_dp.c intel_dp_aux_ch(struct intel_dp *intel_dp, · line 350
Quoted 8 lines
drivers/gpu/drm/i915/intel_dp.c +4
-1@@ -344,7 +344,10 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,* Note that PCH attached eDP panels should use a 125MHz input * clock divider. */ -if (is_cpu_edp (intel_dp)) { +if (dev_priv->pch_id ==INTEL_PCH_LPT_DEVICE_ID_TYPE ) { +/* Workaround for non-ULT HSW */ + aux_clock_divider =74 ; + }else if (is_cpu_edp (intel_dp)) {
Your patch will affect the CPU DP AUX too, but it should only affect the PCH DP AUX registers. You should move this to the !is_cpu_edp case.
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +0
-1if (HAS_DDI (dev)) aux_clock_divider =intel_ddi_get_cdclk_freq (dev_priv) >>1 ;else if (IS_VALLEYVIEW (dev)) --1.7.10.4
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Paulo Zanoni
PATCH v2 1/1 drm/i915: use lower aux clock divider on non-ULT HSW
Workaround to avoid intermittent aux channel failures, per spec change.
v2: Don't mess with cpu dp aux divider (Paulo Zanoni)
---
Untested.
--- drivers/gpu/drm/i915/intel_dp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +6 -2
@@ -353,10 +353,14 @@ intel_dp_aux_ch(struct intel_dp *intel_dp, aux_clock_divider =200 ;/* SNB & IVB eDP input clock at 400Mhz */ else aux_clock_divider =225 ;/* eDP input clock at 450Mhz */ - }else if (HAS_PCH_SPLIT (dev)) + }else if (dev_priv->pch_id ==INTEL_PCH_LPT_DEVICE_ID_TYPE ) { +/* Workaround for non-ULT HSW */ + aux_clock_divider =74 ; + }else if (HAS_PCH_SPLIT (dev)) { aux_clock_divider =DIV_ROUND_UP (intel_pch_rawclk (dev),2 ); -else + }else { aux_clock_divider =intel_hrawclk (dev) /2 ; + }if (IS_GEN6 (dev)) precharge =3 ;
Signature · 1 line
1.7.10.4
Hi
2013/4/9 Jani Nikula <[email protected]>:
Quoted 18 lines
Workaround to avoid intermittent aux channel failures, per spec change.
v2: Don't mess with cpu dp aux divider (Paulo Zanoni)
Signed-off-by Jani Nikula <[email protected]>---
Untested.
--- drivers/gpu/drm/i915/intel_dp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_dp.c +0
-0
drivers/gpu/drm/i915/intel_dp.c intel_dp_aux_ch(struct intel_dp *intel_dp, · line 356
Quoted 5 lines
drivers/gpu/drm/i915/intel_dp.c +1
-1@@ -353,10 +353,14 @@ intel_dp_aux_ch(struct intel_dp *intel_dp, aux_clock_divider =200 ;/* SNB & IVB eDP input clock at 400Mhz */ else aux_clock_divider =225 ;/* eDP input clock at 450Mhz */ - }else if (HAS_PCH_SPLIT (dev)) + }else if (dev_priv->pch_id ==INTEL_PCH_LPT_DEVICE_ID_TYPE ) {
There's a space and a tab between "else" and "if", but I guess Daniel will fix this :)
Quoted 12 lines
drivers/gpu/drm/i915/intel_dp.c +5
-2+/* Workaround for non-ULT HSW */ + aux_clock_divider =74 ; + }else if (HAS_PCH_SPLIT (dev)) { aux_clock_divider =DIV_ROUND_UP (intel_pch_rawclk (dev),2 ); - else + }else { aux_clock_divider =intel_hrawclk (dev) /2 ; + }if (IS_GEN6 (dev)) precharge =3 ; --
Quoted 2 lines
1.7.10.4
--
Paulo Zanoni
Daniel Vetter
AppliedQuoted 16 lines · Paulo Zanoni
Hi
2013/4/9 Jani Nikula <[email protected]>:
Quoted 13 lines
Workaround to avoid intermittent aux channel failures, per spec change.
v2: Don't mess with cpu dp aux divider (Paulo Zanoni)
Signed-off-by Jani Nikula <[email protected]>---
Untested.
--- drivers/gpu/drm/i915/intel_dp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
Quoted 13 lines
drivers/gpu/drm/i915/intel_dp.c intel_dp_aux_ch(struct intel_dp *intel_dp, · line 356
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +1
-1@@ -353,10 +353,14 @@ intel_dp_aux_ch(struct intel_dp *intel_dp, aux_clock_divider =200 ;/* SNB & IVB eDP input clock at 400Mhz */ else aux_clock_divider =225 ;/* eDP input clock at 450Mhz */ - }else if (HAS_PCH_SPLIT (dev)) + }else if (dev_priv->pch_id ==INTEL_PCH_LPT_DEVICE_ID_TYPE ) {There's a space and a tab between "else" and "if", but I guess Daniel will fix this :)
Done.
Quoted 1 line
Reviewed-by Paulo Zanoni <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Quoted 24 lines
Quoted 13 lines
drivers/gpu/drm/i915/intel_dp.c +5
-2+/* Workaround for non-ULT HSW */ + aux_clock_divider =74 ; + }else if (HAS_PCH_SPLIT (dev)) { aux_clock_divider =DIV_ROUND_UP (intel_pch_rawclk (dev),2 ); - else + }else { aux_clock_divider =intel_hrawclk (dev) /2 ; + }if (IS_GEN6 (dev)) precharge =3 ; --Quoted 2 lines
1.7.10.4
--
Paulo Zanoni
_______________________________________________
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