Message ID | 20230105131046.2173431-1-andrzej.hajda@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2,1/9] drm/i915/display/core: use intel_de_rmw if possible | expand |
On Thu, Jan 05, 2023 at 02:10:38PM +0100, Andrzej Hajda wrote: > The helper makes the code more compact and readable. > > Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> > --- > drivers/gpu/drm/i915/display/intel_display.c | 22 ++++++++----------- > .../drm/i915/display/intel_modeset_setup.c | 17 ++++++-------- > 2 files changed, 16 insertions(+), 23 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > index e75b9b2a0e015a..ce506c9fd6ab9f 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -293,11 +293,11 @@ static void > skl_wa_827(struct drm_i915_private *dev_priv, enum pipe pipe, bool enable) > { > if (enable) > - intel_de_write(dev_priv, CLKGATE_DIS_PSL(pipe), > - intel_de_read(dev_priv, CLKGATE_DIS_PSL(pipe)) | DUPS1_GATING_DIS | DUPS2_GATING_DIS); > + intel_de_rmw(dev_priv, CLKGATE_DIS_PSL(pipe), > + 0, DUPS1_GATING_DIS | DUPS2_GATING_DIS); > else > - intel_de_write(dev_priv, CLKGATE_DIS_PSL(pipe), > - intel_de_read(dev_priv, CLKGATE_DIS_PSL(pipe)) & ~(DUPS1_GATING_DIS | DUPS2_GATING_DIS)); > + intel_de_rmw(dev_priv, CLKGATE_DIS_PSL(pipe), > + DUPS1_GATING_DIS | DUPS2_GATING_DIS, 0); > } > > /* Wa_2006604312:icl,ehl */ > @@ -306,11 +306,9 @@ icl_wa_scalerclkgating(struct drm_i915_private *dev_priv, enum pipe pipe, > bool enable) > { > if (enable) > - intel_de_write(dev_priv, CLKGATE_DIS_PSL(pipe), > - intel_de_read(dev_priv, CLKGATE_DIS_PSL(pipe)) | DPFR_GATING_DIS); > + intel_de_rmw(dev_priv, CLKGATE_DIS_PSL(pipe), 0, DPFR_GATING_DIS); > else > - intel_de_write(dev_priv, CLKGATE_DIS_PSL(pipe), > - intel_de_read(dev_priv, CLKGATE_DIS_PSL(pipe)) & ~DPFR_GATING_DIS); > + intel_de_rmw(dev_priv, CLKGATE_DIS_PSL(pipe), DPFR_GATING_DIS, 0); > } > > /* Wa_1604331009:icl,jsl,ehl */ > @@ -1852,12 +1850,10 @@ static void hsw_set_frame_start_delay(const struct intel_crtc_state *crtc_state) > enum transcoder transcoder = crtc_state->cpu_transcoder; > i915_reg_t reg = DISPLAY_VER(dev_priv) >= 14 ? MTL_CHICKEN_TRANS(transcoder) : > CHICKEN_TRANS(transcoder); > - u32 val; > > - val = intel_de_read(dev_priv, reg); > - val &= ~HSW_FRAME_START_DELAY_MASK; > - val |= HSW_FRAME_START_DELAY(crtc_state->framestart_delay - 1); > - intel_de_write(dev_priv, reg, val); > + intel_de_rmw(dev_priv, reg, > + HSW_FRAME_START_DELAY_MASK, > + HSW_FRAME_START_DELAY(crtc_state->framestart_delay - 1)); > } > > static void icl_ddi_bigjoiner_pre_enable(struct intel_atomic_state *state, > diff --git a/drivers/gpu/drm/i915/display/intel_modeset_setup.c b/drivers/gpu/drm/i915/display/intel_modeset_setup.c > index 96395bfbd41dfb..6f6dc7c6b88b0c 100644 > --- a/drivers/gpu/drm/i915/display/intel_modeset_setup.c > +++ b/drivers/gpu/drm/i915/display/intel_modeset_setup.c > @@ -647,17 +647,14 @@ static void intel_early_display_was(struct drm_i915_private *i915) > * Also known as Wa_14010480278. > */ > if (IS_DISPLAY_VER(i915, 10, 12)) > - intel_de_write(i915, GEN9_CLKGATE_DIS_0, > - intel_de_read(i915, GEN9_CLKGATE_DIS_0) | DARBF_GATING_DIS); > + intel_de_rmw(i915, GEN9_CLKGATE_DIS_0, 0, DARBF_GATING_DIS); > > - if (IS_HASWELL(i915)) { > - /* > - * WaRsPkgCStateDisplayPMReq:hsw > - * System hang if this isn't done before disabling all planes! > - */ > - intel_de_write(i915, CHICKEN_PAR1_1, > - intel_de_read(i915, CHICKEN_PAR1_1) | FORCE_ARB_IDLE_PLANES); > - } > + /* > + * WaRsPkgCStateDisplayPMReq:hsw > + * System hang if this isn't done before disabling all planes! > + */ > + if (IS_HASWELL(i915)) > + intel_de_rmw(i915, CHICKEN_PAR1_1, 0, FORCE_ARB_IDLE_PLANES); > > if (IS_KABYLAKE(i915) || IS_COFFEELAKE(i915) || IS_COMETLAKE(i915)) { > /* Display WA #1142:kbl,cfl,cml */ > -- > 2.34.1 >
On 10.01.2023 16:45, Patchwork wrote: > *Patch Details* > *Series:* series starting with [v2,1/9] drm/i915/display/core: use > intel_de_rmw if possible (rev3) > *URL:* https://patchwork.freedesktop.org/series/112438/ > <https://patchwork.freedesktop.org/series/112438/> > *State:* failure > *Details:* > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/index.html > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/index.html> > > > CI Bug Log - changes from CI_DRM_12567 -> Patchwork_112438v3 > > > Summary > > *FAILURE* > > Serious unknown changes coming with Patchwork_112438v3 absolutely need to be > verified manually. > > If you think the reported changes have nothing to do with the changes > introduced in Patchwork_112438v3, 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_112438v3/index.html > > > Participating hosts (41 -> 41) > > Additional (1): fi-kbl-soraka > Missing (1): fi-snb-2520m > > > Possible new issues > > Here are the unknown changes that may have been introduced in > Patchwork_112438v3: > > > IGT changes > > > Possible regressions > > * igt@i915_selftest@live@guc: > o fi-kbl-soraka: NOTRUN -> INCOMPLETE > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/fi-kbl-soraka/igt@i915_selftest@live@guc.html> Quite common recently bug with fi-kbl-soraka and GuC [1] or more generaly live tests[2], not related. [1]: https://lore.kernel.org/intel-gfx/?q=b%3A%22fi-kbl-soraka%2Figt%40i915_selftest%40live%40guc.html%22 [2]: https://lore.kernel.org/intel-gfx/?q=b%3A%22fi-kbl-soraka%2Figt%40i915_selftest%40live%40%22 Regards Andrzej > > > Suppressed > > The following results come from untrusted machines, tests, or statuses. > They do not affect the overall result. > > * igt@i915_selftest@live@guc: > o {bat-rpls-2}: PASS > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12567/bat-rpls-2/igt@i915_selftest@live@guc.html> -> DMESG-WARN <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/bat-rpls-2/igt@i915_selftest@live@guc.html> > > > Known issues > > Here are the changes found in Patchwork_112438v3 that come from known > issues: > > > IGT changes > > > Issues hit > > * > > igt@gem_exec_gttfill@basic: > > o fi-kbl-soraka: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/fi-kbl-soraka/igt@gem_exec_gttfill@basic.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>) +15 similar issues > * > > igt@gem_huc_copy@huc-copy: > > o fi-kbl-soraka: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#2190 <https://gitlab.freedesktop.org/drm/intel/issues/2190>) > * > > igt@gem_lmem_swapping@basic: > > o fi-kbl-soraka: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/fi-kbl-soraka/igt@gem_lmem_swapping@basic.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#4613 <https://gitlab.freedesktop.org/drm/intel/issues/4613>) +3 similar issues > * > > igt@i915_selftest@live@gt_heartbeat: > > o fi-kbl-soraka: NOTRUN -> DMESG-FAIL > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html> (i915#5334 <https://gitlab.freedesktop.org/drm/intel/issues/5334>) > * > > igt@i915_selftest@live@gt_pm: > > o fi-kbl-soraka: NOTRUN -> DMESG-FAIL > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html> (i915#1886 <https://gitlab.freedesktop.org/drm/intel/issues/1886>) > > {name}: This element is suppressed. This means it is ignored when computing > the status of the difference (SUCCESS, WARNING, or FAILURE). > > > Build changes > > * Linux: CI_DRM_12567 -> Patchwork_112438v3 > > CI-20190529: 20190529 > CI_DRM_12567: a5cd9627b806f2f42bbacbf9649145f3954830d9 @ > git://anongit.freedesktop.org/gfx-ci/linux > IGT_7114: 2fd839599a200c089a5c9dbf5048609faf9b8104 @ > https://gitlab.freedesktop.org/drm/igt-gpu-tools.git > Patchwork_112438v3: a5cd9627b806f2f42bbacbf9649145f3954830d9 @ > git://anongit.freedesktop.org/gfx-ci/linux > > > Linux commits > > 737bb731534e drm/i915/display/misc: use intel_de_rmw if possible > 4219e82d96cf drm/i915/display/interfaces: use intel_de_rmw if possible > bcb374d246e2 drm/i915/display/panel: use intel_de_rmw if possible in > panel related code > db81cb0d0791 drm/i915/display/hdmi: use intel_de_rmw if possible > a1b81bc46443 drm/i915/display/pch: use intel_de_rmw if possible > 16d27bbb75d3 drm/i915/display/phys: use intel_de_rmw if possible > 5717847cc9c8 drm/i915/display/dpll: use intel_de_rmw if possible > ed71f8596212 drm/i915/display/power: use intel_de_rmw if possible > 842075203e0b drm/i915/display/core: use intel_de_rmw if possible >
++sai Thanks & regards, Ravi -----Original Message----- From: Hajda, Andrzej <andrzej.hajda@intel.com> Sent: Wednesday, January 11, 2023 5:39 PM To: intel-gfx@lists.freedesktop.org; Patchwork <patchwork@emeril.freedesktop.org> Cc: Veesam, RavitejaX <ravitejax.veesam@intel.com>; Vudum, Lakshminarayana <lakshminarayana.vudum@intel.com> Subject: Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [v2,1/9] drm/i915/display/core: use intel_de_rmw if possible (rev3) On 10.01.2023 16:45, Patchwork wrote: > *Patch Details* > *Series:* series starting with [v2,1/9] drm/i915/display/core: use > intel_de_rmw if possible (rev3) > *URL:* https://patchwork.freedesktop.org/series/112438/ > <https://patchwork.freedesktop.org/series/112438/> > *State:* failure > *Details:* > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/index.html > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/index.htm > l> > > > CI Bug Log - changes from CI_DRM_12567 -> Patchwork_112438v3 > > > Summary > > *FAILURE* > > Serious unknown changes coming with Patchwork_112438v3 absolutely need > to be verified manually. > > If you think the reported changes have nothing to do with the changes > introduced in Patchwork_112438v3, 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_112438v3/index.html > > > Participating hosts (41 -> 41) > > Additional (1): fi-kbl-soraka > Missing (1): fi-snb-2520m > > > Possible new issues > > Here are the unknown changes that may have been introduced in > Patchwork_112438v3: > > > IGT changes > > > Possible regressions > > * igt@i915_selftest@live@guc: > o fi-kbl-soraka: NOTRUN -> INCOMPLETE > > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/fi-kbl-so > raka/igt@i915_selftest@live@guc.html> Quite common recently bug with fi-kbl-soraka and GuC [1] or more generaly live tests[2], not related. [1]: https://lore.kernel.org/intel-gfx/?q=b%3A%22fi-kbl-soraka%2Figt%40i915_selftest%40live%40guc.html%22 [2]: https://lore.kernel.org/intel-gfx/?q=b%3A%22fi-kbl-soraka%2Figt%40i915_selftest%40live%40%22 Regards Andrzej > > > Suppressed > > The following results come from untrusted machines, tests, or statuses. > They do not affect the overall result. > > * igt@i915_selftest@live@guc: > o {bat-rpls-2}: PASS > > <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12567/bat-rpls-2/igt@ > i915_selftest@live@guc.html> -> DMESG-WARN > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/bat-rpls- > 2/igt@i915_selftest@live@guc.html> > > > Known issues > > Here are the changes found in Patchwork_112438v3 that come from known > issues: > > > IGT changes > > > Issues hit > > * > > igt@gem_exec_gttfill@basic: > > o fi-kbl-soraka: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/fi-kbl-soraka/igt@gem_exec_gttfill@basic.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>) +15 similar issues > * > > igt@gem_huc_copy@huc-copy: > > o fi-kbl-soraka: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#2190 <https://gitlab.freedesktop.org/drm/intel/issues/2190>) > * > > igt@gem_lmem_swapping@basic: > > o fi-kbl-soraka: NOTRUN -> SKIP > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/fi-kbl-soraka/igt@gem_lmem_swapping@basic.html> (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#4613 <https://gitlab.freedesktop.org/drm/intel/issues/4613>) +3 similar issues > * > > igt@i915_selftest@live@gt_heartbeat: > > o fi-kbl-soraka: NOTRUN -> DMESG-FAIL > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html> (i915#5334 <https://gitlab.freedesktop.org/drm/intel/issues/5334>) > * > > igt@i915_selftest@live@gt_pm: > > o fi-kbl-soraka: NOTRUN -> DMESG-FAIL > > <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112438v3/fi-kbl-so > raka/igt@i915_selftest@live@gt_pm.html> (i915#1886 > <https://gitlab.freedesktop.org/drm/intel/issues/1886>) > > {name}: This element is suppressed. This means it is ignored when > computing the status of the difference (SUCCESS, WARNING, or FAILURE). > > > Build changes > > * Linux: CI_DRM_12567 -> Patchwork_112438v3 > > CI-20190529: 20190529 > CI_DRM_12567: a5cd9627b806f2f42bbacbf9649145f3954830d9 @ > git://anongit.freedesktop.org/gfx-ci/linux > IGT_7114: 2fd839599a200c089a5c9dbf5048609faf9b8104 @ > https://gitlab.freedesktop.org/drm/igt-gpu-tools.git > Patchwork_112438v3: a5cd9627b806f2f42bbacbf9649145f3954830d9 @ > git://anongit.freedesktop.org/gfx-ci/linux > > > Linux commits > > 737bb731534e drm/i915/display/misc: use intel_de_rmw if possible > 4219e82d96cf drm/i915/display/interfaces: use intel_de_rmw if possible > bcb374d246e2 drm/i915/display/panel: use intel_de_rmw if possible in > panel related code > db81cb0d0791 drm/i915/display/hdmi: use intel_de_rmw if possible > a1b81bc46443 drm/i915/display/pch: use intel_de_rmw if possible > 16d27bbb75d3 drm/i915/display/phys: use intel_de_rmw if possible > 5717847cc9c8 drm/i915/display/dpll: use intel_de_rmw if possible > ed71f8596212 drm/i915/display/power: use intel_de_rmw if possible > 842075203e0b drm/i915/display/core: use intel_de_rmw if possible >
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index e75b9b2a0e015a..ce506c9fd6ab9f 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -293,11 +293,11 @@ static void skl_wa_827(struct drm_i915_private *dev_priv, enum pipe pipe, bool enable) { if (enable) - intel_de_write(dev_priv, CLKGATE_DIS_PSL(pipe), - intel_de_read(dev_priv, CLKGATE_DIS_PSL(pipe)) | DUPS1_GATING_DIS | DUPS2_GATING_DIS); + intel_de_rmw(dev_priv, CLKGATE_DIS_PSL(pipe), + 0, DUPS1_GATING_DIS | DUPS2_GATING_DIS); else - intel_de_write(dev_priv, CLKGATE_DIS_PSL(pipe), - intel_de_read(dev_priv, CLKGATE_DIS_PSL(pipe)) & ~(DUPS1_GATING_DIS | DUPS2_GATING_DIS)); + intel_de_rmw(dev_priv, CLKGATE_DIS_PSL(pipe), + DUPS1_GATING_DIS | DUPS2_GATING_DIS, 0); } /* Wa_2006604312:icl,ehl */ @@ -306,11 +306,9 @@ icl_wa_scalerclkgating(struct drm_i915_private *dev_priv, enum pipe pipe, bool enable) { if (enable) - intel_de_write(dev_priv, CLKGATE_DIS_PSL(pipe), - intel_de_read(dev_priv, CLKGATE_DIS_PSL(pipe)) | DPFR_GATING_DIS); + intel_de_rmw(dev_priv, CLKGATE_DIS_PSL(pipe), 0, DPFR_GATING_DIS); else - intel_de_write(dev_priv, CLKGATE_DIS_PSL(pipe), - intel_de_read(dev_priv, CLKGATE_DIS_PSL(pipe)) & ~DPFR_GATING_DIS); + intel_de_rmw(dev_priv, CLKGATE_DIS_PSL(pipe), DPFR_GATING_DIS, 0); } /* Wa_1604331009:icl,jsl,ehl */ @@ -1852,12 +1850,10 @@ static void hsw_set_frame_start_delay(const struct intel_crtc_state *crtc_state) enum transcoder transcoder = crtc_state->cpu_transcoder; i915_reg_t reg = DISPLAY_VER(dev_priv) >= 14 ? MTL_CHICKEN_TRANS(transcoder) : CHICKEN_TRANS(transcoder); - u32 val; - val = intel_de_read(dev_priv, reg); - val &= ~HSW_FRAME_START_DELAY_MASK; - val |= HSW_FRAME_START_DELAY(crtc_state->framestart_delay - 1); - intel_de_write(dev_priv, reg, val); + intel_de_rmw(dev_priv, reg, + HSW_FRAME_START_DELAY_MASK, + HSW_FRAME_START_DELAY(crtc_state->framestart_delay - 1)); } static void icl_ddi_bigjoiner_pre_enable(struct intel_atomic_state *state, diff --git a/drivers/gpu/drm/i915/display/intel_modeset_setup.c b/drivers/gpu/drm/i915/display/intel_modeset_setup.c index 96395bfbd41dfb..6f6dc7c6b88b0c 100644 --- a/drivers/gpu/drm/i915/display/intel_modeset_setup.c +++ b/drivers/gpu/drm/i915/display/intel_modeset_setup.c @@ -647,17 +647,14 @@ static void intel_early_display_was(struct drm_i915_private *i915) * Also known as Wa_14010480278. */ if (IS_DISPLAY_VER(i915, 10, 12)) - intel_de_write(i915, GEN9_CLKGATE_DIS_0, - intel_de_read(i915, GEN9_CLKGATE_DIS_0) | DARBF_GATING_DIS); + intel_de_rmw(i915, GEN9_CLKGATE_DIS_0, 0, DARBF_GATING_DIS); - if (IS_HASWELL(i915)) { - /* - * WaRsPkgCStateDisplayPMReq:hsw - * System hang if this isn't done before disabling all planes! - */ - intel_de_write(i915, CHICKEN_PAR1_1, - intel_de_read(i915, CHICKEN_PAR1_1) | FORCE_ARB_IDLE_PLANES); - } + /* + * WaRsPkgCStateDisplayPMReq:hsw + * System hang if this isn't done before disabling all planes! + */ + if (IS_HASWELL(i915)) + intel_de_rmw(i915, CHICKEN_PAR1_1, 0, FORCE_ARB_IDLE_PLANES); if (IS_KABYLAKE(i915) || IS_COFFEELAKE(i915) || IS_COMETLAKE(i915)) { /* Display WA #1142:kbl,cfl,cml */
The helper makes the code more compact and readable. Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com> --- drivers/gpu/drm/i915/display/intel_display.c | 22 ++++++++----------- .../drm/i915/display/intel_modeset_setup.c | 17 ++++++-------- 2 files changed, 16 insertions(+), 23 deletions(-)