Skip to contentSkip to conversation

drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate

PATCH In review Stanislav Lisovskiy 3 participants 8 messages Jun 28, 2023 – Jul 3, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate

We are currently having FIFO underruns happening for kms_dsc test case, problem is that, we check if curreny cdclk is >= pixel rate only if there is a single VDSC engine enabled(i.e dsc_split=false) however if we happen to have 2 VDSC engines enabled, we just kinda rely that this would be automatically enough.
However pixel rate can be even >= than VDSC clock(cdclk) * 2, so in that case even with 2 VDSC engines enabled, we still need to tweak it up. So lets compare pixel rate with cdclk * slice count(VDSC engine count) and check if it still requires bumping up.
Previously we had to bump up CDCLK many times for similar reasons.

---
 drivers/gpu/drm/i915/display/intel_cdclk.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_cdclk.c +7 -2
index 4207863b7b2a..5880dcb11588 100644
@@ -2607,9 +2607,14 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state)
 	 * When we decide to use only one VDSC engine, since
 	 * each VDSC operates with 1 ppc throughput, pixel clock
 	 * cannot be higher than the VDSC clock (cdclk)
+	 * If there 2 VDSC engines, then pixel clock can't be higher than
+	 * VDSC clock(cdclk) * 2. However even that can still be not enough.
+	 * Slice count reflects amount of VDSC engines,
+	 * so lets use that to determine, if need still need to tweak CDCLK higher.
 	 */
