[1/2] drm/i915: Program MBUS with rmw during initialization

Submitted by Matt Roper on Feb. 4, 2020, 1:10 a.m.

Details

Message ID 20200204011032.582737-1-matthew.d.roper@intel.com
State Accepted
Commit 837b63e6087838d0f1e612d448405419199d8033
Headers show
Series "Series without cover letter" ( rev: 2 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Matt Roper Feb. 4, 2020, 1:10 a.m.
It wasn't terribly clear from the bspec's wording, but after discussion
with the hardware folks, it turns out that we need to preserve the
pre-existing contents of the MBUS ABOX control register when
initializing a few specific bits.

Bspec: 49213
Bspec: 50096
Fixes: 4cb4585e5a7f ("drm/i915/icl: initialize MBus during display init")
Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_power.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index 6d91e180db99..529319c962e8 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -4504,14 +4504,18 @@  static void icl_dbuf_disable(struct drm_i915_private *dev_priv)
 
 static void icl_mbus_init(struct drm_i915_private *dev_priv)
 {
-	u32 val;
+	u32 mask, val;
 
+	mask = MBUS_ABOX_BT_CREDIT_POOL1_MASK |
+		MBUS_ABOX_BT_CREDIT_POOL2_MASK |
+		MBUS_ABOX_B_CREDIT_MASK |
+		MBUS_ABOX_BW_CREDIT_MASK;
 	val = MBUS_ABOX_BT_CREDIT_POOL1(16) |
-	      MBUS_ABOX_BT_CREDIT_POOL2(16) |
-	      MBUS_ABOX_B_CREDIT(1) |
-	      MBUS_ABOX_BW_CREDIT(1);
+		MBUS_ABOX_BT_CREDIT_POOL2(16) |
+		MBUS_ABOX_B_CREDIT(1) |
+		MBUS_ABOX_BW_CREDIT(1);
 
-	intel_de_write(dev_priv, MBUS_ABOX_CTL, val);
+	intel_de_rmw(dev_priv, MBUS_ABOX_CTL, mask, val);
 }
 
 static void hsw_assert_cdclk(struct drm_i915_private *dev_priv)

Comments

On Tue, Feb 04, 2020 at 11:40:06PM +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: series starting with [1/2] drm/i915: Program MBUS with rmw during initialization
> URL   : https://patchwork.freedesktop.org/series/72950/
> State : failure
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_7866 -> Patchwork_16408
> ====================================================
> 
> Summary
> -------
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with Patchwork_16408 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_16408, 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_16408/index.html
> 
> Possible new issues
> -------------------
> 
>   Here are the unknown changes that may have been introduced in Patchwork_16408:
> 
> ### IGT changes ###
> 
> #### Possible regressions ####
> 
>   * igt@gem_ctx_create@basic-files:
>     - fi-skl-6770hq:      NOTRUN -> [INCOMPLETE][1]
>    [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16408/fi-skl-6770hq/igt@gem_ctx_create@basic-files.html

Unrelated to this series.  These patches only touch a function that's
exclusive to gen11+, so it would have no impact on SKL (which in this
case seems to have just crashed or been disconnected with no visible
errors).


Matt

> 
>   
> Known issues
> ------------
> 
>   Here are the changes found in Patchwork_16408 that come from known issues:
> 
> ### IGT changes ###
> 
> #### Issues hit ####
> 
>   * igt@gem_close_race@basic-threads:
>     - fi-byt-j1900:       [PASS][2] -> [TIMEOUT][3] ([fdo#112271] / [i915#1084] / [i915#816])
>    [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-byt-j1900/igt@gem_close_race@basic-threads.html
>    [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16408/fi-byt-j1900/igt@gem_close_race@basic-threads.html
> 
>   * igt@i915_selftest@live_blt:
>     - fi-hsw-4770r:       [PASS][4] -> [DMESG-FAIL][5] ([i915#553] / [i915#725])
>    [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-hsw-4770r/igt@i915_selftest@live_blt.html
>    [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16408/fi-hsw-4770r/igt@i915_selftest@live_blt.html
>     - fi-byt-j1900:       [PASS][6] -> [DMESG-FAIL][7] ([i915#725])
>    [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-byt-j1900/igt@i915_selftest@live_blt.html
>    [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16408/fi-byt-j1900/igt@i915_selftest@live_blt.html
>     - fi-hsw-4770:        [PASS][8] -> [DMESG-FAIL][9] ([i915#553] / [i915#725])
>    [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-hsw-4770/igt@i915_selftest@live_blt.html
>    [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16408/fi-hsw-4770/igt@i915_selftest@live_blt.html
> 
>   * igt@i915_selftest@live_gem_contexts:
>     - fi-byt-j1900:       [PASS][10] -> [DMESG-FAIL][11] ([i915#722])
>    [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-byt-j1900/igt@i915_selftest@live_gem_contexts.html
>    [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16408/fi-byt-j1900/igt@i915_selftest@live_gem_contexts.html
> 
>   
> #### Possible fixes ####
> 
>   * igt@gem_exec_parallel@fds:
>     - fi-byt-j1900:       [FAIL][12] ([i915#694]) -> [PASS][13]
>    [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-byt-j1900/igt@gem_exec_parallel@fds.html
>    [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16408/fi-byt-j1900/igt@gem_exec_parallel@fds.html
> 
>   * igt@i915_selftest@live_gem_contexts:
>     - fi-kbl-x1275:       [DMESG-FAIL][14] ([i915#943]) -> [PASS][15]
>    [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-kbl-x1275/igt@i915_selftest@live_gem_contexts.html
>    [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16408/fi-kbl-x1275/igt@i915_selftest@live_gem_contexts.html
> 
>   * igt@kms_chamelium@hdmi-hpd-fast:
>     - fi-kbl-7500u:       [FAIL][16] ([fdo#111407]) -> [PASS][17]
>    [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
>    [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16408/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
> 
>   
> #### Warnings ####
> 
>   * igt@gem_exec_parallel@contexts:
>     - fi-byt-j1900:       [TIMEOUT][18] ([fdo#112271] / [i915#1084]) -> [FAIL][19] ([i915#694])
>    [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7866/fi-byt-j1900/igt@gem_exec_parallel@contexts.html
>    [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16408/fi-byt-j1900/igt@gem_exec_parallel@contexts.html
> 
>   
>   [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
>   [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
>   [i915#1084]: https://gitlab.freedesktop.org/drm/intel/issues/1084
>   [i915#553]: https://gitlab.freedesktop.org/drm/intel/issues/553
>   [i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
>   [i915#722]: https://gitlab.freedesktop.org/drm/intel/issues/722
>   [i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
>   [i915#816]: https://gitlab.freedesktop.org/drm/intel/issues/816
>   [i915#943]: https://gitlab.freedesktop.org/drm/intel/issues/943
> 
> 
> Participating hosts (46 -> 45)
> ------------------------------
> 
>   Additional (6): fi-skl-6770hq fi-ilk-650 fi-icl-u3 fi-kbl-8809g fi-icl-dsi fi-bsw-nick 
>   Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-bwr-2160 fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 
> 
> 
> Build changes
> -------------
> 
>   * CI: CI-20190529 -> None
>   * Linux: CI_DRM_7866 -> Patchwork_16408
> 
>   CI-20190529: 20190529
>   CI_DRM_7866: bd8251861a5c1ac11e3510355f503675a05d26e6 @ git://anongit.freedesktop.org/gfx-ci/linux
>   IGT_5417: 33cc93c8ba5daa0b7498f297a4f626844d895d06 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
>   Patchwork_16408: 69823ec347f2cb0a10a2d866488d511f0cd09c2a @ git://anongit.freedesktop.org/gfx-ci/linux
> 
> 
> == Linux commits ==
> 
> 69823ec347f2 drm/i915/tgl: Program MBUS_ABOX{1, 2}_CTL during display init
> 87fa15148708 drm/i915: Program MBUS with rmw during initialization
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16408/index.html
Quoting Matt Roper (2020-02-05 00:11:46)
> On Tue, Feb 04, 2020 at 11:40:06PM +0000, Patchwork wrote:
> > == Series Details ==
> > 
> > Series: series starting with [1/2] drm/i915: Program MBUS with rmw during initialization
> > URL   : https://patchwork.freedesktop.org/series/72950/
> > State : failure
> > 
> > == Summary ==
> > 
> > CI Bug Log - changes from CI_DRM_7866 -> Patchwork_16408
> > ====================================================
> > 
> > Summary
> > -------
> > 
> >   **FAILURE**
> > 
> >   Serious unknown changes coming with Patchwork_16408 absolutely need to be
> >   verified manually.
> >   
> >   If you think the reported changes have nothing to do with the changes
> >   introduced in Patchwork_16408, 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_16408/index.html
> > 
> > Possible new issues
> > -------------------
> > 
> >   Here are the unknown changes that may have been introduced in Patchwork_16408:
> > 
> > ### IGT changes ###
> > 
> > #### Possible regressions ####
> > 
> >   * igt@gem_ctx_create@basic-files:
> >     - fi-skl-6770hq:      NOTRUN -> [INCOMPLETE][1]
> >    [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16408/fi-skl-6770hq/igt@gem_ctx_create@basic-files.html
> 
> Unrelated to this series.  These patches only touch a function that's
> exclusive to gen11+, so it would have no impact on SKL (which in this
> case seems to have just crashed or been disconnected with no visible
> errors).

ext4 panicked, not for the first time on that machine.
-Chris
On Mon, Feb 03, 2020 at 05:10:31PM -0800, Matt Roper wrote:
> It wasn't terribly clear from the bspec's wording, but after discussion
> with the hardware folks, it turns out that we need to preserve the
> pre-existing contents of the MBUS ABOX control register when
> initializing a few specific bits.
> 
> Bspec: 49213
> Bspec: 50096
> Fixes: 4cb4585e5a7f ("drm/i915/icl: initialize MBus during display init")
> Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Reviewed-by: Matt Atwood <matthew.s.atwood@intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_power.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
> index 6d91e180db99..529319c962e8 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> @@ -4504,14 +4504,18 @@ static void icl_dbuf_disable(struct drm_i915_private *dev_priv)
>  
>  static void icl_mbus_init(struct drm_i915_private *dev_priv)
>  {
> -	u32 val;
> +	u32 mask, val;
>  
> +	mask = MBUS_ABOX_BT_CREDIT_POOL1_MASK |
> +		MBUS_ABOX_BT_CREDIT_POOL2_MASK |
> +		MBUS_ABOX_B_CREDIT_MASK |
> +		MBUS_ABOX_BW_CREDIT_MASK;
>  	val = MBUS_ABOX_BT_CREDIT_POOL1(16) |
> -	      MBUS_ABOX_BT_CREDIT_POOL2(16) |
> -	      MBUS_ABOX_B_CREDIT(1) |
> -	      MBUS_ABOX_BW_CREDIT(1);
> +		MBUS_ABOX_BT_CREDIT_POOL2(16) |
> +		MBUS_ABOX_B_CREDIT(1) |
> +		MBUS_ABOX_BW_CREDIT(1);
>  
> -	intel_de_write(dev_priv, MBUS_ABOX_CTL, val);
> +	intel_de_rmw(dev_priv, MBUS_ABOX_CTL, mask, val);
>  }
>  
>  static void hsw_assert_cdclk(struct drm_i915_private *dev_priv)
> -- 
> 2.24.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Mon, Feb 10, 2020 at 10:20:17PM +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: series starting with [1/2] drm/i915: Program MBUS with rmw during initialization (rev2)
> URL   : https://patchwork.freedesktop.org/series/72950/
> State : success
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_7903 -> Patchwork_16509
> ====================================================
> 
> Summary
> -------
> 
>   **WARNING**
> 
>   Minor unknown changes coming with Patchwork_16509 need to be verified
>   manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_16509, 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_16509/index.html
> 
> Possible new issues
> -------------------
> 
>   Here are the unknown changes that may have been introduced in Patchwork_16509:
> 
> ### IGT changes ###
> 
> #### Warnings ####
> 
>   * igt@i915_pm_rpm@module-reload:
>     - fi-ivb-3770:        [SKIP][1] ([fdo#109271]) -> [INCOMPLETE][2]
>    [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-ivb-3770/igt@i915_pm_rpm@module-reload.html
>    [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16509/fi-ivb-3770/igt@i915_pm_rpm@module-reload.html

Unrelated IVB issue; wouldn't be caused by this patch.

Patchwork also shows clean results for the shards CI, although I can't
find the results mail in my inbox.

Applied to dinq.  Thanks Matt Atwood for the reviews.


Matt

> 
>   
> Known issues
> ------------
> 
>   Here are the changes found in Patchwork_16509 that come from known issues:
> 
> ### IGT changes ###
> 
> #### Issues hit ####
> 
>   * igt@gem_exec_parallel@basic:
>     - fi-byt-n2820:       [PASS][3] -> [TIMEOUT][4] ([fdo#112271])
>    [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-byt-n2820/igt@gem_exec_parallel@basic.html
>    [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16509/fi-byt-n2820/igt@gem_exec_parallel@basic.html
> 
>   * igt@i915_selftest@live_blt:
>     - fi-hsw-4770r:       [PASS][5] -> [DMESG-FAIL][6] ([i915#553] / [i915#725])
>    [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-hsw-4770r/igt@i915_selftest@live_blt.html
>    [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16509/fi-hsw-4770r/igt@i915_selftest@live_blt.html
> 
>   
> #### Possible fixes ####
> 
>   * igt@i915_selftest@live_blt:
>     - fi-bsw-n3050:       [INCOMPLETE][7] ([i915#392]) -> [PASS][8]
>    [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-bsw-n3050/igt@i915_selftest@live_blt.html
>    [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16509/fi-bsw-n3050/igt@i915_selftest@live_blt.html
>     - fi-hsw-4770:        [DMESG-FAIL][9] ([i915#553] / [i915#725]) -> [PASS][10]
>    [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-hsw-4770/igt@i915_selftest@live_blt.html
>    [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16509/fi-hsw-4770/igt@i915_selftest@live_blt.html
> 
>   * igt@i915_selftest@live_gem_contexts:
>     - fi-cfl-8700k:       [DMESG-FAIL][11] ([i915#623]) -> [PASS][12]
>    [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
>    [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16509/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
>     - fi-byt-n2820:       [DMESG-FAIL][13] ([i915#1052]) -> [PASS][14]
>    [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
>    [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16509/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
>     - fi-cfl-guc:         [INCOMPLETE][15] ([CI#80] / [fdo#106070] / [i915#424]) -> [PASS][16]
>    [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html
>    [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16509/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html
>     - fi-cml-s:           [DMESG-FAIL][17] ([i915#877]) -> [PASS][18]
>    [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-cml-s/igt@i915_selftest@live_gem_contexts.html
>    [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16509/fi-cml-s/igt@i915_selftest@live_gem_contexts.html
> 
>   * igt@i915_selftest@live_gtt:
>     - fi-bdw-5557u:       [TIMEOUT][19] ([fdo#112271]) -> [PASS][20]
>    [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7903/fi-bdw-5557u/igt@i915_selftest@live_gtt.html
>    [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16509/fi-bdw-5557u/igt@i915_selftest@live_gtt.html
> 
>   
>   [CI#80]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/80
>   [fdo#106070]: https://bugs.freedesktop.org/show_bug.cgi?id=106070
>   [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
>   [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
>   [i915#1052]: https://gitlab.freedesktop.org/drm/intel/issues/1052
>   [i915#392]: https://gitlab.freedesktop.org/drm/intel/issues/392
>   [i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424
>   [i915#553]: https://gitlab.freedesktop.org/drm/intel/issues/553
>   [i915#623]: https://gitlab.freedesktop.org/drm/intel/issues/623
>   [i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
>   [i915#877]: https://gitlab.freedesktop.org/drm/intel/issues/877
> 
> 
> Participating hosts (47 -> 44)
> ------------------------------
> 
>   Additional (3): fi-skl-lmem fi-kbl-7560u fi-snb-2600 
>   Missing    (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-snb-2520m fi-byt-clapper fi-bdw-samus 
> 
> 
> Build changes
> -------------
> 
>   * CI: CI-20190529 -> None
>   * Linux: CI_DRM_7903 -> Patchwork_16509
> 
>   CI-20190529: 20190529
>   CI_DRM_7903: 47b768c475f4a11a48bc43e6228660f8b26a542b @ git://anongit.freedesktop.org/gfx-ci/linux
>   IGT_5433: 6a96c17f3a1b4e1f90b1a0b0ce42a7219875d1a4 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
>   Patchwork_16509: 5a3c01778052d138ca6065b76e55f9a98d225f34 @ git://anongit.freedesktop.org/gfx-ci/linux
> 
> 
> == Linux commits ==
> 
> 5a3c01778052 drm/i915/tgl: Program MBUS_ABOX{1, 2}_CTL during display init
> 901419eb8a59 drm/i915: Program MBUS with rmw during initialization
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16509/index.html