diff mbox series

[v2] drm/i915/display/tgl+: Implement new PLL programming step

Message ID 20220216134059.25348-1-jose.souza@intel.com (mailing list archive)
State New, archived
Headers show
Series [v2] drm/i915/display/tgl+: Implement new PLL programming step | expand

Commit Message

Souza, Jose Feb. 16, 2022, 1:40 p.m. UTC
A new programming step was added to combo and TC PLL sequences.
If override_AFC_startup is set in VBT, driver should overwrite
AFC_startup value to 0x0 or 0x7 in PLL's div0 register.

The current understating is that only TGL needs this and all other
display 12 and newer platforms will have a older VBT or a newer VBT
with override_AFC_startup set to 0 but in any case there is a
drm_warn_on_once() to let us know if this is not true.

v2:
- specification updated, now AFC can be override to 0x0 or 0x7
- not using a union for div0 (Imre)
- following previous wrong vbt naming: bits instead of bytes (Imre)

BSpec: 49204
BSpec: 20122
BSpec: 49968
BSpec: 71360
Cc: Imre Deak <imre.deak@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com> # v1
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c     |  6 +++
 drivers/gpu/drm/i915/display/intel_display.c  |  1 +
 .../drm/i915/display/intel_display_debugfs.c  |  1 +
 drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 44 +++++++++++++------
 drivers/gpu/drm/i915/display/intel_dpll_mgr.h |  3 ++
 drivers/gpu/drm/i915/display/intel_vbt_defs.h |  8 ++++
 drivers/gpu/drm/i915/i915_drv.h               |  3 ++
 drivers/gpu/drm/i915/i915_reg.h               | 12 +++++
 8 files changed, 65 insertions(+), 13 deletions(-)

Comments

Souza, Jose Feb. 17, 2022, 4:25 p.m. UTC | #1
On Thu, 2022-02-17 at 13:32 +0000, Patchwork wrote:
Patch Details
Series: drm/i915/display/tgl+: Implement new PLL programming step (rev3)
URL:    https://patchwork.freedesktop.org/series/99867/
State:  failure
Details:        https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/index.html
CI Bug Log - changes from CI_DRM_11238_full -> Patchwork_22296_full
Summary

FAILURE

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

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_22296_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.

Participating hosts (12 -> 11)

Missing (1): shard-dg1

Possible new issues

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

IGT changes
Possible regressions

  *   igt@kms_big_fb@x-tiled-8bpp-rotate-180:

     *   shard-glk: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-glk4/igt@kms_big_fb@x-tiled-8bpp-rotate-180.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-glk3/igt@kms_big_fb@x-tiled-8bpp-rotate-180.html>
  *   igt@prime_self_import@export-vs-gem_close-race:

     *   shard-snb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-snb5/igt@prime_self_import@export-vs-gem_close-race.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-snb4/igt@prime_self_import@export-vs-gem_close-race.html>

None of those failures are related to this changes.

Known issues

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

