diff mbox series

[1/2] drm/i915/display: Do both crawl and squash when changing cdclk

Message ID 20220930213412.161283-1-anusha.srivatsa@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/i915/display: Do both crawl and squash when changing cdclk | expand

Commit Message

Srivatsa, Anusha Sept. 30, 2022, 9:34 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

For MTL, changing cdclk from between certain frequencies has
both squash and crawl. Use the current cdclk config and
the new(desired) cdclk config to construtc a mid cdclk config.
Set the cdclk twice:
- Current cdclk -> mid cdclk
- mid cdclk -> desired cdclk

v2: Add check in intel_modeset_calc_cdclk() to avoid cdclk
change via modeset for platforms that support squash_crawl sequences(Ville)

Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_cdclk.c | 144 +++++++++++++++++----
 1 file changed, 116 insertions(+), 28 deletions(-)

Comments

Srivatsa, Anusha Sept. 30, 2022, 11:45 p.m. UTC | #1
@ville.syrjala@linux.intel.com<mailto:ville.syrjala@linux.intel.com> The mid_cdclk_config logic actually showing issues during cdclk sanitize
“cdclk 0 not valid for refclk abc”


Though that part logic should not be affected…..

Looking into it.

Anusha

From: Patchwork <patchwork@emeril.freedesktop.org>
Sent: Friday, September 30, 2022 3:25 PM
To: Srivatsa, Anusha <anusha.srivatsa@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/display: Do both crawl and squash when changing cdclk

Patch Details
Series:
series starting with [1/2] drm/i915/display: Do both crawl and squash when changing cdclk
URL:
https://patchwork.freedesktop.org/series/109326/
State:
failure
Details:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/index.html
CI Bug Log - changes from CI_DRM_12204 -> Patchwork_109326v1
Summary

FAILURE

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

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

Participating hosts (48 -> 48)

Additional (4): bat-dg2-11 fi-rkl-11600 bat-adls-5 fi-tgl-dsi
Missing (4): fi-ctg-p8600 fi-icl-u2 fi-bdw-samus fi-hsw-4200u

Possible new issues

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

IGT changes
Possible regressions

  *   igt@gem_close_race@basic-threads:

     *   fi-snb-2600: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-snb-2600/igt@gem_close_race@basic-threads.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-snb-2600/igt@gem_close_race@basic-threads.html>

  *   igt@i915_hangman@error-state-basic:

     *   fi-blb-e6850: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-blb-e6850/igt@i915_hangman@error-state-basic.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-blb-e6850/igt@i915_hangman@error-state-basic.html>
     *   fi-pnv-d510: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-pnv-d510/igt@i915_hangman@error-state-basic.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-pnv-d510/igt@i915_hangman@error-state-basic.html>

  *   igt@i915_module_load@load:

     *   fi-skl-6700k2: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-skl-6700k2/igt@i915_module_load@load.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-skl-6700k2/igt@i915_module_load@load.html>
     *   fi-cfl-guc: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-cfl-guc/igt@i915_module_load@load.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-cfl-guc/igt@i915_module_load@load.html>
     *   fi-bdw-5557u: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-bdw-5557u/igt@i915_module_load@load.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-bdw-5557u/igt@i915_module_load@load.html>
     *   fi-cfl-8109u: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-cfl-8109u/igt@i915_module_load@load.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-cfl-8109u/igt@i915_module_load@load.html>
     *   fi-ilk-650: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-ilk-650/igt@i915_module_load@load.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-ilk-650/igt@i915_module_load@load.html>
     *   fi-bsw-kefka: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-bsw-kefka/igt@i915_module_load@load.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-bsw-kefka/igt@i915_module_load@load.html>

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

     *   fi-adl-ddr5: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-adl-ddr5/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-adl-ddr5/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   fi-rkl-guc: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-rkl-guc/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-rkl-guc/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   bat-adlp-4: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/bat-adlp-4/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-adlp-4/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   fi-tgl-u2: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-tgl-u2/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-tgl-u2/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   fi-bxt-dsi: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-bxt-dsi/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-bxt-dsi/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   fi-glk-dsi: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-glk-dsi/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-glk-dsi/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   fi-glk-j4005: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-glk-j4005/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-glk-j4005/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   fi-rkl-11600: NOTRUN -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-rkl-11600/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   bat-dg1-5: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/bat-dg1-5/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-dg1-5/igt@i915_pm_rpm@basic-pci-d3-state.html>

  *   igt@kms_busy@basic@flip:

     *   fi-elk-e7500: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-elk-e7500/igt@kms_busy@basic@flip.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-elk-e7500/igt@kms_busy@basic@flip.html>
     *   fi-hsw-g3258: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-hsw-g3258/igt@kms_busy@basic@flip.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-hsw-g3258/igt@kms_busy@basic@flip.html>
     *   fi-hsw-4770: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-hsw-4770/igt@kms_busy@basic@flip.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-hsw-4770/igt@kms_busy@basic@flip.html>
     *   fi-ivb-3770: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-ivb-3770/igt@kms_busy@basic@flip.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-ivb-3770/igt@kms_busy@basic@flip.html>
     *   fi-skl-6600u: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-skl-6600u/igt@kms_busy@basic@flip.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-skl-6600u/igt@kms_busy@basic@flip.html>
     *   fi-snb-2520m: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-snb-2520m/igt@kms_busy@basic@flip.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-snb-2520m/igt@kms_busy@basic@flip.html>

  *   igt@kms_force_connector_basic@force-connector-state:

     *   fi-kbl-7567u: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-kbl-7567u/igt@kms_force_connector_basic@force-connector-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-kbl-7567u/igt@kms_force_connector_basic@force-connector-state.html>

