diff mbox series

[v4] drm/i915: Add Wa_14019789679

Message ID 20240731155614.3460645-1-nitin.r.gote@intel.com (mailing list archive)
State New, archived
Headers show
Series [v4] drm/i915: Add Wa_14019789679 | expand

Commit Message

Nitin Gote July 31, 2024, 3:56 p.m. UTC
Wa_14019789679 implementation for MTL, ARL and DG2.

v2: Corrected condition

v3:
   - Fix indentation (Jani Nikula)
   - dword size should be 0x1 and
     initialize dword to 0 instead of MI_NOOP (Tejas)
   - Use IS_GFX_GT_IP_RANGE() (Tejas)

v4:
   - 3DSTATE_MESH_CONTROL instruction is 3 dwords long
     Align with dword size. (Roper, Matthew D)
   - Add RCS engine check. (Tejas)

Bspec: 47083

Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  1 +
 drivers/gpu/drm/i915/gt/intel_workarounds.c  | 16 +++++++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

Comments

Upadhyay, Tejas July 31, 2024, 5:32 p.m. UTC | #1
> -----Original Message-----
> From: Gote, Nitin R <nitin.r.gote@intel.com>
> Sent: Wednesday, July 31, 2024 9:26 PM
> To: intel-gfx@lists.freedesktop.org; Upadhyay, Tejas
> <tejas.upadhyay@intel.com>; Roper, Matthew D
> <matthew.d.roper@intel.com>
> Cc: Shyti, Andi <andi.shyti@intel.com>; Wilson, Chris P
> <chris.p.wilson@intel.com>; Gote, Nitin R <nitin.r.gote@intel.com>
> Subject: [PATCH v4] drm/i915: Add Wa_14019789679
> 
> Wa_14019789679 implementation for MTL, ARL and DG2.
> 
> v2: Corrected condition
> 
> v3:
>    - Fix indentation (Jani Nikula)
>    - dword size should be 0x1 and
>      initialize dword to 0 instead of MI_NOOP (Tejas)
>    - Use IS_GFX_GT_IP_RANGE() (Tejas)
> 
> v4:
>    - 3DSTATE_MESH_CONTROL instruction is 3 dwords long
>      Align with dword size. (Roper, Matthew D)
>    - Add RCS engine check. (Tejas)
> 
> Bspec: 47083
> 
> Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  1 +
> drivers/gpu/drm/i915/gt/intel_workarounds.c  | 16 +++++++++++++++-
>  2 files changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> index 2bd8d98d2110..5394bc7d4daf 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> @@ -220,6 +220,7 @@
>  #define GFX_OP_DESTBUFFER_INFO
> ((0x3<<29)|(0x1d<<24)|(0x8e<<16)|1)
>  #define GFX_OP_DRAWRECT_INFO
> ((0x3<<29)|(0x1d<<24)|(0x80<<16)|(0x3))
>  #define GFX_OP_DRAWRECT_INFO_I965  ((0x7900<<16)|0x2)
> +#define CMD_3DSTATE_MESH_CONTROL ((0x3 << 29) | (0x3 << 27) | (0x0 <<
> +24) | (0x77 << 16) | (0x3))
> 
>  #define XY_CTRL_SURF_INSTR_SIZE		5
>  #define MI_FLUSH_DW_SIZE		3
> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> index 09a287c1aedd..bfe6d8fc820f 100644
> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> @@ -974,7 +974,12 @@ int intel_engine_emit_ctx_wa(struct i915_request
> *rq)
>  	if (ret)
>  		return ret;
> 
> -	cs = intel_ring_begin(rq, (wal->count * 2 + 2));
> +	if ((IS_GFX_GT_IP_RANGE(rq->engine->gt, IP_VER(12, 70), IP_VER(12,
> 74)) ||
> +	     IS_DG2(rq->i915)) && rq->engine->class == RENDER_CLASS)
> +		cs = intel_ring_begin(rq, (wal->count * 2 + 6));
> +	else
> +		cs = intel_ring_begin(rq, (wal->count * 2 + 2));
> +
>  	if (IS_ERR(cs))
>  		return PTR_ERR(cs);
> 
> @@ -1004,6 +1009,15 @@ int intel_engine_emit_ctx_wa(struct i915_request
> *rq)
>  	}
>  	*cs++ = MI_NOOP;
> 
> +	/* Wa_14019789679 */
> +	if ((IS_GFX_GT_IP_RANGE(rq->engine->gt, IP_VER(12, 70), IP_VER(12,
> 74)) ||
> +	     IS_DG2(rq->i915)) && rq->engine->class == RENDER_CLASS) {
> +		*cs++ = CMD_3DSTATE_MESH_CONTROL;
> +		*cs++ = 0;
> +		*cs++ = 0;
> +		*cs++ = MI_NOOP;
> +	}
> +

Please check pre-merge results, to me does not look related except that arlh platform failure, even that does not look much informative. May be hit retest. Otherwise LGTM,

Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com>

Tejas
>  	intel_uncore_forcewake_put__locked(uncore, fw);
>  	spin_unlock(&uncore->lock);
>  	intel_gt_mcr_unlock(wal->gt, flags);
> --
> 2.25.1
Matt Roper July 31, 2024, 5:45 p.m. UTC | #2
On Wed, Jul 31, 2024 at 09:26:14PM +0530, Nitin Gote wrote:
> Wa_14019789679 implementation for MTL, ARL and DG2.
> 
> v2: Corrected condition
> 
> v3:
>    - Fix indentation (Jani Nikula)
>    - dword size should be 0x1 and
>      initialize dword to 0 instead of MI_NOOP (Tejas)
>    - Use IS_GFX_GT_IP_RANGE() (Tejas)
> 
> v4:
>    - 3DSTATE_MESH_CONTROL instruction is 3 dwords long
>      Align with dword size. (Roper, Matthew D)
>    - Add RCS engine check. (Tejas)
> 
> Bspec: 47083
> 
> Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>

If the condition on this workaround gets any more complicated (e.g.,
extending to other platforms in the future), we may want to pull the
condition out to a dedicated function so it can be managed in a single
place.  But this is fine for now.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>


Matt

> ---
>  drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  1 +
>  drivers/gpu/drm/i915/gt/intel_workarounds.c  | 16 +++++++++++++++-
>  2 files changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> index 2bd8d98d2110..5394bc7d4daf 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> @@ -220,6 +220,7 @@
>  #define GFX_OP_DESTBUFFER_INFO	 ((0x3<<29)|(0x1d<<24)|(0x8e<<16)|1)
>  #define GFX_OP_DRAWRECT_INFO     ((0x3<<29)|(0x1d<<24)|(0x80<<16)|(0x3))
>  #define GFX_OP_DRAWRECT_INFO_I965  ((0x7900<<16)|0x2)
> +#define CMD_3DSTATE_MESH_CONTROL ((0x3 << 29) | (0x3 << 27) | (0x0 << 24) | (0x77 << 16) | (0x3))
>  
>  #define XY_CTRL_SURF_INSTR_SIZE		5
>  #define MI_FLUSH_DW_SIZE		3
> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> index 09a287c1aedd..bfe6d8fc820f 100644
> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> @@ -974,7 +974,12 @@ int intel_engine_emit_ctx_wa(struct i915_request *rq)
>  	if (ret)
>  		return ret;
>  
> -	cs = intel_ring_begin(rq, (wal->count * 2 + 2));
> +	if ((IS_GFX_GT_IP_RANGE(rq->engine->gt, IP_VER(12, 70), IP_VER(12, 74)) ||
> +	     IS_DG2(rq->i915)) && rq->engine->class == RENDER_CLASS)
> +		cs = intel_ring_begin(rq, (wal->count * 2 + 6));
> +	else
> +		cs = intel_ring_begin(rq, (wal->count * 2 + 2));
> +
>  	if (IS_ERR(cs))
>  		return PTR_ERR(cs);
>  
> @@ -1004,6 +1009,15 @@ int intel_engine_emit_ctx_wa(struct i915_request *rq)
>  	}
>  	*cs++ = MI_NOOP;
>  
> +	/* Wa_14019789679 */
> +	if ((IS_GFX_GT_IP_RANGE(rq->engine->gt, IP_VER(12, 70), IP_VER(12, 74)) ||
> +	     IS_DG2(rq->i915)) && rq->engine->class == RENDER_CLASS) {
> +		*cs++ = CMD_3DSTATE_MESH_CONTROL;
> +		*cs++ = 0;
> +		*cs++ = 0;
> +		*cs++ = MI_NOOP;
> +	}
> +
>  	intel_uncore_forcewake_put__locked(uncore, fw);
>  	spin_unlock(&uncore->lock);
>  	intel_gt_mcr_unlock(wal->gt, flags);
> -- 
> 2.25.1
>
Nitin Gote Aug. 1, 2024, 5:40 a.m. UTC | #3
Hi Bug Team,

Issues reported on https://patchwork.freedesktop.org/series/136659/ are not related to this patch.
Please help to re-report.

Thank you,
Nitin

From: Patchwork <patchwork@emeril.freedesktop.org>
Sent: Thursday, August 1, 2024 9:31 AM
To: Gote, Nitin R <nitin.r.gote@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: ✗ Fi.CI.BAT: failure for drm/i915: Add Wa_14019789679 (rev5)

Patch Details
Series:
drm/i915: Add Wa_14019789679 (rev5)
URL:
https://patchwork.freedesktop.org/series/136659/
State:
failure
Details:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/index.html
CI Bug Log - changes from CI_DRM_15165 -> Patchwork_136659v5
Summary

FAILURE

Serious unknown changes coming with Patchwork_136659v5 absolutely need to be
verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_136659v5, please notify your bug team (I915-ci-infra@lists.freedesktop.org<mailto:I915-ci-infra@lists.freedesktop.org>) 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_136659v5/index.html

Participating hosts (41 -> 41)

Additional (2): fi-glk-j4005 bat-dg2-11
Missing (2): fi-snb-2520m fi-kbl-8809g

Possible new issues

Here are the unknown changes that may have been introduced in Patchwork_136659v5:

IGT changes
Possible regressions

  *   igt@runner@aborted:

     *   fi-glk-j4005: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/fi-glk-j4005/igt@runner@aborted.html>

New tests

New tests have been introduced between CI_DRM_15165 and Patchwork_136659v5:

New IGT tests (1)

  *   igt@i915_selftest@live@guc_hang:

     *   Statuses : 24 pass(s)
     *   Exec time: [0.62, 6.51] s

Known issues

Here are the changes found in Patchwork_136659v5 that come from known issues:

IGT changes
Issues hit

  *   igt@gem_mmap@basic:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@gem_mmap@basic.html> (i915#4083<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4083>)

  *   igt@gem_tiled_fence_blits@basic:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@gem_tiled_fence_blits@basic.html> (i915#4077<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4077>) +2 other tests skip

  *   igt@gem_tiled_pread_basic:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@gem_tiled_pread_basic.html> (i915#4079<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4079>) +1 other test skip

  *   igt@i915_pm_rps@basic-api:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@i915_pm_rps@basic-api.html> (i915#6621<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6621>)

  *   igt@kms_addfb_basic@addfb25-x-tiled-mismatch-legacy:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_addfb_basic@addfb25-x-tiled-mismatch-legacy.html> (i915#4212<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4212>) +7 other tests skip

  *   igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html> (i915#5190<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5190>)

  *   igt@kms_addfb_basic@basic-y-tiled-legacy:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_addfb_basic@basic-y-tiled-legacy.html> (i915#4215<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4215> / i915#5190<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5190>)

  *   igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html> (i915#4103<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4103> / i915#4213<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4213>) +1 other test skip

  *   igt@kms_dsc@dsc-basic:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_dsc@dsc-basic.html> (i915#3555<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555> / i915#3840<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3840>)

  *   igt@kms_force_connector_basic@force-load-detect:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_force_connector_basic@force-load-detect.html>

  *   igt@kms_force_connector_basic@prune-stale-modes:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_force_connector_basic@prune-stale-modes.html> (i915#5274<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5274>)

  *   igt@kms_pm_backlight@basic-brightness:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_pm_backlight@basic-brightness.html> (i915#5354<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5354>)

  *   igt@kms_psr@psr-sprite-plane-onoff:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_psr@psr-sprite-plane-onoff.html> (i915#1072<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1072> / i915#9732<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9732>) +3 other tests skip

  *   igt@kms_setmode@basic-clone-single-crtc:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_setmode@basic-clone-single-crtc.html> (i915#3555<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555>)

  *   igt@prime_vgem@basic-fence-flip:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@prime_vgem@basic-fence-flip.html> (i915#3708<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3708>)

  *   igt@prime_vgem@basic-fence-mmap:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@prime_vgem@basic-fence-mmap.html> (i915#3708<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3708> / i915#4077<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4077>) +1 other test skip

  *   igt@prime_vgem@basic-read:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@prime_vgem@basic-read.html> (i915#3291<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3291> / i915#3708<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3708>) +2 other tests skip

Possible fixes

  *   igt@i915_selftest@live@hangcheck:

     *   bat-adlm-1: INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15165/bat-adlm-1/igt@i915_selftest@live@hangcheck.html> (i915#9413<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9413>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-adlm-1/igt@i915_selftest@live@hangcheck.html>

{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_15165 -> Patchwork_136659v5

CI-20190529: 20190529
CI_DRM_15165: 171eab5202f1033b5f509bae5214c8d7853336eb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7950: 7950
Patchwork_136659v5: 171eab5202f1033b5f509bae5214c8d7853336eb @ git://anongit.freedesktop.org/gfx-ci/linux
Illipilli, TejasreeX Aug. 2, 2024, 9:50 a.m. UTC | #4
Hi Nitin,

https://patchwork.freedesktop.org/series/136659/ - Re-reported.

Thanks,
Tejasree

From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Gote, Nitin R
Sent: Thursday, August 1, 2024 11:10 AM
To: I915-ci-infra@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: RE: ✗ Fi.CI.BAT: failure for drm/i915: Add Wa_14019789679 (rev5)

Hi Bug Team,

Issues reported on https://patchwork.freedesktop.org/series/136659/ are not related to this patch.
Please help to re-report.

Thank you,
Nitin

From: Patchwork <patchwork@emeril.freedesktop.org<mailto:patchwork@emeril.freedesktop.org>>
Sent: Thursday, August 1, 2024 9:31 AM
To: Gote, Nitin R <nitin.r.gote@intel.com<mailto:nitin.r.gote@intel.com>>
Cc: intel-gfx@lists.freedesktop.org<mailto:intel-gfx@lists.freedesktop.org>
Subject: ✗ Fi.CI.BAT: failure for drm/i915: Add Wa_14019789679 (rev5)

Patch Details
Series:
drm/i915: Add Wa_14019789679 (rev5)
URL:
https://patchwork.freedesktop.org/series/136659/
State:
failure
Details:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/index.html
CI Bug Log - changes from CI_DRM_15165 -> Patchwork_136659v5
Summary

FAILURE

Serious unknown changes coming with Patchwork_136659v5 absolutely need to be
verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_136659v5, please notify your bug team (I915-ci-infra@lists.freedesktop.org<mailto:I915-ci-infra@lists.freedesktop.org>) 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_136659v5/index.html

Participating hosts (41 -> 41)

Additional (2): fi-glk-j4005 bat-dg2-11
Missing (2): fi-snb-2520m fi-kbl-8809g

Possible new issues

Here are the unknown changes that may have been introduced in Patchwork_136659v5:

IGT changes
Possible regressions

  *   igt@runner@aborted:

     *   fi-glk-j4005: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/fi-glk-j4005/igt@runner@aborted.html>

New tests

New tests have been introduced between CI_DRM_15165 and Patchwork_136659v5:

New IGT tests (1)

  *   igt@i915_selftest@live@guc_hang:

     *   Statuses : 24 pass(s)
     *   Exec time: [0.62, 6.51] s

Known issues

Here are the changes found in Patchwork_136659v5 that come from known issues:

IGT changes
Issues hit

  *   igt@gem_mmap@basic:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@gem_mmap@basic.html> (i915#4083<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4083>)

  *   igt@gem_tiled_fence_blits@basic:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@gem_tiled_fence_blits@basic.html> (i915#4077<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4077>) +2 other tests skip

  *   igt@gem_tiled_pread_basic:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@gem_tiled_pread_basic.html> (i915#4079<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4079>) +1 other test skip

  *   igt@i915_pm_rps@basic-api:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@i915_pm_rps@basic-api.html> (i915#6621<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6621>)

  *   igt@kms_addfb_basic@addfb25-x-tiled-mismatch-legacy:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_addfb_basic@addfb25-x-tiled-mismatch-legacy.html> (i915#4212<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4212>) +7 other tests skip

  *   igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html> (i915#5190<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5190>)

  *   igt@kms_addfb_basic@basic-y-tiled-legacy:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_addfb_basic@basic-y-tiled-legacy.html> (i915#4215<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4215> / i915#5190<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5190>)

  *   igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html> (i915#4103<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4103> / i915#4213<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4213>) +1 other test skip

  *   igt@kms_dsc@dsc-basic:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_dsc@dsc-basic.html> (i915#3555<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555> / i915#3840<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3840>)

  *   igt@kms_force_connector_basic@force-load-detect:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_force_connector_basic@force-load-detect.html>

  *   igt@kms_force_connector_basic@prune-stale-modes:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_force_connector_basic@prune-stale-modes.html> (i915#5274<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5274>)

  *   igt@kms_pm_backlight@basic-brightness:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_pm_backlight@basic-brightness.html> (i915#5354<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5354>)

  *   igt@kms_psr@psr-sprite-plane-onoff:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_psr@psr-sprite-plane-onoff.html> (i915#1072<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1072> / i915#9732<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9732>) +3 other tests skip

  *   igt@kms_setmode@basic-clone-single-crtc:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@kms_setmode@basic-clone-single-crtc.html> (i915#3555<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555>)

  *   igt@prime_vgem@basic-fence-flip:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@prime_vgem@basic-fence-flip.html> (i915#3708<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3708>)

  *   igt@prime_vgem@basic-fence-mmap:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@prime_vgem@basic-fence-mmap.html> (i915#3708<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3708> / i915#4077<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4077>) +1 other test skip

  *   igt@prime_vgem@basic-read:

     *   bat-dg2-11: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-dg2-11/igt@prime_vgem@basic-read.html> (i915#3291<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3291> / i915#3708<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3708>) +2 other tests skip

Possible fixes

  *   igt@i915_selftest@live@hangcheck:

     *   bat-adlm-1: INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15165/bat-adlm-1/igt@i915_selftest@live@hangcheck.html> (i915#9413<https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9413>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_136659v5/bat-adlm-1/igt@i915_selftest@live@hangcheck.html>

{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_15165 -> Patchwork_136659v5

CI-20190529: 20190529
CI_DRM_15165: 171eab5202f1033b5f509bae5214c8d7853336eb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7950: 7950
Patchwork_136659v5: 171eab5202f1033b5f509bae5214c8d7853336eb @ git://anongit.freedesktop.org/gfx-ci/linux
Andi Shyti Aug. 5, 2024, 11:03 a.m. UTC | #5
Hi Nitin,

On Wed, Jul 31, 2024 at 09:26:14PM +0530, Nitin Gote wrote:
> Wa_14019789679 implementation for MTL, ARL and DG2.
> 
> v2: Corrected condition
> 
> v3:
>    - Fix indentation (Jani Nikula)
>    - dword size should be 0x1 and
>      initialize dword to 0 instead of MI_NOOP (Tejas)
>    - Use IS_GFX_GT_IP_RANGE() (Tejas)
> 
> v4:
>    - 3DSTATE_MESH_CONTROL instruction is 3 dwords long
>      Align with dword size. (Roper, Matthew D)
>    - Add RCS engine check. (Tejas)
> 
> Bspec: 47083
> 
> Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>

Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>

Even though the CI failures don't look related, I submitted
another round of test to be more paranoiac, as I saw one failure
in MTL.

I will merge it afterwards.

Thanks,
Andi
Andi Shyti Aug. 5, 2024, 10 p.m. UTC | #6
Hi Nitin,

On Wed, Jul 31, 2024 at 09:26:14PM +0530, Nitin Gote wrote:
> Wa_14019789679 implementation for MTL, ARL and DG2.
> 
> v2: Corrected condition
> 
> v3:
>    - Fix indentation (Jani Nikula)
>    - dword size should be 0x1 and
>      initialize dword to 0 instead of MI_NOOP (Tejas)
>    - Use IS_GFX_GT_IP_RANGE() (Tejas)
> 
> v4:
>    - 3DSTATE_MESH_CONTROL instruction is 3 dwords long
>      Align with dword size. (Roper, Matthew D)
>    - Add RCS engine check. (Tejas)
> 
> Bspec: 47083
> 
> Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>

merged to drm-intel-gt-next.

I also added the "gt" tag after "drm/i915" in the title.

Thanks,
Andi
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
index 2bd8d98d2110..5394bc7d4daf 100644
--- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
+++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
@@ -220,6 +220,7 @@ 
 #define GFX_OP_DESTBUFFER_INFO	 ((0x3<<29)|(0x1d<<24)|(0x8e<<16)|1)
 #define GFX_OP_DRAWRECT_INFO     ((0x3<<29)|(0x1d<<24)|(0x80<<16)|(0x3))
 #define GFX_OP_DRAWRECT_INFO_I965  ((0x7900<<16)|0x2)
+#define CMD_3DSTATE_MESH_CONTROL ((0x3 << 29) | (0x3 << 27) | (0x0 << 24) | (0x77 << 16) | (0x3))
 
 #define XY_CTRL_SURF_INSTR_SIZE		5
 #define MI_FLUSH_DW_SIZE		3
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index 09a287c1aedd..bfe6d8fc820f 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -974,7 +974,12 @@  int intel_engine_emit_ctx_wa(struct i915_request *rq)
 	if (ret)
 		return ret;
 
-	cs = intel_ring_begin(rq, (wal->count * 2 + 2));
+	if ((IS_GFX_GT_IP_RANGE(rq->engine->gt, IP_VER(12, 70), IP_VER(12, 74)) ||
+	     IS_DG2(rq->i915)) && rq->engine->class == RENDER_CLASS)
+		cs = intel_ring_begin(rq, (wal->count * 2 + 6));
+	else
+		cs = intel_ring_begin(rq, (wal->count * 2 + 2));
+
 	if (IS_ERR(cs))
 		return PTR_ERR(cs);
 
@@ -1004,6 +1009,15 @@  int intel_engine_emit_ctx_wa(struct i915_request *rq)
 	}
 	*cs++ = MI_NOOP;
 
+	/* Wa_14019789679 */
+	if ((IS_GFX_GT_IP_RANGE(rq->engine->gt, IP_VER(12, 70), IP_VER(12, 74)) ||
+	     IS_DG2(rq->i915)) && rq->engine->class == RENDER_CLASS) {
+		*cs++ = CMD_3DSTATE_MESH_CONTROL;
+		*cs++ = 0;
+		*cs++ = 0;
+		*cs++ = MI_NOOP;
+	}
+
 	intel_uncore_forcewake_put__locked(uncore, fw);
 	spin_unlock(&uncore->lock);
 	intel_gt_mcr_unlock(wal->gt, flags);