IGT changes
Issues hit

  *   igt@gem_exec_balancer@parallel-balancer:

     *   shard-iclb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-iclb4/igt@gem_exec_balancer@parallel-balancer.html> -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb3/igt@gem_exec_balancer@parallel-balancer.html> ([i915#4525])
  *   igt@gem_exec_capture@pi@bcs0:

     *   shard-skl: NOTRUN -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl4/igt@gem_exec_capture@pi@bcs0.html> ([i915#4547])
  *   igt@gem_exec_fair@basic-flow@rcs0:

     *   shard-tglb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-tglb8/igt@gem_exec_fair@basic-flow@rcs0.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-tglb5/igt@gem_exec_fair@basic-flow@rcs0.html> (i915#2842<https://gitlab.freedesktop.org/drm/intel/issues/2842>)
  *   igt@gem_exec_fair@basic-throttle@rcs0:

     *   shard-iclb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-iclb7/igt@gem_exec_fair@basic-throttle@rcs0.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb4/igt@gem_exec_fair@basic-throttle@rcs0.html> (i915#2849<https://gitlab.freedesktop.org/drm/intel/issues/2849>)
  *   igt@gem_flink_race@flink_name:

     *   shard-skl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-skl7/igt@gem_flink_race@flink_name.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl7/igt@gem_flink_race@flink_name.html> (i915#1982<https://gitlab.freedesktop.org/drm/intel/issues/1982>)
  *   igt@gem_lmem_swapping@heavy-verify-random:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl1/igt@gem_lmem_swapping@heavy-verify-random.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / [i915#4613]) +3 similar issues

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb6/igt@gem_lmem_swapping@heavy-verify-random.html> ([i915#4613])

  *   igt@gem_lmem_swapping@random-engines:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl3/igt@gem_lmem_swapping@random-engines.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / [i915#4613])
  *   igt@gem_pwrite@basic-exhaustion:

     *   shard-skl: NOTRUN -> WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl10/igt@gem_pwrite@basic-exhaustion.html> (i915#2658<https://gitlab.freedesktop.org/drm/intel/issues/2658>)
  *   igt@gem_render_copy@y-tiled-mc-ccs-to-vebox-yf-tiled:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb6/igt@gem_render_copy@y-tiled-mc-ccs-to-vebox-yf-tiled.html> ([i915#768])
  *   igt@gem_userptr_blits@unsync-overlap:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb6/igt@gem_userptr_blits@unsync-overlap.html> (i915#3297<https://gitlab.freedesktop.org/drm/intel/issues/3297>)
  *   igt@gen7_exec_parse@chained-batch:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb6/igt@gen7_exec_parse@chained-batch.html> (fdo#109289<https://bugs.freedesktop.org/show_bug.cgi?id=109289>)
  *   igt@i915_pm_dc@dc6-dpms:

     *   shard-skl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl8/igt@i915_pm_dc@dc6-dpms.html> ([i915#454])
  *   igt@i915_selftest@live@hangcheck:

     *   shard-snb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-snb4/igt@i915_selftest@live@hangcheck.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-snb2/igt@i915_selftest@live@hangcheck.html> (i915#3921<https://gitlab.freedesktop.org/drm/in>)
  *   igt@kms_big_fb@linear-16bpp-rotate-90:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb6/igt@kms_big_fb@linear-16bpp-rotate-90.html> (fdo#110725<https://bugs.freedesktop.org/show_bug.cgi?id=110725> / fdo#111614<https://bugs.freedesktop.org/show_bug.cgi?id=111614>) +1 similar issue
  *   igt@kms_big_fb@x-tiled-32bpp-rotate-180:

     *   shard-glk: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-glk8/igt@kms_big_fb@x-tiled-32bpp-rotate-180.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-glk9/igt@kms_big_fb@x-tiled-32bpp-rotate-180.html> (i915#118<https://gitlab.freedesktop.org/drm/intel/issues/118>)
  *   igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip:

     *   shard-kbl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-kbl3/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#3777<https://gitlab.freedesktop.org/drm/intel/issues/3777>)
  *   igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-hflip:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl4/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-hflip.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#3777<https://gitlab.freedesktop.org/drm/intel/issues/3777>) +2 similar issues
  *   igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-async-flip:

     *   shard-skl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl10/igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-async-flip.html> (i915#3743<https://gitlab.freedesktop.org/drm/intel/issues/3743>)
  *   igt@kms_big_fb@yf-tiled-16bpp-rotate-270:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-tglb1/igt@kms_big_fb@yf-tiled-16bpp-rotate-270.html> (fdo#111615<https://bugs.freedesktop.org/show_bug.cgi?id=111615>)
  *   igt@kms_big_fb@yf-tiled-64bpp-rotate-90:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb6/igt@kms_big_fb@yf-tiled-64bpp-rotate-90.html> (fdo#110723<https://bugs.freedesktop.org/show_bug.cgi?id=110723>) +1 similar issue
  *   igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl10/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#3777<https://gitlab.freedesktop.org/drm/intel/issues/3777>) +5 similar issues
  *   igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl3/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#3886<https://gitlab.freedesktop.org/drm/intel/issues/3886>) +1 similar issue
  *   igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_mc_ccs:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl3/igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_mc_ccs.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#3886<https://gitlab.freedesktop.org/drm/intel/issues/3886>) +7 similar issues
  *   igt@kms_ccs@pipe-b-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc:

     *   shard-glk: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-glk8/igt@kms_ccs@pipe-b-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#3886<https://gitlab.freedesktop.org/drm/intel/issues/3886>)
  *   igt@kms_ccs@pipe-c-crc-primary-rotation-180-y_tiled_gen12_mc_ccs:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb3/igt@kms_ccs@pipe-c-crc-primary-rotation-180-y_tiled_gen12_mc_ccs.html> (fdo#109278<https://bugs.freedesktop.org/show_bug.cgi?id=109278> / i915#3886<https://gitlab.freedesktop.org/drm/intel/issues/3886>) +1 similar issue
  *   igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs:

     *   shard-kbl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-kbl3/igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#3886<https://gitlab.freedesktop.org/drm/intel/issues/3886>) +1 similar issue
  *   igt@kms_chamelium@dp-crc-multiple:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl3/igt@kms_chamelium@dp-crc-multiple.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / fdo#111827<https://bugs.freedesktop.org/show_bug.cgi?id=111827>) +16 similar issues
  *   igt@kms_chamelium@dp-hpd-enable-disable-mode:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb6/igt@kms_chamelium@dp-hpd-enable-disable-mode.html> (fdo#109284<https://bugs.freedesktop.org/show_bug.cgi?id=109284> / fdo#111827<https://bugs.freedesktop.org/show_bug.cgi?id=111827>)
  *   igt@kms_chamelium@vga-hpd-enable-disable-mode:

     *   shard-kbl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-kbl3/igt@kms_chamelium@vga-hpd-enable-disable-mode.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / fdo#111827<https://bugs.freedesktop.org/show_bug.cgi?id=111827>)
  *   igt@kms_color@pipe-d-ctm-blue-to-red:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb6/igt@kms_color@pipe-d-ctm-blue-to-red.html> (fdo#109278<https://bugs.freedesktop.org/show_bug.cgi?id=109278> / i915#1149<https://gitlab.freedesktop.org/drm/intel/issues/1149>)
  *   igt@kms_color_chamelium@pipe-a-ctm-limited-range:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl3/igt@kms_color_chamelium@pipe-a-ctm-limited-range.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / fdo#111827<https://bugs.freedesktop.org/show_bug.cgi?id=111827>) +1 similar issue
  *   igt@kms_cursor_crc@pipe-a-cursor-128x128-offscreen:

     *   shard-iclb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-iclb8/igt@kms_cursor_crc@pipe-a-cursor-128x128-offscreen.html> -> DMESG-FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb7/igt@kms_cursor_crc@pipe-a-cursor-128x128-offscreen.html> (i915#1888<https://gitlab.freedesktop.org/drm/intel/issues/1888>)
  *   igt@kms_cursor_crc@pipe-c-cursor-32x10-onscreen:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-tglb1/igt@kms_cursor_crc@pipe-c-cursor-32x10-onscreen.html> (i915#3359<https://gitlab.freedesktop.org/drm/intel/issues/3359>)
  *   igt@kms_cursor_crc@pipe-d-cursor-32x10-offscreen:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb6/igt@kms_cursor_crc@pipe-d-cursor-32x10-offscreen.html> (fdo#109278<https://bugs.freedesktop.org/show_bug.cgi?id=109278>) +6 similar issues
  *   igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb3/igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic.html> (fdo#109274<https://bugs.freedesktop.org/show_bug.cgi?id=109274> / fdo#109278<https://bugs.freedesktop.org/show_bug.cgi?id=109278>)
  *   igt@kms_flip@2x-flip-vs-modeset-vs-hang:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb6/igt@kms_flip@2x-flip-vs-modeset-vs-hang.html> (fdo#109274<https://bugs.freedesktop.org/show_bug.cgi?id=109274>)
  *   igt@kms_flip@flip-vs-expired-vblank-interruptible@b-dp1:

     *   shard-apl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-apl1/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-dp1.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl8/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-dp1.html> ([i915#79])
  *   igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:

     *   shard-kbl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-kbl3/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-kbl1/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html> (i915#180<https://gitlab.freedesktop.org/drm/intel/issues/180>) +8 similar issues
  *   igt@kms_flip@flip-vs-suspend@c-dp1:

     *   shard-apl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-apl1/igt@kms_flip@flip-vs-suspend@c-dp1.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl2/igt@kms_flip@flip-vs-suspend@c-dp1.html> (i915#180<https://gitlab.freedesktop.org/drm/intel/issues/180>) +2 similar issues
  *   igt@kms_flip@plain-flip-ts-check-interruptible@b-edp1:

     *   shard-skl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-skl10/igt@kms_flip@plain-flip-ts-check-interruptible@b-edp1.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl3/igt@kms_flip@plain-flip-ts-check-interruptible@b-edp1.html> (i915#2122<https://gitlab.freedesktop.org/drm/intel/issues/2122>)
  *   igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile-upscaling:

     *   shard-skl: NOTRUN -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl8/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile-upscaling.html> (i915#3701<https://gitlab.freedesktop.org/drm/intel/issues/3701>)
  *   igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-indfb-pgflip-blt:

     *   shard-kbl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-kbl3/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-indfb-pgflip-blt.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271>) +26 similar issues
  *   igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-spr-indfb-draw-blt:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb3/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-spr-indfb-draw-blt.html> (fdo#109280<https://bugs.freedesktop.org/show_bug.cgi?id=109280>) +4 similar issues
  *   igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-spr-indfb-draw-mmap-gtt:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-tglb1/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-spr-indfb-draw-mmap-gtt.html> (fdo#109280<https://bugs.freedesktop.org/show_bug.cgi?id=109280> / fdo#111825<https://bugs.freedesktop.org/show_bug.cgi?id=111825>) +1 similar issue
  *   igt@kms_hdr@static-toggle-dpms:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb6/igt@kms_hdr@static-toggle-dpms.html> (i915#1187<https://gitlab.freedesktop.org/drm/intel/issues/1187>)
  *   igt@kms_pipe_crc_basic@read-crc-pipe-d-frame-sequence:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl10/igt@kms_pipe_crc_basic@read-crc-pipe-d-frame-sequence.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / [i915#533])
  *   igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d:

     *   shard-kbl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-kbl3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / [i915#533])
  *   igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:

     *   shard-skl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl1/igt@kms_plane_alpha_blend@pipe-c-alpha-7efc.html> (fdo#108145<https://bugs.freedesktop.org/show_bug.cgi?id=108145> / i915#265<https://gitlab.freedesktop.org/drm/intel/issues/265>)

     *   shard-apl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl3/igt@kms_plane_alpha_blend@pipe-c-alpha-7efc.html> (fdo#108145<https://bugs.freedesktop.org/show_bug.cgi?id=108145> / i915#265<https://gitlab.freedesktop.org/drm/intel/issues/265>)

  *   igt@kms_psr2_sf@overlay-plane-update-continuous-sf:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl3/igt@kms_psr2_sf@overlay-plane-update-continuous-sf.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / [i915#658])
  *   igt@kms_psr@psr2_cursor_render:

     *   shard-iclb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-iclb2/igt@kms_psr@psr2_cursor_render.html> -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb8/igt@kms_psr@psr2_cursor_render.html> (fdo#109441<https://bugs.freedesktop.org/show_bug.cgi?id=109441>)
  *   igt@kms_rotation_crc@primary-y-tiled-reflect-x-180:

     *   shard-glk: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-glk8/igt@kms_rotation_crc@primary-y-tiled-reflect-x-180.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271>) +2 similar issues
  *   igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-a:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl1/igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-a.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271>) +245 similar issues
  *   igt@perf@polling-small-buf:

     *   shard-skl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl10/igt@perf@polling-small-buf.html> (i915#1722<https://gitlab.freedesktop.org/drm/intel/issues/1722>)
  *   igt@prime_nv_pcopy@test3_5:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl3/igt@prime_nv_pcopy@test3_5.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271>) +38 similar issues
  *   igt@prime_nv_test@nv_write_i915_gtt_mmap_read:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb6/igt@prime_nv_test@nv_write_i915_gtt_mmap_read.html> (fdo#109291<https://bugs.freedesktop.org/show_bug.cgi?id=109291>)
  *   igt@sysfs_clients@fair-3:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl3/igt@sysfs_clients@fair-3.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#2994<https://gitlab.freedesktop.org/drm/intel/issues/2994>)
  *   igt@sysfs_clients@pidname:

     *   shard-kbl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-kbl3/igt@sysfs_clients@pidname.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#2994<https://gitlab.freedesktop.org/drm/intel/issues/2994>)
  *   igt@sysfs_clients@sema-10:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl10/igt@sysfs_clients@sema-10.html> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271> / i915#2994<https://gitlab.freedesktop.org/drm/intel/issues/2994>) +2 similar issues

Possible fixes

  *   igt@gem_ctx_isolation@preservation-s3@bcs0:

     *   shard-apl: DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-apl2/igt@gem_ctx_isolation@preservation-s3@bcs0.html> (i915#180<https://gitlab.freedesktop.org/drm/intel/issues/180>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl4/igt@gem_ctx_isolation@preservation-s3@bcs0.html> +1 similar issue
  *   igt@gem_eio@unwedge-stress:

     *   shard-iclb: TIMEOUT<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-iclb4/igt@gem_eio@unwedge-stress.html> (i915#2481<https://gitlab.freedesktop.org/drm/intel/issues/2481> / i915#3070<https://gitlab.freedesktop.org/drm/intel/issues/3070>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb3/igt@gem_eio@unwedge-stress.html>
  *   igt@gem_exec_whisper@basic-normal:

     *   shard-glk: DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-glk7/igt@gem_exec_whisper@basic-normal.html> (i915#118<https://gitlab.freedesktop.org/drm/intel/issues/118>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-glk2/igt@gem_exec_whisper@basic-normal.html>
  *   igt@gen9_exec_parse@allowed-all:

     *   shard-glk: DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-glk5/igt@gen9_exec_parse@allowed-all.html> (i915#1436<https://gitlab.freedesktop.org/drm/intel/issues/1436> / [i915#716]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-glk8/igt@gen9_exec_parse@allowed-all.html>
  *   igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:

     *   shard-skl: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-skl8/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html> (i915#2346<https://gitlab.freedesktop.org/drm/intel/issues/2346>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl8/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html>
  *   igt@kms_flip@flip-vs-expired-vblank-interruptible@a-hdmi-a2:

     *   shard-glk: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-glk8/igt@kms_flip@flip-vs-expired-vblank-interruptible@a-hdmi-a2.html> ([i915#79]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-glk7/igt@kms_flip@flip-vs-expired-vblank-interruptible@a-hdmi-a2.html> +1 similar issue
  *   igt@kms_flip@plain-flip-ts-check@c-edp1:

     *   shard-skl: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-skl7/igt@kms_flip@plain-flip-ts-check@c-edp1.html> (i915#2122<https://gitlab.freedesktop.org/drm/intel/issues/2122>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl7/igt@kms_flip@plain-flip-ts-check@c-edp1.html>
  *   igt@kms_frontbuffer_tracking@psr-suspend:

     *   shard-skl: INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-skl4/igt@kms_frontbuffer_tracking@psr-suspend.html> (i915#123<https://gitlab.freedesktop.org/drm/intel/issues/123>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl4/igt@kms_frontbuffer_tracking@psr-suspend.html>
  *   igt@kms_hdr@bpc-switch-suspend:

     *   shard-skl: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-skl1/igt@kms_hdr@bpc-switch-suspend.html> (i915#1188<https://gitlab.freedesktop.org/drm/intel/issues/1188>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-skl9/igt@kms_hdr@bpc-switch-suspend.html>
  *   igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes:

     *   shard-kbl: DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-kbl6/igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes.html> (i915#180<https://gitlab.freedesktop.org/drm/intel/issues/180>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-kbl3/igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes.html>
  *   igt@kms_psr@psr2_cursor_plane_move:

     *   shard-iclb: SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-iclb3/igt@kms_psr@psr2_cursor_plane_move.html> (fdo#109441<https://bugs.freedesktop.org/show_bug.cgi?id=109441>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html> +2 similar issues
  *   igt@kms_setmode@basic:

     *   shard-glk: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-glk4/igt@kms_setmode@basic.html> (i915#31<https://gitlab.freedesktop.org/drm/intel/issues/31>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-glk2/igt@kms_setmode@basic.html>

Warnings

  *   igt@gem_exec_balancer@parallel-bb-first:

     *   shard-iclb: SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-iclb6/igt@gem_exec_balancer@parallel-bb-first.html> ([i915#4525]) -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb4/igt@gem_exec_balancer@parallel-bb-first.html> ([i915#5076])
  *   igt@gem_exec_balancer@parallel-out-fence:

     *   shard-iclb: DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-iclb1/igt@gem_exec_balancer@parallel-out-fence.html> ([i915#5076]) -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb6/igt@gem_exec_balancer@parallel-out-fence.html> ([i915#4525])
  *   igt@i915_pm_rc6_residency@rc6-idle:

     *   shard-iclb: WARN<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-iclb3/igt@i915_pm_rc6_residency@rc6-idle.html> (i915#1804<https://gitlab.freedesktop.org/drm/intel/issues/1804> / i915#2684<https://gitlab.freedesktop.org/drm/intel/issues/2684>) -> WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb2/igt@i915_pm_rc6_residency@rc6-idle.html> (i915#2684<https://gitlab.freedesktop.org/drm/intel/issues/2684>)
  *   igt@kms_flip@flip-vs-suspend-interruptible@c-dp1:

     *   shard-kbl: INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-kbl3/igt@kms_flip@flip-vs-suspend-interruptible@c-dp1.html> ([i915#636]) -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-kbl1/igt@kms_flip@flip-vs-suspend-interruptible@c-dp1.html> (i915#180<https://gitlab.freedesktop.org/drm/intel/issues/180>)
  *   igt@kms_psr2_su@page_flip-nv12:

     *   shard-iclb: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-iclb2/igt@kms_psr2_su@page_flip-nv12.html> ([i915#4148]) -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-iclb1/igt@kms_psr2_su@page_flip-nv12.html> (fdo#109642<https://bugs.freedesktop.org/show_bug.cgi?id=109642> / fdo#111068<https://bugs.freedesktop.org/show_bug.cgi?id=111068> / [i915#658])
  *   igt@runner@aborted:

     *   shard-apl: (FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-apl1/igt@runner@aborted.html>, FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-apl6/igt@runner@aborted.html>, FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-apl2/igt@runner@aborted.html>, FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-apl7/igt@runner@aborted.html>, FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-apl3/igt@runner@aborted.html>, FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-apl2/igt@runner@aborted.html>, FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11238/shard-apl2/igt@runner@aborted.html>) (i915#180<https://gitlab.freedesktop.org/drm/intel/issues/180> / i915#1814<https://gitlab.freedesktop.org/drm/intel/issues/1814> / i915#2426<https://gitlab.freedesktop.org/drm/intel/issues/2426> / i915#3002<https://gitlab.freedesktop.org/drm/intel/issues/3002> / [i915#4312]) -> (FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl6/igt@runner@aborted.html>, FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl3/igt@runner@aborted.html>, FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl2/igt@runner@aborted.html>, FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl7/igt@runner@aborted.html>, FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl2/igt@runner@aborted.html>, FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22296/shard-apl8/igt@runner@aborted.html>) (i915#180<https://gitlab.freedesktop.org/drm/intel/issues/180> / i915#2426<https://gitlab.freedesktop.org/drm/intel/issues/2426> / i915#3002<https://gitlab.freedesktop.org/drm/intel/issues/3002> / [i915#4312])

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index aec0efd5350ef..40b5e7ed12c20 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -596,6 +596,12 @@  parse_general_features(struct drm_i915_private *i915,
 	} else {
 		i915->vbt.orientation = DRM_MODE_PANEL_ORIENTATION_UNKNOWN;
 	}
+
+	if (bdb->version >= 249 && general->afc_startup_config) {
+		i915->vbt.override_afc_startup = true;
+		i915->vbt.override_afc_startup_val = general->afc_startup_config == 0x1 ? 0x0 : 0x7;
+	}
+
 	drm_dbg_kms(&i915->drm,
 		    "BDB_GENERAL_FEATURES int_tv_support %d int_crt_support %d lvds_use_ssc %d lvds_ssc_freq %d display_clock_mode %d fdi_rx_polarity_inverted %d\n",
 		    i915->vbt.int_tv_support,
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 6229038475513..9e663692b0f00 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -6502,6 +6502,7 @@  intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 		PIPE_CONF_CHECK_X(dpll_hw_state.cfgcr1);
 		PIPE_CONF_CHECK_X(dpll_hw_state.cfgcr2);
 		PIPE_CONF_CHECK_X(dpll_hw_state.cfgcr0);
+		PIPE_CONF_CHECK_X(dpll_hw_state.div0);
 		PIPE_CONF_CHECK_X(dpll_hw_state.ebb0);
 		PIPE_CONF_CHECK_X(dpll_hw_state.ebb4);
 		PIPE_CONF_CHECK_X(dpll_hw_state.pll0);
diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index 1a202a5c39a53..56b86781a7b16 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -1014,6 +1014,7 @@  static int i915_shared_dplls_info(struct seq_file *m, void *unused)
 		seq_printf(m, " wrpll:   0x%08x\n", pll->state.hw_state.wrpll);
 		seq_printf(m, " cfgcr0:  0x%08x\n", pll->state.hw_state.cfgcr0);
 		seq_printf(m, " cfgcr1:  0x%08x\n", pll->state.hw_state.cfgcr1);
+		seq_printf(m, " div0:    0x%08x\n", pll->state.hw_state.div0);
 		seq_printf(m, " mg_refclkin_ctl:        0x%08x\n",
 			   pll->state.hw_state.mg_refclkin_ctl);
 		seq_printf(m, " mg_clktop2_coreclkctl1: 0x%08x\n",
diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
index 6723c3de5a80c..569903d47aea5 100644
--- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
+++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
@@ -2748,6 +2748,9 @@  static void icl_calc_dpll_state(struct drm_i915_private *i915,
 		pll_state->cfgcr1 |= TGL_DPLL_CFGCR1_CFSELOVRD_NORMAL_XTAL;
 	else
 		pll_state->cfgcr1 |= DPLL_CFGCR1_CENTRAL_FREQ_8400;
+
+	if (i915->vbt.override_afc_startup)
+		pll_state->div0 = TGL_DPLL0_DIV0_AFC_STARTUP(i915->vbt.override_afc_startup_val);
 }
 
 static bool icl_mg_pll_find_divisors(int clock_khz, bool is_dp, bool use_ssc,
@@ -2949,6 +2952,11 @@  static bool icl_calc_mg_pll_state(struct intel_crtc_state *crtc_state,
 					 DKL_PLL_DIV0_PROP_COEFF(prop_coeff) |
 					 DKL_PLL_DIV0_FBPREDIV(m1div) |
 					 DKL_PLL_DIV0_FBDIV_INT(m2div_int);
+		if (dev_priv->vbt.override_afc_startup) {
+			u8 val = dev_priv->vbt.override_afc_startup_val;
+
+			pll_state->mg_pll_div0 |= DKL_PLL_DIV0_AFC_STARTUP(val);
+		}
 
 		pll_state->mg_pll_div1 = DKL_PLL_DIV1_IREF_TRIM(iref_trim) |
 					 DKL_PLL_DIV1_TDC_TARGET_CNT(tdc_targetcnt);
@@ -3448,10 +3456,10 @@  static bool dkl_pll_get_hw_state(struct drm_i915_private *dev_priv,
 		MG_CLKTOP2_CORECLKCTL1_A_DIVRATIO_MASK;
 
 	hw_state->mg_pll_div0 = intel_de_read(dev_priv, DKL_PLL_DIV0(tc_port));
-	hw_state->mg_pll_div0 &= (DKL_PLL_DIV0_INTEG_COEFF_MASK |
-				  DKL_PLL_DIV0_PROP_COEFF_MASK |
-				  DKL_PLL_DIV0_FBPREDIV_MASK |
-				  DKL_PLL_DIV0_FBDIV_INT_MASK);
+	val = DKL_PLL_DIV0_MASK;
+	if (dev_priv->vbt.override_afc_startup)
+		val |= DKL_PLL_DIV0_AFC_STARTUP_MASK;
+	hw_state->mg_pll_div0 &= val;
 
 	hw_state->mg_pll_div1 = intel_de_read(dev_priv, DKL_PLL_DIV1(tc_port));
 	hw_state->mg_pll_div1 &= (DKL_PLL_DIV1_IREF_TRIM_MASK |
@@ -3513,6 +3521,10 @@  static bool icl_pll_get_hw_state(struct drm_i915_private *dev_priv,
 						 TGL_DPLL_CFGCR0(id));
 		hw_state->cfgcr1 = intel_de_read(dev_priv,
 						 TGL_DPLL_CFGCR1(id));
+		if (dev_priv->vbt.override_afc_startup) {
+			hw_state->div0 = intel_de_read(dev_priv, TGL_DPLL0_DIV0(id));
+			hw_state->div0 &= TGL_DPLL0_DIV0_AFC_STARTUP_MASK;
+		}
 	} else {
 		if (IS_JSL_EHL(dev_priv) && id == DPLL_ID_EHL_DPLL4) {
 			hw_state->cfgcr0 = intel_de_read(dev_priv,
@@ -3554,7 +3566,7 @@  static void icl_dpll_write(struct drm_i915_private *dev_priv,
 {
 	struct intel_dpll_hw_state *hw_state = &pll->state.hw_state;
 	const enum intel_dpll_id id = pll->info->id;
-	i915_reg_t cfgcr0_reg, cfgcr1_reg;
+	i915_reg_t cfgcr0_reg, cfgcr1_reg, div0_reg = INVALID_MMIO_REG;
 
 	if (IS_ALDERLAKE_S(dev_priv)) {
 		cfgcr0_reg = ADLS_DPLL_CFGCR0(id);
@@ -3568,6 +3580,7 @@  static void icl_dpll_write(struct drm_i915_private *dev_priv,
 	} else if (DISPLAY_VER(dev_priv) >= 12) {
 		cfgcr0_reg = TGL_DPLL_CFGCR0(id);
 		cfgcr1_reg = TGL_DPLL_CFGCR1(id);
+		div0_reg = TGL_DPLL0_DIV0(id);
 	} else {
 		if (IS_JSL_EHL(dev_priv) && id == DPLL_ID_EHL_DPLL4) {
 			cfgcr0_reg = ICL_DPLL_CFGCR0(4);
@@ -3580,6 +3593,12 @@  static void icl_dpll_write(struct drm_i915_private *dev_priv,
 
 	intel_de_write(dev_priv, cfgcr0_reg, hw_state->cfgcr0);
 	intel_de_write(dev_priv, cfgcr1_reg, hw_state->cfgcr1);
+	drm_WARN_ON_ONCE(&dev_priv->drm, dev_priv->vbt.override_afc_startup &&
+			 !i915_mmio_reg_valid(div0_reg));
+	if (dev_priv->vbt.override_afc_startup &&
+	    i915_mmio_reg_valid(div0_reg))
+		intel_de_rmw(dev_priv, div0_reg, TGL_DPLL0_DIV0_AFC_STARTUP_MASK,
+			     hw_state->div0);
 	intel_de_posting_read(dev_priv, cfgcr1_reg);
 }
 
@@ -3667,13 +3686,11 @@  static void dkl_pll_write(struct drm_i915_private *dev_priv,
 	val |= hw_state->mg_clktop2_hsclkctl;
 	intel_de_write(dev_priv, DKL_CLKTOP2_HSCLKCTL(tc_port), val);
 
-	val = intel_de_read(dev_priv, DKL_PLL_DIV0(tc_port));
-	val &= ~(DKL_PLL_DIV0_INTEG_COEFF_MASK |
-		 DKL_PLL_DIV0_PROP_COEFF_MASK |
-		 DKL_PLL_DIV0_FBPREDIV_MASK |
-		 DKL_PLL_DIV0_FBDIV_INT_MASK);
-	val |= hw_state->mg_pll_div0;
-	intel_de_write(dev_priv, DKL_PLL_DIV0(tc_port), val);
+	val = DKL_PLL_DIV0_MASK;
+	if (dev_priv->vbt.override_afc_startup)
+		val |= DKL_PLL_DIV0_AFC_STARTUP_MASK;
+	intel_de_rmw(dev_priv, DKL_PLL_DIV0(tc_port), val,
+		     hw_state->mg_pll_div0);
 
 	val = intel_de_read(dev_priv, DKL_PLL_DIV1(tc_port));
 	val &= ~(DKL_PLL_DIV1_IREF_TRIM_MASK |
@@ -3912,13 +3929,14 @@  static void icl_dump_hw_state(struct drm_i915_private *dev_priv,
 			      const struct intel_dpll_hw_state *hw_state)
 {
 	drm_dbg_kms(&dev_priv->drm,
-		    "dpll_hw_state: cfgcr0: 0x%x, cfgcr1: 0x%x, "
+		    "dpll_hw_state: cfgcr0: 0x%x, cfgcr1: 0x%x, div0: 0x%x, "
 		    "mg_refclkin_ctl: 0x%x, hg_clktop2_coreclkctl1: 0x%x, "
 		    "mg_clktop2_hsclkctl: 0x%x, mg_pll_div0: 0x%x, "
 		    "mg_pll_div2: 0x%x, mg_pll_lf: 0x%x, "
 		    "mg_pll_frac_lock: 0x%x, mg_pll_ssc: 0x%x, "
 		    "mg_pll_bias: 0x%x, mg_pll_tdc_coldst_bias: 0x%x\n",
 		    hw_state->cfgcr0, hw_state->cfgcr1,
+		    hw_state->div0,
 		    hw_state->mg_refclkin_ctl,
 		    hw_state->mg_clktop2_coreclkctl1,
 		    hw_state->mg_clktop2_hsclkctl,
diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.h b/drivers/gpu/drm/i915/display/intel_dpll_mgr.h
index 91fe181462b2e..ba2fdfce15792 100644
--- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.h
+++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.h
@@ -208,6 +208,9 @@  struct intel_dpll_hw_state {
 	/* icl */
 	u32 cfgcr0;
 
+	/* tgl */
+	u32 div0;
+
 	/* bxt */
 	u32 ebb0, ebb4, pll0, pll1, pll2, pll3, pll6, pll8, pll9, pll10, pcsdw12;
 
diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index a39d6cfea87aa..b9397d9363c52 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -162,6 +162,14 @@  struct bdb_general_features {
 	u8 dp_ssc_freq:1;	/* SSC freq for PCH attached eDP */
 	u8 dp_ssc_dongle_supported:1;
 	u8 rsvd11:2; /* finish byte */
+
+	/* bits 6 */
+	u8 tc_hpd_retry_timeout:7; /* 242 */
+	u8 rsvd12:1;
+
+	/* bits 7 */
+	u8 afc_startup_config:2;/* 249 */
+	u8 rsvd13:6;
 } __packed;
 
 /*
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 418091484e02a..f600d1cb01b34 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -357,6 +357,9 @@  struct intel_vbt_data {
 	unsigned int bios_lvds_val; /* initial [PCH_]LVDS reg val in VBIOS */
 	enum drm_panel_orientation orientation;
 
+	bool override_afc_startup;
+	u8 override_afc_startup_val;
+
 	enum drrs_support_type drrs_type;
 
 	struct {
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 4ea1713e6b608..060f5c2e26479 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -7987,6 +7987,12 @@  enum skl_power_gate {
 #define RKL_DPLL_CFGCR0(pll)		_MMIO_PLL(pll, _TGL_DPLL0_CFGCR0, \
 						  _TGL_DPLL1_CFGCR0)
 
+#define _TGL_DPLL0_DIV0					0x164B00
+#define _TGL_DPLL1_DIV0					0x164C00
+#define TGL_DPLL0_DIV0(pll)				_MMIO_PLL(pll, _TGL_DPLL0_DIV0, _TGL_DPLL1_DIV0)
+#define   TGL_DPLL0_DIV0_AFC_STARTUP_MASK		REG_GENMASK(27, 25)
+#define   TGL_DPLL0_DIV0_AFC_STARTUP(val)		REG_FIELD_PREP(TGL_DPLL0_DIV0_AFC_STARTUP_MASK, (val))
+
 #define _TGL_DPLL0_CFGCR1		0x164288
 #define _TGL_DPLL1_CFGCR1		0x164290
 #define _TGL_TBTPLL_CFGCR1		0x1642A0
@@ -8034,6 +8040,8 @@  enum skl_power_gate {
 
 /* DEKEL PHY MMIO Address = Phy base + (internal address & ~index_mask) */
 #define _DKL_PLL_DIV0			0x200
+#define   DKL_PLL_DIV0_AFC_STARTUP_MASK	REG_GENMASK(27, 25)
+#define   DKL_PLL_DIV0_AFC_STARTUP(val)	REG_FIELD_PREP(DKL_PLL_DIV0_AFC_STARTUP_MASK, (val))
 #define   DKL_PLL_DIV0_INTEG_COEFF(x)	((x) << 16)
 #define   DKL_PLL_DIV0_INTEG_COEFF_MASK	(0x1F << 16)
 #define   DKL_PLL_DIV0_PROP_COEFF(x)	((x) << 12)
@@ -8043,6 +8051,10 @@  enum skl_power_gate {
 #define   DKL_PLL_DIV0_FBPREDIV_MASK	(0xF << DKL_PLL_DIV0_FBPREDIV_SHIFT)
 #define   DKL_PLL_DIV0_FBDIV_INT(x)	((x) << 0)
 #define   DKL_PLL_DIV0_FBDIV_INT_MASK	(0xFF << 0)
+#define   DKL_PLL_DIV0_MASK		(DKL_PLL_DIV0_INTEG_COEFF_MASK | \
+					 DKL_PLL_DIV0_PROP_COEFF_MASK | \
+					 DKL_PLL_DIV0_FBPREDIV_MASK | \
+					 DKL_PLL_DIV0_FBDIV_INT_MASK)
 #define DKL_PLL_DIV0(tc_port)		_MMIO(_PORT(tc_port, _DKL_PHY1_BASE, \
 						    _DKL_PHY2_BASE) + \
 						    _DKL_PLL_DIV0)