Warnings

  *   igt@kms_force_connector_basic@force-connector-state:

     *   fi-bdw-gvtdvm: DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-bdw-gvtdvm/igt@kms_force_connector_basic@force-connector-state.html> (i915#5922<https://gitlab.freedesktop.org/drm/intel/issues/5922>) -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-bdw-gvtdvm/igt@kms_force_connector_basic@force-connector-state.html>

Suppressed

The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.

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

     *   {fi-ehl-2}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-ehl-2/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-ehl-2/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   {bat-rpls-2}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/bat-rpls-2/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-rpls-2/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   {bat-adlp-6}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/bat-adlp-6/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-adlp-6/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   {bat-jsl-3}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/bat-jsl-3/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-jsl-3/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   {bat-dg2-11}: NOTRUN -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-dg2-11/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   {bat-dg2-8}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/bat-dg2-8/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-dg2-8/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   {bat-adlm-1}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/bat-adlm-1/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-adlm-1/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   {bat-jsl-1}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/bat-jsl-1/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-jsl-1/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   {fi-jsl-1}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-jsl-1/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-jsl-1/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   {bat-rpls-1}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/bat-rpls-1/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-rpls-1/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   {bat-rplp-1}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/bat-rplp-1/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-rplp-1/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   {bat-adls-5}: NOTRUN -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-adls-5/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   {bat-dg2-9}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/bat-dg2-9/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-dg2-9/igt@i915_pm_rpm@basic-pci-d3-state.html>
     *   {bat-adln-1}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/bat-adln-1/igt@i915_pm_rpm@basic-pci-d3-state.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-adln-1/igt@i915_pm_rpm@basic-pci-d3-state.html>

Known issues

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

IGT changes
Issues hit

  *   igt@gem_exec_suspend@basic-s0@smem:

     *   fi-bsw-nick: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12204/fi-bsw-nick/igt@gem_exec_suspend@basic-s0@smem.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-bsw-nick/igt@gem_exec_suspend@basic-s0@smem.html> (i915#4831<https://gitlab.freedesktop.org/drm/intel/issues/4831>)

  *   igt@gem_huc_copy@huc-copy:

     *   fi-rkl-11600: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-rkl-11600/igt@gem_huc_copy@huc-copy.html> (i915#2190<https://gitlab.freedesktop.org/drm/intel/issues/2190>)

  *   igt@gem_tiled_pread_basic:

     *   fi-rkl-11600: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-rkl-11600/igt@gem_tiled_pread_basic.html> (i915#3282<https://gitlab.freedesktop.org/drm/intel/issues/3282>)

  *   igt@i915_pm_backlight@basic-brightness:

     *   fi-rkl-11600: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-rkl-11600/igt@i915_pm_backlight@basic-brightness.html> (i915#3012<https://gitlab.freedesktop.org/drm/intel/issues/3012>)

  *   igt@kms_chamelium@hdmi-edid-read:

     *   fi-rkl-11600: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-rkl-11600/igt@kms_chamelium@hdmi-edid-read.html> (fdo#111827<https://bugs.freedesktop.org/show_bug.cgi?id=111827>) +7 similar issues

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

     *   fi-rkl-11600: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-rkl-11600/igt@kms_cursor_legacy@basic-busy-flip-before-cursor.html> (i915#4103<https://gitlab.freedesktop.org/drm/intel/issues/4103>)

  *   igt@kms_force_connector_basic@force-load-detect:

     *   fi-rkl-11600: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-rkl-11600/igt@kms_force_connector_basic@force-load-detect.html> (fdo#109285<https://bugs.freedesktop.org/show_bug.cgi?id=109285> / i915#4098<https://gitlab.freedesktop.org/drm/intel/issues/4098>)

  *   igt@kms_psr@primary_page_flip:

     *   fi-rkl-11600: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-rkl-11600/igt@kms_psr@primary_page_flip.html> (i915#1072<https://gitlab.freedesktop.org/drm/intel/issues/1072>) +3 similar issues

  *   igt@kms_setmode@basic-clone-single-crtc:

     *   fi-rkl-11600: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-rkl-11600/igt@kms_setmode@basic-clone-single-crtc.html> (i915#3555<https://gitlab.freedesktop.org/drm/intel/issues/3555> / i915#4098<https://gitlab.freedesktop.org/drm/intel/issues/4098>)

  *   igt@runner@aborted:

     *   fi-hsw-4770: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-hsw-4770/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312> / i915#5594<https://gitlab.freedesktop.org/drm/intel/issues/5594>)
     *   bat-adlp-4: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-adlp-4/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-ivb-3770: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-ivb-3770/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-elk-e7500: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-elk-e7500/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-snb-2600: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-snb-2600/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-tgl-u2: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-tgl-u2/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-bxt-dsi: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-bxt-dsi/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-glk-dsi: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-glk-dsi/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   bat-dg1-5: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/bat-dg1-5/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-glk-j4005: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-glk-j4005/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-kbl-7567u: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-kbl-7567u/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-rkl-11600: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-rkl-11600/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-adl-ddr5: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-adl-ddr5/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-cfl-guc: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-cfl-guc/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-skl-6700k2: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-skl-6700k2/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-cfl-8109u: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-cfl-8109u/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-ilk-650: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-ilk-650/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-skl-6600u: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-skl-6600u/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-bdw-5557u: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-bdw-5557u/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-snb-2520m: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-snb-2520m/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-rkl-guc: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-rkl-guc/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-hsw-g3258: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-hsw-g3258/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)
     *   fi-bsw-kefka: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109326v1/fi-bsw-kefka/igt@runner@aborted.html> (i915#4312<https://gitlab.freedesktop.org/drm/intel/issues/4312>)

{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_12204 -> Patchwork_109326v1

CI-20190529: 20190529
CI_DRM_12204: fd2f9b9a4178e667adad268a662eb8a9c0ddc8f8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6670: d618e9865fe5cbaf511ca43503abad442605d0a5 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109326v1: fd2f9b9a4178e667adad268a662eb8a9c0ddc8f8 @ git://anongit.freedesktop.org/gfx-ci/linux

Linux commits

b99c9d29b170 drm/i915/display: Add CDCLK Support for MTL
e9a9ba513769 drm/i915/display: Do both crawl and squash when changing cdclk
kernel test robot Oct. 7, 2022, 1:40 p.m. UTC | #2
Greeting,

FYI, we noticed the following commit (built with gcc-11):

commit: aeee45faa440efba299e6a87530d799cf17dddb7 ("[Intel-gfx] [PATCH 1/2] drm/i915/display: Do both crawl and squash when changing cdclk")
url: https://github.com/intel-lab-lkp/linux/commits/Anusha-Srivatsa/drm-i915-display-Do-both-crawl-and-squash-when-changing-cdclk/20221001-053554
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link: https://lore.kernel.org/intel-gfx/20220930213412.161283-1-anusha.srivatsa@intel.com

in testcase: igt
version: igt-x86_64-e9244bfd-1_20221001
with following parameters:

	group: group-20



on test machine: 20 threads 1 sockets (Commet Lake) with 16G memory

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


If you fix the issue, kindly add following tag
| Reported-by: kernel test robot <oliver.sang@intel.com>
| Link: https://lore.kernel.org/r/202210072114.2e98a895-oliver.sang@intel.com


[   44.307540][  T497]
[   44.316100][  T497] Subtest invalid-param-get: SUCCESS (0.000s)
[   44.316104][  T497]
[   44.325683][  T497] 2022-10-03 04:22:27 build/tests/gem_ctx_param --run-subtest invalid-param-set
[   44.325687][  T497]
[   44.329743][ T1418] general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
[   44.335852][  T497] IGT-Version: 1.26-gdcb1d7a8 (x86_64) (Linux: 6.0.0-rc7-01492-gaeee45faa440 x86_64)
[   44.336894][ T1418] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   44.336896][ T1418] CPU: 13 PID: 1418 Comm: kms_hdmi_inject Not tainted 6.0.0-rc7-01492-gaeee45faa440 #1
[   44.348255][  T497]
[   44.357520][ T1418] Hardware name: Intel Corporation CometLake Client Platform/CometLake S UDIMM (ERB/CRB), BIOS CMLSFWR1.R00.2212.D00.2104290922 04/29/2021
[ 44.357521][ T1418] RIP: 0010:cdclk_squash_waveform (kbuild/src/consumer/drivers/gpu/drm/i915/display/intel_cdclk.c:1681) i915
[   44.366216][  T497] Starting subtest: invalid-param-set
[ 44.375205][ T1418] Code: 48 c1 ea 03 80 3c 02 00 0f 85 2b 02 00 00 48 8b b1 e0 07 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d 7e 04 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 52
All code
========
   0:	48 c1 ea 03          	shr    $0x3,%rdx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 2b 02 00 00    	jne    0x239
   e:	48 8b b1 e0 07 00 00 	mov    0x7e0(%rcx),%rsi
  15:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  1c:	fc ff df 
  1f:	48 8d 7e 04          	lea    0x4(%rsi),%rdi
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
  2a:*	0f b6 14 02          	movzbl (%rdx,%rax,1),%edx		<-- trapping instruction
  2e:	48 89 f8             	mov    %rdi,%rax
  31:	83 e0 07             	and    $0x7,%eax
  34:	83 c0 01             	add    $0x1,%eax
  37:	38 d0                	cmp    %dl,%al
  39:	7c 08                	jl     0x43
  3b:	84 d2                	test   %dl,%dl
  3d:	0f                   	.byte 0xf
  3e:	85                   	.byte 0x85
  3f:	52                   	push   %rdx

Code starting with the faulting instruction
===========================================
   0:	0f b6 14 02          	movzbl (%rdx,%rax,1),%edx
   4:	48 89 f8             	mov    %rdi,%rax
   7:	83 e0 07             	and    $0x7,%eax
   a:	83 c0 01             	add    $0x1,%eax
   d:	38 d0                	cmp    %dl,%al
   f:	7c 08                	jl     0x19
  11:	84 d2                	test   %dl,%dl
  13:	0f                   	.byte 0xf
  14:	85                   	.byte 0x85
  15:	52                   	push   %rdx
[   44.375207][ T1418] RSP: 0018:ffffc90003a4f7d8 EFLAGS: 00010247
[   44.377399][  T497]
[   44.391335][ T1418]
[   44.391336][ T1418] RAX: dffffc0000000000 RBX: ffff88810ae90000 RCX: ffff88810ae90000
[   44.391338][ T1418] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
[   44.391340][ T1418] RBP: ffff88844df24000 R08: 0000000000000000 R09: ffffc90003a4f73f
[   44.398321][  T497] Subtest invalid-param-set: SUCCESS (0.000s)
[   44.402970][ T1418] R10: fffff52000749ee7 R11: 0000000000000001 R12: 0000000000000000
[   44.402972][ T1418] R13: ffff88844fd5f200 R14: ffff8881126a5b00 R15: 000000000005265c
[   44.402973][ T1418] FS:  00007f22bc18bbc0(0000) GS:ffff8883a1c80000(0000) knlGS:0000000000000000
[   44.422364][  T497]
[   44.428267][ T1418] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   44.428269][ T1418] CR2: 0000561be4617038 CR3: 0000000454ee8006 CR4: 00000000003706e0
[   44.431544][  T497] 2022-10-03 04:22:28 build/tests/gem_ctx_param --run-subtest invalid-set-no-zeromap
[   44.432644][ T1418] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   44.432645][ T1418] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   44.432646][ T1418] Call Trace:
[   44.432647][ T1418]  <TASK>
[   44.440462][  T497]
[ 44.448262][ T1418] ? intel_atomic_lock_global_state (kbuild/src/consumer/drivers/gpu/drm/i915/display/intel_global_state.c:231) i915
[   44.457177][  T497] IGT-Version: 1.26-gdcb1d7a8 (x86_64) (Linux: 6.0.0-rc7-01492-gaeee45faa440 x86_64)
[ 44.461971][ T1418] intel_modeset_calc_cdclk (kbuild/src/consumer/drivers/gpu/drm/i915/display/intel_cdclk.c:2021 kbuild/src/consumer/drivers/gpu/drm/i915/display/intel_cdclk.c:2836) i915


To reproduce:

        git clone https://github.com/intel/lkp-tests.git
        cd lkp-tests
        sudo bin/lkp install job.yaml           # job file is attached in this email
        bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
        sudo bin/lkp run generated-yaml-file

        # if come across any failure that blocks the test,
        # please remove ~/.lkp and /lkp dir to run from a clean state.
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 a12e86d92783..f7bc1013b149 100644
--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
@@ -1689,37 +1689,68 @@  static u32 cdclk_squash_waveform(struct drm_i915_private *dev_priv,
 	return 0xffff;
 }
 
-static void bxt_set_cdclk(struct drm_i915_private *dev_priv,
-			  const struct intel_cdclk_config *cdclk_config,
-			  enum pipe pipe)
+static int cdclk_squash_divider(u16 waveform)
+{
+	return hweight16(waveform ?: 0xffff);
+}
+
+static bool cdclk_crawl_and_squash(struct drm_i915_private *i915,
+				   const struct intel_cdclk_config *old_cdclk_config,
+				   const struct intel_cdclk_config *new_cdclk_config,
+				   struct intel_cdclk_config *mid_cdclk_config)
+{
+	u16 old_waveform = cdclk_squash_waveform(i915, old_cdclk_config->cdclk);
+	u16 new_waveform = cdclk_squash_waveform(i915, new_cdclk_config->cdclk);
+	u16 mid_waveform;
+	int size = 16;
+	int div = 2;
+
+	/* Return if Squash only or Crawl only is the desired action */
+	if (old_cdclk_config->vco <= 0 || new_cdclk_config->vco <= 0 ||
+	    old_cdclk_config->vco == new_cdclk_config->vco ||
+	    old_waveform == new_waveform)
+		return false;
+
+	*mid_cdclk_config = *new_cdclk_config;
+
+	/* If moving to a higher cdclk(squash) the mid cdclk config
+	 * should have the new (squash) waveform.
+	 * If moving to a lower cdclk (crawl) the mid cdclk config
+	 * should have the new vco.
+	 */
+
+	if (cdclk_squash_divider(new_waveform) > cdclk_squash_divider(old_waveform)) {
+		mid_cdclk_config->vco = old_cdclk_config->vco;
+		mid_waveform = new_waveform;
+	} else {
+		mid_cdclk_config->vco = new_cdclk_config->vco;
+		mid_waveform = old_waveform;
+	}
+
+	mid_cdclk_config->cdclk = DIV_ROUND_CLOSEST(cdclk_squash_divider(mid_waveform) *
+						    mid_cdclk_config->vco, size * div);
+
+	/* make sure the mid clock came out sane */
+
+	drm_WARN_ON(&i915->drm, mid_cdclk_config->cdclk <
+		    min(old_cdclk_config->cdclk, new_cdclk_config->cdclk));
+	drm_WARN_ON(&i915->drm, mid_cdclk_config->cdclk >
+		    i915->display.cdclk.max_cdclk_freq);
+	drm_WARN_ON(&i915->drm, cdclk_squash_waveform(i915, mid_cdclk_config->cdclk) !=
+		    mid_waveform);
+
+	return true;
+}
+
+static void _bxt_set_cdclk(struct drm_i915_private *dev_priv,
+			   const struct intel_cdclk_config *cdclk_config,
+			   enum pipe pipe)
 {
 	int cdclk = cdclk_config->cdclk;
 	int vco = cdclk_config->vco;
 	u32 val;
 	u16 waveform;
 	int clock;
-	int ret;
-
-	/* Inform power controller of upcoming frequency change. */
-	if (DISPLAY_VER(dev_priv) >= 11)
-		ret = skl_pcode_request(&dev_priv->uncore, SKL_PCODE_CDCLK_CONTROL,
-					SKL_CDCLK_PREPARE_FOR_CHANGE,
-					SKL_CDCLK_READY_FOR_CHANGE,
-					SKL_CDCLK_READY_FOR_CHANGE, 3);
-	else
-		/*
-		 * BSpec requires us to wait up to 150usec, but that leads to
-		 * timeouts; the 2ms used here is based on experiment.
-		 */
-		ret = snb_pcode_write_timeout(&dev_priv->uncore,
-					      HSW_PCODE_DE_WRITE_FREQ_REQ,
-					      0x80000000, 150, 2);
-	if (ret) {
-		drm_err(&dev_priv->drm,
-			"Failed to inform PCU about cdclk change (err %d, freq %d)\n",
-			ret, cdclk);
-		return;
-	}
 
 	if (HAS_CDCLK_CRAWL(dev_priv) && dev_priv->display.cdclk.hw.vco > 0 && vco > 0) {
 		if (dev_priv->display.cdclk.hw.vco != vco)
@@ -1772,6 +1803,44 @@  static void bxt_set_cdclk(struct drm_i915_private *dev_priv,
 
 	if (pipe != INVALID_PIPE)
 		intel_crtc_wait_for_next_vblank(intel_crtc_for_pipe(dev_priv, pipe));
+}
+
+static void bxt_set_cdclk(struct drm_i915_private *dev_priv,
+			  const struct intel_cdclk_config *cdclk_config,
+			  enum pipe pipe)
+{
+	struct intel_cdclk_config mid_cdclk_config;
+	int cdclk = cdclk_config->cdclk;
+	int ret;
+
+	/* Inform power controller of upcoming frequency change. */
+	if (DISPLAY_VER(dev_priv) >= 11)
+		ret = skl_pcode_request(&dev_priv->uncore, SKL_PCODE_CDCLK_CONTROL,
+					SKL_CDCLK_PREPARE_FOR_CHANGE,
+					SKL_CDCLK_READY_FOR_CHANGE,
+					SKL_CDCLK_READY_FOR_CHANGE, 3);
+	else
+		/*
+		 * BSpec requires us to wait up to 150usec, but that leads to
+		 * timeouts; the 2ms used here is based on experiment.
+		 */
+		ret = snb_pcode_write_timeout(&dev_priv->uncore,
+					      HSW_PCODE_DE_WRITE_FREQ_REQ,
+					      0x80000000, 150, 2);
+	if (ret) {
+		drm_err(&dev_priv->drm,
+			"Failed to inform PCU about cdclk change (err %d, freq %d)\n",
+			ret, cdclk);
+		return;
+	}
+
+	if (cdclk_crawl_and_squash(dev_priv, &dev_priv->display.cdclk.hw,
+				   cdclk_config, &mid_cdclk_config)) {
+		_bxt_set_cdclk(dev_priv, &mid_cdclk_config, pipe);
+		_bxt_set_cdclk(dev_priv, cdclk_config, pipe);
+	} else {
+		_bxt_set_cdclk(dev_priv, cdclk_config, pipe);
+	}
 
 	if (DISPLAY_VER(dev_priv) >= 11) {
 		ret = snb_pcode_write(&dev_priv->uncore, SKL_PCODE_CDCLK_CONTROL,
@@ -1944,6 +2013,20 @@  void intel_cdclk_uninit_hw(struct drm_i915_private *i915)
 		skl_cdclk_uninit_hw(i915);
 }
 
+static bool intel_cdclk_can_crawl_and_squash(struct drm_i915_private *i915,
+					     const struct intel_cdclk_config *a,
+					     const struct intel_cdclk_config *b)
+{
+	u16 old_waveform = cdclk_squash_waveform(i915, a->cdclk);
+	u16 new_waveform = cdclk_squash_waveform(i915, b->cdclk);
+
+	if (!HAS_CDCLK_CRAWL(i915) || !has_cdclk_squasher(i915))
+		return false;
+
+	return a->vco != b->vco &&
+	       old_waveform == new_waveform;
+}
+
 static bool intel_cdclk_can_crawl(struct drm_i915_private *dev_priv,
 				  const struct intel_cdclk_config *a,
 				  const struct intel_cdclk_config *b)
@@ -2750,9 +2833,14 @@  int intel_modeset_calc_cdclk(struct intel_atomic_state *state)
 			pipe = INVALID_PIPE;
 	}
 
-	if (intel_cdclk_can_squash(dev_priv,
-				   &old_cdclk_state->actual,
-				   &new_cdclk_state->actual)) {
+	if (intel_cdclk_can_crawl_and_squash(dev_priv,
+					     &old_cdclk_state->actual,
+					     &new_cdclk_state->actual)) {
+		drm_dbg_kms(&dev_priv->drm,
+			    "Can change cdclk via crawler and squasher\n");
+	} else if (intel_cdclk_can_squash(dev_priv,
+					&old_cdclk_state->actual,
+					&new_cdclk_state->actual)) {
 		drm_dbg_kms(&dev_priv->drm,
 			    "Can change cdclk via squasher\n");
 	} else if (intel_cdclk_can_crawl(dev_priv,