-	if (crtc_state->dsc.compression_enable && !crtc_state->dsc.dsc_split)
-		min_cdclk = max(min_cdclk, (int)crtc_state->pixel_rate);
+	if (crtc_state->dsc.compression_enable)
+		min_cdclk = max_t(int, min_cdclk * crtc_state->dsc.slice_count,
+			          crtc_state->pixel_rate);
 
 	/*
 	 * HACK. Currently for TGL/DG2 platforms we calculate
Signature · 1 line
2.37.3
#1 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate

== Series Details ==

== Series Details ==

Series: drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate
URL : https://patchwork.freedesktop.org/series/119967/
State : warning

== Summary ==

Error: dim checkpatch failed
f10b5f4e2d3d drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate -:37: ERROR:CODE_INDENT: code indent should use tabs where possible
#37: FILE: drivers/gpu/drm/i915/display/intel_cdclk.c:2617:
+^I^I^I crtc_state->pixel_rate);$

-:37: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #37: FILE: drivers/gpu/drm/i915/display/intel_cdclk.c:2617:
+ min_cdclk = max_t(int, min_cdclk * crtc_state->dsc.slice_count,
+ crtc_state->pixel_rate);

total: 1 errors, 0 warnings, 1 checks, 16 lines checked

#2 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate

In reply to Stanislav Lisovskiy
== Series Details ==

== Series Details ==

Series: drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate
URL : https://patchwork.freedesktop.org/series/119967/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13330 -> Patchwork_119967v1
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in Patchwork_119967v1, 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_119967v1/index.html

Participating hosts (40 -> 40)
------------------------------

Additional (1): fi-kbl-soraka
Missing (1): fi-snb-2520m

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_suspend@basic-s2idle-without-i915:
- bat-rpls-1: [PASS][1] -> [WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13330/bat-rpls-1/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/bat-rpls-1/igt@[email protected]

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#2190])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/fi-kbl-soraka/igt@[email protected]

* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#4613]) +3 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/fi-kbl-soraka/igt@[email protected]

* igt@i915_pm_rpm@basic-pci-d3-state:
- bat-mtlp-8: [PASS][5] -> [ABORT][6] ([i915#7077] / [i915#7977])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13330/bat-mtlp-8/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/bat-mtlp-8/igt@[email protected]

* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][7] ([i915#1886] / [i915#7913])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html

* igt@i915_selftest@live@mman:
- bat-rpls-1: [PASS][8] -> [TIMEOUT][9] ([i915#6794] / [i915#7392])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13330/bat-rpls-1/igt@i915_selftest@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/bat-rpls-1/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@slpc:
- bat-rpls-2: NOTRUN -> [DMESG-WARN][10] ([i915#6367])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@i915_suspend@basic-s2idle-without-i915:
- bat-rpls-2: NOTRUN -> [ABORT][11] ([i915#6687] / [i915#8668])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/bat-rpls-2/igt@[email protected]

* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- bat-dg2-11: NOTRUN -> [SKIP][12] ([i915#7828])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/bat-dg2-11/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-kbl-soraka: NOTRUN -> [SKIP][13] ([fdo#109271]) +14 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/fi-kbl-soraka/igt@[email protected]

* igt@kms_psr@primary_mmap_gtt:
- bat-rplp-1: NOTRUN -> [ABORT][14] ([i915#8442])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/bat-rplp-1/igt@kms_psr@primary_mmap_gtt.html

* igt@kms_setmode@basic-clone-single-crtc:
- fi-kbl-soraka: NOTRUN -> [SKIP][15] ([fdo#109271] / [i915#4579])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/fi-kbl-soraka/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@gt_pm:
- bat-rpls-2: [DMESG-FAIL][16] ([i915#4258] / [i915#7913]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13330/bat-rpls-2/igt@i915_selftest@live@gt_pm.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/bat-rpls-2/igt@i915_selftest@live@gt_pm.html

* igt@i915_selftest@live@hangcheck:
- bat-dg2-11: [ABORT][18] ([i915#7913] / [i915#7979]) -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13330/bat-dg2-11/igt@i915_selftest@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/bat-dg2-11/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@reset:
- bat-rpls-2: [ABORT][20] ([i915#4983] / [i915#7461] / [i915#7913] / [i915#7981] / [i915#8347]) -> [PASS][21]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13330/bat-rpls-2/igt@i915_selftest@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/bat-rpls-2/igt@i915_selftest@[email protected]

#### Warnings ####

* igt@kms_psr@sprite_plane_onoff:
- bat-rplp-1: [ABORT][22] ([i915#8442] / [i915#8712]) -> [SKIP][23] ([i915#1072])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13330/bat-rplp-1/igt@kms_psr@sprite_plane_onoff.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/bat-rplp-1/igt@kms_psr@sprite_plane_onoff.html

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

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
[i915#6794]: https://gitlab.freedesktop.org/drm/intel/issues/6794
[i915#7077]: https://gitlab.freedesktop.org/drm/intel/issues/7077
[i915#7392]: https://gitlab.freedesktop.org/drm/intel/issues/7392
[i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7977]: https://gitlab.freedesktop.org/drm/intel/issues/7977
[i915#7979]: https://gitlab.freedesktop.org/drm/intel/issues/7979
[i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981
[i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347
[i915#8442]: https://gitlab.freedesktop.org/drm/intel/issues/8442
[i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668
[i915#8712]: https://gitlab.freedesktop.org/drm/intel/issues/8712

Build changes
-------------

* Linux: CI_DRM_13330 -> Patchwork_119967v1

CI-20190529: 20190529
CI_DRM_13330: dd3ec2080383e2bf738c6640aca4183997cf2dde @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7353: cacdae5ad7cb92bdc26a79802fcdd244dadccd42 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_119967v1: dd3ec2080383e2bf738c6640aca4183997cf2dde @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

09c4954c76e7 drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v1/index.html

#3 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate (rev2)

In reply to Stanislav Lisovskiy
== Series Details ==

== Series Details ==

Series: drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate (rev2)
URL : https://patchwork.freedesktop.org/series/119967/
State : warning

== Summary ==

Error: dim checkpatch failed
6ecbb473f50a drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate -:37: ERROR:CODE_INDENT: code indent should use tabs where possible
#37: FILE: drivers/gpu/drm/i915/display/intel_cdclk.c:2617:
+^I^I^I crtc_state->pixel_rate);$

-:37: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #37: FILE: drivers/gpu/drm/i915/display/intel_cdclk.c:2617:
+ min_cdclk = max_t(int, min_cdclk * crtc_state->dsc.slice_count,
+ crtc_state->pixel_rate);

total: 1 errors, 0 warnings, 1 checks, 16 lines checked

#4 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate (rev2)

In reply to Stanislav Lisovskiy
== Series Details ==

== Series Details ==

Series: drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate (rev2)
URL : https://patchwork.freedesktop.org/series/119967/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13336 -> Patchwork_119967v2
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in Patchwork_119967v2, 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_119967v2/index.html

Participating hosts (41 -> 40)
------------------------------

Missing (1): fi-snb-2520m

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@gt_pm:
- fi-apl-guc: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13336/fi-apl-guc/igt@i915_selftest@live@gt_pm.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/fi-apl-guc/igt@i915_selftest@live@gt_pm.html

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

* igt@debugfs_test@basic-hwmon:
- bat-adlp-11: NOTRUN -> [SKIP][3] ([i915#7456])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-adlp-11/igt@[email protected]

* igt@gem_tiled_pread_basic:
- bat-adlp-11: NOTRUN -> [SKIP][4] ([i915#3282])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-adlp-11/igt@gem_tiled_pread_basic.html

* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [PASS][5] -> [DMESG-FAIL][6] ([i915#5334])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13336/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@migrate:
- bat-dg2-11: [PASS][7] -> [DMESG-WARN][8] ([i915#7699])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13336/bat-dg2-11/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-dg2-11/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@requests:
- bat-rpls-1: [PASS][9] -> [ABORT][10] ([i915#4983] / [i915#7911] / [i915#7920])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13336/bat-rpls-1/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-rpls-1/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@reset:
- bat-rpls-2: [PASS][11] -> [ABORT][12] ([i915#4983] / [i915#7461] / [i915#7913] / [i915#8347])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13336/bat-rpls-2/igt@i915_selftest@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@kms_chamelium_frames@hdmi-crc-fast:
- bat-adlp-11: NOTRUN -> [SKIP][13] ([i915#7828]) +7 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-adlp-11/igt@[email protected]

* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- bat-jsl-1: NOTRUN -> [SKIP][14] ([i915#7828])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-jsl-1/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-adlp-11: NOTRUN -> [SKIP][15] ([i915#4103]) +1 similar issue
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-adlp-11/igt@[email protected]

* igt@kms_force_connector_basic@prune-stale-modes:
- bat-adlp-11: NOTRUN -> [SKIP][16] ([i915#4093]) +3 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-adlp-11/igt@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-dg2-11: NOTRUN -> [SKIP][17] ([i915#1845] / [i915#5354]) +3 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-dg2-11/igt@[email protected]

* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-dp-5:
- bat-adlp-11: NOTRUN -> [DMESG-FAIL][18] ([i915#6868])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-adlp-11/igt@kms_pipe_crc_basic@[email protected]

* igt@kms_psr@primary_page_flip:
- bat-adlp-11: NOTRUN -> [SKIP][19] ([i915#1072]) +3 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-adlp-11/igt@kms_psr@primary_page_flip.html

* igt@kms_setmode@basic-clone-single-crtc:
- bat-adlp-11: NOTRUN -> [ABORT][20] ([i915#4579] / [i915#8260] / [i915#8668])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-adlp-11/igt@[email protected]

#### Possible fixes ####

* igt@i915_module_load@load:
- bat-adlp-11: [ABORT][21] ([i915#4423]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13336/bat-adlp-11/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-adlp-11/igt@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- bat-jsl-3: [DMESG-FAIL][23] ([i915#5334]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13336/bat-jsl-3/igt@i915_selftest@live@gt_heartbeat.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-jsl-3/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@gt_mocs:
- bat-mtlp-6: [DMESG-FAIL][25] ([i915#7059]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13336/bat-mtlp-6/igt@i915_selftest@live@gt_mocs.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-mtlp-6/igt@i915_selftest@live@gt_mocs.html

* igt@i915_selftest@live@migrate:
- bat-jsl-1: [INCOMPLETE][27] -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13336/bat-jsl-1/igt@i915_selftest@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/bat-jsl-1/igt@i915_selftest@[email protected]

[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#4093]: https://gitlab.freedesktop.org/drm/intel/issues/4093
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4423]: https://gitlab.freedesktop.org/drm/intel/issues/4423
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6868]: https://gitlab.freedesktop.org/drm/intel/issues/6868
[i915#7059]: https://gitlab.freedesktop.org/drm/intel/issues/7059
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7920]: https://gitlab.freedesktop.org/drm/intel/issues/7920
[i915#8260]: https://gitlab.freedesktop.org/drm/intel/issues/8260
[i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347
[i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668

Build changes
-------------

* Linux: CI_DRM_13336 -> Patchwork_119967v2

CI-20190529: 20190529
CI_DRM_13336: 1423126050a5bb0317e86e61395e4413e0ad013b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7356: 66452bb0118e8d3a78d054cef50a60a9858a00a9 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_119967v2: 1423126050a5bb0317e86e61395e4413e0ad013b @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

2c81696e2177 drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_119967v2/index.html

#5 lore raw
In reply to Stanislav Lisovskiy
Quoted 8 lines · Stanislav Lisovskiy

We are currently having FIFO underruns happening for kms_dsc test case, problem is that, we check if curreny cdclk is >= pixel rate only if there is a single VDSC engine enabled(i.e dsc_split=false) however if we happen to have 2 VDSC engines enabled, we just kinda rely that this would be automatically enough.
However pixel rate can be even >= than VDSC clock(cdclk) * 2, so in that case even with 2 VDSC engines enabled, we still need to tweak it up. So lets compare pixel rate with cdclk * slice count(VDSC engine count) and

Is it not that we use slice count for the number of DSC slices in which the horizontal scanline count is divided. So this can be 1,2, 4.

Whereas VDSC engine count is the number of VDSC engines the stream is splitted.

IIUC for a case where number of horizontal DSC slices is 4 and we use 2 VDSC engines, each VDSC engine will get two slices and slice width will be HACTIVE/4.

Perhaps what we want to do is to compare pixel rate with cdclk * (number of vdsc engine count = dsc_split ? 2 : 1)

Regards,

Ankit

Quoted 29 lines

check if it still requires bumping up.
Previously we had to bump up CDCLK many times for similar reasons.

---
  drivers/gpu/drm/i915/display/intel_cdclk.c | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_cdclk.c +7 -2
index 4207863b7b2a..5880dcb11588 100644
@@ -2607,9 +2607,14 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state)
  	 * When we decide to use only one VDSC engine, since
  	 * each VDSC operates with 1 ppc throughput, pixel clock
  	 * cannot be higher than the VDSC clock (cdclk)
+	 * If there 2 VDSC engines, then pixel clock can't be higher than
+	 * VDSC clock(cdclk) * 2. However even that can still be not enough.
+	 * Slice count reflects amount of VDSC engines,
+	 * so lets use that to determine, if need still need to tweak CDCLK higher.
  	 */
