drm/i915/icl: Add new supported CD clocks
Subsystems (3)
PATCH 1/3 drm/i915/icl: Add new supported CD clocks
Now 180, 172.8 and 192 MHz are supported.
180 and 172.8 MHz CD clocks will only be used when audio is not enabled as state by BSpec and implemented in intel_crtc_compute_min_cdclk(), CD clock must be at least twice of Azalia BCLK and BCLK by default is 96 MHz, it could be set to 48 MHz but we are not reading it.
BSpec: 20598
BSpec: 15729
--- drivers/gpu/drm/i915/display/intel_cdclk.c | 29 +++++++++++++++------- 1 file changed, 20 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/display/intel_cdclk.c +20 -9
@@ -1756,9 +1756,10 @@ static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv)static int icl_calc_cdclk (int min_cdclk,unsigned int ref) { -int ranges_24[] = {312000 ,552000 ,648000 }; -int ranges_19_38[] = {307200 ,556800 ,652800 }; -int *ranges; +const int ranges_24[] = {180000 ,192000 ,312000 ,552000 ,648000 }; +const int ranges_19_38[] = {172800 ,192000 ,307200 ,556800 ,652800 }; +const int *ranges; +unsigned int len, i;switch (ref) {default :
@@ -1766,19 +1767,22 @@ static int icl_calc_cdclk(int min_cdclk, unsigned int ref)/* fall through */ case 24000 : ranges = ranges_24; + len =ARRAY_SIZE (ranges_24);break ;case 19200 :case 38400 : ranges = ranges_19_38; + len =ARRAY_SIZE (ranges_19_38);break ; } -if (min_cdclk > ranges[1 ]) -return ranges[2 ]; -else if (min_cdclk > ranges[0 ]) -return ranges[1 ]; -else -return ranges[0 ]; +for (i =0 ; i < len; i++) { +if (min_cdclk <= ranges[i]) +return ranges[i]; + } + +WARN_ON (min_cdclk > ranges[len -1 ]); +return ranges[len -1 ]; }static int icl_calc_cdclk_pll_vco (struct drm_i915_private *dev_priv,int cdclk)
@@ -1792,16 +1796,23 @@ static int icl_calc_cdclk_pll_vco(struct drm_i915_private *dev_priv, int cdclk)default :MISSING_CASE (cdclk);/* fall through */ +case 172800 :case 307200 :case 556800 :case 652800 :WARN_ON (dev_priv->cdclk.hw.ref !=19200 && dev_priv->cdclk.hw.ref !=38400 );break ; +case 180000 :case 312000 :case 552000 :case 648000 :WARN_ON (dev_priv->cdclk.hw.ref !=24000 ); +break ; +case 192000 : +WARN_ON (dev_priv->cdclk.hw.ref !=19200 && + dev_priv->cdclk.hw.ref !=38400 && + dev_priv->cdclk.hw.ref !=24000 ); } ratio = cdclk / (dev_priv->cdclk.hw.ref /2 );
Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm/i915/ehl: Remove unsupported cd clocks
EHL do not support 648 and 652.8 MHz.
BSpec: 20598
--- drivers/gpu/drm/i915/display/intel_cdclk.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_cdclk.c +13 -4
@@ -1754,7 +1754,8 @@ static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv) dev_priv->cdclk.hw.vco =-1 ; } -static int icl_calc_cdclk (int min_cdclk,unsigned int ref) +static int icl_calc_cdclk (struct drm_i915_private *dev_priv,int min_cdclk, +unsigned int ref) {const int ranges_24[] = {180000 ,192000 ,312000 ,552000 ,648000 };const int ranges_19_38[] = {172800 ,192000 ,307200 ,556800 ,652800 };
@@ -1776,6 +1777,12 @@ static int icl_calc_cdclk(int min_cdclk, unsigned int ref)break ; } +/* +* EHL do not support 648 and 652.8 MHz, so just decrement the len +*/ +if (IS_ELKHARTLAKE (dev_priv)) + len--; +for (i =0 ; i < len; i++) {if (min_cdclk <= ranges[i])return ranges[i];
@@ -1954,7 +1961,8 @@ static void icl_init_cdclk(struct drm_i915_private *dev_priv)DRM_DEBUG_KMS ("Sanitizing cdclk programmed by pre-os\n" ); sanitized_state.ref = dev_priv->cdclk.hw.ref; - sanitized_state.cdclk =icl_calc_cdclk (0 , sanitized_state.ref); + sanitized_state.cdclk =icl_calc_cdclk (dev_priv,0 , + sanitized_state.ref); sanitized_state.vco =icl_calc_cdclk_pll_vco (dev_priv, sanitized_state.cdclk); sanitized_state.voltage_level =
@@ -2554,7 +2562,7 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state)if (min_cdclk <0 )return min_cdclk; - cdclk =icl_calc_cdclk (min_cdclk, ref); + cdclk =icl_calc_cdclk (dev_priv, min_cdclk, ref); vco =icl_calc_cdclk_pll_vco (dev_priv, cdclk); state->cdclk.logical.vco = vco;
@@ -2564,7 +2572,8 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state) cnl_compute_min_voltage_level(state));if (!state->active_crtcs) { - cdclk =icl_calc_cdclk (state->cdclk.force_min_cdclk, ref); + cdclk =icl_calc_cdclk (dev_priv, state->cdclk.force_min_cdclk, + ref); vco =icl_calc_cdclk_pll_vco (dev_priv, cdclk); state->cdclk.actual.vco = vco;
Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/3] drm/i915/ehl: Remove unsupported cd clocks
Quoted 1 line · José Roberto de Souza
EHL do not support 648 and 652.8 MHz.
You should modify the max_cdclk() function instead. I think that along should be sufficient.
Quoted 72 lines
BSpec: 20598
Cc Clint Taylor <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +13
-4@@ -1754,7 +1754,8 @@ static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv) dev_priv->cdclk.hw.vco =-1 ; } -static int icl_calc_cdclk (int min_cdclk,unsigned int ref) +static int icl_calc_cdclk (struct drm_i915_private *dev_priv,int min_cdclk, +unsigned int ref) {const int ranges_24[] = {180000 ,192000 ,312000 ,552000 ,648000 };const int ranges_19_38[] = {172800 ,192000 ,307200 ,556800 ,652800 };@@ -1776,6 +1777,12 @@ static int icl_calc_cdclk(int min_cdclk, unsigned int ref)break ; } +/* +* EHL do not support 648 and 652.8 MHz, so just decrement the len +*/ +if (IS_ELKHARTLAKE (dev_priv)) + len--; +for (i =0 ; i < len; i++) {if (min_cdclk <= ranges[i])return ranges[i];@@ -1954,7 +1961,8 @@ static void icl_init_cdclk(struct drm_i915_private *dev_priv)DRM_DEBUG_KMS ("Sanitizing cdclk programmed by pre-os\n" ); sanitized_state.ref = dev_priv->cdclk.hw.ref; - sanitized_state.cdclk =icl_calc_cdclk (0 , sanitized_state.ref); + sanitized_state.cdclk =icl_calc_cdclk (dev_priv,0 , + sanitized_state.ref); sanitized_state.vco =icl_calc_cdclk_pll_vco (dev_priv, sanitized_state.cdclk); sanitized_state.voltage_level =@@ -2554,7 +2562,7 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state)if (min_cdclk <0 )return min_cdclk; - cdclk =icl_calc_cdclk (min_cdclk, ref); + cdclk =icl_calc_cdclk (dev_priv, min_cdclk, ref); vco =icl_calc_cdclk_pll_vco (dev_priv, cdclk); state->cdclk.logical.vco = vco;@@ -2564,7 +2572,8 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state) cnl_compute_min_voltage_level(state));if (!state->active_crtcs) { - cdclk =icl_calc_cdclk (state->cdclk.force_min_cdclk, ref); + cdclk =icl_calc_cdclk (dev_priv, state->cdclk.force_min_cdclk, + ref); vco =icl_calc_cdclk_pll_vco (dev_priv, cdclk); state->cdclk.actual.vco = vco;Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: [PATCH 2/3] drm/i915/ehl: Remove unsupported cd clocks
Quoted 5 lines · Ville Syrjälä
Quoted 1 line · José Roberto de Souza
EHL do not support 648 and 652.8 MHz.
You should modify the
max_cdclk()function instead. I think that along should be sufficient.
Side note, these "if (foo) len--;" constructs lead to later trouble. Either pick a different array based on the platform, or have a way to filter the values (e.g. by max or by min).
The last "len--" I untangled was the DP link rate support.
BR,
Jani.
Quoted 73 lines
Quoted 73 lines
BSpec: 20598
Cc Clint Taylor <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +13
-4@@ -1754,7 +1754,8 @@ static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv) dev_priv->cdclk.hw.vco =-1 ; } -static int icl_calc_cdclk (int min_cdclk,unsigned int ref) +static int icl_calc_cdclk (struct drm_i915_private *dev_priv,int min_cdclk, +unsigned int ref) {const int ranges_24[] = {180000 ,192000 ,312000 ,552000 ,648000 };const int ranges_19_38[] = {172800 ,192000 ,307200 ,556800 ,652800 };@@ -1776,6 +1777,12 @@ static int icl_calc_cdclk(int min_cdclk, unsigned int ref)break ; } +/* +* EHL do not support 648 and 652.8 MHz, so just decrement the len +*/ +if (IS_ELKHARTLAKE (dev_priv)) + len--; +for (i =0 ; i < len; i++) {if (min_cdclk <= ranges[i])return ranges[i];@@ -1954,7 +1961,8 @@ static void icl_init_cdclk(struct drm_i915_private *dev_priv)DRM_DEBUG_KMS ("Sanitizing cdclk programmed by pre-os\n" ); sanitized_state.ref = dev_priv->cdclk.hw.ref; - sanitized_state.cdclk =icl_calc_cdclk (0 , sanitized_state.ref); + sanitized_state.cdclk =icl_calc_cdclk (dev_priv,0 , + sanitized_state.ref); sanitized_state.vco =icl_calc_cdclk_pll_vco (dev_priv, sanitized_state.cdclk); sanitized_state.voltage_level =@@ -2554,7 +2562,7 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state)if (min_cdclk <0 )return min_cdclk; - cdclk =icl_calc_cdclk (min_cdclk, ref); + cdclk =icl_calc_cdclk (dev_priv, min_cdclk, ref); vco =icl_calc_cdclk_pll_vco (dev_priv, cdclk); state->cdclk.logical.vco = vco;@@ -2564,7 +2572,8 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state) cnl_compute_min_voltage_level(state));if (!state->active_crtcs) { - cdclk =icl_calc_cdclk (state->cdclk.force_min_cdclk, ref); + cdclk =icl_calc_cdclk (dev_priv, state->cdclk.force_min_cdclk, + ref); vco =icl_calc_cdclk_pll_vco (dev_priv, cdclk); state->cdclk.actual.vco = vco;Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/3] drm/i915/ehl: Remove unsupported cd clocks
In reply to Ville SyrjäläQuoted 7 lines · Ville Syrjälä
Quoted 1 line · José Roberto de Souza
EHL do not support 648 and 652.8 MHz.
You should modify the
max_cdclk()function instead. I think that along
should be sufficient.
Okay and it makes the patch smaller, thanks
Quoted 77 lines
Quoted 77 lines
BSpec: 20598
Cc Clint Taylor <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +2
-1@@ -1754,7 +1754,8 @@ static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv) dev_priv->cdclk.hw.vco = -1; } -static int icl_calc_cdclk (int min_cdclk,unsigned int ref) +static int icl_calc_cdclk (struct drm_i915_private *dev_priv,int min_cdclk, +unsigned int ref) {const int ranges_24[] = { 180000, 192000, 312000, 552000,
648000 };
const int ranges_19_38[] = { 172800, 192000, 307200, 556800,
652800 };drivers/gpu/drm/i915/display/intel_cdclk.c +2
-0@@ -1776,6 +1777,12 @@ static int icl_calc_cdclk(int min_cdclk, unsigned int ref) break; } +/* +* EHL do not support 648 and 652.8 MHz, so just decrement the len
drivers/gpu/drm/i915/display/intel_cdclk.c +6
-1+*/ +if (IS_ELKHARTLAKE (dev_priv)) + len--; +for (i =0 ; i < len; i++) {if (min_cdclk <= ranges[i])return ranges[i];@@ -1954,7 +1961,8 @@ static void icl_init_cdclk(struct drm_i915_private *dev_priv) DRM_DEBUG_KMS("Sanitizing cdclk programmed by pre-os\n"); sanitized_state.ref = dev_priv->cdclk.hw.ref; - sanitized_state.cdclk =icl_calc_cdclk (0 , sanitized_state.ref); + sanitized_state.cdclk =icl_calc_cdclk (dev_priv,0 , + sanitized_state.ref); sanitized_state.vco =icl_calc_cdclk_pll_vco (dev_priv, sanitized_state.cdclk);
drivers/gpu/drm/i915/display/intel_cdclk.c +1
-1sanitized_state.voltage_level =@@ -2554,7 +2562,7 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state)if (min_cdclk <0 )return min_cdclk; - cdclk =icl_calc_cdclk (min_cdclk, ref); + cdclk =icl_calc_cdclk (dev_priv, min_cdclk, ref); vco =icl_calc_cdclk_pll_vco (dev_priv, cdclk);drivers/gpu/drm/i915/display/intel_cdclk.c +2
-1state->cdclk.logical.vco = vco;@@ -2564,7 +2572,8 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state) cnl_compute_min_voltage_level(state));if (!state->active_crtcs) { - cdclk =icl_calc_cdclk (state->cdclk.force_min_cdclk, ref); + cdclk =icl_calc_cdclk (dev_priv, state- >cdclk.force_min_cdclk, + ref);vco =
icl_calc_cdclk_pll_vco(dev_priv, cdclk);
Quoted 8 lines
Quoted 8 lines
state->cdclk.actual.vco= vco;Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 drm/i915/ehl: Add voltage level requirement table
In reply to José Roberto de SouzaEHL has it own voltage level requirement depending on cd clock.
BSpec: 21809
--- drivers/gpu/drm/i915/display/intel_cdclk.c | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/display/intel_cdclk.c +17 -6
@@ -1872,8 +1872,17 @@ static void icl_set_cdclk(struct drm_i915_private *dev_priv, dev_priv->cdclk.hw.voltage_level = cdclk_state->voltage_level; } -static u8 icl_calc_voltage_level (int cdclk) +static u8 icl_calc_voltage_level (struct drm_i915_private *dev_priv,int cdclk) { +if (IS_ELKHARTLAKE (dev_priv)) { +if (cdclk >312000 ) +return 2 ; +else if (cdclk >180000 ) +return 1 ; +else +return 0 ; + } +if (cdclk >556800 )return 2 ;else if (cdclk >312000 )
@@ -1930,7 +1939,7 @@ static void icl_get_cdclk(struct drm_i915_private *dev_priv,* at least what the CDCLK frequency requires. */ cdclk_state->voltage_level = -icl_calc_voltage_level (cdclk_state->cdclk); +icl_calc_voltage_level (dev_priv, cdclk_state->cdclk); }static void icl_init_cdclk (struct drm_i915_private *dev_priv)
@@ -1966,7 +1975,8 @@ static void icl_init_cdclk(struct drm_i915_private *dev_priv) sanitized_state.vco =icl_calc_cdclk_pll_vco (dev_priv, sanitized_state.cdclk); sanitized_state.voltage_level = -icl_calc_voltage_level (sanitized_state.cdclk); +icl_calc_voltage_level (dev_priv, + sanitized_state.cdclk);icl_set_cdclk (dev_priv, &sanitized_state,INVALID_PIPE ); }
@@ -1977,7 +1987,8 @@ static void icl_uninit_cdclk(struct drm_i915_private *dev_priv) cdclk_state.cdclk = cdclk_state.bypass; cdclk_state.vco =0 ; - cdclk_state.voltage_level =icl_calc_voltage_level (cdclk_state.cdclk); + cdclk_state.voltage_level =icl_calc_voltage_level (dev_priv, + cdclk_state.cdclk);icl_set_cdclk (dev_priv, &cdclk_state,INVALID_PIPE ); }
@@ -2568,7 +2579,7 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state) state->cdclk.logical.vco = vco; state->cdclk.logical.cdclk = cdclk; state->cdclk.logical.voltage_level = -max (icl_calc_voltage_level (cdclk), +max (icl_calc_voltage_level (dev_priv, cdclk),cnl_compute_min_voltage_level (state));if (!state->active_crtcs) {
@@ -2579,7 +2590,7 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state) state->cdclk.actual.vco = vco; state->cdclk.actual.cdclk = cdclk; state->cdclk.actual.voltage_level = -icl_calc_voltage_level (cdclk); +icl_calc_voltage_level (dev_priv, cdclk); }else { state->cdclk.actual = state->cdclk.logical; }
Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/ehl: Add voltage level requirement table
Quoted 23 lines · José Roberto de Souza
EHL has it own voltage level requirement depending on cd clock.
BSpec: 21809
Cc Clint Taylor <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +3
-1@@ -1872,8 +1872,17 @@ static void icl_set_cdclk(struct drm_i915_private *dev_priv, dev_priv->cdclk.hw.voltage_level = cdclk_state->voltage_level; } -static u8 icl_calc_voltage_level (int cdclk) +static u8 icl_calc_voltage_level (struct drm_i915_private *dev_priv,int cdclk) { +if (IS_ELKHARTLAKE (dev_priv)) { +if (cdclk >312000 )
drivers/gpu/drm/i915/display/intel_cdclk.c static void icl_set_cdclk(struct drm_i915_private *dev_priv, · line 1888
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +7
-0+return 2 ; + else if (cdclk > 180000) + return 1; + else + return 0; + } +if (cdclk >556800 )return 2 ;else if (cdclk >312000 )
I would move the rest into and else branch to make it clear the two are just the two sides of the same coin.
Quoted 54 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +7
-5@@ -1930,7 +1939,7 @@ static void icl_get_cdclk(struct drm_i915_private *dev_priv,* at least what the CDCLK frequency requires. */ cdclk_state->voltage_level = -icl_calc_voltage_level (cdclk_state->cdclk); +icl_calc_voltage_level (dev_priv, cdclk_state->cdclk); }static void icl_init_cdclk (struct drm_i915_private *dev_priv)@@ -1966,7 +1975,8 @@ static void icl_init_cdclk(struct drm_i915_private *dev_priv) sanitized_state.vco =icl_calc_cdclk_pll_vco (dev_priv, sanitized_state.cdclk); sanitized_state.voltage_level = -icl_calc_voltage_level (sanitized_state.cdclk); +icl_calc_voltage_level (dev_priv, + sanitized_state.cdclk);icl_set_cdclk (dev_priv, &sanitized_state,INVALID_PIPE ); }@@ -1977,7 +1987,8 @@ static void icl_uninit_cdclk(struct drm_i915_private *dev_priv) cdclk_state.cdclk = cdclk_state.bypass; cdclk_state.vco =0 ; - cdclk_state.voltage_level =icl_calc_voltage_level (cdclk_state.cdclk); + cdclk_state.voltage_level =icl_calc_voltage_level (dev_priv, + cdclk_state.cdclk);icl_set_cdclk (dev_priv, &cdclk_state,INVALID_PIPE ); }@@ -2568,7 +2579,7 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state) state->cdclk.logical.vco = vco; state->cdclk.logical.cdclk = cdclk; state->cdclk.logical.voltage_level = -max (icl_calc_voltage_level (cdclk), +max (icl_calc_voltage_level (dev_priv, cdclk),cnl_compute_min_voltage_level (state));if (!state->active_crtcs) {@@ -2579,7 +2590,7 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state) state->cdclk.actual.vco = vco; state->cdclk.actual.cdclk = cdclk; state->cdclk.actual.voltage_level = -icl_calc_voltage_level (cdclk); +icl_calc_voltage_level (dev_priv, cdclk); }else { state->cdclk.actual = state->cdclk.logical; }Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/ehl: Add voltage level requirement table
Quoted 34 lines · Ville Syrjälä
Quoted 32 lines · José Roberto de Souza
EHL has it own voltage level requirement depending on cd clock.
BSpec: 21809
Cc Clint Taylor <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 23 ++++++++++++++++ ------ 1 file changed, 17 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +8
-1@@ -1872,8 +1872,17 @@ static void icl_set_cdclk(struct drm_i915_private *dev_priv, dev_priv->cdclk.hw.voltage_level = cdclk_state->voltage_level; } -static u8 icl_calc_voltage_level(int cdclk) +static u8 icl_calc_voltage_level (struct drm_i915_private *dev_priv,int cdclk) { +if (IS_ELKHARTLAKE (dev_priv)) { +if (cdclk >312000 ) +return 2 ; +else if (cdclk >180000 ) +return 1 ; +else +return 0 ;
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_cdclk.c static void icl_set_cdclk(struct drm_i915_private *dev_priv, · line 1888
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +2
-0+ } +if (cdclk >556800 )drivers/gpu/drm/i915/display/intel_cdclk.c +0
-0return 2 ; else if (cdclk > 312000)I would move the rest into and else branch to make it clear the two are just the two sides of the same coin.
You mean like this?
static u8 icl_calc_voltage_level(struct drm_i915_private *dev_priv, int cdclk)
{
if (IS_ELKHARTLAKE(dev_priv)) {
if (cdclk > 312000)
return 2;
else if (cdclk > 180000)
return 1;
else
return 0;
} else {
if (cdclk > 556800)
return 2;
else if (cdclk > 312000)
return 1;
else
return 0;
}
}Quoted 61 lines
Quoted 61 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +1
-1@@ -1930,7 +1939,7 @@ static void icl_get_cdclk(structdrm_i915_private *dev_priv, * at least what the CDCLK frequency requires. */ cdclk_state->voltage_level = -icl_calc_voltage_level (cdclk_state->cdclk); +icl_calc_voltage_level (dev_priv, cdclk_state->cdclk); }static void
icl_init_cdclk(struct drm_i915_private *dev_priv)drivers/gpu/drm/i915/display/intel_cdclk.c +2
-1@@ -1966,7 +1975,8 @@ static void icl_init_cdclk(struct drm_i915_private *dev_priv) sanitized_state.vco = icl_calc_cdclk_pll_vco(dev_priv, sanitized_state.cd clk); sanitized_state.voltage_level = -icl_calc_voltage_level (sanitized_state. cdclk); + icl_calc_voltage_level(dev_priv, + sanitized_state.cdclk);
drivers/gpu/drm/i915/display/intel_cdclk.c +2
-1icl_set_cdclk (dev_priv, &sanitized_state,INVALID_PIPE ); }@@ -1977,7 +1987,8 @@ static void icl_uninit_cdclk(struct drm_i915_private *dev_priv) cdclk_state.cdclk = cdclk_state.bypass; cdclk_state.vco =0 ; - cdclk_state.voltage_level =icl_calc_voltage_level (cdclk_state.cdclk); + cdclk_state.voltage_level =icl_calc_voltage_level (dev_priv, + cdclk_state. cdclk);drivers/gpu/drm/i915/display/intel_cdclk.c +1
-1icl_set_cdclk (dev_priv, &cdclk_state,INVALID_PIPE ); }@@ -2568,7 +2579,7 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state) state->cdclk.logical.vco = vco; state->cdclk.logical.cdclk = cdclk; state->cdclk.logical.voltage_level = -max (icl_calc_voltage_level (cdclk), +max (icl_calc_voltage_level (dev_priv, cdclk),cnl_compute_min_voltage_level (state));drivers/gpu/drm/i915/display/intel_cdclk.c +1
-1if (!state->active_crtcs) {@@ -2579,7 +2590,7 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state) state->cdclk.actual.vco = vco; state->cdclk.actual.cdclk = cdclk; state->cdclk.actual.voltage_level = -icl_calc_voltage_level (cdclk); +icl_calc_voltage_level (dev_priv, cdclk); }else { state->cdclk.actual = state->cdclk.logical;}
Signature · 1 line
2.22.0
Quoted 4 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/ehl: Add voltage level requirement table
Quoted 44 lines · Jose
Quoted 34 lines · Ville Syrjälä
Quoted 32 lines · José Roberto de Souza
EHL has it own voltage level requirement depending on cd clock.
BSpec: 21809
Cc Clint Taylor <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 23 ++++++++++++++++ ------ 1 file changed, 17 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +8
-1@@ -1872,8 +1872,17 @@ static void icl_set_cdclk(struct drm_i915_private *dev_priv, dev_priv->cdclk.hw.voltage_level = cdclk_state->voltage_level; } -static u8 icl_calc_voltage_level(int cdclk) +static u8 icl_calc_voltage_level (struct drm_i915_private *dev_priv,int cdclk) { +if (IS_ELKHARTLAKE (dev_priv)) { +if (cdclk >312000 ) +return 2 ; +else if (cdclk >180000 ) +return 1 ; +else +return 0 ;Quoted 8 lines
drivers/gpu/drm/i915/display/intel_cdclk.c static void icl_set_cdclk(struct drm_i915_private *dev_priv, · line 1888
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +2
-0+ } +if (cdclk >556800 )drivers/gpu/drm/i915/display/intel_cdclk.c +0
-0return 2 ; else if (cdclk > 312000)I would move the rest into and else branch to make it clear the two are just the two sides of the same coin.
Quoted 1 line
You mean like this?
Yes.
Quoted 87 lines
static u8
icl_calc_voltage_level(struct drm_i915_private *dev_priv, int cdclk){ if (IS_ELKHARTLAKE(dev_priv)) { if (cdclk > 312000) return 2; else if (cdclk > 180000) return 1; else return 0; } else { if (cdclk > 556800) return 2; else if (cdclk > 312000) return 1; else return 0; } }Quoted 65 lines
Quoted 65 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +1
-1@@ -1930,7 +1939,7 @@ static void icl_get_cdclk(structdrm_i915_private *dev_priv, * at least what the CDCLK frequency requires. */ cdclk_state->voltage_level = -icl_calc_voltage_level (cdclk_state->cdclk); +icl_calc_voltage_level (dev_priv, cdclk_state->cdclk); }static void
icl_init_cdclk(struct drm_i915_private *dev_priv)drivers/gpu/drm/i915/display/intel_cdclk.c +2
-1@@ -1966,7 +1975,8 @@ static void icl_init_cdclk(struct drm_i915_private *dev_priv) sanitized_state.vco = icl_calc_cdclk_pll_vco(dev_priv, sanitized_state.cd clk); sanitized_state.voltage_level = -icl_calc_voltage_level (sanitized_state. cdclk); + icl_calc_voltage_level(dev_priv, + sanitized_state.cdclk);
drivers/gpu/drm/i915/display/intel_cdclk.c +2
-1icl_set_cdclk (dev_priv, &sanitized_state,INVALID_PIPE ); }@@ -1977,7 +1987,8 @@ static void icl_uninit_cdclk(struct drm_i915_private *dev_priv) cdclk_state.cdclk = cdclk_state.bypass; cdclk_state.vco =0 ; - cdclk_state.voltage_level =icl_calc_voltage_level (cdclk_state.cdclk); + cdclk_state.voltage_level =icl_calc_voltage_level (dev_priv, + cdclk_state. cdclk);drivers/gpu/drm/i915/display/intel_cdclk.c +1
-1icl_set_cdclk (dev_priv, &cdclk_state,INVALID_PIPE ); }@@ -2568,7 +2579,7 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state) state->cdclk.logical.vco = vco; state->cdclk.logical.cdclk = cdclk; state->cdclk.logical.voltage_level = -max (icl_calc_voltage_level (cdclk), +max (icl_calc_voltage_level (dev_priv, cdclk),cnl_compute_min_voltage_level (state));drivers/gpu/drm/i915/display/intel_cdclk.c +1
-1if (!state->active_crtcs) {@@ -2579,7 +2590,7 @@ static int icl_modeset_calc_cdclk(struct intel_atomic_state *state) state->cdclk.actual.vco = vco; state->cdclk.actual.cdclk = cdclk; state->cdclk.actual.voltage_level = -icl_calc_voltage_level (cdclk); +icl_calc_voltage_level (dev_priv, cdclk); }else { state->cdclk.actual = state->cdclk.logical;}
Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.SPARSE: warning for series starting with [1/3] drm/i915/icl: Add new supported CD clocks
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915/icl: Add new supported CD clocks
URL : https://patchwork.freedesktop.org/series/62355/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/i915/icl: Add new supported CD clocks Okay!
Commit: drm/i915/ehl: Remove unsupported cd clocks Okay!
Commit: drm/i915/ehl: Add voltage level requirement table -O:drivers/gpu/drm/i915/display/intel_cdclk.c:2571:17: warning: expression using sizeof(void) -O:drivers/gpu/drm/i915/display/intel_cdclk.c:2571:17: warning: expression using sizeof(void) +drivers/gpu/drm/i915/display/intel_cdclk.c:2582:17: warning: expression using sizeof(void) +drivers/gpu/drm/i915/display/intel_cdclk.c:2582:17: warning: expression using sizeof(void)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915/icl: Add new supported CD clocks
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915/icl: Add new supported CD clocks
URL : https://patchwork.freedesktop.org/series/62355/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_6299 -> Patchwork_13337
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_13337 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_13337, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13337/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_13337:
### IGT changes ###
#### Possible regressions ####
* igt@gem_sync@basic-store-each:
- fi-bdw-5557u: NOTRUN -> [FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13337/fi-bdw-5557u/igt@[email protected]
#### Warnings ####
* igt@i915_selftest@live_contexts:
- fi-bdw-gvtdvm: [DMESG-FAIL][2] ([fdo#110235]) -> [INCOMPLETE][3]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13337/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
Known issues
------------
Here are the changes found in Patchwork_13337 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live_hangcheck:
- fi-icl-u2: [PASS][4] -> [INCOMPLETE][5] ([fdo#107713] / [fdo#108569])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-icl-u2/igt@i915_selftest@live_hangcheck.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13337/fi-icl-u2/igt@i915_selftest@live_hangcheck.html
#### Possible fixes ####
* igt@gem_cpu_reloc@basic:
- fi-icl-dsi: [INCOMPLETE][6] ([fdo#107713] / [fdo#110246]) -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-icl-dsi/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13337/fi-icl-dsi/igt@[email protected]
* igt@gem_sync@basic-store-each:
- fi-kbl-7567u: [FAIL][8] -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-kbl-7567u/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13337/fi-kbl-7567u/igt@[email protected]
* igt@i915_module_load@reload:
- fi-blb-e6850: [INCOMPLETE][10] ([fdo#107718]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-blb-e6850/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13337/fi-blb-e6850/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: [FAIL][12] ([fdo#108511]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-skl-6770hq/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13337/fi-skl-6770hq/igt@[email protected]
* igt@i915_selftest@live_contexts:
- fi-skl-gvtdvm: [DMESG-FAIL][14] ([fdo#110235]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-skl-gvtdvm/igt@i915_selftest@live_contexts.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13337/fi-skl-gvtdvm/igt@i915_selftest@live_contexts.html
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [DMESG-WARN][16] ([fdo#102614]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-hsw-peppy/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13337/fi-hsw-peppy/igt@[email protected]
[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#110235]: https://bugs.freedesktop.org/show_bug.cgi?id=110235
[fdo#110246]: https://bugs.freedesktop.org/show_bug.cgi?id=110246
Participating hosts (44 -> 35)
------------------------------
Additional (1): fi-bdw-5557u
Missing (10): fi-kbl-soraka fi-ilk-m540 fi-bsw-n3050 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-pnv-d510 fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_6299 -> Patchwork_13337
CI_DRM_6299: 2a6cf9f4dc05b77beab4b7d9d1c9f16c7e55a001 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5059: 1f67ee0d09d6513f487f2be74aae9700e755258a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13337: e9f434aaa5f9e67d0aee4ab23bb9e98e40841e91 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
e9f434aaa5f9 drm/i915/ehl: Add voltage level requirement table 70a07288126a drm/i915/ehl: Remove unsupported cd clocks 7b8941b203bd drm/i915/icl: Add new supported CD clocks
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13337/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.SPARSE: warning for series starting with [1/3] drm/i915/icl: Add new supported CD clocks (rev2)
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915/icl: Add new supported CD clocks (rev2)
URL : https://patchwork.freedesktop.org/series/62355/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/i915/icl: Add new supported CD clocks Okay!
Commit: drm/i915/ehl: Remove unsupported cd clocks Okay!
Commit: drm/i915/ehl: Add voltage level requirement table -O:drivers/gpu/drm/i915/display/intel_cdclk.c:2571:17: warning: expression using sizeof(void) -O:drivers/gpu/drm/i915/display/intel_cdclk.c:2571:17: warning: expression using sizeof(void) +drivers/gpu/drm/i915/display/intel_cdclk.c:2582:17: warning: expression using sizeof(void) +drivers/gpu/drm/i915/display/intel_cdclk.c:2582:17: warning: expression using sizeof(void)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915/icl: Add new supported CD clocks (rev2)
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915/icl: Add new supported CD clocks (rev2)
URL : https://patchwork.freedesktop.org/series/62355/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_6300 -> Patchwork_13342
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_13342 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_13342, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13342/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_13342:
### IGT changes ###
#### Possible regressions ####
* igt@gem_sync@basic-store-each:
- fi-skl-6770hq: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6300/fi-skl-6770hq/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13342/fi-skl-6770hq/igt@[email protected]
* igt@i915_selftest@live_gtt:
- fi-apl-guc: [PASS][3] -> [DMESG-WARN][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6300/fi-apl-guc/igt@i915_selftest@live_gtt.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13342/fi-apl-guc/igt@i915_selftest@live_gtt.html
Known issues
------------
Here are the changes found in Patchwork_13342 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: [PASS][5] -> [INCOMPLETE][6] ([fdo#107718])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6300/fi-blb-e6850/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13342/fi-blb-e6850/igt@[email protected]
* igt@i915_selftest@live_contexts:
- fi-bdw-gvtdvm: [PASS][7] -> [DMESG-FAIL][8] ([fdo#110235])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6300/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13342/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
* igt@prime_busy@basic-after-default:
- fi-icl-u3: [PASS][9] -> [DMESG-WARN][10] ([fdo#107724])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6300/fi-icl-u3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13342/fi-icl-u3/igt@[email protected]
#### Possible fixes ####
* igt@gem_mmap_gtt@basic-read-no-prefault:
- fi-icl-u3: [DMESG-WARN][11] ([fdo#107724]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6300/fi-icl-u3/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13342/fi-icl-u3/igt@[email protected]
* igt@i915_selftest@live_contexts:
- fi-skl-gvtdvm: [DMESG-FAIL][13] ([fdo#110235]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6300/fi-skl-gvtdvm/igt@i915_selftest@live_contexts.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13342/fi-skl-gvtdvm/igt@i915_selftest@live_contexts.html
* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u3: [FAIL][15] ([fdo#103167]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6300/fi-icl-u3/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13342/fi-icl-u3/igt@[email protected]
* igt@prime_busy@basic-wait-after-default:
- fi-icl-dsi: [INCOMPLETE][17] ([fdo#107713]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6300/fi-icl-dsi/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13342/fi-icl-dsi/igt@[email protected]
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#110235]: https://bugs.freedesktop.org/show_bug.cgi?id=110235
Participating hosts (44 -> 42)
------------------------------
Additional (6): fi-cml-u2 fi-kbl-guc fi-whl-u fi-kbl-x1275 fi-gdg-551 fi-cml-u
Missing (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_6300 -> Patchwork_13342
CI_DRM_6300: a0694108fecf62a79e0be32e578f25fdcbf466e4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5059: 1f67ee0d09d6513f487f2be74aae9700e755258a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13342: 58c6fb7f6c3888ce67bff4294fa89371a246c690 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
58c6fb7f6c38 drm/i915/ehl: Add voltage level requirement table a9968a30cb98 drm/i915/ehl: Remove unsupported cd clocks e2f4342fa7ce drm/i915/icl: Add new supported CD clocks
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13342/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 21 lines · José Roberto de Souza
Now 180, 172.8 and 192 MHz are supported.
180 and 172.8 MHz CD clocks will only be used when audio is not enabled as state by BSpec and implemented in
intel_crtc_compute_min_cdclk(), CD clock must be at least twice of Azalia BCLK and BCLK by default is 96 MHz, it could be set to 48 MHz but we are not reading it.BSpec: 20598
BSpec: 15729Cc Clint Taylor <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 29 +++++++++++++++------- 1 file changed, 20 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +0
-0
drivers/gpu/drm/i915/display/intel_cdclk.c static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv) · line 1760
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +2
-3@@ -1756,9 +1756,10 @@ static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv)static int icl_calc_cdclk (int min_cdclk,unsigned int ref) { -int ranges_24[] = {312000 ,552000 ,648000 }; -int ranges_19_38[] = {307200 ,556800 ,652800 }; -int *ranges; +const int ranges_24[] = {180000 ,192000 ,312000 ,552000 ,648000 }; +const int ranges_19_38[] = {172800 ,192000 ,307200 ,556800 ,652800 };
static?
drivers/gpu/drm/i915/display/intel_cdclk.c static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv) · line 1762
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +2
-0+const int *ranges; +unsigned int len, i;
just 'int' please
Quoted 43 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +10
-6switch (ref) {default :@@ -1766,19 +1767,22 @@ static int icl_calc_cdclk(int min_cdclk, unsigned int ref)/* fall through */ case 24000 : ranges = ranges_24; + len =ARRAY_SIZE (ranges_24);break ;case 19200 :case 38400 : ranges = ranges_19_38; + len =ARRAY_SIZE (ranges_19_38);break ; } -if (min_cdclk > ranges[1 ]) -return ranges[2 ]; -else if (min_cdclk > ranges[0 ]) -return ranges[1 ]; -else -return ranges[0 ]; +for (i =0 ; i < len; i++) { +if (min_cdclk <= ranges[i]) +return ranges[i]; + } + +WARN_ON (min_cdclk > ranges[len -1 ]); +return ranges[len -1 ]; }static int icl_calc_cdclk_pll_vco (struct drm_i915_private *dev_priv,int cdclk)@@ -1792,16 +1796,23 @@ static int icl_calc_cdclk_pll_vco(struct drm_i915_private *dev_priv, int cdclk)default :MISSING_CASE (cdclk);/* fall through */ +case 172800 :case 307200 :case 556800 :case 652800 :WARN_ON (dev_priv->cdclk.hw.ref !=19200 && dev_priv->cdclk.hw.ref !=38400 );break ;
drivers/gpu/drm/i915/display/intel_cdclk.c static int icl_calc_cdclk_pll_vco(struct drm_i915_private *dev_priv, int cdclk) · line 1815
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +6
-0+case 180000 :case 312000 :case 552000 :case 648000 :WARN_ON (dev_priv->cdclk.hw.ref !=24000 ); +break ; +case 192000 : +WARN_ON (dev_priv->cdclk.hw.ref !=19200 && + dev_priv->cdclk.hw.ref !=38400 && + dev_priv->cdclk.hw.ref !=24000 );
I'd probably put a break here too for symmetry.
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +0
-0} ratio = cdclk / (dev_priv->cdclk.hw.ref /2 );Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 28 lines · Ville Syrjälä
Quoted 26 lines · José Roberto de Souza
Now 180, 172.8 and 192 MHz are supported.
180 and 172.8 MHz CD clocks will only be used when audio is not enabled as state by BSpec and implemented in
intel_crtc_compute_min_cdclk(), CD clock must be at least twice of Azalia BCLK and BCLK by default is 96 MHz, it could be set to 48 MHz
but we are not reading it.BSpec: 20598
BSpec: 15729Cc Clint Taylor <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 29 +++++++++++++++--- ---- 1 file changed, 20 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +0
-0@@ -1756,9 +1756,10 @@ static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv)
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_cdclk.c static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv)
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +2
-3static int icl_calc_cdclk (int min_cdclk,unsigned int ref) { -int ranges_24[] = {312000 ,552000 ,648000 }; -int ranges_19_38[] = {307200 ,556800 ,652800 }; -int *ranges; +const int ranges_24[] = {180000 ,192000 ,312000 ,552000 ,648000 }; +const int ranges_19_38[] = {172800 ,192000 ,307200 ,556800 ,652800 };static?
We don't need to keep this in memory all the time.
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_cdclk.c static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv) · line 1762
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +2
-0+const int *ranges; +unsigned int len, i;just 'int' please
Ok
Quoted 51 lines
Quoted 51 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +9
-6switch (ref) {default :@@ -1766,19 +1767,22 @@ static int icl_calc_cdclk(int min_cdclk, unsigned int ref)/* fall through */ case 24000 : ranges = ranges_24; + len =ARRAY_SIZE (ranges_24);break ;case 19200 :case 38400 : ranges = ranges_19_38; + len =ARRAY_SIZE (ranges_19_38);break ; } -if (min_cdclk > ranges[1 ]) -return ranges[2 ]; -else if (min_cdclk > ranges[0 ]) -return ranges[1 ]; -else -return ranges[0 ]; +for (i =0 ; i < len; i++) { +if (min_cdclk <= ranges[i]) +return ranges[i]; + } + +WARN_ON (min_cdclk > ranges[len -1 ]); +return ranges[len -1 ]; }static int icl_calc_cdclk_pll_vco(struct
drm_i915_private*dev_priv, int cdclk)drivers/gpu/drm/i915/display/intel_cdclk.c +2
-0@@ -1792,16 +1796,23 @@ static int icl_calc_cdclk_pll_vco(struct drm_i915_private *dev_priv, int cdclk) default:MISSING_CASE (cdclk );/* fall through */ +case 172800 :case 307200 :case 556800 :case 652800 :WARN_ON (dev_priv->cdclk.hw.ref !=19200 && dev_priv->cdclk.hw.ref !=38400 );break ; +case 180000 :case 312000 :case 552000 :case 648000 :
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_cdclk.c static int icl_calc_cdclk_pll_vco(struct drm_i915_private *dev_priv, int cdclk) · line 1815
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +5
-0WARN_ON (dev_priv->cdclk.hw.ref !=24000 ); +break ; +case 192000 : +WARN_ON (dev_priv->cdclk.hw.ref !=19200 && + dev_priv->cdclk.hw.ref !=38400 && + dev_priv->cdclk.hw.ref !=24000 );I'd probably put a break here too for symmetry.
Ok
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +0
-0}ratio = cdclk / (
dev_priv->cdclk.hw.ref/ 2);Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 41 lines · Jose
Quoted 28 lines · Ville Syrjälä
Quoted 26 lines · José Roberto de Souza
Now 180, 172.8 and 192 MHz are supported.
180 and 172.8 MHz CD clocks will only be used when audio is not enabled as state by BSpec and implemented in
intel_crtc_compute_min_cdclk(), CD clock must be at least twice of Azalia BCLK and BCLK by default is 96 MHz, it could be set to 48 MHz
but we are not reading it.BSpec: 20598
BSpec: 15729Cc Clint Taylor <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 29 +++++++++++++++--- ---- 1 file changed, 20 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +0
-0@@ -1756,9 +1756,10 @@ static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv)Quoted 11 lines
drivers/gpu/drm/i915/display/intel_cdclk.c static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv)
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +2
-3static int icl_calc_cdclk (int min_cdclk,unsigned int ref) { -int ranges_24[] = {312000 ,552000 ,648000 }; -int ranges_19_38[] = {307200 ,556800 ,652800 }; -int *ranges; +const int ranges_24[] = {180000 ,192000 ,312000 ,552000 ,648000 }; +const int ranges_19_38[] = {172800 ,192000 ,307200 ,556800 ,652800 };static?
Quoted 1 line
We don't need to keep this in memory all the time.
It'll be in memory either way. It's going to end up as either text or bss. bss seems better.
Quoted 82 lines
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cdclk.c static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv) · line 1762
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +2
-0+const int *ranges; +unsigned int len, i;just 'int' please
Ok
Quoted 51 lines
Quoted 51 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +9
-6switch (ref) {default :@@ -1766,19 +1767,22 @@ static int icl_calc_cdclk(int min_cdclk, unsigned int ref)/* fall through */ case 24000 : ranges = ranges_24; + len =ARRAY_SIZE (ranges_24);break ;case 19200 :case 38400 : ranges = ranges_19_38; + len =ARRAY_SIZE (ranges_19_38);break ; } -if (min_cdclk > ranges[1 ]) -return ranges[2 ]; -else if (min_cdclk > ranges[0 ]) -return ranges[1 ]; -else -return ranges[0 ]; +for (i =0 ; i < len; i++) { +if (min_cdclk <= ranges[i]) +return ranges[i]; + } + +WARN_ON (min_cdclk > ranges[len -1 ]); +return ranges[len -1 ]; }static int icl_calc_cdclk_pll_vco(struct
drm_i915_private*dev_priv, int cdclk)drivers/gpu/drm/i915/display/intel_cdclk.c +2
-0@@ -1792,16 +1796,23 @@ static int icl_calc_cdclk_pll_vco(struct drm_i915_private *dev_priv, int cdclk) default:MISSING_CASE (cdclk );/* fall through */ +case 172800 :case 307200 :case 556800 :case 652800 :WARN_ON (dev_priv->cdclk.hw.ref !=19200 && dev_priv->cdclk.hw.ref !=38400 );break ; +case 180000 :case 312000 :case 552000 :case 648000 :Quoted 8 lines
drivers/gpu/drm/i915/display/intel_cdclk.c static int icl_calc_cdclk_pll_vco(struct drm_i915_private *dev_priv, int cdclk) · line 1815
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +5
-0WARN_ON (dev_priv->cdclk.hw.ref !=24000 ); +break ; +case 192000 : +WARN_ON (dev_priv->cdclk.hw.ref !=19200 && + dev_priv->cdclk.hw.ref !=38400 && + dev_priv->cdclk.hw.ref !=24000 );I'd probably put a break here too for symmetry.
Ok
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +0
-0}ratio = cdclk / (
dev_priv->cdclk.hw.ref/ 2);Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 7 lines · José Roberto de Souza
Now 180, 172.8 and 192 MHz are supported.
180 and 172.8 MHz CD clocks will only be used when audio is not enabled as state by BSpec and implemented in
intel_crtc_compute_min_cdclk(), CD clock must be at least twice of Azalia BCLK and BCLK by default is 96 MHz, it could be set to 48 MHz but we are not reading it.
Do we know whether this thing still suffers from the glk/cnl issue where we can't even talk to the codec if cdclk is too low? If it does we need to adjust the platform check for the "force min cdclk for audio" thing. Also that is going to suck on icl due to the cd2x divider always being 1 and hence we can't do the optimized cdclk change around audio power requests.
Quoted 87 lines
BSpec: 20598
BSpec: 15729Cc Clint Taylor <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 29 +++++++++++++++------- 1 file changed, 20 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +20
-9@@ -1756,9 +1756,10 @@ static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv)static int icl_calc_cdclk (int min_cdclk,unsigned int ref) { -int ranges_24[] = {312000 ,552000 ,648000 }; -int ranges_19_38[] = {307200 ,556800 ,652800 }; -int *ranges; +const int ranges_24[] = {180000 ,192000 ,312000 ,552000 ,648000 }; +const int ranges_19_38[] = {172800 ,192000 ,307200 ,556800 ,652800 }; +const int *ranges; +unsigned int len, i;switch (ref) {default :@@ -1766,19 +1767,22 @@ static int icl_calc_cdclk(int min_cdclk, unsigned int ref)/* fall through */ case 24000 : ranges = ranges_24; + len =ARRAY_SIZE (ranges_24);break ;case 19200 :case 38400 : ranges = ranges_19_38; + len =ARRAY_SIZE (ranges_19_38);break ; } -if (min_cdclk > ranges[1 ]) -return ranges[2 ]; -else if (min_cdclk > ranges[0 ]) -return ranges[1 ]; -else -return ranges[0 ]; +for (i =0 ; i < len; i++) { +if (min_cdclk <= ranges[i]) +return ranges[i]; + } + +WARN_ON (min_cdclk > ranges[len -1 ]); +return ranges[len -1 ]; }static int icl_calc_cdclk_pll_vco (struct drm_i915_private *dev_priv,int cdclk)@@ -1792,16 +1796,23 @@ static int icl_calc_cdclk_pll_vco(struct drm_i915_private *dev_priv, int cdclk)default :MISSING_CASE (cdclk);/* fall through */ +case 172800 :case 307200 :case 556800 :case 652800 :WARN_ON (dev_priv->cdclk.hw.ref !=19200 && dev_priv->cdclk.hw.ref !=38400 );break ; +case 180000 :case 312000 :case 552000 :case 648000 :WARN_ON (dev_priv->cdclk.hw.ref !=24000 ); +break ; +case 192000 : +WARN_ON (dev_priv->cdclk.hw.ref !=19200 && + dev_priv->cdclk.hw.ref !=38400 && + dev_priv->cdclk.hw.ref !=24000 ); } ratio = cdclk / (dev_priv->cdclk.hw.ref /2 );Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Ville Syrjälä
Quoted 8 lines · José Roberto de Souza
Now 180, 172.8 and 192 MHz are supported.
180 and 172.8 MHz CD clocks will only be used when audio is not enabled as state by BSpec and implemented in
intel_crtc_compute_min_cdclk(), CD clock must be at least twice of Azalia BCLK and BCLK by default is 96 MHz, it could be set to 48 MHz
but we are not reading it.
Quoted 10 lines
Do we know whether this thing still suffers from the glk/cnl issue where
we can't even talk to the codec if cdclk is too low? If it does we need
to adjust the platform check for the "force min cdclk for audio" thing.
Also that is going to suck on icl due to the cd2x divider always being
1 and hence we can't do the optimized cdclk change around audio power requests.
Not sure how to test if we can talk to the codec when cdclock is too low(you mean lower than 192000khz(96MHz*2)?) but this workflow worked:
1- only full HD eDP panel connected | cdclock = 172800khz 2- connected a full HD DP monitor with audio | cdclock = 192000khz
* audio works
3- disconnected full HD DP monitor | cdclock = 172800khz 4- connected again a full HD DP monitor with audio | cdclock = 192000khz
* audio works
Do you have any other test in mind?
Quoted 87 lines
Quoted 87 lines
BSpec: 20598
BSpec: 15729Cc Clint Taylor <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 29 +++++++++++++++--- ---- 1 file changed, 20 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +4
-3@@ -1756,9 +1756,10 @@ static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv)static int icl_calc_cdclk (int min_cdclk,unsigned int ref) { -int ranges_24[] = {312000 ,552000 ,648000 }; -int ranges_19_38[] = {307200 ,556800 ,652800 }; -int *ranges; +const int ranges_24[] = {180000 ,192000 ,312000 ,552000 ,648000 }; +const int ranges_19_38[] = {172800 ,192000 ,307200 ,556800 ,652800 }; +const int *ranges; +unsigned int len, i;drivers/gpu/drm/i915/display/intel_cdclk.c +9
-6switch (ref) {default :@@ -1766,19 +1767,22 @@ static int icl_calc_cdclk(int min_cdclk, unsigned int ref)/* fall through */ case 24000 : ranges = ranges_24; + len =ARRAY_SIZE (ranges_24);break ;case 19200 :case 38400 : ranges = ranges_19_38; + len =ARRAY_SIZE (ranges_19_38);break ; } -if (min_cdclk > ranges[1 ]) -return ranges[2 ]; -else if (min_cdclk > ranges[0 ]) -return ranges[1 ]; -else -return ranges[0 ]; +for (i =0 ; i < len; i++) { +if (min_cdclk <= ranges[i]) +return ranges[i]; + } + +WARN_ON (min_cdclk > ranges[len -1 ]); +return ranges[len -1 ]; }static int icl_calc_cdclk_pll_vco(struct
drm_i915_private*dev_priv, int cdclk)drivers/gpu/drm/i915/display/intel_cdclk.c +7
-0@@ -1792,16 +1796,23 @@ static int icl_calc_cdclk_pll_vco(struct drm_i915_private *dev_priv, int cdclk) default:MISSING_CASE (cdclk );/* fall through */ +case 172800 :case 307200 :case 556800 :case 652800 :WARN_ON (dev_priv->cdclk.hw.ref !=19200 && dev_priv->cdclk.hw.ref !=38400 );break ; +case 180000 :case 312000 :case 552000 :case 648000 :WARN_ON (dev_priv->cdclk.hw.ref !=24000 ); +break ; +case 192000 : +WARN_ON (dev_priv->cdclk.hw.ref !=19200 && + dev_priv->cdclk.hw.ref !=38400 && + dev_priv->cdclk.hw.ref !=24000 ); }
Quoted 8 lines
Quoted 8 lines
ratio = cdclk / (
dev_priv->cdclk.hw.ref/ 2);Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 34 lines · Jose
Quoted 11 lines · Ville Syrjälä
Quoted 8 lines · José Roberto de Souza
Now 180, 172.8 and 192 MHz are supported.
180 and 172.8 MHz CD clocks will only be used when audio is not enabled as state by BSpec and implemented in
intel_crtc_compute_min_cdclk(), CD clock must be at least twice of Azalia BCLK and BCLK by default is 96 MHz, it could be set to 48 MHz
but we are not reading it.Quoted 10 lines
Do we know whether this thing still suffers from the glk/cnl issue where
we can't even talk to the codec if cdclk is too low? If it does we need
to adjust the platform check for the "force min cdclk for audio" thing.
Also that is going to suck on icl due to the cd2x divider always being
1 and hence we can't do the optimized cdclk change around audio power requests.Not sure how to test if we can talk to the codec when cdclock is too
low(you mean lower than 192000khz(96MHz*2)?)but this workflow worked:1- only full HD eDP panel connected | cdclock = 172800khz 2- connected a full HD DP monitor with audio | cdclock = 192000khz
* audio works
3- disconnected full HD DP monitor | cdclock = 172800khz 4- connected again a full HD DP monitor with audio | cdclock = 192000khz
* audio works
Quoted 1 line
Do you have any other test in mind?
Try to load/resume the audio driver when cdclk is low maybe?
Quoted 96 lines
Quoted 96 lines
Quoted 96 lines
BSpec: 20598
BSpec: 15729Cc Clint Taylor <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 29 +++++++++++++++--- ---- 1 file changed, 20 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +4
-3@@ -1756,9 +1756,10 @@ static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv)static int icl_calc_cdclk (int min_cdclk,unsigned int ref) { -int ranges_24[] = {312000 ,552000 ,648000 }; -int ranges_19_38[] = {307200 ,556800 ,652800 }; -int *ranges; +const int ranges_24[] = {180000 ,192000 ,312000 ,552000 ,648000 }; +const int ranges_19_38[] = {172800 ,192000 ,307200 ,556800 ,652800 }; +const int *ranges; +unsigned int len, i;drivers/gpu/drm/i915/display/intel_cdclk.c +9
-6switch (ref) {default :@@ -1766,19 +1767,22 @@ static int icl_calc_cdclk(int min_cdclk, unsigned int ref)/* fall through */ case 24000 : ranges = ranges_24; + len =ARRAY_SIZE (ranges_24);break ;case 19200 :case 38400 : ranges = ranges_19_38; + len =ARRAY_SIZE (ranges_19_38);break ; } -if (min_cdclk > ranges[1 ]) -return ranges[2 ]; -else if (min_cdclk > ranges[0 ]) -return ranges[1 ]; -else -return ranges[0 ]; +for (i =0 ; i < len; i++) { +if (min_cdclk <= ranges[i]) +return ranges[i]; + } + +WARN_ON (min_cdclk > ranges[len -1 ]); +return ranges[len -1 ]; }static int icl_calc_cdclk_pll_vco(struct
drm_i915_private*dev_priv, int cdclk)drivers/gpu/drm/i915/display/intel_cdclk.c +7
-0@@ -1792,16 +1796,23 @@ static int icl_calc_cdclk_pll_vco(struct drm_i915_private *dev_priv, int cdclk) default:MISSING_CASE (cdclk );/* fall through */ +case 172800 :case 307200 :case 556800 :case 652800 :WARN_ON (dev_priv->cdclk.hw.ref !=19200 && dev_priv->cdclk.hw.ref !=38400 );break ; +case 180000 :case 312000 :case 552000 :case 648000 :WARN_ON (dev_priv->cdclk.hw.ref !=24000 ); +break ; +case 192000 : +WARN_ON (dev_priv->cdclk.hw.ref !=19200 && + dev_priv->cdclk.hw.ref !=38400 && + dev_priv->cdclk.hw.ref !=24000 ); }ratio = cdclk / (
dev_priv->cdclk.hw.ref/ 2);Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 42 lines · Ville Syrjälä
Quoted 41 lines · Jose
Quoted 13 lines · Ville Syrjälä
Quoted 10 lines · José Roberto de Souza
Now 180, 172.8 and 192 MHz are supported.
180 and 172.8 MHz CD clocks will only be used when audio is not enabled as state by BSpec and implemented in
intel_crtc_compute_min_cdclk(), CD clock must be at least twice of
Azalia BCLK and BCLK by default is 96 MHz, it could be set to 48
MHz
but we are not reading it.Quoted 13 lines
Do we know whether this thing still suffers from the glk/cnl issue
where
we can't even talk to the codec if cdclk is too low? If it does we
need
to adjust the platform check for the "force min cdclk for audio" thing.
Also that is going to suck on icl due to the cd2x divider always being
1 and hence we can't do the optimized cdclk change around audio power
requests.Not sure how to test if we can talk to the codec when cdclock is too
low(you mean lower than 192000khz(96MHz*2)?)but this workflow worked:1- only full HD eDP panel connected | cdclock = 172800khz 2- connected a full HD DP monitor with audio | cdclock = 192000khz
* audio works
3- disconnected full HD DP monitor | cdclock = 172800khz 4- connected again a full HD DP monitor with audio | cdclock = 192000khz
* audio works
Quoted 3 lines
Quoted 1 line
Do you have any other test in mind?
Try to load/resume the audio driver when cdclk is low maybe?
Oh good idea.
It worked, snd_hda_intel loaded without errors while cdclk was 172800 kHz and then connecting a monitor with audio the cdclk was set to 192000 kHz and audio was send to speakers.
Quoted 92 lines
Quoted 92 lines
Quoted 92 lines
Quoted 92 lines
BSpec: 20598
BSpec: 15729Cc Clint Taylor <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 29 +++++++++++++++--- ---- 1 file changed, 20 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +2
-3@@ -1756,9 +1756,10 @@ static void cnl_sanitize_cdclk(struct drm_i915_private *dev_priv)static int icl_calc_cdclk (int min_cdclk,unsigned int ref) { -int ranges_24[] = {312000 ,552000 ,648000 }; -int ranges_19_38[] = {307200 ,556800 ,652800 }; -int *ranges; +const int ranges_24[] = {180000 ,192000 ,312000 ,552000 ,648000 }; +const int ranges_19_38[] = {172800 ,192000 ,307200 ,556800,
652800 };drivers/gpu/drm/i915/display/intel_cdclk.c +11
-6+const int *ranges; +unsigned int len, i;switch (ref) {default :@@ -1766,19 +1767,22 @@ static int icl_calc_cdclk(int min_cdclk, unsigned int ref)/* fall through */ case 24000 : ranges = ranges_24; + len =ARRAY_SIZE (ranges_24);break ;case 19200 :case 38400 : ranges = ranges_19_38; + len =ARRAY_SIZE (ranges_19_38);break ; } -if (min_cdclk > ranges[1 ]) -return ranges[2 ]; -else if (min_cdclk > ranges[0 ]) -return ranges[1 ]; -else -return ranges[0 ]; +for (i =0 ; i < len; i++) { +if (min_cdclk <= ranges[i]) +return ranges[i]; + } + +WARN_ON (min_cdclk > ranges[len -1 ]); +return ranges[len -1 ]; }static int icl_calc_cdclk_pll_vco(struct
drm_i915_private*dev_priv, int cdclk)drivers/gpu/drm/i915/display/intel_cdclk.c +0
-0@@ -1792,16 +1796,23 @@ static inticl_calc_cdclk_pll_vco(struct
drm_i915_private*dev_priv, int cdclk)drivers/gpu/drm/i915/display/intel_cdclk.c +7
-0default :MISSING_CASE (cdclk);/* fall through */ +case 172800 :case 307200 :case 556800 :case 652800 :WARN_ON (dev_priv->cdclk.hw.ref !=19200 && dev_priv->cdclk.hw.ref !=38400 );break ; +case 180000 :case 312000 :case 552000 :case 648000 :WARN_ON (dev_priv->cdclk.hw.ref !=24000 ); +break ; +case 192000 : +WARN_ON (dev_priv->cdclk.hw.ref !=19200 && + dev_priv->cdclk.hw.ref !=38400 && + dev_priv->cdclk.hw.ref !=24000 ); }
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
ratio = cdclk / (
dev_priv->cdclk.hw.ref/ 2);Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx