diff mbox series

drm/i915/display/dg2: Sanitize CD clock

Message ID 20211117151900.627726-1-mika.kahola@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/display/dg2: Sanitize CD clock | expand

Commit Message

Kahola, Mika Nov. 17, 2021, 3:19 p.m. UTC
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()]

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_cdclk.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

Comments

Kahola, Mika Nov. 18, 2021, 8:34 a.m. UTC | #1
Please ignore this. These CD clock squashing patches needs to be sent as a series.


From: Patchwork <patchwork@emeril.freedesktop.org>
Sent: Thursday, November 18, 2021 12:08 AM
To: Kahola, Mika <mika.kahola@intel.com>
Cc: intel-gfx@lists.freedesktop.org
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@gem_lmem_swapping@verify-random.html> +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/amd_basic@cs-gfx.html> (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/amd_basic@query-info.html> (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/amd_cs_nop@nop-gfx0.html> (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/amd_cs_nop@sync-fork-compute0.html> (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@gem_exec_suspend@basic-s0.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-kbl-soraka/igt@gem_exec_suspend@basic-s0.html> (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@gem_huc_copy@huc-copy.html> (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@i915_pm_backlight@basic-brightness.html> (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@i915_pm_rpm@basic-pci-d3-state.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21620/fi-skl-6600u/igt@i915_pm_rpm@basic-pci-d3-state.html> (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@kms_chamelium@common-hpd-after-suspend.html> (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@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html> (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@kms_force_connector_basic@force-load-detect.html> (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@prime_vgem@basic-userptr.html> (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@live@hangcheck.html> (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@live@hangcheck.html>

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

Build changes

  *   Linux: CI_DRM_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
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
index 91c19e0a98d7..296dd1fc4289 100644
--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
@@ -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);
 
 	/*