Prep series - CDCLK code churn
Subsystems (3)
cover Prep series - CDCLK code churn
No functional changes. The series is more of a prep series for the mid_cdclk_config series:
https://patchwork.freedesktop.org/series/109694/
Main change:
- Change usage of "crawler" and "squasher". Use crawling and
squashing instead.
- Handle both squash and crawl similar in terms of checking
if the platform supports them or not. With the changes introduced, both are a display feature flag.
- Move code from bxt_set_cdclk() to make it more modularized
and easy to read and understand.
v2: Change function names to align with rest of the driver. No major changes.
Anusha Srivatsa (4):
drm/i915/display: Change terminology for cdclk actions drm/i915/display: Introduce HAS_CDCLK_SQUASH macro drm/i915/display: Move chunks of code out of bxt_set_cdclk() drm/i915/display: Move squash_ctl register programming to its own
function
drivers/gpu/drm/i915/display/intel_cdclk.c | 80 ++++++++++++---------- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/intel_device_info.h | 1 + 4 files changed, 48 insertions(+), 35 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/4 drm/i915/display: Change terminology for cdclk actions
No functional changes. Changing terminolgy in some print statements. s/has_cdclk_squasher/has_cdclk_squash, s/crawler/crawl and s/squasher/squash.
--- drivers/gpu/drm/i915/display/intel_cdclk.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/display/intel_cdclk.c +8 -8
@@ -1220,7 +1220,7 @@ static void skl_cdclk_uninit_hw(struct drm_i915_private *dev_priv)skl_set_cdclk (dev_priv, &cdclk_config,INVALID_PIPE ); } -static bool has_cdclk_squasher (struct drm_i915_private *i915) +static bool has_cdclk_squash (struct drm_i915_private *i915) {return IS_DG2 (i915); }
@@ -1520,7 +1520,7 @@ static void bxt_get_cdclk(struct drm_i915_private *dev_priv,return ; } -if (has_cdclk_squasher (dev_priv)) +if (has_cdclk_squash (dev_priv)) squash_ctl =intel_de_read (dev_priv,CDCLK_SQUASH_CTL );if (squash_ctl &CDCLK_SQUASH_ENABLE ) {
@@ -1747,7 +1747,7 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,else clock = cdclk; -if (has_cdclk_squasher (dev_priv)) { +if (has_cdclk_squash (dev_priv)) {u32 squash_ctl =0 ;if (waveform)
@@ -1845,7 +1845,7 @@ static void bxt_sanitize_cdclk(struct drm_i915_private *dev_priv) expected =skl_cdclk_decimal (cdclk);/* Figure out what CD2X divider we should be using for this cdclk */ -if (has_cdclk_squasher (dev_priv)) +if (has_cdclk_squash (dev_priv)) clock = dev_priv->display.cdclk.hw.vco /2 ;else clock = dev_priv->display.cdclk.hw.cdclk;
@@ -1976,7 +1976,7 @@ static bool intel_cdclk_can_squash(struct drm_i915_private *dev_priv,* the moment all platforms with squasher use a fixed cd2x * divider. */ -if (!has_cdclk_squasher (dev_priv)) +if (!has_cdclk_squash (dev_priv))return false; return a->cdclk != b->cdclk &&
@@ -2028,7 +2028,7 @@ static bool intel_cdclk_can_cd2x_update(struct drm_i915_private *dev_priv,* the moment all platforms with squasher use a fixed cd2x * divider. */ -if (has_cdclk_squasher (dev_priv)) +if (has_cdclk_squash (dev_priv))return false; return a->cdclk != b->cdclk &&
@@ -2754,12 +2754,12 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state *state) &old_cdclk_state->actual, &new_cdclk_state->actual)) {drm_dbg_kms (&dev_priv->drm, -"Can change cdclk via squasher\n" ); +"Can change cdclk via squashing\n" ); } else if (intel_cdclk_can_crawl(dev_priv, &old_cdclk_state->actual, &new_cdclk_state->actual)) {drm_dbg_kms (&dev_priv->drm, -"Can change cdclk via crawl\n" ); +"Can change cdclk via crawling\n" ); } else if (pipe != INVALID_PIPE) { new_cdclk_state->pipe = pipe;
Signature · 1 line
2.25.1
Re: [Intel-gfx] [PATCH 1/4] drm/i915/display: Change terminology for cdclk actions
Quoted 10 lines · Anusha Srivatsa
No functional changes. Changing terminolgy in some print statements. s/has_cdclk_squasher/has_cdclk_squash, s/crawler/crawl and s/squasher/squash.
Cc Balasubramani Vivekanandan <[email protected]>Cc Ville Syrjälä <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
Quoted 77 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +8
-8@@ -1220,7 +1220,7 @@ static void skl_cdclk_uninit_hw(struct drm_i915_private *dev_priv)skl_set_cdclk (dev_priv, &cdclk_config,INVALID_PIPE ); } -static bool has_cdclk_squasher (struct drm_i915_private *i915) +static bool has_cdclk_squash (struct drm_i915_private *i915) {return IS_DG2 (i915); }@@ -1520,7 +1520,7 @@ static void bxt_get_cdclk(struct drm_i915_private *dev_priv,return ; } -if (has_cdclk_squasher (dev_priv)) +if (has_cdclk_squash (dev_priv)) squash_ctl =intel_de_read (dev_priv,CDCLK_SQUASH_CTL );if (squash_ctl &CDCLK_SQUASH_ENABLE ) {@@ -1747,7 +1747,7 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,else clock = cdclk; -if (has_cdclk_squasher (dev_priv)) { +if (has_cdclk_squash (dev_priv)) {u32 squash_ctl =0 ;if (waveform)@@ -1845,7 +1845,7 @@ static void bxt_sanitize_cdclk(struct drm_i915_private *dev_priv) expected =skl_cdclk_decimal (cdclk);/* Figure out what CD2X divider we should be using for this cdclk */ -if (has_cdclk_squasher (dev_priv)) +if (has_cdclk_squash (dev_priv)) clock = dev_priv->display.cdclk.hw.vco /2 ;else clock = dev_priv->display.cdclk.hw.cdclk;@@ -1976,7 +1976,7 @@ static bool intel_cdclk_can_squash(struct drm_i915_private *dev_priv,* the moment all platforms with squasher use a fixed cd2x * divider. */ -if (!has_cdclk_squasher (dev_priv)) +if (!has_cdclk_squash (dev_priv))return false; return a->cdclk != b->cdclk &&@@ -2028,7 +2028,7 @@ static bool intel_cdclk_can_cd2x_update(struct drm_i915_private *dev_priv,* the moment all platforms with squasher use a fixed cd2x * divider. */ -if (has_cdclk_squasher (dev_priv)) +if (has_cdclk_squash (dev_priv))return false; return a->cdclk != b->cdclk &&@@ -2754,12 +2754,12 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state *state) &old_cdclk_state->actual, &new_cdclk_state->actual)) {drm_dbg_kms (&dev_priv->drm, -"Can change cdclk via squasher\n" ); +"Can change cdclk via squashing\n" ); } else if (intel_cdclk_can_crawl(dev_priv, &old_cdclk_state->actual, &new_cdclk_state->actual)) {drm_dbg_kms (&dev_priv->drm, -"Can change cdclk via crawl\n" ); +"Can change cdclk via crawling\n" ); } else if (pipe != INVALID_PIPE) { new_cdclk_state->pipe = pipe;Signature · 1 line
2.25.1
PATCH 2/4 drm/i915/display: Introduce HAS_CDCLK_SQUASH macro
In reply to Anusha SrivatsaDriver had discrepancy in how cdclk squash and crawl support were checked. Like crawl, add squash as a 1 bit feature flag to the display section of DG2.
--- drivers/gpu/drm/i915/display/intel_cdclk.c | 15 +++++---------- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/intel_device_info.h | 1 + 4 files changed, 8 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_cdclk.c +5 -10
@@ -1220,11 +1220,6 @@ static void skl_cdclk_uninit_hw(struct drm_i915_private *dev_priv)skl_set_cdclk (dev_priv, &cdclk_config,INVALID_PIPE ); } -static bool has_cdclk_squash (struct drm_i915_private *i915) -{ -return IS_DG2 (i915); -} -struct intel_cdclk_vals {u32 cdclk;u16 refclk;
@@ -1520,7 +1515,7 @@ static void bxt_get_cdclk(struct drm_i915_private *dev_priv,return ; } -if (has_cdclk_squash (dev_priv)) +if (HAS_CDCLK_SQUASH (dev_priv)) squash_ctl =intel_de_read (dev_priv,CDCLK_SQUASH_CTL );if (squash_ctl &CDCLK_SQUASH_ENABLE ) {
@@ -1747,7 +1742,7 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,else clock = cdclk; -if (has_cdclk_squash (dev_priv)) { +if (HAS_CDCLK_SQUASH (dev_priv)) {u32 squash_ctl =0 ;if (waveform)
@@ -1845,7 +1840,7 @@ static void bxt_sanitize_cdclk(struct drm_i915_private *dev_priv) expected =skl_cdclk_decimal (cdclk);/* Figure out what CD2X divider we should be using for this cdclk */ -if (has_cdclk_squash (dev_priv)) +if (HAS_CDCLK_SQUASH (dev_priv)) clock = dev_priv->display.cdclk.hw.vco /2 ;else clock = dev_priv->display.cdclk.hw.cdclk;
@@ -1976,7 +1971,7 @@ static bool intel_cdclk_can_squash(struct drm_i915_private *dev_priv,* the moment all platforms with squasher use a fixed cd2x * divider. */ -if (!has_cdclk_squash (dev_priv)) +if (!HAS_CDCLK_SQUASH (dev_priv))return false; return a->cdclk != b->cdclk &&
@@ -2028,7 +2023,7 @@ static bool intel_cdclk_can_cd2x_update(struct drm_i915_private *dev_priv,* the moment all platforms with squasher use a fixed cd2x * divider. */ -if (has_cdclk_squash (dev_priv)) +if (HAS_CDCLK_SQUASH (dev_priv))return false; return a->cdclk != b->cdclk &&
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -869,6 +869,7 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,#define HAS_DOUBLE_BUFFERED_M_N (dev_priv) (DISPLAY_VER(dev_priv) >= 9 || IS_BROADWELL(dev_priv))#define HAS_CDCLK_CRAWL (dev_priv) (INTEL_INFO(dev_priv)->display.has_cdclk_crawl) +#define HAS_CDCLK_SQUASH (dev_priv) (INTEL_INFO(dev_priv)->display.has_cdclk_squash)#define HAS_DDI (dev_priv) (INTEL_INFO(dev_priv)->display.has_ddi)#define HAS_FPGA_DBG_UNCLAIMED (dev_priv) (INTEL_INFO(dev_priv)->display.has_fpga_dbg)#define HAS_PSR (dev_priv) (INTEL_INFO(dev_priv)->display.has_psr)
drivers/gpu/drm/i915/i915_pci.c +1 -0
@@ -1064,6 +1064,7 @@ static const struct intel_device_info xehpsdv_info = { .has_guc_deprivilege = 1, \ .has_heci_pxp = 1, \ .has_media_ratio_mode = 1, \ + .display.has_cdclk_squash = 1, \ .__runtime.platform_engine_mask = \BIT (RCS0 ) |BIT (BCS0 ) | \ BIT(VECS0) | BIT(VECS1) | \
drivers/gpu/drm/i915/intel_device_info.h +1 -0
@@ -180,6 +180,7 @@ enum intel_ppgtt_type {/* Keep in alphabetical order */ \func (cursor_needs_physical); \func (has_cdclk_crawl); \ +func (has_cdclk_squash); \func (has_ddi); \func (has_dp_mst); \func (has_dsb); \
Signature · 1 line
2.25.1
Re: [Intel-gfx] [PATCH 2/4] drm/i915/display: Introduce HAS_CDCLK_SQUASH macro
Quoted 7 lines · Anusha Srivatsa
Driver had discrepancy in how cdclk squash and crawl support were checked. Like crawl, add squash as a 1 bit feature flag to the display section of DG2.
Cc Balasubramani Vivekanandan <[email protected]>Cc Ville Syrjälä <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>
Quoted 6 lines
--- drivers/gpu/drm/i915/display/intel_cdclk.c | 15 +++++---------- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/intel_device_info.h | 1 + 4 files changed, 8 insertions(+), 10 deletions(-)
Quoted 101 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +5
-10@@ -1220,11 +1220,6 @@ static void skl_cdclk_uninit_hw(struct drm_i915_private *dev_priv)skl_set_cdclk (dev_priv, &cdclk_config,INVALID_PIPE ); } -static bool has_cdclk_squash (struct drm_i915_private *i915) -{ -return IS_DG2 (i915); -} -struct intel_cdclk_vals {u32 cdclk;u16 refclk;@@ -1520,7 +1515,7 @@ static void bxt_get_cdclk(struct drm_i915_private *dev_priv,return ; } -if (has_cdclk_squash (dev_priv)) +if (HAS_CDCLK_SQUASH (dev_priv)) squash_ctl =intel_de_read (dev_priv,CDCLK_SQUASH_CTL );if (squash_ctl &CDCLK_SQUASH_ENABLE ) {@@ -1747,7 +1742,7 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,else clock = cdclk; -if (has_cdclk_squash (dev_priv)) { +if (HAS_CDCLK_SQUASH (dev_priv)) {u32 squash_ctl =0 ;if (waveform)@@ -1845,7 +1840,7 @@ static void bxt_sanitize_cdclk(struct drm_i915_private *dev_priv) expected =skl_cdclk_decimal (cdclk);/* Figure out what CD2X divider we should be using for this cdclk */ -if (has_cdclk_squash (dev_priv)) +if (HAS_CDCLK_SQUASH (dev_priv)) clock = dev_priv->display.cdclk.hw.vco /2 ;else clock = dev_priv->display.cdclk.hw.cdclk;@@ -1976,7 +1971,7 @@ static bool intel_cdclk_can_squash(struct drm_i915_private *dev_priv,* the moment all platforms with squasher use a fixed cd2x * divider. */ -if (!has_cdclk_squash (dev_priv)) +if (!HAS_CDCLK_SQUASH (dev_priv))return false; return a->cdclk != b->cdclk &&@@ -2028,7 +2023,7 @@ static bool intel_cdclk_can_cd2x_update(struct drm_i915_private *dev_priv,* the moment all platforms with squasher use a fixed cd2x * divider. */ -if (has_cdclk_squash (dev_priv)) +if (HAS_CDCLK_SQUASH (dev_priv))return false; return a->cdclk != b->cdclk &&drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -869,6 +869,7 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,#define HAS_DOUBLE_BUFFERED_M_N (dev_priv) (DISPLAY_VER(dev_priv) >= 9 || IS_BROADWELL(dev_priv))#define HAS_CDCLK_CRAWL (dev_priv) (INTEL_INFO(dev_priv)->display.has_cdclk_crawl) +#define HAS_CDCLK_SQUASH (dev_priv) (INTEL_INFO(dev_priv)->display.has_cdclk_squash)#define HAS_DDI (dev_priv) (INTEL_INFO(dev_priv)->display.has_ddi)#define HAS_FPGA_DBG_UNCLAIMED (dev_priv) (INTEL_INFO(dev_priv)->display.has_fpga_dbg)#define HAS_PSR (dev_priv) (INTEL_INFO(dev_priv)->display.has_psr)drivers/gpu/drm/i915/i915_pci.c +1
-0@@ -1064,6 +1064,7 @@ static const struct intel_device_info xehpsdv_info = { .has_guc_deprivilege = 1, \ .has_heci_pxp = 1, \ .has_media_ratio_mode = 1, \ + .display.has_cdclk_squash = 1, \ .__runtime.platform_engine_mask = \BIT (RCS0 ) |BIT (BCS0 ) | \ BIT(VECS0) | BIT(VECS1) | \drivers/gpu/drm/i915/intel_device_info.h +1
-0@@ -180,6 +180,7 @@ enum intel_ppgtt_type {/* Keep in alphabetical order */ \func (cursor_needs_physical); \func (has_cdclk_crawl); \ +func (has_cdclk_squash); \func (has_ddi); \func (has_dp_mst); \func (has_dsb); \Signature · 1 line
2.25.1
PATCH 3/4 drm/i915/display: Move chunks of code out of bxt_set_cdclk()
In reply to Anusha SrivatsaNo functional change. Moving segments out to simplify bxt_set_cdlck()
v2: s/bxt_cdclk_pll/bxt_cdclk_pll_update (Jani)
--- drivers/gpu/drm/i915/display/intel_cdclk.c | 40 ++++++++++++++-------- 1 file changed, 25 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/display/intel_cdclk.c +25 -15
@@ -1684,6 +1684,27 @@ static u32 cdclk_squash_waveform(struct drm_i915_private *dev_priv,return 0xffff ; } +static void icl_cdclk_pll_update (struct drm_i915_private *i915,int vco) +{ +if (i915->display.cdclk.hw.vco !=0 && + i915->display.cdclk.hw.vco != vco) +icl_cdclk_pll_disable (i915); + +if (i915->display.cdclk.hw.vco != vco) +icl_cdclk_pll_enable (i915, vco); +} + +static void bxt_cdclk_pll_update (struct drm_i915_private *i915,int vco) +{ +if (i915->display.cdclk.hw.vco !=0 && + i915->display.cdclk.hw.vco != vco) +bxt_de_pll_disable (i915); + +if (i915->display.cdclk.hw.vco != vco) +bxt_de_pll_enable (i915, vco); + +} +static void bxt_set_cdclk (struct drm_i915_private *dev_priv,const struct intel_cdclk_config *cdclk_config,enum pipe pipe)
@@ -1719,21 +1740,10 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,if (HAS_CDCLK_CRAWL (dev_priv) && dev_priv->display.cdclk.hw.vco >0 && vco >0 ) {if (dev_priv->display.cdclk.hw.vco != vco)adlp_cdclk_pll_crawl (dev_priv, vco); - }else if (DISPLAY_VER (dev_priv) >=11 ) { -if (dev_priv->display.cdclk.hw.vco !=0 && - dev_priv->display.cdclk.hw.vco != vco) -icl_cdclk_pll_disable (dev_priv); - -if (dev_priv->display.cdclk.hw.vco != vco) -icl_cdclk_pll_enable (dev_priv, vco); - }else { -if (dev_priv->display.cdclk.hw.vco !=0 && - dev_priv->display.cdclk.hw.vco != vco) -bxt_de_pll_disable (dev_priv); - -if (dev_priv->display.cdclk.hw.vco != vco) -bxt_de_pll_enable (dev_priv, vco); - } + }else if (DISPLAY_VER (dev_priv) >=11 ) +icl_cdclk_pll_update (dev_priv, vco); +else +bxt_cdclk_pll_update (dev_priv, vco); waveform =cdclk_squash_waveform (dev_priv, cdclk);
Signature · 1 line
2.25.1
Re: [Intel-gfx] [PATCH 3/4] drm/i915/display: Move chunks of code out of bxt_set_cdclk()
Quoted 5 lines · Anusha Srivatsa
No functional change. Moving segments out to simplify
bxt_set_cdlck()v2: s/bxt_cdclk_pll/bxt_cdclk_pll_update (Jani)
Quoted 7 lines
Cc Jani Nikula <[email protected]>Cc Balasubramani Vivekanandan <[email protected]>Cc Ville Syrjälä <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 40 ++++++++++++++-------- 1 file changed, 25 insertions(+), 15 deletions(-)
Quoted 62 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +25
-15@@ -1684,6 +1684,27 @@ static u32 cdclk_squash_waveform(struct drm_i915_private *dev_priv,return 0xffff ; } +static void icl_cdclk_pll_update (struct drm_i915_private *i915,int vco) +{ +if (i915->display.cdclk.hw.vco !=0 && + i915->display.cdclk.hw.vco != vco) +icl_cdclk_pll_disable (i915); + +if (i915->display.cdclk.hw.vco != vco) +icl_cdclk_pll_enable (i915, vco); +} + +static void bxt_cdclk_pll_update (struct drm_i915_private *i915,int vco) +{ +if (i915->display.cdclk.hw.vco !=0 && + i915->display.cdclk.hw.vco != vco) +bxt_de_pll_disable (i915); + +if (i915->display.cdclk.hw.vco != vco) +bxt_de_pll_enable (i915, vco); + +} +static void bxt_set_cdclk (struct drm_i915_private *dev_priv,const struct intel_cdclk_config *cdclk_config,enum pipe pipe)@@ -1719,21 +1740,10 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,if (HAS_CDCLK_CRAWL (dev_priv) && dev_priv->display.cdclk.hw.vco >0 && vco >0 ) {if (dev_priv->display.cdclk.hw.vco != vco)adlp_cdclk_pll_crawl (dev_priv, vco); - }else if (DISPLAY_VER (dev_priv) >=11 ) { -if (dev_priv->display.cdclk.hw.vco !=0 && - dev_priv->display.cdclk.hw.vco != vco) -icl_cdclk_pll_disable (dev_priv); - -if (dev_priv->display.cdclk.hw.vco != vco) -icl_cdclk_pll_enable (dev_priv, vco); - }else { -if (dev_priv->display.cdclk.hw.vco !=0 && - dev_priv->display.cdclk.hw.vco != vco) -bxt_de_pll_disable (dev_priv); - -if (dev_priv->display.cdclk.hw.vco != vco) -bxt_de_pll_enable (dev_priv, vco); - } + }else if (DISPLAY_VER (dev_priv) >=11 ) +icl_cdclk_pll_update (dev_priv, vco); +else +bxt_cdclk_pll_update (dev_priv, vco); waveform =cdclk_squash_waveform (dev_priv, cdclk);Signature · 1 line
2.25.1
PATCH 4/4 drm/i915/display: Move squash_ctl register programming to its own function
In reply to Anusha SrivatsaNo functional change. Introduce dg2_cdclk_squash_program and move squash_ctl register programming bits to this.
v2: s/dg2_cdclk_squash_programming/dg2_cdclk_squash_program (Jani)
--- drivers/gpu/drm/i915/display/intel_cdclk.c | 23 +++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/display/intel_cdclk.c +14 -9
@@ -1705,6 +1705,18 @@ static void bxt_cdclk_pll_update(struct drm_i915_private *i915, int vco) } +static void dg2_cdclk_squash_program (struct drm_i915_private *i915, +u16 waveform) +{ +u32 squash_ctl =0 ; + +if (waveform) + squash_ctl =CDCLK_SQUASH_ENABLE | +CDCLK_SQUASH_WINDOW_SIZE (0xf ) | waveform; + +intel_de_write (i915,CDCLK_SQUASH_CTL , squash_ctl); +} +static void bxt_set_cdclk (struct drm_i915_private *dev_priv,const struct intel_cdclk_config *cdclk_config,enum pipe pipe)
@@ -1752,15 +1764,8 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,else clock = cdclk; -if (HAS_CDCLK_SQUASH (dev_priv)) { -u32 squash_ctl =0 ; - -if (waveform) - squash_ctl =CDCLK_SQUASH_ENABLE | -CDCLK_SQUASH_WINDOW_SIZE (0xf ) | waveform; - -intel_de_write (dev_priv,CDCLK_SQUASH_CTL , squash_ctl); - } +if (HAS_CDCLK_SQUASH (dev_priv)) +dg2_cdclk_squash_program (dev_priv, waveform); val =bxt_cdclk_cd2x_div_sel (dev_priv, clock, vco) | bxt_cdclk_cd2x_pipe(dev_priv, pipe) |
Signature · 1 line
2.25.1
Re: [Intel-gfx] [PATCH 4/4] drm/i915/display: Move squash_ctl register programming to its own function
Quoted 5 lines · Anusha Srivatsa
No functional change. Introduce
dg2_cdclk_squash_programand movesquash_ctlregister programming bits to this.v2: s/dg2_cdclk_squash_programming/dg2_cdclk_squash_program (Jani)
Quoted 7 lines
Cc Jani Nikula <[email protected]>Cc Balasubramani Vivekanandan <[email protected]>Cc Ville Syrjälä <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 23 +++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
Quoted 45 lines
drivers/gpu/drm/i915/display/intel_cdclk.c +14
-9@@ -1705,6 +1705,18 @@ static void bxt_cdclk_pll_update(struct drm_i915_private *i915, int vco) } +static void dg2_cdclk_squash_program (struct drm_i915_private *i915, +u16 waveform) +{ +u32 squash_ctl =0 ; + +if (waveform) + squash_ctl =CDCLK_SQUASH_ENABLE | +CDCLK_SQUASH_WINDOW_SIZE (0xf ) | waveform; + +intel_de_write (i915,CDCLK_SQUASH_CTL , squash_ctl); +} +static void bxt_set_cdclk (struct drm_i915_private *dev_priv,const struct intel_cdclk_config *cdclk_config,enum pipe pipe)@@ -1752,15 +1764,8 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,else clock = cdclk; -if (HAS_CDCLK_SQUASH (dev_priv)) { -u32 squash_ctl =0 ; - -if (waveform) - squash_ctl =CDCLK_SQUASH_ENABLE | -CDCLK_SQUASH_WINDOW_SIZE (0xf ) | waveform; - -intel_de_write (dev_priv,CDCLK_SQUASH_CTL , squash_ctl); - } +if (HAS_CDCLK_SQUASH (dev_priv)) +dg2_cdclk_squash_program (dev_priv, waveform); val =bxt_cdclk_cd2x_div_sel (dev_priv, clock, vco) | bxt_cdclk_cd2x_pipe(dev_priv, pipe) |Signature · 1 line
2.25.1
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Prep series - CDCLK code churn (rev2)
In reply to Anusha Srivatsa== Series Details ==
== Series Details ==
Series: Prep series - CDCLK code churn (rev2)
URL : https://patchwork.freedesktop.org/series/109974/
State : warning
== Summary ==
Error: dim checkpatch failed750f09e493d8 drm/i915/display: Change terminology for cdclk actions 7e35fba6b197 drm/i915/display: Introduce HAS_CDCLK_SQUASH macro e7d2804a8d53 drm/i915/display: Move chunks of code out of bxt_set_cdclk() -:46: CHECK:BRACES: Blank lines aren't necessary before a close brace '}' #46: FILE: drivers/gpu/drm/i915/display/intel_cdclk.c:1706:
+
+}
total: 0 errors, 0 warnings, 1 checks, 52 lines checkedb54115c43c27 drm/i915/display: Move squash_ctl register programming to its own function -:29: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #29: FILE: drivers/gpu/drm/i915/display/intel_cdclk.c:1709:
+static void dg2_cdclk_squash_program(struct drm_i915_private *i915,
+ u16 waveform)
total: 0 errors, 0 warnings, 1 checks, 35 lines checked
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for Prep series - CDCLK code churn (rev2)
In reply to Anusha Srivatsa== Series Details ==
== Series Details ==
Series: Prep series - CDCLK code churn (rev2)
URL : https://patchwork.freedesktop.org/series/109974/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12277 -> Patchwork_109974v2
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_109974v2 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_109974v2, 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_109974v2/index.html
Participating hosts (43 -> 40)
------------------------------
Missing (3): fi-ctg-p8600 fi-bdw-samus bat-jsl-1
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_109974v2:
### IGT changes ###
#### Possible regressions ####
* igt@kms_cursor_legacy@basic-flip-before-cursor@atomic-transitions:
- fi-elk-e7500: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12277/fi-elk-e7500/igt@kms_cursor_legacy@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109974v2/fi-elk-e7500/igt@kms_cursor_legacy@[email protected]
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@i915_pm_rpm@basic-rte:
- {bat-rplp-1}: [PASS][3] -> [DMESG-WARN][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12277/bat-rplp-1/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109974v2/bat-rplp-1/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_109974v2 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-bdw-5557u: NOTRUN -> [SKIP][5] ([fdo#109271] / [fdo#111827])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109974v2/fi-bdw-5557u/igt@[email protected]
- bat-adlp-4: NOTRUN -> [SKIP][6] ([fdo#111827])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109974v2/bat-adlp-4/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size:
- fi-bsw-kefka: [PASS][7] -> [FAIL][8] ([i915#6298])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12277/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109974v2/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
* igt@kms_pipe_crc_basic@suspend-read-crc:
- bat-adlp-4: NOTRUN -> [SKIP][9] ([i915#3546])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109974v2/bat-adlp-4/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-b-hdmi-a-2:
- fi-bdw-5557u: NOTRUN -> [INCOMPLETE][10] ([i915#146])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109974v2/fi-bdw-5557u/igt@kms_pipe_crc_basic@[email protected]
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s0@smem:
- {bat-adlm-1}: [DMESG-WARN][11] ([i915#2867]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12277/bat-adlm-1/igt@gem_exec_suspend@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109974v2/bat-adlm-1/igt@gem_exec_suspend@[email protected]
* igt@gem_huc_copy@huc-copy:
- {bat-atsm-1}: [FAIL][13] ([i915#7029]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12277/bat-atsm-1/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109974v2/bat-atsm-1/igt@[email protected]
* igt@i915_module_load@load:
- {bat-dg2-8}: [FAIL][15] -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12277/bat-dg2-8/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109974v2/bat-dg2-8/igt@[email protected]
* igt@i915_selftest@live@migrate:
- bat-adlp-4: [INCOMPLETE][17] ([i915#7308]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12277/bat-adlp-4/igt@i915_selftest@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109974v2/bat-adlp-4/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@reset:
- {bat-rpls-1}: [DMESG-FAIL][19] ([i915#4983]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12277/bat-rpls-1/igt@i915_selftest@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109974v2/bat-rpls-1/igt@i915_selftest@[email protected]
* igt@i915_suspend@basic-s3-without-i915:
- fi-bdw-5557u: [INCOMPLETE][21] ([i915#146]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12277/fi-bdw-5557u/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109974v2/fi-bdw-5557u/igt@[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
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
[i915#146]: https://gitlab.freedesktop.org/drm/intel/issues/146
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
[i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
[i915#7029]: https://gitlab.freedesktop.org/drm/intel/issues/7029
[i915#7308]: https://gitlab.freedesktop.org/drm/intel/issues/7308
Build changes
-------------
* Linux: CI_DRM_12277 -> Patchwork_109974v2
CI-20190529: 20190529
CI_DRM_12277: 382f329699fb46e1fccb50f6ada2af090d07686d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7022: d73b21e653555d2e0370789071799aa0037049c1 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109974v2: 382f329699fb46e1fccb50f6ada2af090d07686d @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
1134d43a0088 drm/i915/display: Move squash_ctl register programming to its own function 697abfe9951c drm/i915/display: Move chunks of code out of bxt_set_cdclk() d48d1d03731f drm/i915/display: Introduce HAS_CDCLK_SQUASH macro 91ca1cfa7696 drm/i915/display: Change terminology for cdclk actions
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109974v2/index.html