-	if (crtc_state->dsc.compression_enable && !crtc_state->dsc.dsc_split)
-		min_cdclk = max(min_cdclk, (int)crtc_state->pixel_rate);
+	if (crtc_state->dsc.compression_enable)
+		min_cdclk = max_t(int, min_cdclk * crtc_state->dsc.slice_count,
+			          crtc_state->pixel_rate);
 
  	/*
  	 * HACK. Currently for TGL/DG2 platforms we calculate
#6 lore raw
Quoted 17 lines · Ankit K
Quoted 8 lines · Stanislav Lisovskiy

We are currently having FIFO underruns happening for kms_dsc test case, problem is that, we check if curreny cdclk is >= pixel rate only if there is a single VDSC engine enabled(i.e dsc_split=false) however if we happen to have 2 VDSC engines enabled, we just kinda rely that this would be automatically enough.
However pixel rate can be even >= than VDSC clock(cdclk) * 2, so in that case even with 2 VDSC engines enabled, we still need to tweak it up. So lets compare pixel rate with cdclk * slice count(VDSC engine count) and

Is it not that we use slice count for the number of DSC slices in which the horizontal scanline count is divided. So this can be 1,2, 4.

Whereas VDSC engine count is the number of VDSC engines the stream is splitted.

Quoted 6 lines

IIUC for a case where number of horizontal DSC slices is 4 and we use 2 VDSC engines, each VDSC engine will get two slices and slice width will be HACTIVE/4.

Perhaps what we want to do is to compare pixel rate with cdclk * (number of vdsc engine count = dsc_split ? 2 : 1)

Yes, we of course need amount of DSC engines here, however I was wondering is there any other way to get amount of VDSC engines used more precisely, except just assuming "2" if dsc_split is set to true?

As I understand amount of slices will always be >= amount of VDSC engines, however of course if we will have 2 slices for each VDSC engines - that would be too optimistic. However I just really don't want to hardcode "2" here.
Need to check if there is any other way..

Stan

Quoted 34 lines

Regards,

Ankit

Quoted 28 lines

check if it still requires bumping up.
Previously we had to bump up CDCLK many times for similar reasons.

---
  drivers/gpu/drm/i915/display/intel_cdclk.c | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_cdclk.c +7 -2
index 4207863b7b2a..5880dcb11588 100644
@@ -2607,9 +2607,14 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state)
  	 * When we decide to use only one VDSC engine, since
  	 * each VDSC operates with 1 ppc throughput, pixel clock
  	 * cannot be higher than the VDSC clock (cdclk)
+	 * If there 2 VDSC engines, then pixel clock can't be higher than
+	 * VDSC clock(cdclk) * 2. However even that can still be not enough.
+	 * Slice count reflects amount of VDSC engines,
+	 * so lets use that to determine, if need still need to tweak CDCLK higher.
  	 */
