drm/i915/display: Communicate display configuration to pcode
Subsystems (3)
PATCH 1/1 drm/i915/display: Communicate display configuration to pcode
From: Jigar Bhatt <[email protected]>
Display to communicate "display configuration" to Pcode for more accurate power accounting for DG2. Existing sequence is only sending the voltage value to the Pcode. Adding new sequence with current cdclk associate with voltage value masking. Adding pcode request when any power well will disable or enable.
v2: - Fixed identation(Stanislav Lisovskiy)
- Made conditions more specific(in the commit we declare that we do this for DG2 only, however that commit changes >= to == for many other platforms.(Stanislav Lisovskiy)
--- drivers/gpu/drm/i915/display/intel_cdclk.c | 89 +++++++++++++++++++- drivers/gpu/drm/i915/display/intel_cdclk.h | 2 + drivers/gpu/drm/i915/display/intel_display.c | 6 ++ drivers/gpu/drm/i915/i915_reg.h | 4 + 4 files changed, 98 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_cdclk.c +86 -3
@@ -1908,10 +1908,10 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,* NOOP - No Pcode communication needed for * Display versions 14 and beyond */ ; - else if (DISPLAY_VER(dev_priv) >= 11) + else if (DISPLAY_VER(dev_priv) >= 11 && !IS_DG2(dev_priv)) ret =snb_pcode_write (&dev_priv->uncore,SKL_PCODE_CDCLK_CONTROL , cdclk_config->voltage_level); - else +if (DISPLAY_VER (dev_priv) <11 ) {/* * The timeout isn't specified, the 2ms used here is based on * experiment.
@@ -1922,7 +1922,7 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,HSW_PCODE_DE_WRITE_FREQ_REQ , cdclk_config->voltage_level, 150, 2); - + }if (ret) { drm_err(&dev_priv->drm, "PCode CDCLK freq set failed, (err %d, freq %d)\n",
@@ -2218,6 +2218,34 @@ void intel_cdclk_dump_config(struct drm_i915_private *i915, cdclk_config->voltage_level); } +/** +* intel_display_to_pcode- inform pcode for display config +* @cdclk: current cdclk as per new or old state +* @voltage_level: current voltage_level send to Pcode +* @active_pipes: active pipes for more accurate power accounting +*/ +static void intel_display_to_pcode (struct drm_i915_private *dev_priv, +unsigned int cdclk,u8 voltage_level, +u8 active_pipes) +{ +int ret; + +if (DISPLAY_VER (dev_priv) >=12 ) { + ret =skl_pcode_request (&dev_priv->uncore,SKL_PCODE_CDCLK_CONTROL , +SKL_CDCLK_PREPARE_FOR_CHANGE | +DISPLAY_TO_PCODE_MASK + (cdclk, active_pipes, voltage_level), +SKL_CDCLK_READY_FOR_CHANGE , +SKL_CDCLK_READY_FOR_CHANGE ,3 ); +if (ret) { +drm_err (&dev_priv->drm, +"Failed to inform PCU about display config (err %d)\n" , + ret); +return ; + } + } +} +/** * intel_set_cdclk - Push the CDCLK configuration to the hardware * @dev_priv: i915 device
@@ -2287,6 +2315,61 @@ static void intel_set_cdclk(struct drm_i915_private *dev_priv, } } +/** +* intel_display_to_pcode_pre_notification: display to pcode notification +* before the enabling power wells. +* send notification with cdclk, number of pipes, voltage_level. +* @state: intel atomic state +*/ +void intel_display_to_pcode_pre_notification (struct intel_atomic_state *state) +{ +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +const struct intel_cdclk_state *old_cdclk_state = +intel_atomic_get_old_cdclk_state (state); +const struct intel_cdclk_state *new_cdclk_state = +intel_atomic_get_new_cdclk_state (state); +if (!intel_cdclk_changed (&old_cdclk_state->actual, + &new_cdclk_state->actual) && + (new_cdclk_state->active_pipes == + old_cdclk_state->active_pipes)) +return ; +if (old_cdclk_state->actual.cdclk <= new_cdclk_state->actual.cdclk) { +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +return ; + } +if (old_cdclk_state->actual.cdclk >= new_cdclk_state->actual.cdclk) { +intel_display_to_pcode (dev_priv, old_cdclk_state->actual.cdclk, + old_cdclk_state->actual.voltage_level, + old_cdclk_state->active_pipes); +return ; + } +if (old_cdclk_state->active_pipes != new_cdclk_state->active_pipes) { +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +return ; + } +intel_display_to_pcode (dev_priv,DISPLAY_TO_PCODE_CDCLK_MAX , + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +} + +/*intel_display_to_pcode_post_notification: after frequency change sending +* voltage_level, active pipes, current CDCLK frequency. +* @state: intel atomic state +*/ +void intel_display_to_pcode_post_notification (struct intel_atomic_state *state) +{ +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +const struct intel_cdclk_state *new_cdclk_state = +intel_atomic_get_new_cdclk_state (state); +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +} +/** * intel_set_cdclk_pre_plane_update - Push the CDCLK state to the hardware * @state: intel atomic state
drivers/gpu/drm/i915/display/intel_cdclk.h +2 -0
@@ -64,6 +64,8 @@ bool intel_cdclk_needs_modeset(const struct intel_cdclk_config *a, const struct intel_cdclk_config *b);void intel_set_cdclk_pre_plane_update (struct intel_atomic_state *state);void intel_set_cdclk_post_plane_update (struct intel_atomic_state *state); +void intel_display_to_pcode_pre_notification (struct intel_atomic_state *state); +void intel_display_to_pcode_post_notification (struct intel_atomic_state *state);void intel_cdclk_dump_config (struct drm_i915_private *i915,const struct intel_cdclk_config *cdclk_config,const char *context);
drivers/gpu/drm/i915/display/intel_display.c +6 -0
@@ -7462,6 +7462,9 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)intel_atomic_prepare_plane_clear_colors (state); +if (IS_DG2 (dev_priv)) +intel_display_to_pcode_pre_notification (state); +for_each_oldnew_intel_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { if (intel_crtc_needs_modeset(new_crtc_state) ||
@@ -7483,6 +7486,9 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)intel_modeset_verify_disabled (dev_priv, state); } +if (IS_DG2 (dev_priv)) +intel_display_to_pcode_post_notification (state); +intel_sagv_pre_plane_update (state);/* Complete the events for pipes that have now been disabled */
drivers/gpu/drm/i915/i915_reg.h +4 -0
@@ -6498,6 +6498,10 @@#define ICL_PCODE_MEM_SS_READ_GLOBAL_INFO (0x0 << 8)#define ICL_PCODE_MEM_SS_READ_QGV_POINT_INFO (point) (((point) << 16) | (0x1 << 8))#define ADL_PCODE_MEM_SS_READ_PSF_GV_INFO ((0) | (0x2 << 8)) +#define DISPLAY_TO_PCODE_CDCLK_MAX 0x28D +#define DISPLAY_TO_PCODE_MASK (cdclk, num_pipes, voltage_level) \ + ((1 << 31) | (num_pipes << 28) | \ + (cdclk << 16) | (1 << 27) | voltage_level)#define ICL_PCODE_SAGV_DE_MEM_SS_CONFIG 0xe#define ICL_PCODE_REP_QGV_MASK REG_GENMASK(1, 0)#define ICL_PCODE_REP_QGV_SAFE REG_FIELD_PREP(ICL_PCODE_REP_QGV_MASK, 0)
Signature · 1 line
2.37.3
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/display: Communicate display configuration to pcode (rev2)
== Series Details ==
== Series Details ==
Series: drm/i915/display: Communicate display configuration to pcode (rev2)
URL : https://patchwork.freedesktop.org/series/102678/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
Hi Stanislav,
[...]
drivers/gpu/drm/i915/display/intel_cdclk.c void intel_cdclk_dump_config(struct drm_i915_private *i915, · line 2232
Quoted 12 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +12
-0+/** +* intel_display_to_pcode- inform pcode for display config +* @cdclk: current cdclk as per new or old state +* @voltage_level: current voltage_level send to Pcode +* @active_pipes: active pipes for more accurate power accounting +*/ +static void intel_display_to_pcode (struct drm_i915_private *dev_priv, +unsigned int cdclk,u8 voltage_level, +u8 active_pipes) +{ +int ret; +
if (DISPLAY_VER(dev_priv) < 12)
return;
the rest can go outside the if and we save one indentation leve.
BTW... /dev_priv/i915/ ?
Quoted 15 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +15
-0+if (DISPLAY_VER (dev_priv) >=12 ) { + ret =skl_pcode_request (&dev_priv->uncore,SKL_PCODE_CDCLK_CONTROL , +SKL_CDCLK_PREPARE_FOR_CHANGE | +DISPLAY_TO_PCODE_MASK + (cdclk, active_pipes, voltage_level), +SKL_CDCLK_READY_FOR_CHANGE , +SKL_CDCLK_READY_FOR_CHANGE ,3 ); +if (ret) { +drm_err (&dev_priv->drm, +"Failed to inform PCU about display config (err %d)\n" , + ret); +return ; + } + } +}
[...]
Quoted 23 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +23
-0+void intel_display_to_pcode_pre_notification (struct intel_atomic_state *state) +{ +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +const struct intel_cdclk_state *old_cdclk_state = +intel_atomic_get_old_cdclk_state (state); +const struct intel_cdclk_state *new_cdclk_state = +intel_atomic_get_new_cdclk_state (state); +if (!intel_cdclk_changed (&old_cdclk_state->actual, + &new_cdclk_state->actual) && + (new_cdclk_state->active_pipes == + old_cdclk_state->active_pipes)) +return ; +if (old_cdclk_state->actual.cdclk <= new_cdclk_state->actual.cdclk) { +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +return ; + } +if (old_cdclk_state->actual.cdclk >= new_cdclk_state->actual.cdclk) { +intel_display_to_pcode (dev_priv, old_cdclk_state->actual.cdclk, + old_cdclk_state->actual.voltage_level, + old_cdclk_state->active_pipes); +return ;
drivers/gpu/drm/i915/display/intel_cdclk.c static void intel_set_cdclk(struct drm_i915_private *dev_priv, · line 2356
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +10
-0+ } +if (old_cdclk_state->active_pipes != new_cdclk_state->active_pipes) { +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +return ; + } +intel_display_to_pcode (dev_priv,DISPLAY_TO_PCODE_CDCLK_MAX , + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes);
if you replace all the ifs with "else if"s you can have only one return and remove all the brackets.
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +4
-0+} + +/*intel_display_to_pcode_post_notification: after frequency change sending +* voltage_level, active pipes, current CDCLK frequency.
drivers/gpu/drm/i915/display/intel_cdclk.c static void intel_set_cdclk(struct drm_i915_private *dev_priv, · line 2370
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +10
-0+* @state: intel atomic state +*/ +void intel_display_to_pcode_post_notification (struct intel_atomic_state *state) +{ +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +const struct intel_cdclk_state *new_cdclk_state = +intel_atomic_get_new_cdclk_state (state); +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes);
the indentation here is off
Quoted 1 line
+}
Andi
[...]
Jani Nikula
maintainerQuoted 49 lines · Stanislav Lisovskiy
From: Jigar Bhatt <[email protected]>
Display to communicate "display configuration" to Pcode for more accurate power accounting for DG2. Existing sequence is only sending the voltage value to the Pcode. Adding new sequence with current cdclk associate with voltage value masking. Adding pcode request when any power well will disable or enable.
v2: - Fixed identation(Stanislav Lisovskiy)
- Made conditions more specific(in the commit we declare that we do this for DG2 only, however that commit changes >= to == for many other platforms.(Stanislav Lisovskiy)Signed-off-by Jigar Bhatt <[email protected]>Signed-off-by Stanislav Lisovskiy <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 89 +++++++++++++++++++- drivers/gpu/drm/i915/display/intel_cdclk.h | 2 + drivers/gpu/drm/i915/display/intel_display.c | 6 ++ drivers/gpu/drm/i915/i915_reg.h | 4 + 4 files changed, 98 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +3
-3@@ -1908,10 +1908,10 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,* NOOP - No Pcode communication needed for * Display versions 14 and beyond */ ; - else if (DISPLAY_VER(dev_priv) >= 11) + else if (DISPLAY_VER(dev_priv) >= 11 && !IS_DG2(dev_priv)) ret =snb_pcode_write (&dev_priv->uncore,SKL_PCODE_CDCLK_CONTROL , cdclk_config->voltage_level); - else +if (DISPLAY_VER (dev_priv) <11 ) {/* * The timeout isn't specified, the 2ms used here is based on * experiment. @@ -1922,7 +1922,7 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,HSW_PCODE_DE_WRITE_FREQ_REQ , cdclk_config->voltage_level, 150, 2); - + }if (ret) { drm_err(&dev_priv->drm, "PCode CDCLK freq set failed, (err %d, freq %d)\n",
drivers/gpu/drm/i915/display/intel_cdclk.c void intel_cdclk_dump_config(struct drm_i915_private *i915, · line 2226
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +6
-0@@ -2218,6 +2218,34 @@ void intel_cdclk_dump_config(struct drm_i915_private *i915, cdclk_config->voltage_level); } +/** +* intel_display_to_pcode- inform pcode for display config +* @cdclk: current cdclk as per new or old state +* @voltage_level: current voltage_level send to Pcode +* @active_pipes: active pipes for more accurate power accounting +*/
kernel-doc is usually discoraged for internal functions.
Quoted 26 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +22
-0+static void intel_display_to_pcode (struct drm_i915_private *dev_priv, +unsigned int cdclk,u8 voltage_level, +u8 active_pipes) +{ +int ret; + +if (DISPLAY_VER (dev_priv) >=12 ) { + ret =skl_pcode_request (&dev_priv->uncore,SKL_PCODE_CDCLK_CONTROL , +SKL_CDCLK_PREPARE_FOR_CHANGE | +DISPLAY_TO_PCODE_MASK + (cdclk, active_pipes, voltage_level), +SKL_CDCLK_READY_FOR_CHANGE , +SKL_CDCLK_READY_FOR_CHANGE ,3 ); +if (ret) { +drm_err (&dev_priv->drm, +"Failed to inform PCU about display config (err %d)\n" , + ret); +return ; + } + } +} +/** * intel_set_cdclk - Push the CDCLK configuration to the hardware * @dev_priv: i915 device
drivers/gpu/drm/i915/display/intel_cdclk.c static void intel_set_cdclk(struct drm_i915_private *dev_priv, · line 2324
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +7
-0@@ -2287,6 +2315,61 @@ static void intel_set_cdclk(struct drm_i915_private *dev_priv, } } +/** +* intel_display_to_pcode_pre_notification: display to pcode notification +* before the enabling power wells. +* send notification with cdclk, number of pipes, voltage_level. +* @state: intel atomic state +*/ +void intel_display_to_pcode_pre_notification (struct intel_atomic_state *state)
The function name should indicate what is being notified. Pre-notification of what? Post-notification of what?
Functions in this file should be prefixed intel_cdclk_*.
Quoted 69 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +48
-0+{ +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +const struct intel_cdclk_state *old_cdclk_state = +intel_atomic_get_old_cdclk_state (state); +const struct intel_cdclk_state *new_cdclk_state = +intel_atomic_get_new_cdclk_state (state); +if (!intel_cdclk_changed (&old_cdclk_state->actual, + &new_cdclk_state->actual) && + (new_cdclk_state->active_pipes == + old_cdclk_state->active_pipes)) +return ; +if (old_cdclk_state->actual.cdclk <= new_cdclk_state->actual.cdclk) { +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +return ; + } +if (old_cdclk_state->actual.cdclk >= new_cdclk_state->actual.cdclk) { +intel_display_to_pcode (dev_priv, old_cdclk_state->actual.cdclk, + old_cdclk_state->actual.voltage_level, + old_cdclk_state->active_pipes); +return ; + } +if (old_cdclk_state->active_pipes != new_cdclk_state->active_pipes) { +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +return ; + } +intel_display_to_pcode (dev_priv,DISPLAY_TO_PCODE_CDCLK_MAX , + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +} + +/*intel_display_to_pcode_post_notification: after frequency change sending +* voltage_level, active pipes, current CDCLK frequency. +* @state: intel atomic state +*/ +void intel_display_to_pcode_post_notification (struct intel_atomic_state *state) +{ +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +const struct intel_cdclk_state *new_cdclk_state = +intel_atomic_get_new_cdclk_state (state); +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +} +/** * intel_set_cdclk_pre_plane_update - Push the CDCLK state to the hardware * @state: intel atomic state drivers/gpu/drm/i915/display/intel_cdclk.h +2
-0@@ -64,6 +64,8 @@ bool intel_cdclk_needs_modeset(const struct intel_cdclk_config *a, const struct intel_cdclk_config *b);void intel_set_cdclk_pre_plane_update (struct intel_atomic_state *state);void intel_set_cdclk_post_plane_update (struct intel_atomic_state *state); +void intel_display_to_pcode_pre_notification (struct intel_atomic_state *state); +void intel_display_to_pcode_post_notification (struct intel_atomic_state *state);void intel_cdclk_dump_config (struct drm_i915_private *i915,const struct intel_cdclk_config *cdclk_config,const char *context);drivers/gpu/drm/i915/display/intel_display.c +0
-0
drivers/gpu/drm/i915/display/intel_display.c static void intel_atomic_commit_tail(struct intel_atomic_state *state) · line 7467
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0@@ -7462,6 +7462,9 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)intel_atomic_prepare_plane_clear_colors (state); +if (IS_DG2 (dev_priv)) +intel_display_to_pcode_pre_notification (state); +
This is very high level code and platform checks don't belong here. Let's not start now.
Quoted 28 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0for_each_oldnew_intel_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { if (intel_crtc_needs_modeset(new_crtc_state) ||@@ -7483,6 +7486,9 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)intel_modeset_verify_disabled (dev_priv, state); } +if (IS_DG2 (dev_priv)) +intel_display_to_pcode_post_notification (state); +intel_sagv_pre_plane_update (state);/* Complete the events for pipes that have now been disabled */ drivers/gpu/drm/i915/i915_reg.h +4
-0@@ -6498,6 +6498,10 @@#define ICL_PCODE_MEM_SS_READ_GLOBAL_INFO (0x0 << 8)#define ICL_PCODE_MEM_SS_READ_QGV_POINT_INFO (point) (((point) << 16) | (0x1 << 8))#define ADL_PCODE_MEM_SS_READ_PSF_GV_INFO ((0) | (0x2 << 8)) +#define DISPLAY_TO_PCODE_CDCLK_MAX 0x28D +#define DISPLAY_TO_PCODE_MASK (cdclk, num_pipes, voltage_level) \ + ((1 << 31) | (num_pipes << 28) | \ + (cdclk << 16) | (1 << 27) | voltage_level)#define ICL_PCODE_SAGV_DE_MEM_SS_CONFIG 0xe#define ICL_PCODE_REP_QGV_MASK REG_GENMASK(1, 0)#define ICL_PCODE_REP_QGV_SAFE REG_FIELD_PREP(ICL_PCODE_REP_QGV_MASK, 0)
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Quoted 174 lines · Jani Nikula
Quoted 49 lines · Stanislav Lisovskiy
From: Jigar Bhatt <[email protected]>
Display to communicate "display configuration" to Pcode for more accurate power accounting for DG2. Existing sequence is only sending the voltage value to the Pcode. Adding new sequence with current cdclk associate with voltage value masking. Adding pcode request when any power well will disable or enable.
v2: - Fixed identation(Stanislav Lisovskiy)
- Made conditions more specific(in the commit we declare that we do this for DG2 only, however that commit changes >= to == for many other platforms.(Stanislav Lisovskiy)Signed-off-by Jigar Bhatt <[email protected]>Signed-off-by Stanislav Lisovskiy <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 89 +++++++++++++++++++- drivers/gpu/drm/i915/display/intel_cdclk.h | 2 + drivers/gpu/drm/i915/display/intel_display.c | 6 ++ drivers/gpu/drm/i915/i915_reg.h | 4 + 4 files changed, 98 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +3
-3@@ -1908,10 +1908,10 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,* NOOP - No Pcode communication needed for * Display versions 14 and beyond */ ; - else if (DISPLAY_VER(dev_priv) >= 11) + else if (DISPLAY_VER(dev_priv) >= 11 && !IS_DG2(dev_priv)) ret =snb_pcode_write (&dev_priv->uncore,SKL_PCODE_CDCLK_CONTROL , cdclk_config->voltage_level); - else +if (DISPLAY_VER (dev_priv) <11 ) {/* * The timeout isn't specified, the 2ms used here is based on * experiment. @@ -1922,7 +1922,7 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,HSW_PCODE_DE_WRITE_FREQ_REQ , cdclk_config->voltage_level, 150, 2); - + }if (ret) { drm_err(&dev_priv->drm, "PCode CDCLK freq set failed, (err %d, freq %d)\n",drivers/gpu/drm/i915/display/intel_cdclk.c void intel_cdclk_dump_config(struct drm_i915_private *i915, · line 2226
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +6
-0@@ -2218,6 +2218,34 @@ void intel_cdclk_dump_config(struct drm_i915_private *i915, cdclk_config->voltage_level); } +/** +* intel_display_to_pcode- inform pcode for display config +* @cdclk: current cdclk as per new or old state +* @voltage_level: current voltage_level send to Pcode +* @active_pipes: active pipes for more accurate power accounting +*/ kernel-doc is usually discoraged for internal functions.
Quoted 26 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +22
-0+static void intel_display_to_pcode (struct drm_i915_private *dev_priv, +unsigned int cdclk,u8 voltage_level, +u8 active_pipes) +{ +int ret; + +if (DISPLAY_VER (dev_priv) >=12 ) { + ret =skl_pcode_request (&dev_priv->uncore,SKL_PCODE_CDCLK_CONTROL , +SKL_CDCLK_PREPARE_FOR_CHANGE | +DISPLAY_TO_PCODE_MASK + (cdclk, active_pipes, voltage_level), +SKL_CDCLK_READY_FOR_CHANGE , +SKL_CDCLK_READY_FOR_CHANGE ,3 ); +if (ret) { +drm_err (&dev_priv->drm, +"Failed to inform PCU about display config (err %d)\n" , + ret); +return ; + } + } +} +/** * intel_set_cdclk - Push the CDCLK configuration to the hardware * @dev_priv: i915 device drivers/gpu/drm/i915/display/intel_cdclk.c static void intel_set_cdclk(struct drm_i915_private *dev_priv, · line 2324
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +7
-0@@ -2287,6 +2315,61 @@ static void intel_set_cdclk(struct drm_i915_private *dev_priv, } } +/** +* intel_display_to_pcode_pre_notification: display to pcode notification +* before the enabling power wells. +* send notification with cdclk, number of pipes, voltage_level. +* @state: intel atomic state +*/ +void intel_display_to_pcode_pre_notification (struct intel_atomic_state *state)The function name should indicate what is being notified. Pre-notification of what? Post-notification of what?
Functions in this file should be prefixed intel_cdclk_*.
Quoted 70 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +48
-0+{ +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +const struct intel_cdclk_state *old_cdclk_state = +intel_atomic_get_old_cdclk_state (state); +const struct intel_cdclk_state *new_cdclk_state = +intel_atomic_get_new_cdclk_state (state); +if (!intel_cdclk_changed (&old_cdclk_state->actual, + &new_cdclk_state->actual) && + (new_cdclk_state->active_pipes == + old_cdclk_state->active_pipes)) +return ; +if (old_cdclk_state->actual.cdclk <= new_cdclk_state->actual.cdclk) { +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +return ; + } +if (old_cdclk_state->actual.cdclk >= new_cdclk_state->actual.cdclk) { +intel_display_to_pcode (dev_priv, old_cdclk_state->actual.cdclk, + old_cdclk_state->actual.voltage_level, + old_cdclk_state->active_pipes); +return ; + } +if (old_cdclk_state->active_pipes != new_cdclk_state->active_pipes) { +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +return ; + } +intel_display_to_pcode (dev_priv,DISPLAY_TO_PCODE_CDCLK_MAX , + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +} + +/*intel_display_to_pcode_post_notification: after frequency change sending +* voltage_level, active pipes, current CDCLK frequency. +* @state: intel atomic state +*/ +void intel_display_to_pcode_post_notification (struct intel_atomic_state *state) +{ +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +const struct intel_cdclk_state *new_cdclk_state = +intel_atomic_get_new_cdclk_state (state); +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +} +/** * intel_set_cdclk_pre_plane_update - Push the CDCLK state to the hardware * @state: intel atomic state drivers/gpu/drm/i915/display/intel_cdclk.h +2
-0@@ -64,6 +64,8 @@ bool intel_cdclk_needs_modeset(const struct intel_cdclk_config *a, const struct intel_cdclk_config *b);void intel_set_cdclk_pre_plane_update (struct intel_atomic_state *state);void intel_set_cdclk_post_plane_update (struct intel_atomic_state *state); +void intel_display_to_pcode_pre_notification (struct intel_atomic_state *state); +void intel_display_to_pcode_post_notification (struct intel_atomic_state *state);void intel_cdclk_dump_config (struct drm_i915_private *i915,const struct intel_cdclk_config *cdclk_config,const char *context);drivers/gpu/drm/i915/display/intel_display.c +0
-0@@ -7462,6 +7462,9 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c static void intel_atomic_commit_tail(struct intel_atomic_state *state) · line 7467
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0intel_atomic_prepare_plane_clear_colors (state); +if (IS_DG2 (dev_priv)) +intel_display_to_pcode_pre_notification (state); +This is very high level code and platform checks don't belong here. Let's not start now.
Ohhh. Totally agree. That is one of those cases, when you wonder "why I didn't spot this myself(((".
Looks like I was a bit too soon with resending Jigar's patch, I took over. Just looked briefly for some obvious things.
Will fix that.
Stan
Quoted 32 lines
Quoted 29 lines
drivers/gpu/drm/i915/display/intel_display.c +3
-0for_each_oldnew_intel_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { if (intel_crtc_needs_modeset(new_crtc_state) ||@@ -7483,6 +7486,9 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)intel_modeset_verify_disabled (dev_priv, state); } +if (IS_DG2 (dev_priv)) +intel_display_to_pcode_post_notification (state); +intel_sagv_pre_plane_update (state);/* Complete the events for pipes that have now been disabled */ drivers/gpu/drm/i915/i915_reg.h +4
-0@@ -6498,6 +6498,10 @@#define ICL_PCODE_MEM_SS_READ_GLOBAL_INFO (0x0 << 8)#define ICL_PCODE_MEM_SS_READ_QGV_POINT_INFO (point) (((point) << 16) | (0x1 << 8))#define ADL_PCODE_MEM_SS_READ_PSF_GV_INFO ((0) | (0x2 << 8)) +#define DISPLAY_TO_PCODE_CDCLK_MAX 0x28D +#define DISPLAY_TO_PCODE_MASK (cdclk, num_pipes, voltage_level) \ + ((1 << 31) | (num_pipes << 28) | \ + (cdclk << 16) | (1 << 27) | voltage_level)#define ICL_PCODE_SAGV_DE_MEM_SS_CONFIG 0xe#define ICL_PCODE_REP_QGV_MASK REG_GENMASK(1, 0)#define ICL_PCODE_REP_QGV_SAFE REG_FIELD_PREP(ICL_PCODE_REP_QGV_MASK, 0)Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Rodrigo Vivi
maintainerQuoted 8 lines · Stanislav Lisovskiy
From: Jigar Bhatt <[email protected]>
Display to communicate "display configuration" to Pcode for more accurate power accounting for DG2. Existing sequence is only sending the voltage value to the Pcode. Adding new sequence with current cdclk associate with voltage value masking. Adding pcode request when any power well will disable or enable.
Quoted 4 lines
v2: - Fixed identation(Stanislav Lisovskiy)
- Made conditions more specific(in the commit we declare that we do this for DG2 only, however that commit changes >= to == for many other platforms.(Stanislav Lisovskiy)
Is this a DG2 only thing? or more like DGFX in general? what about DG1?
Quoted 188 lines
Signed-off-by Jigar Bhatt <[email protected]>Signed-off-by Stanislav Lisovskiy <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 89 +++++++++++++++++++- drivers/gpu/drm/i915/display/intel_cdclk.h | 2 + drivers/gpu/drm/i915/display/intel_display.c | 6 ++ drivers/gpu/drm/i915/i915_reg.h | 4 + 4 files changed, 98 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +86
-3@@ -1908,10 +1908,10 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,* NOOP - No Pcode communication needed for * Display versions 14 and beyond */ ; - else if (DISPLAY_VER(dev_priv) >= 11) + else if (DISPLAY_VER(dev_priv) >= 11 && !IS_DG2(dev_priv)) ret =snb_pcode_write (&dev_priv->uncore,SKL_PCODE_CDCLK_CONTROL , cdclk_config->voltage_level); - else +if (DISPLAY_VER (dev_priv) <11 ) {/* * The timeout isn't specified, the 2ms used here is based on * experiment. @@ -1922,7 +1922,7 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,HSW_PCODE_DE_WRITE_FREQ_REQ , cdclk_config->voltage_level, 150, 2); - + }if (ret) { drm_err(&dev_priv->drm, "PCode CDCLK freq set failed, (err %d, freq %d)\n",@@ -2218,6 +2218,34 @@ void intel_cdclk_dump_config(struct drm_i915_private *i915, cdclk_config->voltage_level); } +/** +* intel_display_to_pcode- inform pcode for display config +* @cdclk: current cdclk as per new or old state +* @voltage_level: current voltage_level send to Pcode +* @active_pipes: active pipes for more accurate power accounting +*/ +static void intel_display_to_pcode (struct drm_i915_private *dev_priv, +unsigned int cdclk,u8 voltage_level, +u8 active_pipes) +{ +int ret; + +if (DISPLAY_VER (dev_priv) >=12 ) { + ret =skl_pcode_request (&dev_priv->uncore,SKL_PCODE_CDCLK_CONTROL , +SKL_CDCLK_PREPARE_FOR_CHANGE | +DISPLAY_TO_PCODE_MASK + (cdclk, active_pipes, voltage_level), +SKL_CDCLK_READY_FOR_CHANGE , +SKL_CDCLK_READY_FOR_CHANGE ,3 ); +if (ret) { +drm_err (&dev_priv->drm, +"Failed to inform PCU about display config (err %d)\n" , + ret); +return ; + } + } +} +/** * intel_set_cdclk - Push the CDCLK configuration to the hardware * @dev_priv: i915 device @@ -2287,6 +2315,61 @@ static void intel_set_cdclk(struct drm_i915_private *dev_priv, } } +/** +* intel_display_to_pcode_pre_notification: display to pcode notification +* before the enabling power wells. +* send notification with cdclk, number of pipes, voltage_level. +* @state: intel atomic state +*/ +void intel_display_to_pcode_pre_notification (struct intel_atomic_state *state) +{ +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +const struct intel_cdclk_state *old_cdclk_state = +intel_atomic_get_old_cdclk_state (state); +const struct intel_cdclk_state *new_cdclk_state = +intel_atomic_get_new_cdclk_state (state); +if (!intel_cdclk_changed (&old_cdclk_state->actual, + &new_cdclk_state->actual) && + (new_cdclk_state->active_pipes == + old_cdclk_state->active_pipes)) +return ; +if (old_cdclk_state->actual.cdclk <= new_cdclk_state->actual.cdclk) { +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +return ; + } +if (old_cdclk_state->actual.cdclk >= new_cdclk_state->actual.cdclk) { +intel_display_to_pcode (dev_priv, old_cdclk_state->actual.cdclk, + old_cdclk_state->actual.voltage_level, + old_cdclk_state->active_pipes); +return ; + } +if (old_cdclk_state->active_pipes != new_cdclk_state->active_pipes) { +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +return ; + } +intel_display_to_pcode (dev_priv,DISPLAY_TO_PCODE_CDCLK_MAX , + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +} + +/*intel_display_to_pcode_post_notification: after frequency change sending +* voltage_level, active pipes, current CDCLK frequency. +* @state: intel atomic state +*/ +void intel_display_to_pcode_post_notification (struct intel_atomic_state *state) +{ +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +const struct intel_cdclk_state *new_cdclk_state = +intel_atomic_get_new_cdclk_state (state); +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +} +/** * intel_set_cdclk_pre_plane_update - Push the CDCLK state to the hardware * @state: intel atomic state drivers/gpu/drm/i915/display/intel_cdclk.h +2
-0@@ -64,6 +64,8 @@ bool intel_cdclk_needs_modeset(const struct intel_cdclk_config *a, const struct intel_cdclk_config *b);void intel_set_cdclk_pre_plane_update (struct intel_atomic_state *state);void intel_set_cdclk_post_plane_update (struct intel_atomic_state *state); +void intel_display_to_pcode_pre_notification (struct intel_atomic_state *state); +void intel_display_to_pcode_post_notification (struct intel_atomic_state *state);void intel_cdclk_dump_config (struct drm_i915_private *i915,const struct intel_cdclk_config *cdclk_config,const char *context);drivers/gpu/drm/i915/display/intel_display.c +6
-0@@ -7462,6 +7462,9 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)intel_atomic_prepare_plane_clear_colors (state); +if (IS_DG2 (dev_priv)) +intel_display_to_pcode_pre_notification (state); +for_each_oldnew_intel_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { if (intel_crtc_needs_modeset(new_crtc_state) ||@@ -7483,6 +7486,9 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)intel_modeset_verify_disabled (dev_priv, state); } +if (IS_DG2 (dev_priv)) +intel_display_to_pcode_post_notification (state); +intel_sagv_pre_plane_update (state);/* Complete the events for pipes that have now been disabled */ drivers/gpu/drm/i915/i915_reg.h +4
-0@@ -6498,6 +6498,10 @@#define ICL_PCODE_MEM_SS_READ_GLOBAL_INFO (0x0 << 8)#define ICL_PCODE_MEM_SS_READ_QGV_POINT_INFO (point) (((point) << 16) | (0x1 << 8))#define ADL_PCODE_MEM_SS_READ_PSF_GV_INFO ((0) | (0x2 << 8)) +#define DISPLAY_TO_PCODE_CDCLK_MAX 0x28D +#define DISPLAY_TO_PCODE_MASK (cdclk, num_pipes, voltage_level) \ + ((1 << 31) | (num_pipes << 28) | \ + (cdclk << 16) | (1 << 27) | voltage_level)#define ICL_PCODE_SAGV_DE_MEM_SS_CONFIG 0xe#define ICL_PCODE_REP_QGV_MASK REG_GENMASK(1, 0)#define ICL_PCODE_REP_QGV_SAFE REG_FIELD_PREP(ICL_PCODE_REP_QGV_MASK, 0)Signature · 1 line
2.37.3
Quoted 9 lines · Rodrigo Vivi
Quoted 8 lines · Stanislav Lisovskiy
From: Jigar Bhatt <[email protected]>
Display to communicate "display configuration" to Pcode for more accurate power accounting for DG2. Existing sequence is only sending the voltage value to the Pcode. Adding new sequence with current cdclk associate with voltage value masking. Adding pcode request when any power well will disable or enable.
Quoted 8 lines
Quoted 4 lines
v2: - Fixed identation(Stanislav Lisovskiy)
- Made conditions more specific(in the commit we declare that we do this for DG2 only, however that commit changes >= to == for many other platforms.(Stanislav Lisovskiy)Is this a DG2 only thing? or more like DGFX in general? what about DG1?
Need to check this, took over this task from Jigar, so not fully aware currently. At least my understanding and what commit says is that this is for DG2. Agree need to check if we can extend this to other platforms..
Stan
Quoted 189 lines
Quoted 189 lines
Signed-off-by Jigar Bhatt <[email protected]>Signed-off-by Stanislav Lisovskiy <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 89 +++++++++++++++++++- drivers/gpu/drm/i915/display/intel_cdclk.h | 2 + drivers/gpu/drm/i915/display/intel_display.c | 6 ++ drivers/gpu/drm/i915/i915_reg.h | 4 + 4 files changed, 98 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +86
-3@@ -1908,10 +1908,10 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,* NOOP - No Pcode communication needed for * Display versions 14 and beyond */ ; - else if (DISPLAY_VER(dev_priv) >= 11) + else if (DISPLAY_VER(dev_priv) >= 11 && !IS_DG2(dev_priv)) ret =snb_pcode_write (&dev_priv->uncore,SKL_PCODE_CDCLK_CONTROL , cdclk_config->voltage_level); - else +if (DISPLAY_VER (dev_priv) <11 ) {/* * The timeout isn't specified, the 2ms used here is based on * experiment. @@ -1922,7 +1922,7 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,HSW_PCODE_DE_WRITE_FREQ_REQ , cdclk_config->voltage_level, 150, 2); - + }if (ret) { drm_err(&dev_priv->drm, "PCode CDCLK freq set failed, (err %d, freq %d)\n",@@ -2218,6 +2218,34 @@ void intel_cdclk_dump_config(struct drm_i915_private *i915, cdclk_config->voltage_level); } +/** +* intel_display_to_pcode- inform pcode for display config +* @cdclk: current cdclk as per new or old state +* @voltage_level: current voltage_level send to Pcode +* @active_pipes: active pipes for more accurate power accounting +*/ +static void intel_display_to_pcode (struct drm_i915_private *dev_priv, +unsigned int cdclk,u8 voltage_level, +u8 active_pipes) +{ +int ret; + +if (DISPLAY_VER (dev_priv) >=12 ) { + ret =skl_pcode_request (&dev_priv->uncore,SKL_PCODE_CDCLK_CONTROL , +SKL_CDCLK_PREPARE_FOR_CHANGE | +DISPLAY_TO_PCODE_MASK + (cdclk, active_pipes, voltage_level), +SKL_CDCLK_READY_FOR_CHANGE , +SKL_CDCLK_READY_FOR_CHANGE ,3 ); +if (ret) { +drm_err (&dev_priv->drm, +"Failed to inform PCU about display config (err %d)\n" , + ret); +return ; + } + } +} +/** * intel_set_cdclk - Push the CDCLK configuration to the hardware * @dev_priv: i915 device @@ -2287,6 +2315,61 @@ static void intel_set_cdclk(struct drm_i915_private *dev_priv, } } +/** +* intel_display_to_pcode_pre_notification: display to pcode notification +* before the enabling power wells. +* send notification with cdclk, number of pipes, voltage_level. +* @state: intel atomic state +*/ +void intel_display_to_pcode_pre_notification (struct intel_atomic_state *state) +{ +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +const struct intel_cdclk_state *old_cdclk_state = +intel_atomic_get_old_cdclk_state (state); +const struct intel_cdclk_state *new_cdclk_state = +intel_atomic_get_new_cdclk_state (state); +if (!intel_cdclk_changed (&old_cdclk_state->actual, + &new_cdclk_state->actual) && + (new_cdclk_state->active_pipes == + old_cdclk_state->active_pipes)) +return ; +if (old_cdclk_state->actual.cdclk <= new_cdclk_state->actual.cdclk) { +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +return ; + } +if (old_cdclk_state->actual.cdclk >= new_cdclk_state->actual.cdclk) { +intel_display_to_pcode (dev_priv, old_cdclk_state->actual.cdclk, + old_cdclk_state->actual.voltage_level, + old_cdclk_state->active_pipes); +return ; + } +if (old_cdclk_state->active_pipes != new_cdclk_state->active_pipes) { +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +return ; + } +intel_display_to_pcode (dev_priv,DISPLAY_TO_PCODE_CDCLK_MAX , + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +} + +/*intel_display_to_pcode_post_notification: after frequency change sending +* voltage_level, active pipes, current CDCLK frequency. +* @state: intel atomic state +*/ +void intel_display_to_pcode_post_notification (struct intel_atomic_state *state) +{ +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +const struct intel_cdclk_state *new_cdclk_state = +intel_atomic_get_new_cdclk_state (state); +intel_display_to_pcode (dev_priv, new_cdclk_state->actual.cdclk, + new_cdclk_state->actual.voltage_level, + new_cdclk_state->active_pipes); +} +/** * intel_set_cdclk_pre_plane_update - Push the CDCLK state to the hardware * @state: intel atomic state drivers/gpu/drm/i915/display/intel_cdclk.h +2
-0@@ -64,6 +64,8 @@ bool intel_cdclk_needs_modeset(const struct intel_cdclk_config *a, const struct intel_cdclk_config *b);void intel_set_cdclk_pre_plane_update (struct intel_atomic_state *state);void intel_set_cdclk_post_plane_update (struct intel_atomic_state *state); +void intel_display_to_pcode_pre_notification (struct intel_atomic_state *state); +void intel_display_to_pcode_post_notification (struct intel_atomic_state *state);void intel_cdclk_dump_config (struct drm_i915_private *i915,const struct intel_cdclk_config *cdclk_config,const char *context);drivers/gpu/drm/i915/display/intel_display.c +6
-0@@ -7462,6 +7462,9 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)intel_atomic_prepare_plane_clear_colors (state); +if (IS_DG2 (dev_priv)) +intel_display_to_pcode_pre_notification (state); +for_each_oldnew_intel_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { if (intel_crtc_needs_modeset(new_crtc_state) ||@@ -7483,6 +7486,9 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)intel_modeset_verify_disabled (dev_priv, state); } +if (IS_DG2 (dev_priv)) +intel_display_to_pcode_post_notification (state); +intel_sagv_pre_plane_update (state);/* Complete the events for pipes that have now been disabled */ drivers/gpu/drm/i915/i915_reg.h +4
-0@@ -6498,6 +6498,10 @@#define ICL_PCODE_MEM_SS_READ_GLOBAL_INFO (0x0 << 8)#define ICL_PCODE_MEM_SS_READ_QGV_POINT_INFO (point) (((point) << 16) | (0x1 << 8))#define ADL_PCODE_MEM_SS_READ_PSF_GV_INFO ((0) | (0x2 << 8)) +#define DISPLAY_TO_PCODE_CDCLK_MAX 0x28D +#define DISPLAY_TO_PCODE_MASK (cdclk, num_pipes, voltage_level) \ + ((1 << 31) | (num_pipes << 28) | \ + (cdclk << 16) | (1 << 27) | voltage_level)#define ICL_PCODE_SAGV_DE_MEM_SS_CONFIG 0xe#define ICL_PCODE_REP_QGV_MASK REG_GENMASK(1, 0)#define ICL_PCODE_REP_QGV_SAFE REG_FIELD_PREP(ICL_PCODE_REP_QGV_MASK, 0)Signature · 1 line
2.37.3
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/display: Communicate display configuration to pcode (rev2)
In reply to Stanislav Lisovskiy== Series Details ==
== Series Details ==
Series: drm/i915/display: Communicate display configuration to pcode (rev2)
URL : https://patchwork.freedesktop.org/series/102678/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12712 -> Patchwork_102678v2
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_102678v2 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_102678v2, 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_102678v2/index.html
Participating hosts (38 -> 37)
------------------------------
Additional (1): fi-kbl-soraka
Missing (2): bat-atsm-1 fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_102678v2:
### IGT changes ###
#### Possible regressions ####
* igt@i915_suspend@basic-s2idle-without-i915:
- fi-cfl-8700k: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12712/fi-cfl-8700k/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102678v2/fi-cfl-8700k/igt@[email protected]
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@i915_module_load@load:
- {bat-dg2-11}: [PASS][3] -> [ABORT][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12712/bat-dg2-11/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102678v2/bat-dg2-11/igt@[email protected]
- {bat-dg2-9}: [PASS][5] -> [ABORT][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12712/bat-dg2-9/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102678v2/bat-dg2-9/igt@[email protected]
- {bat-dg2-8}: [PASS][7] -> [ABORT][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12712/bat-dg2-8/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102678v2/bat-dg2-8/igt@[email protected]
New tests
---------
New tests have been introduced between CI_DRM_12712 and Patchwork_102678v2:
### New IGT tests (4) ###
* igt@gem_exec_fence@basic-wait:
- Statuses :
- Exec time: [None] s
* igt@gem_exec_fence@nb-await:
- Statuses :
- Exec time: [None] s
* igt@i915_pm_rpm@module-reload:
- Statuses : 29 pass(s) 5 skip(s)
- Exec time: [0.0] s
* igt@i915_selftest@live:
- Statuses :
- Exec time: [None] s
Known issues
------------
Here are the changes found in Patchwork_102678v2 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#2190])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102678v2/fi-kbl-soraka/igt@[email protected]
* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][10] ([fdo#109271] / [i915#4613]) +3 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102678v2/fi-kbl-soraka/igt@[email protected]
* igt@i915_selftest@live@execlists:
- fi-kbl-soraka: NOTRUN -> [INCOMPLETE][11] ([i915#7156] / [i915#7913])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102678v2/fi-kbl-soraka/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [PASS][12] -> [DMESG-FAIL][13] ([i915#5334])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12712/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102678v2/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][14] ([i915#1886])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102678v2/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
* igt@kms_chamelium_frames@hdmi-crc-fast:
- fi-kbl-soraka: NOTRUN -> [SKIP][15] ([fdo#109271]) +15 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102678v2/fi-kbl-soraka/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_gttfill@basic:
- fi-pnv-d510: [FAIL][16] ([i915#7229]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12712/fi-pnv-d510/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102678v2/fi-pnv-d510/igt@[email protected]
* igt@i915_selftest@live@reset:
- {bat-rpls-2}: [ABORT][18] ([i915#4983]) -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12712/bat-rpls-2/igt@i915_selftest@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102678v2/bat-rpls-2/igt@i915_selftest@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
[i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
[i915#7156]: https://gitlab.freedesktop.org/drm/intel/issues/7156
[i915#7229]: https://gitlab.freedesktop.org/drm/intel/issues/7229
[i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981
Build changes
-------------
* Linux: CI_DRM_12712 -> Patchwork_102678v2
CI-20190529: 20190529
CI_DRM_12712: 579f8b992ea3f5cd11bd803dd0585a7ddb006a13 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7153: f47f859f13376958a2bd199423b1f0ff53dddbe0 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_102678v2: 579f8b992ea3f5cd11bd803dd0585a7ddb006a13 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
34b7e79ad857 drm/i915/display: Communicate display configuration to pcode
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_102678v2/index.html