diff options
author | Oscar Mateo <oscar.mateo@intel.com> | 2018-05-08 17:29:23 -0400 |
---|---|---|
committer | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2018-05-11 08:53:20 -0400 |
commit | cc38cae7c4e9350c93aa2da506086415fecd6e4a (patch) | |
tree | f4463bcba92b8003574249bc4bb2c9df2ed34c7c /drivers/gpu/drm/i915/intel_workarounds.c | |
parent | ca6acc25250a1dc101c5a541b4f58bcc1dd65de5 (diff) |
drm/i915/icl: Introduce initial Icelake Workarounds
Inherit workarounds from previous platforms that are still valid for
Icelake.
v2: GEN7_ROW_CHICKEN2 is masked
v3:
- Since it has been fixed already in upstream, removed the TODO
comment about WA_SET_BIT for WaInPlaceDecompressionHang.
- Squashed with this patch:
drm/i915/icl: add icelake_init_clock_gating()
from Paulo Zanoni <paulo.r.zanoni@intel.com>
- Squashed with this patch:
drm/i915/icl: WaForceEnableNonCoherent
from Oscar Mateo <oscar.mateo@intel.com>
- WaPushConstantDereferenceHoldDisable is now Wa_1604370585 and
applies to B0 as well.
- WaPipeControlBefore3DStateSamplePattern WABB was being applied
to ICL incorrectly.
v4:
- Wrap the commit message
- s/dev_priv/p to please checkpatch
v5: Rebased on top of the WA refactoring
v6: Rebased on top of further whitelist registers refactoring (Michel)
v7: Added WaRsForcewakeAddDelayForAck
v8: s/ICL_HDC_CHICKEN0/ICL_HDC_MODE (Mika)
v9:
- C, not lisp (Chris)
- WaIncreaseDefaultTLBEntries is the same for GEN > 9_LP (Tvrtko)
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tomasz Lis <tomasz.lis@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1525814984-20039-2-git-send-email-oscar.mateo@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_workarounds.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_workarounds.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_workarounds.c b/drivers/gpu/drm/i915/intel_workarounds.c index ec9d340fcb00..73d02d3785d4 100644 --- a/drivers/gpu/drm/i915/intel_workarounds.c +++ b/drivers/gpu/drm/i915/intel_workarounds.c | |||
@@ -441,6 +441,27 @@ static int cnl_ctx_workarounds_init(struct drm_i915_private *dev_priv) | |||
441 | return 0; | 441 | return 0; |
442 | } | 442 | } |
443 | 443 | ||
444 | static int icl_ctx_workarounds_init(struct drm_i915_private *dev_priv) | ||
445 | { | ||
446 | /* Wa_1604370585:icl (pre-prod) | ||
447 | * Formerly known as WaPushConstantDereferenceHoldDisable | ||
448 | */ | ||
449 | if (IS_ICL_REVID(dev_priv, ICL_REVID_A0, ICL_REVID_B0)) | ||
450 | WA_SET_BIT_MASKED(GEN7_ROW_CHICKEN2, | ||
451 | PUSH_CONSTANT_DEREF_DISABLE); | ||
452 | |||
453 | /* WaForceEnableNonCoherent:icl | ||
454 | * This is not the same workaround as in early Gen9 platforms, where | ||
455 | * lacking this could cause system hangs, but coherency performance | ||
456 | * overhead is high and only a few compute workloads really need it | ||
457 | * (the register is whitelisted in hardware now, so UMDs can opt in | ||
458 | * for coherency if they have a good reason). | ||
459 | */ | ||
460 | WA_SET_BIT_MASKED(ICL_HDC_MODE, HDC_FORCE_NON_COHERENT); | ||
461 | |||
462 | return 0; | ||
463 | } | ||
464 | |||
444 | int intel_ctx_workarounds_init(struct drm_i915_private *dev_priv) | 465 | int intel_ctx_workarounds_init(struct drm_i915_private *dev_priv) |
445 | { | 466 | { |
446 | int err = 0; | 467 | int err = 0; |
@@ -465,6 +486,8 @@ int intel_ctx_workarounds_init(struct drm_i915_private *dev_priv) | |||
465 | err = cfl_ctx_workarounds_init(dev_priv); | 486 | err = cfl_ctx_workarounds_init(dev_priv); |
466 | else if (IS_CANNONLAKE(dev_priv)) | 487 | else if (IS_CANNONLAKE(dev_priv)) |
467 | err = cnl_ctx_workarounds_init(dev_priv); | 488 | err = cnl_ctx_workarounds_init(dev_priv); |
489 | else if (IS_ICELAKE(dev_priv)) | ||
490 | err = icl_ctx_workarounds_init(dev_priv); | ||
468 | else | 491 | else |
469 | MISSING_CASE(INTEL_GEN(dev_priv)); | 492 | MISSING_CASE(INTEL_GEN(dev_priv)); |
470 | if (err) | 493 | if (err) |
@@ -663,6 +686,21 @@ static void cnl_gt_workarounds_apply(struct drm_i915_private *dev_priv) | |||
663 | _MASKED_BIT_ENABLE(GEN9_FFSC_PERCTX_PREEMPT_CTRL)); | 686 | _MASKED_BIT_ENABLE(GEN9_FFSC_PERCTX_PREEMPT_CTRL)); |
664 | } | 687 | } |
665 | 688 | ||
689 | static void icl_gt_workarounds_apply(struct drm_i915_private *dev_priv) | ||
690 | { | ||
691 | /* This is not an Wa. Enable for better image quality */ | ||
692 | I915_WRITE(_3D_CHICKEN3, | ||
693 | _MASKED_BIT_ENABLE(_3D_CHICKEN3_AA_LINE_QUALITY_FIX_ENABLE)); | ||
694 | |||
695 | /* WaInPlaceDecompressionHang:icl */ | ||
696 | I915_WRITE(GEN9_GAMT_ECO_REG_RW_IA, I915_READ(GEN9_GAMT_ECO_REG_RW_IA) | | ||
697 | GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS); | ||
698 | |||
699 | /* WaPipelineFlushCoherentLines:icl */ | ||
700 | I915_WRITE(GEN8_L3SQCREG4, I915_READ(GEN8_L3SQCREG4) | | ||
701 | GEN8_LQSC_FLUSH_COHERENT_LINES); | ||
702 | } | ||
703 | |||
666 | void intel_gt_workarounds_apply(struct drm_i915_private *dev_priv) | 704 | void intel_gt_workarounds_apply(struct drm_i915_private *dev_priv) |
667 | { | 705 | { |
668 | if (INTEL_GEN(dev_priv) < 8) | 706 | if (INTEL_GEN(dev_priv) < 8) |
@@ -683,6 +721,8 @@ void intel_gt_workarounds_apply(struct drm_i915_private *dev_priv) | |||
683 | cfl_gt_workarounds_apply(dev_priv); | 721 | cfl_gt_workarounds_apply(dev_priv); |
684 | else if (IS_CANNONLAKE(dev_priv)) | 722 | else if (IS_CANNONLAKE(dev_priv)) |
685 | cnl_gt_workarounds_apply(dev_priv); | 723 | cnl_gt_workarounds_apply(dev_priv); |
724 | else if (IS_ICELAKE(dev_priv)) | ||
725 | icl_gt_workarounds_apply(dev_priv); | ||
686 | else | 726 | else |
687 | MISSING_CASE(INTEL_GEN(dev_priv)); | 727 | MISSING_CASE(INTEL_GEN(dev_priv)); |
688 | } | 728 | } |
@@ -761,6 +801,10 @@ static void cnl_whitelist_build(struct whitelist *w) | |||
761 | whitelist_reg(w, GEN8_CS_CHICKEN1); | 801 | whitelist_reg(w, GEN8_CS_CHICKEN1); |
762 | } | 802 | } |
763 | 803 | ||
804 | static void icl_whitelist_build(struct whitelist *w) | ||
805 | { | ||
806 | } | ||
807 | |||
764 | static struct whitelist *whitelist_build(struct intel_engine_cs *engine, | 808 | static struct whitelist *whitelist_build(struct intel_engine_cs *engine, |
765 | struct whitelist *w) | 809 | struct whitelist *w) |
766 | { | 810 | { |
@@ -789,6 +833,8 @@ static struct whitelist *whitelist_build(struct intel_engine_cs *engine, | |||
789 | cfl_whitelist_build(w); | 833 | cfl_whitelist_build(w); |
790 | else if (IS_CANNONLAKE(i915)) | 834 | else if (IS_CANNONLAKE(i915)) |
791 | cnl_whitelist_build(w); | 835 | cnl_whitelist_build(w); |
836 | else if (IS_ICELAKE(i915)) | ||
837 | icl_whitelist_build(w); | ||
792 | else | 838 | else |
793 | MISSING_CASE(INTEL_GEN(i915)); | 839 | MISSING_CASE(INTEL_GEN(i915)); |
794 | 840 | ||