Skip to contentSkip to conversation

drm/i915/display/dg2: Sanitize CD clock

PATCH In review Mika Kahola 2 participants 3 messages Nov 17, 2021 – Nov 18, 2021

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

PATCH 1/1 drm/i915/display/dg2: Sanitize CD clock

In case of CD clock squashing the divider is always 1. We don't need to calculate the divider in use so let's skip that for DG2.

v2: Drop unnecessary local variable (Ville)
v3: Avoid if-else structure (Ville)
[v4: vsyrjala: Fix cd2x divider calculation (Uma),
Introduce has_cdclk_squasher()]

---
 drivers/gpu/drm/i915/display/intel_cdclk.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_cdclk.c +12 -3
index 91c19e0a98d7..296dd1fc4289 100644
@@ -1212,6 +1212,11 @@ static void skl_cdclk_uninit_hw(struct drm_i915_private *dev_priv)
 	skl_set_cdclk(dev_priv, &cdclk_config, INVALID_PIPE);
 }
 
+static bool has_cdclk_squasher(struct drm_i915_private *i915)
+{
+	return IS_DG2(i915);
+}
+
 static const struct intel_cdclk_vals bxt_cdclk_table[] = {
 	{ .refclk = 19200, .cdclk = 144000, .divider = 8, .ratio = 60 },
 	{ .refclk = 19200, .cdclk = 288000, .divider = 4, .ratio = 60 },
@@ -1728,7 +1733,7 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,
 static void bxt_sanitize_cdclk(struct drm_i915_private *dev_priv)
 {
 	u32 cdctl, expected;
-	int cdclk, vco;
+	int cdclk, clock, vco;
 
 	intel_update_cdclk(dev_priv);
 	intel_dump_cdclk_config(&dev_priv->cdclk.hw, "Current CDCLK");
@@ -1764,8 +1769,12 @@ static void bxt_sanitize_cdclk(struct drm_i915_private *dev_priv)
 	expected = skl_cdclk_decimal(cdclk);
 
 	/* Figure out what CD2X divider we should be using for this cdclk */
-	expected |= bxt_cdclk_cd2x_div_sel(dev_priv,
-					   dev_priv->cdclk.hw.cdclk,
+	if (has_cdclk_squasher(dev_priv))
+		clock = dev_priv->cdclk.hw.vco / 2;
+	else
+		clock = dev_priv->cdclk.hw.cdclk;
+
+	expected |= bxt_cdclk_cd2x_div_sel(dev_priv, clock,
 					   dev_priv->cdclk.hw.vco);
 
 	/*
Signature · 1 line
2.27.0
#1 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/display/dg2: Sanitize CD clock

== Series Details ==

== Series Details ==

Series: drm/i915/display/dg2: Sanitize CD clock
URL : https://patchwork.freedesktop.org/series/97032/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10896 -> Patchwork_21620
====================================================

Summary
-------

**FAILURE**

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

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

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

Additional (1): fi-tgl-1115g4
Missing (8): bat-dg1-6 fi-hsw-4200u fi-icl-u2 fi-bsw-cyan fi-snb-2520m fi-ctg-p8600 bat-jsl-2 bat-jsl-1

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

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

### IGT changes ###

#### Possible regressions ####

* igt@gem_lmem_swapping@verify-random:
- fi-tgl-1115g4: NOTRUN -> [SKIP][1] +3 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_basic@cs-gfx:
- fi-rkl-guc: NOTRUN -> [SKIP][2] ([fdo#109315]) +17 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-rkl-guc/igt@amdgpu/[email protected]

* igt@amdgpu/amd_basic@query-info:
- fi-tgl-1115g4: NOTRUN -> [SKIP][3] ([fdo#109315])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@amdgpu/[email protected]

* igt@amdgpu/amd_cs_nop@nop-gfx0:
- fi-tgl-1115g4: NOTRUN -> [SKIP][4] ([fdo#109315] / [i915#2575]) +16 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@amdgpu/[email protected]

* igt@amdgpu/amd_cs_nop@sync-fork-compute0:
- fi-snb-2600: NOTRUN -> [SKIP][5] ([fdo#109271]) +17 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-snb-2600/igt@amdgpu/[email protected]

* igt@gem_exec_suspend@basic-s0:
- fi-kbl-soraka: [PASS][6] -> [INCOMPLETE][7] ([i915#4221])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10896/fi-kbl-soraka/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-kbl-soraka/igt@[email protected]

* igt@gem_huc_copy@huc-copy:
- fi-tgl-1115g4: NOTRUN -> [SKIP][8] ([i915#2190])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@[email protected]

* igt@i915_pm_backlight@basic-brightness:
- fi-tgl-1115g4: NOTRUN -> [SKIP][9] ([i915#1155])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@[email protected]

* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-skl-6600u: [PASS][10] -> [FAIL][11] ([i915#3239])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10896/fi-skl-6600u/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-skl-6600u/igt@[email protected]

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-tgl-1115g4: NOTRUN -> [SKIP][12] ([fdo#111827]) +8 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-tgl-1115g4: NOTRUN -> [SKIP][13] ([i915#4103]) +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- fi-tgl-1115g4: NOTRUN -> [SKIP][14] ([fdo#109285])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@[email protected]

* igt@kms_psr@primary_mmap_gtt:
- fi-tgl-1115g4: NOTRUN -> [SKIP][15] ([i915#1072]) +3 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@kms_psr@primary_mmap_gtt.html

* igt@prime_vgem@basic-userptr:
- fi-tgl-1115g4: NOTRUN -> [SKIP][16] ([i915#3301])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@gt_engines:
- fi-rkl-guc: [DMESG-FAIL][17] -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10896/fi-rkl-guc/igt@i915_selftest@live@gt_engines.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-rkl-guc/igt@i915_selftest@live@gt_engines.html

* igt@i915_selftest@live@hangcheck:
- fi-snb-2600: [INCOMPLETE][19] ([i915#3921]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10896/fi-snb-2600/igt@i915_selftest@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-snb-2600/igt@i915_selftest@[email protected]

{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
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#3239]: https://gitlab.freedesktop.org/drm/intel/issues/3239
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4221]: https://gitlab.freedesktop.org/drm/intel/issues/4221
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4449]: https://gitlab.freedesktop.org/drm/intel/issues/4449

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

* Linux: CI_DRM_10896 -> Patchwork_21620

CI-20190529: 20190529
CI_DRM_10896: bf11e5f354ac51635d032893d80a1d0015d277dc @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6283: a2cd90a7c24bb7a4c19ca74c75ed8c950820dee2 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_21620: 7557c0692bd46e01cc7e778d47f8b454d2fc97fb @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

7557c0692bd4 drm/i915/display/dg2: Sanitize CD clock

== Logs ==

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

#2 lore raw

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/display/dg2: Sanitize CD clock

Please ignore this. These CD clock squashing patches needs to be sent as a series.

From: Patchwork <[email protected]>
Sent: Thursday, November 18, 2021 12:08 AM
To: Kahola, Mika <[email protected]>
Cc: [email protected]
Subject: ✗ Fi.CI.BAT: failure for drm/i915/display/dg2: Sanitize CD clock

Patch Details
Series:

drm/i915/display/dg2: Sanitize CD clock

URL:

https://patchwork.freedesktop.org/series/97032/

State:

failure

Details:

https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/index.html

CI Bug Log - changes from CI_DRM_10896 -> Patchwork_21620 Summary

FAILURE

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

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

Participating hosts (40 -> 33)

Additional (1): fi-tgl-1115g4
Missing (8): bat-dg1-6 fi-hsw-4200u fi-icl-u2 fi-bsw-cyan fi-snb-2520m fi-ctg-p8600 bat-jsl-2 bat-jsl-1

Possible new issues

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

IGT changes
Possible regressions

* igt@gem_lmem_swapping@verify-random:

* fi-tgl-1115g4: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@[email protected]> +3 similar issues

Known issues

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

IGT changes
Issues hit

* igt@amdgpu/amd_basic@cs-gfx:

* fi-rkl-guc: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-rkl-guc/igt@amdgpu/[email protected]> (fdo#109315<https://bugs.freedesktop.org/show_bug.cgi?id=109315>) +17 similar issues

* igt@amdgpu/amd_basic@query-info:

* fi-tgl-1115g4: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@amdgpu/[email protected]> (fdo#109315<https://bugs.freedesktop.org/show_bug.cgi?id=109315>)

* igt@amdgpu/amd_cs_nop@nop-gfx0:

* fi-tgl-1115g4: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@amdgpu/[email protected]> (fdo#109315<https://bugs.freedesktop.org/show_bug.cgi?id=109315> / i915#2575<https://gitlab.freedesktop.org/drm/intel/issues/2575>) +16 similar issues

* igt@amdgpu/amd_cs_nop@sync-fork-compute0:

* fi-snb-2600: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-snb-2600/igt@amdgpu/[email protected]> (fdo#109271<https://bugs.freedesktop.org/show_bug.cgi?id=109271>) +17 similar issues

* igt@gem_exec_suspend@basic-s0:

* fi-kbl-soraka: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10896/fi-kbl-soraka/igt@[email protected]> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-kbl-soraka/igt@[email protected]> (i915#4221<https://gitlab.freedesktop.org/drm/intel/issues/4221>)

* igt@gem_huc_copy@huc-copy:

* fi-tgl-1115g4: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@[email protected]> (i915#2190<https://gitlab.freedesktop.org/drm/intel/issues/2190>)

* igt@i915_pm_backlight@basic-brightness:

* fi-tgl-1115g4: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@[email protected]> (i915#1155<https://gitlab.freedesktop.org/drm/intel/issues/1155>)

* igt@i915_pm_rpm@basic-pci-d3-state:

* fi-skl-6600u: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10896/fi-skl-6600u/igt@[email protected]> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-skl-6600u/igt@[email protected]> (i915#3239<https://gitlab.freedesktop.org/drm/intel/issues/3239>)

* igt@kms_chamelium@common-hpd-after-suspend:

* fi-tgl-1115g4: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@[email protected]> (fdo#111827<https://bugs.freedesktop.org/show_bug.cgi?id=111827>) +8 similar issues

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

* fi-tgl-1115g4: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@[email protected]> (i915#4103<https://gitlab.freedesktop.org/drm/intel/issues/4103>) +1 similar issue

* igt@kms_force_connector_basic@force-load-detect:

* fi-tgl-1115g4: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@[email protected]> (fdo#109285<https://bugs.freedesktop.org/show_bug.cgi?id=109285>)

* igt@kms_psr@primary_mmap_gtt:

* fi-tgl-1115g4: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@kms_psr@primary_mmap_gtt.html> (i915#1072<https://gitlab.freedesktop.org/drm/intel/issues/1072>) +3 similar issues

* igt@prime_vgem@basic-userptr:

* fi-tgl-1115g4: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-tgl-1115g4/igt@[email protected]> (i915#3301<https://gitlab.freedesktop.org/drm/intel/issues/3301>)

Possible fixes

* igt@i915_selftest@live@gt_engines:

* fi-rkl-guc: DMESG-FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10896/fi-rkl-guc/igt@i915_selftest@live@gt_engines.html> -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-rkl-guc/igt@i915_selftest@live@gt_engines.html>

* igt@i915_selftest@live@hangcheck:

* fi-snb-2600: INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10896/fi-snb-2600/igt@i915_selftest@[email protected]> (i915#3921<https://gitlab.freedesktop.org/drm/intel/issues/3921>) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-snb-2600/igt@i915_selftest@[email protected]>

{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_10896 -> Patchwork_21620

CI-20190529: 20190529
CI_DRM_10896: bf11e5f354ac51635d032893d80a1d0015d277dc @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6283: a2cd90a7c24bb7a4c19ca74c75ed8c950820dee2 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_21620: 7557c0692bd46e01cc7e778d47f8b454d2fc97fb @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

7557c0692bd4 drm/i915/display/dg2: Sanitize CD clock