-	if (crtc_state->dsc.compression_enable && !crtc_state->dsc.dsc_split)
-		min_cdclk = max(min_cdclk, (int)crtc_state->pixel_rate);
+	if (crtc_state->dsc.compression_enable)
+		min_cdclk = max_t(int, min_cdclk * crtc_state->dsc.slice_count,
+			          crtc_state->pixel_rate);
  	/*
  	 * HACK. Currently for TGL/DG2 platforms we calculate
#7 lore raw
Quoted 22 lines · Stanislav
Quoted 15 lines · Ankit K
Quoted 8 lines · Stanislav Lisovskiy

We are currently having FIFO underruns happening for kms_dsc test case, problem is that, we check if curreny cdclk is >= pixel rate only if there is a single VDSC engine enabled(i.e dsc_split=false) however if we happen to have 2 VDSC engines enabled, we just kinda rely that this would be automatically enough.
However pixel rate can be even >= than VDSC clock(cdclk) * 2, so in that case even with 2 VDSC engines enabled, we still need to tweak it up. So lets compare pixel rate with cdclk * slice count(VDSC engine count) and

Is it not that we use slice count for the number of DSC slices in which the horizontal scanline count is divided. So this can be 1,2, 4.

Whereas VDSC engine count is the number of VDSC engines the stream is splitted.

Quoted 6 lines

IIUC for a case where number of horizontal DSC slices is 4 and we use 2 VDSC engines, each VDSC engine will get two slices and slice width will be HACTIVE/4.

Perhaps what we want to do is to compare pixel rate with cdclk * (number of vdsc engine count = dsc_split ? 2 : 1)

Quoted 8 lines

Yes, we of course need amount of DSC engines here, however I was wondering is there any other way to get amount of VDSC engines used more precisely, except just assuming "2" if dsc_split is set to true?

As I understand amount of slices will always be >= amount of VDSC engines, however of course if we will have 2 slices for each VDSC engines - that would be too optimistic. However I just really don't want to hardcode "2" here.
Need to check if there is any other way..

Hmm right there is no exact way. DSS_CTL2 defines Left and right vdsc branch as of now and dsc_split is true if right VDSC engine also gets used.

Perhaps dsc_split can be defined as flag, each bit representing a VDSC engine?

Regards,

Ankit

Quoted 36 lines

Stan

Quoted 33 lines

Regards,

Ankit

Quoted 28 lines

check if it still requires bumping up.
Previously we had to bump up CDCLK many times for similar reasons.

---
   drivers/gpu/drm/i915/display/intel_cdclk.c | 9 +++++++--
   1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_cdclk.c +7 -2
index 4207863b7b2a..5880dcb11588 100644
@@ -2607,9 +2607,14 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state)
   	 * When we decide to use only one VDSC engine, since
   	 * each VDSC operates with 1 ppc throughput, pixel clock
   	 * cannot be higher than the VDSC clock (cdclk)
+	 * If there 2 VDSC engines, then pixel clock can't be higher than
+	 * VDSC clock(cdclk) * 2. However even that can still be not enough.
+	 * Slice count reflects amount of VDSC engines,
+	 * so lets use that to determine, if need still need to tweak CDCLK higher.
   	 */
-	if (crtc_state->dsc.compression_enable && !crtc_state->dsc.dsc_split)
-		min_cdclk = max(min_cdclk, (int)crtc_state->pixel_rate);
+	if (crtc_state->dsc.compression_enable)
+		min_cdclk = max_t(int, min_cdclk * crtc_state->dsc.slice_count,
+			          crtc_state->pixel_rate);
   	/*
   	 * HACK. Currently for TGL/DG2 platforms we calculate