✗ Fi.CI.BAT: failure for drm/xe/display: check for error on drmm_mutex_init

2024-03-18 Thread Patchwork
== Series Details ==

Series: drm/xe/display: check for error on drmm_mutex_init
URL   : https://patchwork.freedesktop.org/series/131301/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_1 -> Patchwork_131301v1


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_131301v1 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_131301v1, please notify your bug team 
(i915-ci-in...@lists.freedesktop.org) 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_131301v1/index.html

Participating hosts (34 -> 35)
--

  Additional (2): bat-adlm-1 fi-kbl-8809g 
  Missing(1): fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_selftest@live@hangcheck:
- bat-arls-1: [PASS][1] -> [ABORT][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/bat-arls-1/igt@i915_selftest@l...@hangcheck.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/bat-arls-1/igt@i915_selftest@l...@hangcheck.html

  
Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- bat-arls-3: [PASS][3] -> [FAIL][4] ([i915#10234])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/bat-arls-3/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/bat-arls-3/boot.html
- fi-kbl-8809g:   NOTRUN -> [FAIL][5] ([i915#8293])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/fi-kbl-8809g/boot.html

  
 Possible fixes 

  * boot:
- fi-apl-guc: [FAIL][6] ([i915#8293]) -> [PASS][7]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/fi-apl-guc/boot.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/fi-apl-guc/boot.html

  

### IGT changes ###

 Issues hit 

  * igt@debugfs_test@basic-hwmon:
- bat-adlm-1: NOTRUN -> [SKIP][8] ([i915#3826])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/bat-adlm-1/igt@debugfs_t...@basic-hwmon.html

  * igt@fbdev@eof:
- bat-adlm-1: NOTRUN -> [SKIP][9] ([i915#2582]) +3 other tests skip
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/bat-adlm-1/igt@fb...@eof.html

  * igt@fbdev@info:
- bat-adlm-1: NOTRUN -> [SKIP][10] ([i915#1849] / [i915#2582])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/bat-adlm-1/igt@fb...@info.html

  * igt@gem_lmem_swapping@basic:
- fi-apl-guc: NOTRUN -> [SKIP][11] ([i915#4613]) +3 other tests skip
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/fi-apl-guc/igt@gem_lmem_swapp...@basic.html

  * igt@gem_lmem_swapping@parallel-random-engines:
- bat-adlm-1: NOTRUN -> [SKIP][12] ([i915#4613]) +3 other tests skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/bat-adlm-1/igt@gem_lmem_swapp...@parallel-random-engines.html

  * igt@gem_tiled_pread_basic:
- bat-adlm-1: NOTRUN -> [SKIP][13] ([i915#3282])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/bat-adlm-1/igt@gem_tiled_pread_basic.html

  * igt@i915_pm_rps@basic-api:
- bat-adlm-1: NOTRUN -> [SKIP][14] ([i915#6621])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/bat-adlm-1/igt@i915_pm_...@basic-api.html

  * igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size:
- bat-adlm-1: NOTRUN -> [SKIP][15] ([i915#9875] / [i915#9900]) +16 
other tests skip
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/bat-adlm-1/igt@kms_cursor_leg...@basic-flip-after-cursor-varying-size.html

  * igt@kms_flip@basic-plain-flip:
- bat-adlm-1: NOTRUN -> [SKIP][16] ([i915#3637]) +3 other tests skip
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/bat-adlm-1/igt@kms_f...@basic-plain-flip.html

  * igt@kms_force_connector_basic@force-load-detect:
- bat-adlm-1: NOTRUN -> [SKIP][17]
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/bat-adlm-1/igt@kms_force_connector_ba...@force-load-detect.html

  * igt@kms_frontbuffer_tracking@basic:
- bat-adlm-1: NOTRUN -> [SKIP][18] ([i915#1849] / [i915#4342])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v1/bat-adlm-1/igt@kms_frontbuffer_track...@basic.html

  * igt@kms_hdmi_inject@inject-audio:
- fi-apl-guc: NOTRUN -> [SKIP][19] +17 other tests skip
   [19]: 

RE: ✗ Fi.CI.BAT: failure for drm/i915/xelpg: Add Wa_14020495402

2024-03-18 Thread Sripada, Radhakrishna
The failures are not related to the changes made.

Regards,
Radhakrishna Sripada

From: Patchwork 
Sent: Monday, March 18, 2024 5:15 PM
To: Sripada, Radhakrishna 
Cc: intel-gfx@lists.freedesktop.org
Subject: ✗ Fi.CI.BAT: failure for drm/i915/xelpg: Add Wa_14020495402

Patch Details
Series:
drm/i915/xelpg: Add Wa_14020495402
URL:
https://patchwork.freedesktop.org/series/131291/
State:
failure
Details:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/index.html
CI Bug Log - changes from CI_DRM_14443 -> Patchwork_131291v1
Summary

FAILURE

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

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_131291v1, please notify your bug team 
(i915-ci-in...@lists.freedesktop.org)
 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_131291v1/index.html

Participating hosts (35 -> 33)

Additional (2): bat-arls-4 bat-jsl-1
Missing (4): bat-kbl-2 bat-dg2-11 fi-snb-2520m fi-kbl-8809g

Possible new issues

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

IGT changes
Possible regressions

  *   igt@i915_pm_rpm@module-reload:

 *   bat-arls-1: 
PASS
 -> 
INCOMPLETE

  *   igt@i915_selftest@live@hangcheck:

 *   bat-adlm-1: 
PASS
 -> 
INCOMPLETE

Known issues

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

CI changes
Possible fixes

  *   boot:

 *   fi-cfl-8109u: 
FAIL
 (i915#8293) -> 
PASS

IGT changes
Issues hit

  *   igt@debugfs_test@basic-hwmon:

 *   bat-jsl-1: NOTRUN -> 
SKIP
 (i915#9318)

  *   igt@gem_huc_copy@huc-copy:

 *   fi-cfl-8109u: NOTRUN -> 
SKIP
 (i915#2190)
 *   bat-jsl-1: NOTRUN -> 
SKIP
 (i915#2190)

  *   igt@gem_lmem_swapping@verify-random:

 *   fi-cfl-8109u: NOTRUN -> 
SKIP
 (i915#4613) +3 other 
tests skip
 *   bat-jsl-1: NOTRUN -> 
SKIP
 (i915#4613) +3 other 
tests skip

  *   igt@i915_selftest@live@hugepages:

 *   fi-apl-guc: 
PASS
 -> 
ABORT
 (i915#10461)

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

 *   bat-jsl-1: NOTRUN -> 
SKIP
 (i915#4103) +1 other 
test skip

  *   igt@kms_dsc@dsc-basic:

 *   bat-jsl-1: NOTRUN -> 
SKIP
 (i915#3555 / 
i915#9886)

  *   igt@kms_force_connector_basic@force-load-detect:

 *   bat-jsl-1: NOTRUN -> 
SKIP

  *   igt@kms_pm_backlight@basic-brightness:

 *   fi-cfl-8109u: NOTRUN -> 
SKIP
 +11 other tests skip

  *   

[PATCH] drm/xe/display: check for error on drmm_mutex_init

2024-03-18 Thread Arun R Murthy
Check return value for drmm_mutex_init as it can fail and return on
failure.

Signed-off-by: Arun R Murthy 
---
 drivers/gpu/drm/xe/display/xe_display.c | 24 ++--
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/xe/display/xe_display.c 
b/drivers/gpu/drm/xe/display/xe_display.c
index e4db069f0db3..c59fa832758d 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -107,12 +107,24 @@ int xe_display_create(struct xe_device *xe)
 
xe->display.hotplug.dp_wq = alloc_ordered_workqueue("xe-dp", 0);
 
-   drmm_mutex_init(>drm, >sb_lock);
-   drmm_mutex_init(>drm, >display.backlight.lock);
-   drmm_mutex_init(>drm, >display.audio.mutex);
-   drmm_mutex_init(>drm, >display.wm.wm_mutex);
-   drmm_mutex_init(>drm, >display.pps.mutex);
-   drmm_mutex_init(>drm, >display.hdcp.hdcp_mutex);
+   err = drmm_mutex_init(>drm, >sb_lock);
+   if (err)
+   return err;
+   err = drmm_mutex_init(>drm, >display.backlight.lock);
+   if (err)
+   return err;
+   err = drmm_mutex_init(>drm, >display.audio.mutex);
+   if (err)
+   return err;
+   err = drmm_mutex_init(>drm, >display.wm.wm_mutex);
+   if (err)
+   return err;
+   err = drmm_mutex_init(>drm, >display.pps.mutex);
+   if (err)
+   return err;
+   err = drmm_mutex_init(>drm, >display.hdcp.hdcp_mutex);
+   if (err)
+   return err;
xe->enabled_irq_mask = ~0;
 
err = drmm_add_action_or_reset(>drm, display_destroy, NULL);
-- 
2.25.1



RE: [PATCH] drm/i915/display: Fixed a screen flickering when turning on display from off

2024-03-18 Thread Yu, Gareth
https://patchwork.freedesktop.org/patch/582411/?series=130780=2 provides 
the scenario and the details of DMESG in the commit message on rev#1. I'll 
assume we'll go with rev#2.

Thanks,
Gareth

-Original Message-
From: Jani Nikula  
Sent: Monday, March 18, 2024 9:45 PM
To: Dolan Liu ; Ville Syrjälä 

Cc: Yu, Gareth ; intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/display: Fixed a screen flickering when turning 
on display from off

...

As far as the change goes, the original patch is pretty much the only one we 
should consider. I only ever asked for 1) an issue to be reported at fdo 
gitlab, and 2) a commit message properly detailing the issue.

I never asked for functional changes in the patch. Frankly, all the alternative 
versions are nonsense.

I think we can try to go with the patch, but please understand that if it 
regresses some silly userspace, the change will be reverted instead of fixing 
that silly userspace, because that's the rule in kernel development.


BR,
Jani.


PS. Please try to reply inline instead of top-posting in public mailing lists.



✗ Fi.CI.BAT: failure for drm/i915/xelpg: Add Wa_14020495402

2024-03-18 Thread Patchwork
== Series Details ==

Series: drm/i915/xelpg: Add Wa_14020495402
URL   : https://patchwork.freedesktop.org/series/131291/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14443 -> Patchwork_131291v1


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_131291v1 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_131291v1, please notify your bug team 
(i915-ci-in...@lists.freedesktop.org) 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_131291v1/index.html

Participating hosts (35 -> 33)
--

  Additional (2): bat-arls-4 bat-jsl-1 
  Missing(4): bat-kbl-2 bat-dg2-11 fi-snb-2520m fi-kbl-8809g 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_pm_rpm@module-reload:
- bat-arls-1: [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-arls-1/igt@i915_pm_...@module-reload.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/bat-arls-1/igt@i915_pm_...@module-reload.html

  * igt@i915_selftest@live@hangcheck:
- bat-adlm-1: [PASS][3] -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-adlm-1/igt@i915_selftest@l...@hangcheck.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/bat-adlm-1/igt@i915_selftest@l...@hangcheck.html

  
Known issues


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

### CI changes ###

 Possible fixes 

  * boot:
- fi-cfl-8109u:   [FAIL][5] ([i915#8293]) -> [PASS][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-cfl-8109u/boot.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/fi-cfl-8109u/boot.html

  

### IGT changes ###

 Issues hit 

  * igt@debugfs_test@basic-hwmon:
- bat-jsl-1:  NOTRUN -> [SKIP][7] ([i915#9318])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/bat-jsl-1/igt@debugfs_t...@basic-hwmon.html

  * igt@gem_huc_copy@huc-copy:
- fi-cfl-8109u:   NOTRUN -> [SKIP][8] ([i915#2190])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/fi-cfl-8109u/igt@gem_huc_c...@huc-copy.html
- bat-jsl-1:  NOTRUN -> [SKIP][9] ([i915#2190])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/bat-jsl-1/igt@gem_huc_c...@huc-copy.html

  * igt@gem_lmem_swapping@verify-random:
- fi-cfl-8109u:   NOTRUN -> [SKIP][10] ([i915#4613]) +3 other tests skip
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/fi-cfl-8109u/igt@gem_lmem_swapp...@verify-random.html
- bat-jsl-1:  NOTRUN -> [SKIP][11] ([i915#4613]) +3 other tests skip
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/bat-jsl-1/igt@gem_lmem_swapp...@verify-random.html

  * igt@i915_selftest@live@hugepages:
- fi-apl-guc: [PASS][12] -> [ABORT][13] ([i915#10461])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-apl-guc/igt@i915_selftest@l...@hugepages.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/fi-apl-guc/igt@i915_selftest@l...@hugepages.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-jsl-1:  NOTRUN -> [SKIP][14] ([i915#4103]) +1 other test skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/bat-jsl-1/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_dsc@dsc-basic:
- bat-jsl-1:  NOTRUN -> [SKIP][15] ([i915#3555] / [i915#9886])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/bat-jsl-1/igt@kms_...@dsc-basic.html

  * igt@kms_force_connector_basic@force-load-detect:
- bat-jsl-1:  NOTRUN -> [SKIP][16]
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/bat-jsl-1/igt@kms_force_connector_ba...@force-load-detect.html

  * igt@kms_pm_backlight@basic-brightness:
- fi-cfl-8109u:   NOTRUN -> [SKIP][17] +11 other tests skip
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/fi-cfl-8109u/igt@kms_pm_backli...@basic-brightness.html

  * igt@kms_setmode@basic-clone-single-crtc:
- bat-jsl-1:  NOTRUN -> [SKIP][18] ([i915#3555])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131291v1/bat-jsl-1/igt@kms_setm...@basic-clone-single-crtc.html

  
 Possible fixes 

  * igt@i915_selftest@live@hangcheck:
- bat-adlp-6: [ABORT][19] ([i915#10021]) -> [PASS][20]
   [19]: 

✗ Fi.CI.BAT: failure for drm: Add plane SIZE_HINTS property (rev6)

2024-03-18 Thread Patchwork
== Series Details ==

Series: drm: Add plane SIZE_HINTS property (rev6)
URL   : https://patchwork.freedesktop.org/series/113758/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14443 -> Patchwork_113758v6


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_113758v6 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_113758v6, please notify your bug team 
(i915-ci-in...@lists.freedesktop.org) 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_113758v6/index.html

Participating hosts (35 -> 34)
--

  Additional (2): bat-arls-4 bat-jsl-1 
  Missing(3): bat-kbl-2 bat-dg2-11 fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_selftest@live@slpc:
- bat-arls-1: [PASS][1] -> [DMESG-WARN][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-arls-1/igt@i915_selftest@l...@slpc.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-arls-1/igt@i915_selftest@l...@slpc.html

  
New tests
-

  New tests have been introduced between CI_DRM_14443 and Patchwork_113758v6:

### New IGT tests (23) ###

  * igt@kms_cursor_crc@cursor-size-hints:
- Statuses : 7 skip(s)
- Exec time: [0.0] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-dp-1:
- Statuses : 4 pass(s)
- Exec time: [0.42, 0.51] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-dp-2:
- Statuses : 1 pass(s)
- Exec time: [0.47] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-dp-3:
- Statuses : 2 pass(s)
- Exec time: [0.55, 0.56] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-dp-6:
- Statuses : 1 pass(s)
- Exec time: [1.54] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-edp-1:
- Statuses : 5 pass(s)
- Exec time: [0.66, 0.83] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-hdmi-a-1:
- Statuses : 6 pass(s)
- Exec time: [0.29, 0.74] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-hdmi-a-2:
- Statuses : 3 pass(s)
- Exec time: [0.52, 0.81] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-vga-1:
- Statuses : 3 pass(s)
- Exec time: [0.29, 0.84] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-b-hdmi-a-1:
- Statuses : 1 pass(s)
- Exec time: [0.32] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-b-vga-1:
- Statuses : 2 pass(s)
- Exec time: [0.27, 0.68] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-c-dp-1:
- Statuses : 3 pass(s)
- Exec time: [0.51, 0.56] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-c-edp-1:
- Statuses : 3 pass(s)
- Exec time: [1.40, 1.47] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-c-hdmi-a-1:
- Statuses : 3 pass(s)
- Exec time: [0.27, 0.35] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-c-hdmi-a-2:
- Statuses : 1 pass(s)
- Exec time: [0.67] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-c-vga-1:
- Statuses : 1 pass(s)
- Exec time: [0.23] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-d-dp-1:
- Statuses : 1 pass(s)
- Exec time: [0.39] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-d-dp-2:
- Statuses : 1 pass(s)
- Exec time: [0.44] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-d-dp-3:
- Statuses : 2 pass(s)
- Exec time: [0.52, 0.54] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-d-dp-6:
- Statuses : 1 pass(s)
- Exec time: [0.79] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-d-edp-1:
- Statuses : 2 pass(s)
- Exec time: [1.34, 1.40] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-d-hdmi-a-1:
- Statuses : 2 pass(s)
- Exec time: [0.23, 0.34] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-d-hdmi-a-2:
- Statuses : 3 pass(s)
- Exec time: [0.40, 0.67] s

  

Known issues


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

### CI changes ###

 Possible fixes 

  * boot:
- fi-cfl-8109u:   [FAIL][3] ([i915#8293]) -> [PASS][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-cfl-8109u/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/fi-cfl-8109u/boot.html

  

### IGT changes ###

 Issues hit 

  * igt@debugfs_test@basic-hwmon:
- bat-jsl-1:  NOTRUN -> [SKIP][5] ([i915#9318])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-jsl-1/igt@debugfs_t...@basic-hwmon.html

  * igt@gem_huc_copy@huc-copy:
- fi-cfl-8109u:   NOTRUN -> [SKIP][6] ([i915#2190])
   [6]: 

✗ Fi.CI.SPARSE: warning for drm: Add plane SIZE_HINTS property (rev6)

2024-03-18 Thread Patchwork
== Series Details ==

Series: drm: Add plane SIZE_HINTS property (rev6)
URL   : https://patchwork.freedesktop.org/series/113758/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.




✓ Fi.CI.BAT: success for drm/i915/mtl: Add Wa_14020495402

2024-03-18 Thread Patchwork
== Series Details ==

Series: drm/i915/mtl: Add Wa_14020495402
URL   : https://patchwork.freedesktop.org/series/131284/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14443 -> Patchwork_131284v1


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131284v1/index.html

Participating hosts (35 -> 33)
--

  Additional (2): bat-arls-4 bat-jsl-1 
  Missing(4): bat-dg1-7 bat-dg2-11 fi-snb-2520m fi-kbl-8809g 

Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- bat-jsl-1:  NOTRUN -> [FAIL][1] ([i915#8293])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131284v1/bat-jsl-1/boot.html

  
 Possible fixes 

  * boot:
- fi-cfl-8109u:   [FAIL][2] ([i915#8293]) -> [PASS][3]
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-cfl-8109u/boot.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131284v1/fi-cfl-8109u/boot.html

  

### IGT changes ###

 Issues hit 

  * igt@gem_huc_copy@huc-copy:
- fi-cfl-8109u:   NOTRUN -> [SKIP][4] ([i915#2190])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131284v1/fi-cfl-8109u/igt@gem_huc_c...@huc-copy.html

  * igt@gem_lmem_swapping@verify-random:
- fi-cfl-8109u:   NOTRUN -> [SKIP][5] ([i915#4613]) +3 other tests skip
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131284v1/fi-cfl-8109u/igt@gem_lmem_swapp...@verify-random.html

  * igt@i915_selftest@live@execlists:
- fi-bsw-nick:[PASS][6] -> [ABORT][7] ([i915#7911])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-bsw-nick/igt@i915_selftest@l...@execlists.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131284v1/fi-bsw-nick/igt@i915_selftest@l...@execlists.html

  * igt@kms_pm_backlight@basic-brightness:
- fi-cfl-8109u:   NOTRUN -> [SKIP][8] +11 other tests skip
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131284v1/fi-cfl-8109u/igt@kms_pm_backli...@basic-brightness.html

  
 Possible fixes 

  * igt@i915_selftest@live@gem_contexts:
- fi-apl-guc: [ABORT][9] -> [PASS][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-apl-guc/igt@i915_selftest@live@gem_contexts.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131284v1/fi-apl-guc/igt@i915_selftest@live@gem_contexts.html

  * igt@i915_selftest@live@hangcheck:
- bat-adlp-6: [ABORT][11] ([i915#10021]) -> [PASS][12]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-adlp-6/igt@i915_selftest@l...@hangcheck.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131284v1/bat-adlp-6/igt@i915_selftest@l...@hangcheck.html

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

  [i915#10021]: https://gitlab.freedesktop.org/drm/intel/issues/10021
  [i915#10196]: https://gitlab.freedesktop.org/drm/intel/issues/10196
  [i915#10197]: https://gitlab.freedesktop.org/drm/intel/issues/10197
  [i915#10200]: https://gitlab.freedesktop.org/drm/intel/issues/10200
  [i915#10202]: https://gitlab.freedesktop.org/drm/intel/issues/10202
  [i915#10206]: https://gitlab.freedesktop.org/drm/intel/issues/10206
  [i915#10207]: https://gitlab.freedesktop.org/drm/intel/issues/10207
  [i915#10208]: https://gitlab.freedesktop.org/drm/intel/issues/10208
  [i915#10209]: https://gitlab.freedesktop.org/drm/intel/issues/10209
  [i915#10211]: https://gitlab.freedesktop.org/drm/intel/issues/10211
  [i915#10212]: https://gitlab.freedesktop.org/drm/intel/issues/10212
  [i915#10213]: https://gitlab.freedesktop.org/drm/intel/issues/10213
  [i915#10214]: https://gitlab.freedesktop.org/drm/intel/issues/10214
  [i915#10216]: https://gitlab.freedesktop.org/drm/intel/issues/10216
  [i915#10249]: https://gitlab.freedesktop.org/drm/intel/issues/10249
  [i915#10436]: https://gitlab.freedesktop.org/drm/intel/issues/10436
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
  [i915#8293]: https://gitlab.freedesktop.org/drm/intel/issues/8293
  [i915#8809]: https://gitlab.freedesktop.org/drm/intel/issues/8809
  [i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318
  [i915#9732]: https://gitlab.freedesktop.org/drm/intel/issues/9732
  [i915#9812]: 

✓ Fi.CI.BAT: success for drm/i915/gt: Reset queue_priority_hint on parking

2024-03-18 Thread Patchwork
== Series Details ==

Series: drm/i915/gt: Reset queue_priority_hint on parking
URL   : https://patchwork.freedesktop.org/series/131268/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14443 -> Patchwork_131268v1


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131268v1/index.html

Participating hosts (35 -> 33)
--

  Additional (2): bat-arls-4 bat-jsl-1 
  Missing(4): bat-dg2-11 bat-rpls-3 fi-snb-2520m fi-kbl-8809g 

Possible new issues
---

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

### IGT changes ###

 Suppressed 

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

  * igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-a-dp-6:
- {bat-mtlp-9}:   [PASS][1] -> [DMESG-WARN][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-mtlp-9/igt@kms_pipe_crc_basic@read-crc-frame-seque...@pipe-a-dp-6.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131268v1/bat-mtlp-9/igt@kms_pipe_crc_basic@read-crc-frame-seque...@pipe-a-dp-6.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@debugfs_test@basic-hwmon:
- bat-jsl-1:  NOTRUN -> [SKIP][3] ([i915#9318])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131268v1/bat-jsl-1/igt@debugfs_t...@basic-hwmon.html

  * igt@gem_huc_copy@huc-copy:
- bat-jsl-1:  NOTRUN -> [SKIP][4] ([i915#2190])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131268v1/bat-jsl-1/igt@gem_huc_c...@huc-copy.html

  * igt@gem_lmem_swapping@verify-random:
- bat-jsl-1:  NOTRUN -> [SKIP][5] ([i915#4613]) +3 other tests skip
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131268v1/bat-jsl-1/igt@gem_lmem_swapp...@verify-random.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-jsl-1:  NOTRUN -> [SKIP][6] ([i915#4103]) +1 other test skip
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131268v1/bat-jsl-1/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_dsc@dsc-basic:
- bat-jsl-1:  NOTRUN -> [SKIP][7] ([i915#3555] / [i915#9886])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131268v1/bat-jsl-1/igt@kms_...@dsc-basic.html

  * igt@kms_force_connector_basic@force-load-detect:
- bat-jsl-1:  NOTRUN -> [SKIP][8]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131268v1/bat-jsl-1/igt@kms_force_connector_ba...@force-load-detect.html

  * igt@kms_setmode@basic-clone-single-crtc:
- bat-jsl-1:  NOTRUN -> [SKIP][9] ([i915#3555])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131268v1/bat-jsl-1/igt@kms_setm...@basic-clone-single-crtc.html

  
 Possible fixes 

  * igt@i915_selftest@live@gem_contexts:
- fi-apl-guc: [ABORT][10] -> [PASS][11]
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-apl-guc/igt@i915_selftest@live@gem_contexts.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131268v1/fi-apl-guc/igt@i915_selftest@live@gem_contexts.html

  * igt@i915_selftest@live@hangcheck:
- bat-adlp-6: [ABORT][12] ([i915#10021]) -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-adlp-6/igt@i915_selftest@l...@hangcheck.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131268v1/bat-adlp-6/igt@i915_selftest@l...@hangcheck.html

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

  [i915#10021]: https://gitlab.freedesktop.org/drm/intel/issues/10021
  [i915#10196]: https://gitlab.freedesktop.org/drm/intel/issues/10196
  [i915#10197]: https://gitlab.freedesktop.org/drm/intel/issues/10197
  [i915#10200]: https://gitlab.freedesktop.org/drm/intel/issues/10200
  [i915#10202]: https://gitlab.freedesktop.org/drm/intel/issues/10202
  [i915#10206]: https://gitlab.freedesktop.org/drm/intel/issues/10206
  [i915#10207]: https://gitlab.freedesktop.org/drm/intel/issues/10207
  [i915#10208]: https://gitlab.freedesktop.org/drm/intel/issues/10208
  [i915#10209]: https://gitlab.freedesktop.org/drm/intel/issues/10209
  [i915#10211]: https://gitlab.freedesktop.org/drm/intel/issues/10211
  [i915#10212]: https://gitlab.freedesktop.org/drm/intel/issues/10212
  [i915#10213]: https://gitlab.freedesktop.org/drm/intel/issues/10213
  [i915#10214]: https://gitlab.freedesktop.org/drm/intel/issues/10214
  [i915#10216]: https://gitlab.freedesktop.org/drm/intel/issues/10216
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#3555]: 

✗ Fi.CI.CHECKPATCH: warning for drm/i915/gt: Reset queue_priority_hint on parking

2024-03-18 Thread Patchwork
== Series Details ==

Series: drm/i915/gt: Reset queue_priority_hint on parking
URL   : https://patchwork.freedesktop.org/series/131268/
State : warning

== Summary ==

Error: dim checkpatch failed
e1d8aba7c160 drm/i915/gt: Reset queue_priority_hint on parking
-:19: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line 
(possible unwrapped commit description?)
#19: 
<3>[  166.210729] __engine_park:283 
GEM_BUG_ON(engine->sched_engine->queue_priority_hint != (-((int)(~0U >> 1)) - 
1))

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




Re: [PATCH v2] drm/i915/xelpg: Add Wa_14020495402

2024-03-18 Thread Matt Roper
On Mon, Mar 18, 2024 at 02:00:25PM -0700, Radhakrishna Sripada wrote:
> Disable clockgating for TDL SVHS fub.
> 
> v2: Implement in general render/compute wa's(MattR)
> 
> Bspec: 46045
> Cc: Matt Roper 
> Signed-off-by: Radhakrishna Sripada 

Reviewed-by: Matt Roper 

> ---
>  drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 +
>  drivers/gpu/drm/i915/gt/intel_workarounds.c | 6 +-
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h 
> b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
> index 50962cfd1353..1f778b77f4f8 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
> @@ -1215,6 +1215,7 @@
>  #define   GEN12_DISABLE_EARLY_READ   REG_BIT(14)
>  #define   GEN12_ENABLE_LARGE_GRF_MODEREG_BIT(12)
>  #define   GEN12_PUSH_CONST_DEREF_HOLD_DISREG_BIT(8)
> +#define   XELPG_DISABLE_TDL_SVHS_GATING  REG_BIT(1)
>  #define   GEN12_DISABLE_DOP_GATING  REG_BIT(0)
>  
>  #define RT_CTRL  MCR_REG(0xe530)
> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c 
> b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> index b079cbbc1897..d2c63ecc490e 100644
> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> @@ -2892,10 +2892,14 @@ general_render_compute_wa_init(struct intel_engine_cs 
> *engine, struct i915_wa_li
>  
>   if (IS_GFX_GT_IP_STEP(gt, IP_VER(12, 70), STEP_B0, STEP_FOREVER) ||
>   IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_B0, STEP_FOREVER) ||
> - IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 74), IP_VER(12, 74)))
> + IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 74), IP_VER(12, 74))) {
>   /* Wa_14017856879 */
>   wa_mcr_masked_en(wal, GEN9_ROW_CHICKEN3, 
> MTL_DISABLE_FIX_FOR_EOT_FLUSH);
>  
> + /* Wa_14020495402 */
> + wa_mcr_masked_en(wal, GEN8_ROW_CHICKEN2, 
> XELPG_DISABLE_TDL_SVHS_GATING);
> + }
> +
>   if (IS_GFX_GT_IP_STEP(gt, IP_VER(12, 70), STEP_A0, STEP_B0) ||
>   IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_A0, STEP_B0))
>   /*
> -- 
> 2.34.1
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


✗ Fi.CI.BAT: failure for drm/i915/display: DMC wakelock implementation (rev2)

2024-03-18 Thread Patchwork
== Series Details ==

Series: drm/i915/display: DMC wakelock implementation (rev2)
URL   : https://patchwork.freedesktop.org/series/131124/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14443 -> Patchwork_131124v2


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_131124v2 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_131124v2, please notify your bug team 
(i915-ci-in...@lists.freedesktop.org) 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_131124v2/index.html

Participating hosts (35 -> 35)
--

  Additional (2): bat-arls-4 bat-jsl-1 
  Missing(2): bat-dg2-11 fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_selftest@live@hangcheck:
- bat-adln-1: [PASS][1] -> [ABORT][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-adln-1/igt@i915_selftest@l...@hangcheck.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v2/bat-adln-1/igt@i915_selftest@l...@hangcheck.html

  
Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- bat-arls-3: [PASS][3] -> [FAIL][4] ([i915#10234])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-arls-3/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v2/bat-arls-3/boot.html
- bat-jsl-1:  NOTRUN -> [FAIL][5] ([i915#8293])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v2/bat-jsl-1/boot.html
- fi-apl-guc: [PASS][6] -> [FAIL][7] ([i915#8293])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-apl-guc/boot.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v2/fi-apl-guc/boot.html

  
 Possible fixes 

  * boot:
- fi-cfl-8109u:   [FAIL][8] ([i915#8293]) -> [PASS][9]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-cfl-8109u/boot.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v2/fi-cfl-8109u/boot.html

  

### IGT changes ###

 Issues hit 

  * igt@dmabuf@all-tests@dma_fence_chain:
- fi-kbl-8809g:   [PASS][10] -> [INCOMPLETE][11] ([i915#10454])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-kbl-8809g/igt@dmabuf@all-tests@dma_fence_chain.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v2/fi-kbl-8809g/igt@dmabuf@all-tests@dma_fence_chain.html

  * igt@gem_huc_copy@huc-copy:
- fi-cfl-8109u:   NOTRUN -> [SKIP][12] ([i915#2190])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v2/fi-cfl-8109u/igt@gem_huc_c...@huc-copy.html

  * igt@gem_lmem_swapping@verify-random:
- fi-cfl-8109u:   NOTRUN -> [SKIP][13] ([i915#4613]) +3 other tests skip
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v2/fi-cfl-8109u/igt@gem_lmem_swapp...@verify-random.html

  * igt@i915_selftest@live@gem:
- bat-dg2-8:  [PASS][14] -> [ABORT][15] ([i915#10366])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-dg2-8/igt@i915_selftest@l...@gem.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v2/bat-dg2-8/igt@i915_selftest@l...@gem.html

  * igt@kms_pm_backlight@basic-brightness:
- fi-cfl-8109u:   NOTRUN -> [SKIP][16] +11 other tests skip
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v2/fi-cfl-8109u/igt@kms_pm_backli...@basic-brightness.html

  
 Possible fixes 

  * igt@i915_selftest@live@hangcheck:
- bat-adlp-6: [ABORT][17] ([i915#10021]) -> [PASS][18]
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-adlp-6/igt@i915_selftest@l...@hangcheck.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v2/bat-adlp-6/igt@i915_selftest@l...@hangcheck.html

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

  [i915#10021]: https://gitlab.freedesktop.org/drm/intel/issues/10021
  [i915#10196]: https://gitlab.freedesktop.org/drm/intel/issues/10196
  [i915#10197]: https://gitlab.freedesktop.org/drm/intel/issues/10197
  [i915#10200]: https://gitlab.freedesktop.org/drm/intel/issues/10200
  [i915#10202]: https://gitlab.freedesktop.org/drm/intel/issues/10202
  [i915#10206]: https://gitlab.freedesktop.org/drm/intel/issues/10206
  [i915#10207]: https://gitlab.freedesktop.org/drm/intel/issues/10207
  [i915#10208]: https://gitlab.freedesktop.org/drm/intel/issues/10208
  

✗ Fi.CI.SPARSE: warning for drm/i915/display: DMC wakelock implementation (rev2)

2024-03-18 Thread Patchwork
== Series Details ==

Series: drm/i915/display: DMC wakelock implementation (rev2)
URL   : https://patchwork.freedesktop.org/series/131124/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.




✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: DMC wakelock implementation (rev2)

2024-03-18 Thread Patchwork
== Series Details ==

Series: drm/i915/display: DMC wakelock implementation (rev2)
URL   : https://patchwork.freedesktop.org/series/131124/
State : warning

== Summary ==

Error: dim checkpatch failed
eaf8c75d8c52 drm/i915/display: add support for DMC wakelocks
Traceback (most recent call last):
  File "scripts/spdxcheck.py", line 6, in 
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
Traceback (most recent call last):
  File "scripts/spdxcheck.py", line 6, in 
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:237: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does 
MAINTAINERS need updating?
#237: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 450 lines checked
f905231c31a6 drm/i915/display: don't allow DMC wakelock on older hardware
f22ef9fe8e9c drm/i915/display: add module parameter to enable DMC wakelock
-:21: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#21: FILE: drivers/gpu/drm/i915/display/intel_display_params.c:120:
+intel_display_param_named_unsafe(enable_dmc_wl, bool, 0400,
+   "Enable DMC wakelock "

total: 0 errors, 0 warnings, 1 checks, 54 lines checked
d2718fbe3d0d drm/i915/display: tie DMC wakelock to DC5/6 state transitions




✓ Fi.CI.BAT: success for drm/xe/display: fix potential overflow when multiplying 2 u32 (rev2)

2024-03-18 Thread Patchwork
== Series Details ==

Series: drm/xe/display: fix potential overflow when multiplying 2 u32 (rev2)
URL   : https://patchwork.freedesktop.org/series/131014/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14443 -> Patchwork_131014v2


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131014v2/index.html

Participating hosts (35 -> 35)
--

  Additional (2): bat-arls-4 bat-jsl-1 
  Missing(2): bat-dg2-11 fi-snb-2520m 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@debugfs_test@basic-hwmon:
- bat-jsl-1:  NOTRUN -> [SKIP][1] ([i915#9318])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131014v2/bat-jsl-1/igt@debugfs_t...@basic-hwmon.html

  * igt@gem_huc_copy@huc-copy:
- bat-jsl-1:  NOTRUN -> [SKIP][2] ([i915#2190])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131014v2/bat-jsl-1/igt@gem_huc_c...@huc-copy.html

  * igt@gem_lmem_swapping@verify-random:
- bat-jsl-1:  NOTRUN -> [SKIP][3] ([i915#4613]) +3 other tests skip
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131014v2/bat-jsl-1/igt@gem_lmem_swapp...@verify-random.html

  * igt@i915_selftest@live@guc_hang:
- bat-arls-3: [PASS][4] -> [DMESG-FAIL][5] ([i915#10262]) +12 other 
tests dmesg-fail
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-arls-3/igt@i915_selftest@live@guc_hang.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131014v2/bat-arls-3/igt@i915_selftest@live@guc_hang.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-jsl-1:  NOTRUN -> [SKIP][6] ([i915#4103]) +1 other test skip
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131014v2/bat-jsl-1/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_dsc@dsc-basic:
- bat-jsl-1:  NOTRUN -> [SKIP][7] ([i915#3555] / [i915#9886])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131014v2/bat-jsl-1/igt@kms_...@dsc-basic.html

  * igt@kms_force_connector_basic@force-load-detect:
- bat-jsl-1:  NOTRUN -> [SKIP][8]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131014v2/bat-jsl-1/igt@kms_force_connector_ba...@force-load-detect.html

  * igt@kms_setmode@basic-clone-single-crtc:
- bat-jsl-1:  NOTRUN -> [SKIP][9] ([i915#3555])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131014v2/bat-jsl-1/igt@kms_setm...@basic-clone-single-crtc.html

  
 Possible fixes 

  * igt@i915_selftest@live@gem_contexts:
- fi-apl-guc: [ABORT][10] -> [PASS][11]
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-apl-guc/igt@i915_selftest@live@gem_contexts.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131014v2/fi-apl-guc/igt@i915_selftest@live@gem_contexts.html

  * igt@i915_selftest@live@hangcheck:
- bat-adlp-6: [ABORT][12] ([i915#10021]) -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-adlp-6/igt@i915_selftest@l...@hangcheck.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131014v2/bat-adlp-6/igt@i915_selftest@l...@hangcheck.html
- bat-rpls-3: [DMESG-WARN][14] ([i915#5591]) -> [PASS][15]
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-rpls-3/igt@i915_selftest@l...@hangcheck.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131014v2/bat-rpls-3/igt@i915_selftest@l...@hangcheck.html

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

  [i915#10021]: https://gitlab.freedesktop.org/drm/intel/issues/10021
  [i915#10196]: https://gitlab.freedesktop.org/drm/intel/issues/10196
  [i915#10197]: https://gitlab.freedesktop.org/drm/intel/issues/10197
  [i915#10200]: https://gitlab.freedesktop.org/drm/intel/issues/10200
  [i915#10202]: https://gitlab.freedesktop.org/drm/intel/issues/10202
  [i915#10206]: https://gitlab.freedesktop.org/drm/intel/issues/10206
  [i915#10207]: https://gitlab.freedesktop.org/drm/intel/issues/10207
  [i915#10208]: https://gitlab.freedesktop.org/drm/intel/issues/10208
  [i915#10209]: https://gitlab.freedesktop.org/drm/intel/issues/10209
  [i915#10211]: https://gitlab.freedesktop.org/drm/intel/issues/10211
  [i915#10212]: https://gitlab.freedesktop.org/drm/intel/issues/10212
  [i915#10213]: https://gitlab.freedesktop.org/drm/intel/issues/10213
  [i915#10214]: https://gitlab.freedesktop.org/drm/intel/issues/10214
  [i915#10216]: https://gitlab.freedesktop.org/drm/intel/issues/10216
  [i915#10262]: https://gitlab.freedesktop.org/drm/intel/issues/10262
  [i915#10436]: https://gitlab.freedesktop.org/drm/intel/issues/10436
  

✗ Fi.CI.BUILD: failure for Enable Adaptive Sync SDP Support for DP (rev19)

2024-03-18 Thread Patchwork
== Series Details ==

Series: Enable Adaptive Sync SDP Support for DP (rev19)
URL   : https://patchwork.freedesktop.org/series/126829/
State : failure

== Summary ==

Error: patch 
https://patchwork.freedesktop.org/api/1.0/series/126829/revisions/19/mbox/ not 
applied
Applying: drm/dp: Add support to indicate if sink supports AS SDP
Applying: drm: Add Adaptive Sync SDP logging
Applying: drm/i915/display: Add crtc state dump for Adaptive Sync SDP
Using index info to reconstruct a base tree...
M   drivers/gpu/drm/i915/display/intel_crtc_state_dump.c
M   drivers/gpu/drm/i915/display/intel_display_types.h
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/display/intel_display_types.h
Auto-merging drivers/gpu/drm/i915/display/intel_crtc_state_dump.c
CONFLICT (content): Merge conflict in 
drivers/gpu/drm/i915/display/intel_crtc_state_dump.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0003 drm/i915/display: Add crtc state dump for Adaptive Sync SDP
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Build failed, no error log produced




[PATCH v2] drm/i915/xelpg: Add Wa_14020495402

2024-03-18 Thread Radhakrishna Sripada
Disable clockgating for TDL SVHS fub.

v2: Implement in general render/compute wa's(MattR)

Bspec: 46045
Cc: Matt Roper 
Signed-off-by: Radhakrishna Sripada 
---
 drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 +
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 6 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h 
b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
index 50962cfd1353..1f778b77f4f8 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
@@ -1215,6 +1215,7 @@
 #define   GEN12_DISABLE_EARLY_READ REG_BIT(14)
 #define   GEN12_ENABLE_LARGE_GRF_MODE  REG_BIT(12)
 #define   GEN12_PUSH_CONST_DEREF_HOLD_DIS  REG_BIT(8)
+#define   XELPG_DISABLE_TDL_SVHS_GATINGREG_BIT(1)
 #define   GEN12_DISABLE_DOP_GATING  REG_BIT(0)
 
 #define RT_CTRLMCR_REG(0xe530)
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c 
b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index b079cbbc1897..d2c63ecc490e 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -2892,10 +2892,14 @@ general_render_compute_wa_init(struct intel_engine_cs 
*engine, struct i915_wa_li
 
if (IS_GFX_GT_IP_STEP(gt, IP_VER(12, 70), STEP_B0, STEP_FOREVER) ||
IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_B0, STEP_FOREVER) ||
-   IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 74), IP_VER(12, 74)))
+   IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 74), IP_VER(12, 74))) {
/* Wa_14017856879 */
wa_mcr_masked_en(wal, GEN9_ROW_CHICKEN3, 
MTL_DISABLE_FIX_FOR_EOT_FLUSH);
 
+   /* Wa_14020495402 */
+   wa_mcr_masked_en(wal, GEN8_ROW_CHICKEN2, 
XELPG_DISABLE_TDL_SVHS_GATING);
+   }
+
if (IS_GFX_GT_IP_STEP(gt, IP_VER(12, 70), STEP_A0, STEP_B0) ||
IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_A0, STEP_B0))
/*
-- 
2.34.1



✗ Fi.CI.CHECKPATCH: warning for drm/xe/display: fix potential overflow when multiplying 2 u32 (rev2)

2024-03-18 Thread Patchwork
== Series Details ==

Series: drm/xe/display: fix potential overflow when multiplying 2 u32 (rev2)
URL   : https://patchwork.freedesktop.org/series/131014/
State : warning

== Summary ==

Error: dim checkpatch failed
8f904ca289af drm/xe/display: fix potential overflow when multiplying 2 u32
-:20: WARNING:LONG_LINE: line length of 101 exceeds 100 columns
#20: FILE: drivers/gpu/drm/xe/display/xe_fb_pin.c:32:
+   u64 pte = ggtt->pt_ops->pte_encode_bo(bo, 
mul_u32_u32(src_idx, XE_PAGE_SIZE),

-:30: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#30: FILE: drivers/gpu/drm/xe/display/xe_fb_pin.c:65:
+pte_encode_bo(bo, mul_u32_u32(src_idx, 
XE_PAGE_SIZE),
 xe->pat.idx[XE_CACHE_WB]));

-:47: WARNING:LONG_LINE: line length of 101 exceeds 100 columns
#47: FILE: drivers/gpu/drm/xe/display/xe_fb_pin.c:167:
+   u64 pte = ggtt->pt_ops->pte_encode_bo(bo, 
mul_u32_u32(src_idx, XE_PAGE_SIZE),

total: 0 errors, 2 warnings, 1 checks, 38 lines checked




✗ Fi.CI.BAT: failure for Bigjoiner refactoring (rev12)

2024-03-18 Thread Patchwork
== Series Details ==

Series: Bigjoiner refactoring (rev12)
URL   : https://patchwork.freedesktop.org/series/128311/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14443 -> Patchwork_128311v12


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_128311v12 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_128311v12, please notify your bug team 
(i915-ci-in...@lists.freedesktop.org) 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_128311v12/index.html

Participating hosts (35 -> 35)
--

  Additional (1): bat-arls-4 
  Missing(1): fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_module_load@load:
- bat-dg2-8:  [PASS][1] -> [DMESG-WARN][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-dg2-8/igt@i915_module_l...@load.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128311v12/bat-dg2-8/igt@i915_module_l...@load.html

  
Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- fi-apl-guc: [PASS][3] -> [FAIL][4] ([i915#8293])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-apl-guc/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128311v12/fi-apl-guc/boot.html
- fi-kbl-8809g:   [PASS][5] -> [FAIL][6] ([i915#8293])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-kbl-8809g/boot.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128311v12/fi-kbl-8809g/boot.html

  
 Possible fixes 

  * boot:
- fi-cfl-8109u:   [FAIL][7] ([i915#8293]) -> [PASS][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-cfl-8109u/boot.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128311v12/fi-cfl-8109u/boot.html

  

### IGT changes ###

 Issues hit 

  * igt@gem_huc_copy@huc-copy:
- fi-cfl-8109u:   NOTRUN -> [SKIP][9] ([i915#2190])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128311v12/fi-cfl-8109u/igt@gem_huc_c...@huc-copy.html

  * igt@gem_lmem_swapping@verify-random:
- fi-cfl-8109u:   NOTRUN -> [SKIP][10] ([i915#4613]) +3 other tests skip
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128311v12/fi-cfl-8109u/igt@gem_lmem_swapp...@verify-random.html

  * igt@kms_pm_backlight@basic-brightness:
- fi-cfl-8109u:   NOTRUN -> [SKIP][11] +11 other tests skip
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128311v12/fi-cfl-8109u/igt@kms_pm_backli...@basic-brightness.html

  
 Possible fixes 

  * igt@i915_selftest@live@hangcheck:
- bat-adlp-6: [ABORT][12] ([i915#10021]) -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-adlp-6/igt@i915_selftest@l...@hangcheck.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128311v12/bat-adlp-6/igt@i915_selftest@l...@hangcheck.html

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

  [i915#10021]: https://gitlab.freedesktop.org/drm/intel/issues/10021
  [i915#10196]: https://gitlab.freedesktop.org/drm/intel/issues/10196
  [i915#10197]: https://gitlab.freedesktop.org/drm/intel/issues/10197
  [i915#10200]: https://gitlab.freedesktop.org/drm/intel/issues/10200
  [i915#10202]: https://gitlab.freedesktop.org/drm/intel/issues/10202
  [i915#10206]: https://gitlab.freedesktop.org/drm/intel/issues/10206
  [i915#10207]: https://gitlab.freedesktop.org/drm/intel/issues/10207
  [i915#10208]: https://gitlab.freedesktop.org/drm/intel/issues/10208
  [i915#10209]: https://gitlab.freedesktop.org/drm/intel/issues/10209
  [i915#10211]: https://gitlab.freedesktop.org/drm/intel/issues/10211
  [i915#10212]: https://gitlab.freedesktop.org/drm/intel/issues/10212
  [i915#10213]: https://gitlab.freedesktop.org/drm/intel/issues/10213
  [i915#10214]: https://gitlab.freedesktop.org/drm/intel/issues/10214
  [i915#10216]: https://gitlab.freedesktop.org/drm/intel/issues/10216
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#8293]: 

[PATCH v3 2/2] drm/i915: Add SIZE_HINTS property for cursors

2024-03-18 Thread Ville Syrjala
From: Ville Syrjälä 

Advertize more suitable cursor sizes via the new SIZE_HINTS
plane property.

We can't really enumerate all supported cursor sizes on
the platforms where the cursor height can vary freely, so
for simplicity we'll just expose all square+POT sizes between
each platform's min and max cursor limits.

Depending on the platform this will give us one of three
results:
- 64x64,128x128,256x256,512x512
- 64x64,128x128,256x256
- 64x64

Cc: Simon Ser 
Cc: Jonas Ådahl 
Cc: Daniel Stone 
Cc: Sameer Lattannavar 
Cc: Sebastian Wick 
Cc: Harry Wentland 
Cc: Pekka Paalanen 
Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_cursor.c | 24 +
 1 file changed, 24 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c 
b/drivers/gpu/drm/i915/display/intel_cursor.c
index f8b33999d43f..49e9b9be2235 100644
--- a/drivers/gpu/drm/i915/display/intel_cursor.c
+++ b/drivers/gpu/drm/i915/display/intel_cursor.c
@@ -823,6 +823,28 @@ static const struct drm_plane_funcs 
intel_cursor_plane_funcs = {
.format_mod_supported = intel_cursor_format_mod_supported,
 };
 
+static void intel_cursor_add_size_hints_property(struct intel_plane *plane)
+{
+   struct drm_i915_private *i915 = to_i915(plane->base.dev);
+   const struct drm_mode_config *config = >drm.mode_config;
+   struct drm_plane_size_hint hints[4];
+   int size, max_size, num_hints = 0;
+
+   max_size = min(config->cursor_width, config->cursor_height);
+
+   /* for simplicity only enumerate the supported square+POT sizes */
+   for (size = 64; size <= max_size; size *= 2) {
+   if (drm_WARN_ON(>drm, num_hints >= ARRAY_SIZE(hints)))
+   break;
+
+   hints[num_hints].width = size;
+   hints[num_hints].height = size;
+   num_hints++;
+   }
+
+   drm_plane_add_size_hints_property(>base, hints, num_hints);
+}
+
 struct intel_plane *
 intel_cursor_plane_create(struct drm_i915_private *dev_priv,
  enum pipe pipe)
@@ -881,6 +903,8 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv,
   DRM_MODE_ROTATE_0 |
   DRM_MODE_ROTATE_180);
 
+   intel_cursor_add_size_hints_property(cursor);
+
zpos = DISPLAY_RUNTIME_INFO(dev_priv)->num_sprites[pipe] + 1;
drm_plane_create_zpos_immutable_property(>base, zpos);
 
-- 
2.43.2



[PATCH v3 1/2] drm: Introduce plane SIZE_HINTS property

2024-03-18 Thread Ville Syrjala
From: Ville Syrjälä 

Add a new immutable plane property by which a plane can advertise
a handful of recommended plane sizes. This would be mostly exposed
by cursor planes as a slightly more capable replacement for
the DRM_CAP_CURSOR_WIDTH/HEIGHT caps, which can only declare
a one size fits all limit for the whole device.

Currently eg. amdgpu/i915/nouveau just advertize the max cursor
size via the cursor size caps. But always using the max sized
cursor can waste a surprising amount of power, so a better
strategy is desirable.

Most other drivers don't specify any cursor size at all, in
which case the ioctl code just claims that 64x64 is a great
choice. Whether that is actually true is debatable.

A poll of various compositor developers informs us that
blindly probing with setcursor/atomic ioctl to determine
suitable cursor sizes is not acceptable, thus the
introduction of the new property to supplant the cursor
size caps. The compositor will now be free to select a
more optimal cursor size from the short list of options.

Note that the reported sizes (either via the property or the
caps) make no claims about things such as plane scaling. So
these things should only really be consulted for simple
"cursor like" use cases.

Userspace consumer in the form of mutter seems ready:
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3165

v2: Try to add some docs
v3: Specify that value 0 is reserved for future use (basic idea from Jonas)
Drop the note about typical hardware (Pekka)
v4: Update the docs to indicate the list is "in order of preference"
Add a a link to the mutter MR
v5: Limit to cursors only for now (Simon)

Cc: Jonas Ådahl 
Cc: Sameer Lattannavar 
Reviewed-by: Sebastian Wick 
Reviewed-by: Simon Ser 
Acked-by: Daniel Stone 
Acked-by: Harry Wentland 
Acked-by: Pekka Paalanen 
Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/drm_mode_config.c |  7 
 drivers/gpu/drm/drm_plane.c   | 56 +++
 include/drm/drm_mode_config.h |  5 +++
 include/drm/drm_plane.h   |  4 +++
 include/uapi/drm/drm_mode.h   | 11 ++
 5 files changed, 83 insertions(+)

diff --git a/drivers/gpu/drm/drm_mode_config.c 
b/drivers/gpu/drm/drm_mode_config.c
index 48fd2d67f352..568972258222 100644
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -372,6 +372,13 @@ static int drm_mode_create_standard_properties(struct 
drm_device *dev)
return -ENOMEM;
dev->mode_config.modifiers_property = prop;
 
+   prop = drm_property_create(dev,
+  DRM_MODE_PROP_IMMUTABLE | DRM_MODE_PROP_BLOB,
+  "SIZE_HINTS", 0);
+   if (!prop)
+   return -ENOMEM;
+   dev->mode_config.size_hints_property = prop;
+
return 0;
 }
 
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 672c655c7a8e..eecc24c54efd 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -140,6 +140,25 @@
  * DRM_FORMAT_MOD_LINEAR. Before linux kernel release v5.1 there have been
  * various bugs in this area with inconsistencies between the capability
  * flag and per-plane properties.
+ *
+ * SIZE_HINTS:
+ * Blob property which contains the set of recommended plane size
+ * which can used for simple "cursor like" use cases (eg. no scaling).
+ * Using these hints frees userspace from extensive probing of
+ * supported plane sizes through atomic/setcursor ioctls.
+ *
+ * The blob contains an array of struct drm_plane_size_hint, in
+ * order of preference. For optimal usage userspace should pick
+ * the first size that satisfies its own requirements.
+ *
+ * Drivers should only attach this property to planes that
+ * support a very limited set of sizes.
+ *
+ * Note that property value 0 (ie. no blob) is reserved for potential
+ * future use. Current userspace is expected to ignore the property
+ * if the value is 0, and fall back to some other means (eg.
+ * _CAP_CURSOR_WIDTH and _CAP_CURSOR_HEIGHT) to determine
+ * the appropriate plane size to use.
  */
 
 static unsigned int drm_num_planes(struct drm_device *dev)
@@ -1729,3 +1748,40 @@ int drm_plane_create_scaling_filter_property(struct 
drm_plane *plane,
return 0;
 }
 EXPORT_SYMBOL(drm_plane_create_scaling_filter_property);
+
+/**
+ * drm_plane_add_size_hint_property - create a size hint property
+ *
+ * @plane: drm plane
+ * @hints: size hints
+ * @num_hints: number of size hints
+ *
+ * Create a size hints property for the plane.
+ *
+ * RETURNS:
+ * Zero for success or -errno
+ */
+int drm_plane_add_size_hints_property(struct drm_plane *plane,
+ const struct drm_plane_size_hint *hints,
+ int num_hints)
+{
+   struct drm_device *dev = plane->dev;
+   struct drm_mode_config *config = >mode_config;
+   struct 

[PATCH v3 0/2] drm: Add plane SIZE_HINTS property

2024-03-18 Thread Ville Syrjala
From: Ville Syrjälä 

Final final version I hope. Mainly for CI to test against the
new IGTs.

Real userspace implementation:
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3165 
  

IGT:
https://patchwork.freedesktop.org/series/131199/

Changes from v2:
- Limit to cursor planes only (Simon)

Test-with: 20240315191505.27620-1-ville.syrj...@linux.intel.com
Cc: Simon Ser 
Cc: Jonas Ådahl 
Cc: Daniel Stone 
Cc: Sameer Lattannavar 
Cc: Sebastian Wick 
Cc: Harry Wentland 
Cc: Pekka Paalanen 

Ville Syrjälä (2):
  drm: Introduce plane SIZE_HINTS property
  drm/i915: Add SIZE_HINTS property for cursors

 drivers/gpu/drm/drm_mode_config.c   |  7 +++
 drivers/gpu/drm/drm_plane.c | 56 +
 drivers/gpu/drm/i915/display/intel_cursor.c | 24 +
 include/drm/drm_mode_config.h   |  5 ++
 include/drm/drm_plane.h |  4 ++
 include/uapi/drm/drm_mode.h | 11 
 6 files changed, 107 insertions(+)

-- 
2.43.2



✗ Fi.CI.SPARSE: warning for Bigjoiner refactoring (rev12)

2024-03-18 Thread Patchwork
== Series Details ==

Series: Bigjoiner refactoring (rev12)
URL   : https://patchwork.freedesktop.org/series/128311/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'

✗ Fi.CI.CHECKPATCH: warning for Bigjoiner refactoring (rev12)

2024-03-18 Thread Patchwork
== Series Details ==

Series: Bigjoiner refactoring (rev12)
URL   : https://patchwork.freedesktop.org/series/128311/
State : warning

== Summary ==

Error: dim checkpatch failed
f7402570def3 drm/i915: Add a small helper to compute the set of pipes for crtc
7a0f16bdaae4 drm/i915: Extract intel_ddi_post_disable_hdmi_or_sst()
-:77: CHECK:BRACES: Blank lines aren't necessary after an open brace '{'
#77: FILE: drivers/gpu/drm/i915/display/intel_ddi.c:3136:
+{
+

total: 0 errors, 0 warnings, 1 checks, 57 lines checked
6efff282914e drm/i915: Utilize intel_crtc_joined_pipe_mask() more
768684871bf2 drm/i915: Handle joined pipes inside hsw_crtc_disable()
-:130: ERROR:CODE_INDENT: code indent should use tabs where possible
#130: FILE: drivers/gpu/drm/i915/display/intel_display.c:6819:
+if (intel_crtc_is_bigjoiner_slave(old_crtc_state))$

-:130: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#130: FILE: drivers/gpu/drm/i915/display/intel_display.c:6819:
+if (intel_crtc_is_bigjoiner_slave(old_crtc_state))$

-:131: ERROR:CODE_INDENT: code indent should use tabs where possible
#131: FILE: drivers/gpu/drm/i915/display/intel_display.c:6820:
+continue;$

-:131: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#131: FILE: drivers/gpu/drm/i915/display/intel_display.c:6820:
+continue;$

total: 2 errors, 2 warnings, 0 checks, 111 lines checked
24bedff027e7 drm/i915: Handle joined pipes inside hsw_crtc_enable()
-:8: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible 
unwrapped commit description?)
#8: 
That way we can also remove a bunch of checks like 
intel_crtc_is_bigjoiner_slave.

-:278: WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a 
separate line
#278: FILE: drivers/gpu/drm/i915/display/intel_display.c:1718:
+* to change the workaround. */

-:331: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in 
parentheses
#331: FILE: drivers/gpu/drm/i915/display/intel_display.h:315:
+#define for_each_intel_crtc_in_pipe_mask_reverse(dev, intel_crtc, pipe_mask)   
\
+   list_for_each_entry_reverse(intel_crtc, 
\
+   &(dev)->mode_config.crtc_list,  
\
+   base.head)  
\
+   for_each_if((pipe_mask) & BIT(intel_crtc->pipe))

-:331: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'intel_crtc' - possible 
side-effects?
#331: FILE: drivers/gpu/drm/i915/display/intel_display.h:315:
+#define for_each_intel_crtc_in_pipe_mask_reverse(dev, intel_crtc, pipe_mask)   
\
+   list_for_each_entry_reverse(intel_crtc, 
\
+   &(dev)->mode_config.crtc_list,  
\
+   base.head)  
\
+   for_each_if((pipe_mask) & BIT(intel_crtc->pipe))

total: 1 errors, 2 warnings, 1 checks, 304 lines checked
6a9a00d894ad drm/i915: Allow bigjoiner for MST




Re: [PATCH] drm/i915/gt: Reset queue_priority_hint on parking

2024-03-18 Thread Rodrigo Vivi
On Mon, Mar 18, 2024 at 02:58:47PM +0100, Janusz Krzysztofik wrote:
> From: Chris Wilson 
> 
> Originally, with strict in order execution, we could complete execution
> only when the queue was empty. Preempt-to-busy allows replacement of an
> active request that may complete before the preemption is processed by
> HW. If that happens, the request is retired from the queue, but the
> queue_priority_hint remains set, preventing direct submission until
> after the next CS interrupt is processed.

perhaps we are missing some intel_engine_flush_submission at preepmtion?

I wonder if there could be anything else we might be missing
with the lack of the flush.

> 
> This preempt-to-busy race can be triggered by the heartbeat, which will
> also act as the power-management barrier and upon completion allow us to
> idle the HW. We may process the completion of the heartbeat, and begin
> parking the engine before the CS event that restores the
> queue_priority_hint, causing us to fail the assertion that it is MIN.
> 
> <3>[  166.210729] __engine_park:283 
> GEM_BUG_ON(engine->sched_engine->queue_priority_hint != (-((int)(~0U >> 1)) - 
> 1))
> <0>[  166.210781] Dumping ftrace buffer:
> <0>[  166.210795] -
> ...
> <0>[  167.302811] drm_fdin-1097  2..s1. 165741070us : trace_ports: 
> :00:02.0 rcs0: promote { ccid:20 1217:2 prio 0 }
> <0>[  167.302861] drm_fdin-1097  2d.s2. 165741072us : 
> execlists_submission_tasklet: :00:02.0 rcs0: preempting last=1217:2, 
> prio=0, hint=2147483646
> <0>[  167.302928] drm_fdin-1097  2d.s2. 165741072us : 
> __i915_request_unsubmit: :00:02.0 rcs0: fence 1217:2, current 0
> <0>[  167.302992] drm_fdin-1097  2d.s2. 165741073us : 
> __i915_request_submit: :00:02.0 rcs0: fence 3:4660, current 4659
> <0>[  167.303044] drm_fdin-1097  2d.s1. 165741076us : 
> execlists_submission_tasklet: :00:02.0 rcs0: context:3 schedule-in, 
> ccid:40
> <0>[  167.303095] drm_fdin-1097  2d.s1. 165741077us : trace_ports: 
> :00:02.0 rcs0: submit { ccid:40 3:4660* prio 2147483646 }
> <0>[  167.303159] kworker/-89   11. 165741139us : 
> i915_request_retire.part.0: :00:02.0 rcs0: fence c90:2, current 2
> <0>[  167.303208] kworker/-89   11. 165741148us : 
> __intel_context_do_unpin: :00:02.0 rcs0: context:c90 unpin
> <0>[  167.303272] kworker/-89   11. 165741159us : 
> i915_request_retire.part.0: :00:02.0 rcs0: fence 1217:2, current 2
> <0>[  167.303321] kworker/-89   11. 165741166us : 
> __intel_context_do_unpin: :00:02.0 rcs0: context:1217 unpin
> <0>[  167.303384] kworker/-89   11. 165741170us : 
> i915_request_retire.part.0: :00:02.0 rcs0: fence 3:4660, current 4660
> <0>[  167.303434] kworker/-89   11d..1. 165741172us : 
> __intel_context_retire: :00:02.0 rcs0: context:1216 retire runtime: { 
> total:56028ns, avg:56028ns }
> <0>[  167.303484] kworker/-89   11. 165741198us : __engine_park: 
> :00:02.0 rcs0: parked
> <0>[  167.303534]   -0 5d.H3. 165741207us : 
> execlists_irq_handler: :00:02.0 rcs0: semaphore yield: 0040
> <0>[  167.303583] kworker/-89   11. 165741397us : 
> __intel_context_retire: :00:02.0 rcs0: context:1217 retire runtime: { 
> total:325575ns, avg:0ns }
> <0>[  167.303756] kworker/-89   11. 165741777us : 
> __intel_context_retire: :00:02.0 rcs0: context:c90 retire runtime: { 
> total:0ns, avg:0ns }
> <0>[  167.303806] kworker/-89   11. 165742017us : __engine_park: 
> __engine_park:283 GEM_BUG_ON(engine->sched_engine->queue_priority_hint != 
> (-((int)(~0U >> 1)) - 1))
> <0>[  167.303811] -
> <4>[  167.304722] [ cut here ]
> <2>[  167.304725] kernel BUG at drivers/gpu/drm/i915/gt/intel_engine_pm.c:283!
> <4>[  167.304731] invalid opcode:  [#1] PREEMPT SMP NOPTI
> <4>[  167.304734] CPU: 11 PID: 89 Comm: kworker/11:1 Tainted: GW  
> 6.8.0-rc2-CI_DRM_14193-gc655e0fd2804+ #1
> <4>[  167.304736] Hardware name: Intel Corporation Rocket Lake Client 
> Platform/RocketLake S UDIMM 6L RVP, BIOS RKLSFWI1.R00.3173.A03.2204210138 
> 04/21/2022
> <4>[  167.304738] Workqueue: i915-unordered retire_work_handler [i915]
> <4>[  167.304839] RIP: 0010:__engine_park+0x3fd/0x680 [i915]
> <4>[  167.304937] Code: 00 48 c7 c2 b0 e5 86 a0 48 8d 3d 00 00 00 00 e8 79 48 
> d4 e0 bf 01 00 00 00 e8 ef 0a d4 e0 31 f6 bf 09 00 00 00 e8 03 49 c0 e0 <0f> 
> 0b 0f 0b be 01 00 00 00 e8 f5 61 fd ff 31 c0 e9 34 fd ff ff 48
> <4>[  167.304940] RSP: 0018:c959fce0 EFLAGS: 00010246
> <4>[  167.304942] RAX: 0200 RBX:  RCX: 
> 0006
> <4>[  167.304944] RDX:  RSI:  RDI: 
> 0009
> <4>[  167.304946] RBP: 8881330ca1b0 R08: 0001 R09: 
> 0001
> <4>[  167.304947] R10: 0001 R11: 0001 R12: 
> 8881330ca000
> <4>[  

Re: [PATCH] drm/i915/mtl: Add Wa_14020495402

2024-03-18 Thread Matt Roper
On Mon, Mar 18, 2024 at 12:35:58PM -0700, Radhakrishna Sripada wrote:
> Disable clockgating for TDL SVHS fub.
> 
> Bspec: 46045
> Cc: Matt Roper 
> Signed-off-by: Radhakrishna Sripada 
> ---
>  drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 +
>  drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h 
> b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
> index 50962cfd1353..860765cd2ad2 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
> @@ -1215,6 +1215,7 @@
>  #define   GEN12_DISABLE_EARLY_READ   REG_BIT(14)
>  #define   GEN12_ENABLE_LARGE_GRF_MODEREG_BIT(12)
>  #define   GEN12_PUSH_CONST_DEREF_HOLD_DISREG_BIT(8)
> +#define   MTL_DISABLE_TDL_SVHS_GATINGREG_BIT(1)
>  #define   GEN12_DISABLE_DOP_GATING  REG_BIT(0)
>  
>  #define RT_CTRL  MCR_REG(0xe530)
> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c 
> b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> index b079cbbc1897..8a82aa93a08d 100644
> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> @@ -828,6 +828,9 @@ static void xelpg_ctx_workarounds_init(struct 
> intel_engine_cs *engine,
>  
>   /* Wa_14019877138 */
>   wa_mcr_masked_en(wal, XEHP_PSS_CHICKEN, FD_END_COLLECT);
> +
> + /* Wa_14020495402 */
> + wa_mcr_masked_en(wal, GEN8_ROW_CHICKEN2, MTL_DISABLE_TDL_SVHS_GATING);

I don't see this register in the LRC.  I think this might be in the
wrong function?

Also, this patch should use an xelpg prefix, not MTL, since this is a
workaround for the graphics IP (on any platform it shows up in), not for
MTL.


Matt

>  }
>  
>  static void fakewa_disable_nestedbb_mode(struct intel_engine_cs *engine,
> -- 
> 2.34.1
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


[PATCH] drm/i915/mtl: Add Wa_14020495402

2024-03-18 Thread Radhakrishna Sripada
Disable clockgating for TDL SVHS fub.

Bspec: 46045
Cc: Matt Roper 
Signed-off-by: Radhakrishna Sripada 
---
 drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 +
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h 
b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
index 50962cfd1353..860765cd2ad2 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
@@ -1215,6 +1215,7 @@
 #define   GEN12_DISABLE_EARLY_READ REG_BIT(14)
 #define   GEN12_ENABLE_LARGE_GRF_MODE  REG_BIT(12)
 #define   GEN12_PUSH_CONST_DEREF_HOLD_DIS  REG_BIT(8)
+#define   MTL_DISABLE_TDL_SVHS_GATING  REG_BIT(1)
 #define   GEN12_DISABLE_DOP_GATING  REG_BIT(0)
 
 #define RT_CTRLMCR_REG(0xe530)
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c 
b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index b079cbbc1897..8a82aa93a08d 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -828,6 +828,9 @@ static void xelpg_ctx_workarounds_init(struct 
intel_engine_cs *engine,
 
/* Wa_14019877138 */
wa_mcr_masked_en(wal, XEHP_PSS_CHICKEN, FD_END_COLLECT);
+
+   /* Wa_14020495402 */
+   wa_mcr_masked_en(wal, GEN8_ROW_CHICKEN2, MTL_DISABLE_TDL_SVHS_GATING);
 }
 
 static void fakewa_disable_nestedbb_mode(struct intel_engine_cs *engine,
-- 
2.34.1



Re: [PATCH v4] Fix divide-by-zero regression on DP MST unplug with nouveau

2024-03-18 Thread Imre Deak
On Sat, Mar 16, 2024 at 12:05:59PM +, Chris Bainbridge wrote:
> Fix a regression when using nouveau and unplugging a StarTech MSTDP122DP
> DisplayPort 1.2 MST hub (the same regression does not appear when using
> a Cable Matters DisplayPort 1.4 MST hub). Trace:

Thanks for the report and fix, pushed the patch to drm-misc-fixes.

In the future, please add the appropriate 'drm:' prefix to the commit
subject, I added this now while applying the patch.

> 
>  divide error:  [#1] PREEMPT SMP PTI
>  CPU: 7 PID: 2962 Comm: Xorg Not tainted 6.8.0-rc3+ #744
>  Hardware name: Razer Blade/DANA_MB, BIOS 01.01 08/31/2018
>  RIP: 0010:drm_dp_bw_overhead+0xb4/0x110 [drm_display_helper]
>  Code: c6 b8 01 00 00 00 75 61 01 c6 41 0f af f3 41 0f af f1 c1 e1 04 48 63 
> c7 31 d2 89 ff 48 8b 5d f8 c9 48 0f af f1 48 8d 44 06 ff <48> f7 f7 31 d2 31 
> c9 31 f6 31 ff 45 31 c0 45 31 c9 45 31 d2 45 31
>  RSP: 0018:b2c5c211fa30 EFLAGS: 00010206
>  RAX:  RBX:  RCX: 00f59b00
>  RDX:  RSI:  RDI: 
>  RBP: b2c5c211fa48 R08: 0001 R09: 0020
>  R10: 0004 R11:  R12: 00023b4a
>  R13: 91d37d165800 R14: 91d36fac6d80 R15: 91d34a764010
>  FS:  7f4a1ca3fa80() GS:91d6edbc() knlGS:
>  CS:  0010 DS:  ES:  CR0: 80050033
>  CR2: 559491d49000 CR3: 00011d180002 CR4: 003706f0
>  Call Trace:
>   
>   ? show_regs+0x6d/0x80
>   ? die+0x37/0xa0
>   ? do_trap+0xd4/0xf0
>   ? do_error_trap+0x71/0xb0
>   ? drm_dp_bw_overhead+0xb4/0x110 [drm_display_helper]
>   ? exc_divide_error+0x3a/0x70
>   ? drm_dp_bw_overhead+0xb4/0x110 [drm_display_helper]
>   ? asm_exc_divide_error+0x1b/0x20
>   ? drm_dp_bw_overhead+0xb4/0x110 [drm_display_helper]
>   ? drm_dp_calc_pbn_mode+0x2e/0x70 [drm_display_helper]
>   nv50_msto_atomic_check+0xda/0x120 [nouveau]
>   drm_atomic_helper_check_modeset+0xa87/0xdf0 [drm_kms_helper]
>   drm_atomic_helper_check+0x19/0xa0 [drm_kms_helper]
>   nv50_disp_atomic_check+0x13f/0x2f0 [nouveau]
>   drm_atomic_check_only+0x668/0xb20 [drm]
>   ? drm_connector_list_iter_next+0x86/0xc0 [drm]
>   drm_atomic_commit+0x58/0xd0 [drm]
>   ? __pfx___drm_printfn_info+0x10/0x10 [drm]
>   drm_atomic_connector_commit_dpms+0xd7/0x100 [drm]
>   drm_mode_obj_set_property_ioctl+0x1c5/0x450 [drm]
>   ? __pfx_drm_connector_property_set_ioctl+0x10/0x10 [drm]
>   drm_connector_property_set_ioctl+0x3b/0x60 [drm]
>   drm_ioctl_kernel+0xb9/0x120 [drm]
>   drm_ioctl+0x2d0/0x550 [drm]
>   ? __pfx_drm_connector_property_set_ioctl+0x10/0x10 [drm]
>   nouveau_drm_ioctl+0x61/0xc0 [nouveau]
>   __x64_sys_ioctl+0xa0/0xf0
>   do_syscall_64+0x76/0x140
>   ? do_syscall_64+0x85/0x140
>   ? do_syscall_64+0x85/0x140
>   entry_SYSCALL_64_after_hwframe+0x6e/0x76
>  RIP: 0033:0x7f4a1cd1a94f
>  Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 
> 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 
> ff ff 77 1f 48 8b 44 24 18 64 48 2b 04 25 28 00
>  RSP: 002b:7ffd2f1df520 EFLAGS: 0246 ORIG_RAX: 0010
>  RAX: ffda RBX: 7ffd2f1df5b0 RCX: 7f4a1cd1a94f
>  RDX: 7ffd2f1df5b0 RSI: c01064ab RDI: 000f
>  RBP: c01064ab R08: 56347932deb8 R09: 56347a7d99c0
>  R10:  R11: 0246 R12: 56347938a220
>  R13: 000f R14: 563479d9f3f0 R15: 
>   
>  Modules linked in: rfcomm xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat 
> nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user 
> xfrm_algo xt_addrtype nft_compat nf_tables nfnetlink br_netfilter bridge stp 
> llc ccm cmac algif_hash overlay algif_skcipher af_alg bnep binfmt_misc 
> snd_sof_pci_intel_cnl snd_sof_intel_hda_common snd_soc_hdac_hda snd_sof_pci 
> snd_sof_xtensa_dsp snd_sof_intel_hda snd_sof snd_sof_utils 
> snd_soc_acpi_intel_match snd_soc_acpi snd_soc_core snd_compress 
> snd_sof_intel_hda_mlink snd_hda_ext_core iwlmvm intel_rapl_msr 
> intel_rapl_common intel_tcc_cooling x86_pkg_temp_thermal intel_powerclamp 
> mac80211 coretemp kvm_intel snd_hda_codec_hdmi kvm snd_hda_codec_realtek 
> snd_hda_codec_generic uvcvideo libarc4 snd_hda_intel snd_intel_dspcfg 
> snd_hda_codec iwlwifi videobuf2_vmalloc videobuf2_memops uvc irqbypass btusb 
> videobuf2_v4l2 snd_seq_midi crct10dif_pclmul hid_multitouch crc32_pclmul 
> snd_seq_midi_event btrtl snd_hwdep videodev polyval_clmulni polyval_generic 
> snd_rawmidi
>   ghash_clmulni_intel aesni_intel btintel crypto_simd snd_hda_core cryptd 
> snd_seq btbcm ee1004 8250_dw videobuf2_common btmtk rapl nls_iso8859_1 
> mei_hdcp thunderbolt bluetooth intel_cstate wmi_bmof intel_wmi_thunderbolt 
> cfg80211 snd_pcm mc snd_seq_device i2c_i801 r8169 ecdh_generic snd_timer 
> i2c_smbus ecc snd mei_me intel_lpss_pci mei ahci intel_lpss soundcore realtek 
> libahci idma64 

Re: [PATCH v17 0/9] Enable Adaptive Sync SDP Support for DP

2024-03-18 Thread Jani Nikula
On Mon, 11 Mar 2024, Mitul Golani  wrote:
>  An Adaptive-Sync-capable DP protocol converter indicates its
> support by setting the related bit in the DPCD register. This
> is valid for DP and edp as well.
>
> Computes AS SDP values based on the display configuration,
> ensuring proper handling of Variable Refresh Rate (VRR)
> in the context of Adaptive Sync.

[snip]

> Mitul Golani (9):
>   drm/dp: Add support to indicate if sink supports AS SDP
>   drm: Add Adaptive Sync SDP logging

Maarten, Maxime, Thomas, ack for merging these two patches via
drm-intel-next?

BR,
Jani.

>   drm/i915/display: Add crtc state dump for Adaptive Sync SDP
>   drm/i915/dp: Add Read/Write support for Adaptive Sync SDP
>   drm/i915/dp: Add wrapper function to check AS SDP
>   drm/i915/display: Compute AS SDP parameters
>   drm/i915/display: Add state checker for Adaptive Sync SDP
>   drm/i915/display: Compute vrr_vsync params
>   drm/i915/display: Read/Write Adaptive Sync SDP
>
>  drivers/gpu/drm/display/drm_dp_helper.c   |  37 ++
>  .../drm/i915/display/intel_crtc_state_dump.c  |  13 ++
>  drivers/gpu/drm/i915/display/intel_ddi.c  |   1 +
>  drivers/gpu/drm/i915/display/intel_display.c  |  48 +++
>  .../drm/i915/display/intel_display_device.h   |   1 +
>  .../drm/i915/display/intel_display_types.h|   2 +
>  drivers/gpu/drm/i915/display/intel_dp.c   | 125 ++
>  drivers/gpu/drm/i915/display/intel_dp.h   |   1 +
>  drivers/gpu/drm/i915/display/intel_hdmi.c |  14 +-
>  drivers/gpu/drm/i915/display/intel_vrr.c  |  30 -
>  drivers/gpu/drm/i915/i915_reg.h   |  15 +++
>  include/drm/display/drm_dp.h  |  11 ++
>  include/drm/display/drm_dp_helper.h   |  30 +
>  13 files changed, 325 insertions(+), 3 deletions(-)

-- 
Jani Nikula, Intel


[PATCH] drm/i915/gt: Reset queue_priority_hint on parking

2024-03-18 Thread Janusz Krzysztofik
From: Chris Wilson 

Originally, with strict in order execution, we could complete execution
only when the queue was empty. Preempt-to-busy allows replacement of an
active request that may complete before the preemption is processed by
HW. If that happens, the request is retired from the queue, but the
queue_priority_hint remains set, preventing direct submission until
after the next CS interrupt is processed.

This preempt-to-busy race can be triggered by the heartbeat, which will
also act as the power-management barrier and upon completion allow us to
idle the HW. We may process the completion of the heartbeat, and begin
parking the engine before the CS event that restores the
queue_priority_hint, causing us to fail the assertion that it is MIN.

<3>[  166.210729] __engine_park:283 
GEM_BUG_ON(engine->sched_engine->queue_priority_hint != (-((int)(~0U >> 1)) - 
1))
<0>[  166.210781] Dumping ftrace buffer:
<0>[  166.210795] -
...
<0>[  167.302811] drm_fdin-1097  2..s1. 165741070us : trace_ports: 
:00:02.0 rcs0: promote { ccid:20 1217:2 prio 0 }
<0>[  167.302861] drm_fdin-1097  2d.s2. 165741072us : 
execlists_submission_tasklet: :00:02.0 rcs0: preempting last=1217:2, 
prio=0, hint=2147483646
<0>[  167.302928] drm_fdin-1097  2d.s2. 165741072us : 
__i915_request_unsubmit: :00:02.0 rcs0: fence 1217:2, current 0
<0>[  167.302992] drm_fdin-1097  2d.s2. 165741073us : 
__i915_request_submit: :00:02.0 rcs0: fence 3:4660, current 4659
<0>[  167.303044] drm_fdin-1097  2d.s1. 165741076us : 
execlists_submission_tasklet: :00:02.0 rcs0: context:3 schedule-in, ccid:40
<0>[  167.303095] drm_fdin-1097  2d.s1. 165741077us : trace_ports: 
:00:02.0 rcs0: submit { ccid:40 3:4660* prio 2147483646 }
<0>[  167.303159] kworker/-89   11. 165741139us : 
i915_request_retire.part.0: :00:02.0 rcs0: fence c90:2, current 2
<0>[  167.303208] kworker/-89   11. 165741148us : 
__intel_context_do_unpin: :00:02.0 rcs0: context:c90 unpin
<0>[  167.303272] kworker/-89   11. 165741159us : 
i915_request_retire.part.0: :00:02.0 rcs0: fence 1217:2, current 2
<0>[  167.303321] kworker/-89   11. 165741166us : 
__intel_context_do_unpin: :00:02.0 rcs0: context:1217 unpin
<0>[  167.303384] kworker/-89   11. 165741170us : 
i915_request_retire.part.0: :00:02.0 rcs0: fence 3:4660, current 4660
<0>[  167.303434] kworker/-89   11d..1. 165741172us : 
__intel_context_retire: :00:02.0 rcs0: context:1216 retire runtime: { 
total:56028ns, avg:56028ns }
<0>[  167.303484] kworker/-89   11. 165741198us : __engine_park: 
:00:02.0 rcs0: parked
<0>[  167.303534]   -0 5d.H3. 165741207us : 
execlists_irq_handler: :00:02.0 rcs0: semaphore yield: 0040
<0>[  167.303583] kworker/-89   11. 165741397us : 
__intel_context_retire: :00:02.0 rcs0: context:1217 retire runtime: { 
total:325575ns, avg:0ns }
<0>[  167.303756] kworker/-89   11. 165741777us : 
__intel_context_retire: :00:02.0 rcs0: context:c90 retire runtime: { 
total:0ns, avg:0ns }
<0>[  167.303806] kworker/-89   11. 165742017us : __engine_park: 
__engine_park:283 GEM_BUG_ON(engine->sched_engine->queue_priority_hint != 
(-((int)(~0U >> 1)) - 1))
<0>[  167.303811] -
<4>[  167.304722] [ cut here ]
<2>[  167.304725] kernel BUG at drivers/gpu/drm/i915/gt/intel_engine_pm.c:283!
<4>[  167.304731] invalid opcode:  [#1] PREEMPT SMP NOPTI
<4>[  167.304734] CPU: 11 PID: 89 Comm: kworker/11:1 Tainted: GW
  6.8.0-rc2-CI_DRM_14193-gc655e0fd2804+ #1
<4>[  167.304736] Hardware name: Intel Corporation Rocket Lake Client 
Platform/RocketLake S UDIMM 6L RVP, BIOS RKLSFWI1.R00.3173.A03.2204210138 
04/21/2022
<4>[  167.304738] Workqueue: i915-unordered retire_work_handler [i915]
<4>[  167.304839] RIP: 0010:__engine_park+0x3fd/0x680 [i915]
<4>[  167.304937] Code: 00 48 c7 c2 b0 e5 86 a0 48 8d 3d 00 00 00 00 e8 79 48 
d4 e0 bf 01 00 00 00 e8 ef 0a d4 e0 31 f6 bf 09 00 00 00 e8 03 49 c0 e0 <0f> 0b 
0f 0b be 01 00 00 00 e8 f5 61 fd ff 31 c0 e9 34 fd ff ff 48
<4>[  167.304940] RSP: 0018:c959fce0 EFLAGS: 00010246
<4>[  167.304942] RAX: 0200 RBX:  RCX: 
0006
<4>[  167.304944] RDX:  RSI:  RDI: 
0009
<4>[  167.304946] RBP: 8881330ca1b0 R08: 0001 R09: 
0001
<4>[  167.304947] R10: 0001 R11: 0001 R12: 
8881330ca000
<4>[  167.304948] R13: 888110f02aa0 R14: 88812d1d0205 R15: 
88811277d4f0
<4>[  167.304950] FS:  () GS:88844f78() 
knlGS:
<4>[  167.304952] CS:  0010 DS:  ES:  CR0: 80050033
<4>[  167.304953] CR2: 7fc362200c40 CR3: 00013306e003 CR4: 
00770ef0
<4>[  167.304955] PKRU: 5554
<4>[  167.304957] Call Trace:
<4>[  167.304958]  

Re: [PATCH] drm/i915/display: Fixed a screen flickering when turning on display from off

2024-03-18 Thread Jani Nikula
On Mon, 18 Mar 2024, Dolan Liu  wrote:
> this case have been there so many years, it's time to fix it if 
> possible. And user-space software may improved by themselves in we 
> didn't realize place.
>
> even if not,  for the proof user-space setting  0, it's better to change to
>
>
>     if (level < min || level == 0 )
>
>      level =max;
>
>
> Intel default FSP will set the default min is 2% (6/255). if someone 
> missed the setting, it will be keep the default and level.min will be 
> larger than 0.
>
> if someone changed the default min in VBT or coreboot, the user-space 
> lowest level set as 0, still can go though to this logic.
>
>
> whatever, we think this one should correct back, otherwise it will keep 
> occurring in each new kernel release on all Intel device, this is not 
> very friendly to all developers.
>
> and the only fix way is  hack patch to remove "level=max".

As far as the change goes, the original patch is pretty much the only
one we should consider. I only ever asked for 1) an issue to be reported
at fdo gitlab, and 2) a commit message properly detailing the issue.

I never asked for functional changes in the patch. Frankly, all the
alternative versions are nonsense.

I think we can try to go with the patch, but please understand that if
it regresses some silly userspace, the change will be reverted instead
of fixing that silly userspace, because that's the rule in kernel
development.


BR,
Jani.


PS. Please try to reply inline instead of top-posting in public mailing
lists.



>
>
> On 3/15/24 19:02, Ville Syrjälä wrote:
>> On Wed, Mar 06, 2024 at 12:19:42PM +0200, Jani Nikula wrote:
>>> On Wed, 06 Mar 2024, gareth...@intel.com wrote:
 From: Gareth Yu 

 Turn on the panel from zero brightness of the last state, the panel was set
 a maximum PWM in the flow. Once the panel initialization is completed, the
 backlight is restored to zero brightness. There is a flckering generated.
>>> Please be more precise in describing what exactly happens and
>>> when. Driver probe? Modeset? What restores backlight to zero brightness?
>>>
>>> Better yet, please file a bug at fdo gitlab, attach full dmesg with
>>> debugs, etc.
>>>
>>> Before we had the concept of minimum brightness, the minimum was always
>>> 0. And the check was:
>>>
>>> if (level == 0)
>>> level = max;
>>>
>>> Historically, the point was, if you're enabling the display and
>>> backlight, you don't want it to be at 0 brightness, because for most
>>> displays that means a black screen.
>> I think that hack was originally added becaue some silly
>> userspace thingy was setting the backlight level to 0 on
>> suspend/etc. and then forgetting to restore it back to a
>> sane value afterwards. Dunno if that nonsense behaviour
>> still persists to this day.
>>

-- 
Jani Nikula, Intel


[PATCH v3 4/4] drm/i915/display: tie DMC wakelock to DC5/6 state transitions

2024-03-18 Thread Luca Coelho
We only need DMC wakelocks when we allow DC5 and DC6 states.  Add the
calls to enable and disable DMC wakelock accordingly.

Signed-off-by: Luca Coelho 
---
 drivers/gpu/drm/i915/display/intel_display_power_well.c | 7 +++
 drivers/gpu/drm/i915/display/intel_dmc.c| 4 
 2 files changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display_power_well.c 
b/drivers/gpu/drm/i915/display/intel_display_power_well.c
index 217f82f1da84..367464f5c5cd 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power_well.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power_well.c
@@ -17,6 +17,7 @@
 #include "intel_dkl_phy.h"
 #include "intel_dkl_phy_regs.h"
 #include "intel_dmc.h"
+#include "intel_dmc_wl.h"
 #include "intel_dp_aux_regs.h"
 #include "intel_dpio_phy.h"
 #include "intel_dpll.h"
@@ -821,6 +822,8 @@ void gen9_enable_dc5(struct drm_i915_private *dev_priv)
intel_de_rmw(dev_priv, GEN8_CHICKEN_DCPR_1,
 0, SKL_SELECT_ALTERNATE_DC_EXIT);
 
+   intel_dmc_wl_enable(dev_priv);
+
gen9_set_dc_state(dev_priv, DC_STATE_EN_UPTO_DC5);
 }
 
@@ -850,6 +853,8 @@ void skl_enable_dc6(struct drm_i915_private *dev_priv)
intel_de_rmw(dev_priv, GEN8_CHICKEN_DCPR_1,
 0, SKL_SELECT_ALTERNATE_DC_EXIT);
 
+   intel_dmc_wl_enable(dev_priv);
+
gen9_set_dc_state(dev_priv, DC_STATE_EN_UPTO_DC6);
 }
 
@@ -970,6 +975,8 @@ void gen9_disable_dc_states(struct drm_i915_private 
*dev_priv)
if (!HAS_DISPLAY(dev_priv))
return;
 
+   intel_dmc_wl_disable(dev_priv);
+
intel_cdclk_get_cdclk(dev_priv, _config);
/* Can't read out voltage_level so can't use intel_cdclk_changed() */
drm_WARN_ON(_priv->drm,
diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c 
b/drivers/gpu/drm/i915/display/intel_dmc.c
index 3fa851b5c7a6..b20cc018b9a8 100644
--- a/drivers/gpu/drm/i915/display/intel_dmc.c
+++ b/drivers/gpu/drm/i915/display/intel_dmc.c
@@ -550,6 +550,8 @@ void intel_dmc_disable_program(struct drm_i915_private 
*i915)
pipedmc_clock_gating_wa(i915, true);
disable_all_event_handlers(i915);
pipedmc_clock_gating_wa(i915, false);
+
+   intel_dmc_wl_disable(i915);
 }
 
 void assert_dmc_loaded(struct drm_i915_private *i915)
@@ -1079,6 +1081,8 @@ void intel_dmc_suspend(struct drm_i915_private *i915)
if (dmc)
flush_work(>work);
 
+   intel_dmc_wl_disable(i915);
+
/* Drop the reference held in case DMC isn't loaded. */
if (!intel_dmc_has_payload(i915))
intel_dmc_runtime_pm_put(i915);
-- 
2.39.2



[PATCH v3 3/4] drm/i915/display: add module parameter to enable DMC wakelock

2024-03-18 Thread Luca Coelho
This feature should be disabled by default until properly tested and
mature.  Add a module parameter to enable the feature for testing,
while keeping it disabled by default for now.

Signed-off-by: Luca Coelho 
---
 drivers/gpu/drm/i915/display/intel_display_params.c |  5 +
 drivers/gpu/drm/i915/display/intel_display_params.h |  1 +
 drivers/gpu/drm/i915/display/intel_dmc_wl.c | 12 
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_params.c 
b/drivers/gpu/drm/i915/display/intel_display_params.c
index 11e03cfb774d..f40b223cc8a1 100644
--- a/drivers/gpu/drm/i915/display/intel_display_params.c
+++ b/drivers/gpu/drm/i915/display/intel_display_params.c
@@ -116,6 +116,11 @@ intel_display_param_named_unsafe(enable_psr2_sel_fetch, 
bool, 0400,
"(0=disabled, 1=enabled) "
"Default: 1");
 
+intel_display_param_named_unsafe(enable_dmc_wl, bool, 0400,
+   "Enable DMC wakelock "
+   "(0=disabled, 1=enabled) "
+   "Default: 0");
+
 __maybe_unused
 static void _param_print_bool(struct drm_printer *p, const char *driver_name,
  const char *name, bool val)
diff --git a/drivers/gpu/drm/i915/display/intel_display_params.h 
b/drivers/gpu/drm/i915/display/intel_display_params.h
index 6206cc51df04..bf8dbbdb20a1 100644
--- a/drivers/gpu/drm/i915/display/intel_display_params.h
+++ b/drivers/gpu/drm/i915/display/intel_display_params.h
@@ -46,6 +46,7 @@ struct drm_i915_private;
param(int, enable_psr, -1, 0600) \
param(bool, psr_safest_params, false, 0400) \
param(bool, enable_psr2_sel_fetch, true, 0400) \
+   param(bool, enable_dmc_wl, false, 0400) \
 
 #define MEMBER(T, member, ...) T member;
 struct intel_display_params {
diff --git a/drivers/gpu/drm/i915/display/intel_dmc_wl.c 
b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
index 7c991e22c616..84d054bcb2c1 100644
--- a/drivers/gpu/drm/i915/display/intel_dmc_wl.c
+++ b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
@@ -120,7 +120,8 @@ void intel_dmc_wl_enable(struct drm_i915_private *i915)
struct intel_dmc_wl *wl = >display.wl;
unsigned long flags;
 
-   if (DISPLAY_VER(i915) < 20)
+   if (!i915->display.params.enable_dmc_wl ||
+   DISPLAY_VER(i915) < 20)
return;
 
spin_lock_irqsave(>lock, flags);
@@ -146,7 +147,8 @@ void intel_dmc_wl_disable(struct drm_i915_private *i915)
struct intel_dmc_wl *wl = >display.wl;
unsigned long flags;
 
-   if (DISPLAY_VER(i915) < 20)
+   if (!i915->display.params.enable_dmc_wl ||
+   DISPLAY_VER(i915) < 20)
return;
 
flush_delayed_work(>work);
@@ -177,7 +179,8 @@ void intel_dmc_wl_get(struct drm_i915_private *i915, 
i915_reg_t reg)
struct intel_dmc_wl *wl = >display.wl;
unsigned long flags;
 
-   if (DISPLAY_VER(i915) < 20)
+   if (!i915->display.params.enable_dmc_wl ||
+   DISPLAY_VER(i915) < 20)
return;
 
if (!intel_dmc_wl_check_range(reg.reg))
@@ -212,7 +215,8 @@ void intel_dmc_wl_put(struct drm_i915_private *i915, 
i915_reg_t reg)
struct intel_dmc_wl *wl = >display.wl;
unsigned long flags;
 
-   if (DISPLAY_VER(i915) < 20)
+   if (!i915->display.params.enable_dmc_wl ||
+   DISPLAY_VER(i915) < 20)
return;
 
if (!intel_dmc_wl_check_range(reg.reg))
-- 
2.39.2



[PATCH v3 2/4] drm/i915/display: don't allow DMC wakelock on older hardware

2024-03-18 Thread Luca Coelho
Only allow running DMC wakelock code if the display version is 20 or
greater.

Signed-off-by: Luca Coelho 
---
 drivers/gpu/drm/i915/display/intel_dmc_wl.c | 12 
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dmc_wl.c 
b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
index 5c3d8204ae7e..7c991e22c616 100644
--- a/drivers/gpu/drm/i915/display/intel_dmc_wl.c
+++ b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
@@ -120,6 +120,9 @@ void intel_dmc_wl_enable(struct drm_i915_private *i915)
struct intel_dmc_wl *wl = >display.wl;
unsigned long flags;
 
+   if (DISPLAY_VER(i915) < 20)
+   return;
+
spin_lock_irqsave(>lock, flags);
 
if (wl->enabled)
@@ -143,6 +146,9 @@ void intel_dmc_wl_disable(struct drm_i915_private *i915)
struct intel_dmc_wl *wl = >display.wl;
unsigned long flags;
 
+   if (DISPLAY_VER(i915) < 20)
+   return;
+
flush_delayed_work(>work);
 
spin_lock_irqsave(>lock, flags);
@@ -171,6 +177,9 @@ void intel_dmc_wl_get(struct drm_i915_private *i915, 
i915_reg_t reg)
struct intel_dmc_wl *wl = >display.wl;
unsigned long flags;
 
+   if (DISPLAY_VER(i915) < 20)
+   return;
+
if (!intel_dmc_wl_check_range(reg.reg))
return;
 
@@ -203,6 +212,9 @@ void intel_dmc_wl_put(struct drm_i915_private *i915, 
i915_reg_t reg)
struct intel_dmc_wl *wl = >display.wl;
unsigned long flags;
 
+   if (DISPLAY_VER(i915) < 20)
+   return;
+
if (!intel_dmc_wl_check_range(reg.reg))
return;
 
-- 
2.39.2



[PATCH v3 1/4] drm/i915/display: add support for DMC wakelocks

2024-03-18 Thread Luca Coelho
In order to reduce the DC5->DC2 restore time, wakelocks have been
introduced in DMC so the driver can tell it when registers and other
memory areas are going to be accessed and keep their respective blocks
awake.

Implement this in the driver by adding the concept of DMC wakelocks.
When the driver needs to access memory which lies inside pre-defined
ranges, it will tell DMC to set the wakelock, access the memory, then
wait for a while and clear the wakelock.

The wakelock state is protected in the driver with spinlocks to
prevent concurrency issues.

BSpec: 71583
Signed-off-by: Luca Coelho 
---
 drivers/gpu/drm/i915/Makefile |   1 +
 drivers/gpu/drm/i915/display/intel_de.h   |  97 +++-
 .../gpu/drm/i915/display/intel_display_core.h |   2 +
 .../drm/i915/display/intel_display_driver.c   |   1 +
 drivers/gpu/drm/i915/display/intel_dmc_regs.h |   6 +
 drivers/gpu/drm/i915/display/intel_dmc_wl.c   | 226 ++
 drivers/gpu/drm/i915/display/intel_dmc_wl.h   |  30 +++
 drivers/gpu/drm/xe/Makefile   |   1 +
 8 files changed, 356 insertions(+), 8 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/display/intel_dmc_wl.c
 create mode 100644 drivers/gpu/drm/i915/display/intel_dmc_wl.h

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 3ef6ed41e62b..af83ea94c771 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -270,6 +270,7 @@ i915-y += \
display/intel_display_rps.o \
display/intel_display_wa.o \
display/intel_dmc.o \
+   display/intel_dmc_wl.o \
display/intel_dpio_phy.o \
display/intel_dpll.o \
display/intel_dpll_mgr.o \
diff --git a/drivers/gpu/drm/i915/display/intel_de.h 
b/drivers/gpu/drm/i915/display/intel_de.h
index 42552d8c151e..6728a0077793 100644
--- a/drivers/gpu/drm/i915/display/intel_de.h
+++ b/drivers/gpu/drm/i915/display/intel_de.h
@@ -13,52 +13,125 @@
 static inline u32
 intel_de_read(struct drm_i915_private *i915, i915_reg_t reg)
 {
-   return intel_uncore_read(>uncore, reg);
+   u32 val;
+
+   intel_dmc_wl_get(i915, reg);
+
+   val = intel_uncore_read(>uncore, reg);
+
+   intel_dmc_wl_put(i915, reg);
+
+   return val;
 }
 
 static inline u8
 intel_de_read8(struct drm_i915_private *i915, i915_reg_t reg)
 {
-   return intel_uncore_read8(>uncore, reg);
+   u8 val;
+
+   intel_dmc_wl_get(i915, reg);
+
+   val = intel_uncore_read8(>uncore, reg);
+
+   intel_dmc_wl_put(i915, reg);
+
+   return val;
 }
 
 static inline u64
 intel_de_read64_2x32(struct drm_i915_private *i915,
 i915_reg_t lower_reg, i915_reg_t upper_reg)
 {
-   return intel_uncore_read64_2x32(>uncore, lower_reg, upper_reg);
+   u64 val;
+
+   intel_dmc_wl_get(i915, lower_reg);
+   intel_dmc_wl_get(i915, upper_reg);
+
+   val = intel_uncore_read64_2x32(>uncore, lower_reg, upper_reg);
+
+   intel_dmc_wl_put(i915, upper_reg);
+   intel_dmc_wl_put(i915, lower_reg);
+
+   return val;
 }
 
 static inline void
 intel_de_posting_read(struct drm_i915_private *i915, i915_reg_t reg)
 {
+   intel_dmc_wl_get(i915, reg);
+
intel_uncore_posting_read(>uncore, reg);
+
+   intel_dmc_wl_put(i915, reg);
 }
 
 static inline void
 intel_de_write(struct drm_i915_private *i915, i915_reg_t reg, u32 val)
 {
+   intel_dmc_wl_get(i915, reg);
+
intel_uncore_write(>uncore, reg, val);
+
+   intel_dmc_wl_put(i915, reg);
 }
 
 static inline u32
-intel_de_rmw(struct drm_i915_private *i915, i915_reg_t reg, u32 clear, u32 set)
+__intel_de_rmw_nowl(struct drm_i915_private *i915, i915_reg_t reg,
+   u32 clear, u32 set)
 {
return intel_uncore_rmw(>uncore, reg, clear, set);
 }
 
+static inline u32
+intel_de_rmw(struct drm_i915_private *i915, i915_reg_t reg, u32 clear, u32 set)
+{
+   u32 val;
+
+   intel_dmc_wl_get(i915, reg);
+
+   val = __intel_de_rmw_nowl(i915, reg, clear, set);
+
+   intel_dmc_wl_put(i915, reg);
+
+   return val;
+}
+
+static inline int
+__intel_wait_for_register_nowl(struct drm_i915_private *i915, i915_reg_t reg,
+  u32 mask, u32 value, unsigned int timeout)
+{
+   return intel_wait_for_register(>uncore, reg, mask,
+  value, timeout);
+}
+
 static inline int
 intel_de_wait_for_register(struct drm_i915_private *i915, i915_reg_t reg,
   u32 mask, u32 value, unsigned int timeout)
 {
-   return intel_wait_for_register(>uncore, reg, mask, value, 
timeout);
+   int ret;
+
+   intel_dmc_wl_get(i915, reg);
+
+   ret = __intel_wait_for_register_nowl(i915, reg, mask, value, timeout);
+
+   intel_dmc_wl_put(i915, reg);
+
+   return ret;
 }
 
 static inline int
 intel_de_wait_for_register_fw(struct drm_i915_private *i915, i915_reg_t reg,
  u32 mask, u32 value, unsigned int timeout)
 {
- 

[PATCH v3 0/4] drm/i915/display: DMC wakelock implementation

2024-03-18 Thread Luca Coelho
Hi,

This is the fifth version of my series, the third as a proper
patchset.

These are the changes:

In v3:
   * Fixed some checkpatch issues.

In v2:
  * Enable/disable the wakelocks on DC5-6 entry and exit instead of on
DMC load and unload;
  * Added bspec link to the commit message;
  * A bunch of other small changes;
  * For the complete list of changes and discussions, please look at
the patchset in patchwork:
https://patchwork.freedesktop.org/series/128628/

Please review.

Cheers,
Luca.


Luca Coelho (4):
  drm/i915/display: add support for DMC wakelocks
  drm/i915/display: don't allow DMC wakelock on older hardware
  drm/i915/display: add module parameter to enable DMC wakelock
  drm/i915/display: tie DMC wakelock to DC5/6 state transitions

 drivers/gpu/drm/i915/Makefile |   1 +
 drivers/gpu/drm/i915/display/intel_de.h   |  97 ++-
 .../gpu/drm/i915/display/intel_display_core.h |   2 +
 .../drm/i915/display/intel_display_driver.c   |   1 +
 .../drm/i915/display/intel_display_params.c   |   5 +
 .../drm/i915/display/intel_display_params.h   |   1 +
 .../i915/display/intel_display_power_well.c   |   7 +
 drivers/gpu/drm/i915/display/intel_dmc.c  |   4 +
 drivers/gpu/drm/i915/display/intel_dmc_regs.h |   6 +
 drivers/gpu/drm/i915/display/intel_dmc_wl.c   | 242 ++
 drivers/gpu/drm/i915/display/intel_dmc_wl.h   |  30 +++
 drivers/gpu/drm/xe/Makefile   |   1 +
 12 files changed, 389 insertions(+), 8 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/display/intel_dmc_wl.c
 create mode 100644 drivers/gpu/drm/i915/display/intel_dmc_wl.h

-- 
2.39.2



Re: [PATCH] drm/i915: Add includes for BUG_ON/BUILD_BUG_ON in i915_memcpy.c

2024-03-18 Thread Vivi, Rodrigo
On Thu, 2024-03-14 at 14:48 +0200, Joonas Lahtinen wrote:
> Quoting Rodrigo Vivi (2024-03-08 16:58:04)
> > On Fri, Mar 08, 2024 at 04:46:43PM +0200, Joonas Lahtinen wrote:
> > > Add standalone includes for BUG_ON and BUILD_BUG_ON to avoid
> > > build failure
> > > after linux-next include refactoring.
> > 
> > any lore link so we can use with a 'Closes:' tag?
> > and perhaps a reported-by?
> 
> The build failure seems to have happened in intel-gfx-ci.01.org but
> the
> failing build results are not uploaded so it's only visible in the
> background.
> 
> From the CI page[1] we can see next-20240304 is the last successful
> build[2].
> Failure seems to have started next-20240305 after which the results
> are
> not uploaded due to the failure.
> 
> For future, I asked if we could improve the CI dashboard by alos
> showing the
> failing builds in the CI view. 
> 
> However, for now we don't have a reference, I guess.
> 
> [1] https://intel-gfx-ci.01.org/tree/linux-next/combined-alt.html?
> [2] https://intel-gfx-ci.01.org/tree/linux-next/next-
> 20240304/filelist.html
> 
> > 
> > > 
> > > Signed-off-by: Joonas Lahtinen 
> > > Cc: Chris Wilson 
> > > Cc: Jani Nikula 
> > > Cc: Rodrigo Vivi 
> > > Cc: Tvrtko Ursulin 
> > > ---
> > >  drivers/gpu/drm/i915/i915_memcpy.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_memcpy.c
> > > b/drivers/gpu/drm/i915/i915_memcpy.c
> > > index ba82277254b7..cc41974cee74 100644
> > > --- a/drivers/gpu/drm/i915/i915_memcpy.c
> > > +++ b/drivers/gpu/drm/i915/i915_memcpy.c
> > > @@ -25,6 +25,8 @@
> > >  #include 
> > >  #include 
> > >  #include 
> > > +#include 
> > > +#include 
> > 
> > git grep BUILD_BUG_ON drivers/gpu/drm/i915/
> > output
> > 
> > vs
> > 
> > git grep build_bug.h drivers/gpu/drm/i915/
> > output
> > 
> > tells me that we likely need this in many more files...
> > 
> > but not opposed to move with this faster and come back later with
> > other fixes if this unblocks people:
> 
> Yeah, I made the same observation.
> 
> Are you fine to merge this with the R-b even without the reference?

sorry for having missed this.

yes, the rv-b can be used even without the reference, let's just get
this in and fix the build issue.

> 
> Regards, Joonas
> 
> > 
> > Reviewed-by: Rodrigo Vivi 
> > 
> > >  #include 
> > >  
> > >  #include "i915_memcpy.h"
> > > -- 
> > > 2.43.2
> > > 



Re: [PATCH] drm/i915/display: Fixed a screen flickering when turning on display from off

2024-03-18 Thread Dolan Liu



this case have been there so many years, it's time to fix it if 
possible. And user-space software may improved by themselves in we 
didn't realize place.


even if not,  for the proof user-space setting  0, it's better to change to


   if (level < min || level == 0 )

    level =max;


Intel default FSP will set the default min is 2% (6/255). if someone 
missed the setting, it will be keep the default and level.min will be 
larger than 0.


if someone changed the default min in VBT or coreboot, the user-space 
lowest level set as 0, still can go though to this logic.



whatever, we think this one should correct back, otherwise it will keep 
occurring in each new kernel release on all Intel device, this is not 
very friendly to all developers.


and the only fix way is  hack patch to remove "level=max".


On 3/15/24 19:02, Ville Syrjälä wrote:

On Wed, Mar 06, 2024 at 12:19:42PM +0200, Jani Nikula wrote:

On Wed, 06 Mar 2024, gareth...@intel.com wrote:

From: Gareth Yu 

Turn on the panel from zero brightness of the last state, the panel was set
a maximum PWM in the flow. Once the panel initialization is completed, the
backlight is restored to zero brightness. There is a flckering generated.

Please be more precise in describing what exactly happens and
when. Driver probe? Modeset? What restores backlight to zero brightness?

Better yet, please file a bug at fdo gitlab, attach full dmesg with
debugs, etc.

Before we had the concept of minimum brightness, the minimum was always
0. And the check was:

if (level == 0)
level = max;

Historically, the point was, if you're enabling the display and
backlight, you don't want it to be at 0 brightness, because for most
displays that means a black screen.

I think that hack was originally added becaue some silly
userspace thingy was setting the backlight level to 0 on
suspend/etc. and then forgetting to restore it back to a
sane value afterwards. Dunno if that nonsense behaviour
still persists to this day.



[PATCH v19 8/9] drm/i915/display: Compute vrr_vsync params

2024-03-18 Thread Mitul Golani
Compute vrr_vsync_start/end, which sets the position
for hardware to send the Vsync at a fixed position
relative to the end of the Vblank.

--v2:
- Updated VSYNC_START/END macros to VRR_VSYNC_START/END. (Ankit)
- Updated bit fields of VRR_VSYNC_START/END. (Ankit)

--v3:
- Add PIPE_CONF_CHECK_I(vrr.vsync_start/end).
- Read/write vrr_vsync params only when we intend to send
adaptive_sync sdp.

--v4:
- Use VRR_SYNC_START/END macros correctly.

--v5:
- Send AS SDP only when VRR is enabled.
Signed-off-by: Mitul Golani 
---
 drivers/gpu/drm/i915/display/intel_display.c  |  2 ++
 .../drm/i915/display/intel_display_types.h|  1 +
 drivers/gpu/drm/i915/display/intel_vrr.c  | 33 +--
 drivers/gpu/drm/i915/i915_reg.h   |  7 
 4 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index 8f1d948408d3..fed4ed18d53b 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -5377,6 +5377,8 @@ intel_pipe_config_compare(const struct intel_crtc_state 
*current_config,
PIPE_CONF_CHECK_I(vrr.flipline);
PIPE_CONF_CHECK_I(vrr.pipeline_full);
PIPE_CONF_CHECK_I(vrr.guardband);
+   PIPE_CONF_CHECK_I(vrr.vsync_start);
+   PIPE_CONF_CHECK_I(vrr.vsync_end);
}
 
 #undef PIPE_CONF_CHECK_X
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h 
b/drivers/gpu/drm/i915/display/intel_display_types.h
index 8a286751dc39..c2e08f641989 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1430,6 +1430,7 @@ struct intel_crtc_state {
bool enable, in_range;
u8 pipeline_full;
u16 flipline, vmin, vmax, guardband;
+   u32 vsync_end, vsync_start;
} vrr;
 
/* Stream Splitter for eDP MSO */
diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c 
b/drivers/gpu/drm/i915/display/intel_vrr.c
index eb5bd0743902..1d53623e7e0b 100644
--- a/drivers/gpu/drm/i915/display/intel_vrr.c
+++ b/drivers/gpu/drm/i915/display/intel_vrr.c
@@ -9,6 +9,7 @@
 #include "intel_de.h"
 #include "intel_display_types.h"
 #include "intel_vrr.h"
+#include "intel_dp.h"
 
 bool intel_vrr_is_capable(struct intel_connector *connector)
 {
@@ -113,6 +114,7 @@ intel_vrr_compute_config(struct intel_crtc_state 
*crtc_state,
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
struct intel_connector *connector =
to_intel_connector(conn_state->connector);
+   struct intel_dp *intel_dp = intel_attached_dp(connector);
struct drm_display_mode *adjusted_mode = _state->hw.adjusted_mode;
const struct drm_display_info *info = >base.display_info;
int vmin, vmax;
@@ -165,6 +167,14 @@ intel_vrr_compute_config(struct intel_crtc_state 
*crtc_state,
if (crtc_state->uapi.vrr_enabled) {
crtc_state->vrr.enable = true;
crtc_state->mode_flags |= I915_MODE_FLAG_VRR;
+   if (intel_dp_as_sdp_supported(intel_dp)) {
+   crtc_state->vrr.vsync_start =
+   (crtc_state->hw.adjusted_mode.crtc_vtotal -
+   
crtc_state->hw.adjusted_mode.vsync_start);
+   crtc_state->vrr.vsync_end =
+   (crtc_state->hw.adjusted_mode.crtc_vtotal -
+   crtc_state->hw.adjusted_mode.vsync_end);
+   }
}
 }
 
@@ -242,6 +252,12 @@ void intel_vrr_enable(const struct intel_crtc_state 
*crtc_state)
intel_de_write(dev_priv, TRANS_PUSH(cpu_transcoder), TRANS_PUSH_EN);
intel_de_write(dev_priv, TRANS_VRR_CTL(cpu_transcoder),
   VRR_CTL_VRR_ENABLE | trans_vrr_ctl(crtc_state));
+
+   if (HAS_AS_SDP(dev_priv)) {
+   intel_de_write(dev_priv, TRANS_VRR_VSYNC(cpu_transcoder),
+  VRR_VSYNC_END(crtc_state->vrr.vsync_end) |
+  VRR_VSYNC_START(crtc_state->vrr.vsync_start));
+   }
 }
 
 void intel_vrr_disable(const struct intel_crtc_state *old_crtc_state)
@@ -258,13 +274,16 @@ void intel_vrr_disable(const struct intel_crtc_state 
*old_crtc_state)
intel_de_wait_for_clear(dev_priv, TRANS_VRR_STATUS(cpu_transcoder),
VRR_STATUS_VRR_EN_LIVE, 1000);
intel_de_write(dev_priv, TRANS_PUSH(cpu_transcoder), 0);
+
+   if (HAS_AS_SDP(dev_priv))
+   intel_de_write(dev_priv, TRANS_VRR_VSYNC(cpu_transcoder), 0);
 }
 
 void intel_vrr_get_config(struct intel_crtc_state *crtc_state)
 {
struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
-   u32 trans_vrr_ctl;
+   u32 trans_vrr_ctl, 

[PATCH] drm/xe/display: fix potential overflow when multiplying 2 u32

2024-03-18 Thread Arun R Murthy
Multiplying XE_PAGE_SIZE with another u32 and the product stored in
u64 can potentially lead to overflow, use mul_u32_u32 instead.

Signed-off-by: Arun R Murthy 
---
 drivers/gpu/drm/xe/display/xe_fb_pin.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c 
b/drivers/gpu/drm/xe/display/xe_fb_pin.c
index 722c84a56607..e0b511ff7eab 100644
--- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
+++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
@@ -29,7 +29,7 @@ write_dpt_rotated(struct xe_bo *bo, struct iosys_map *map, 
u32 *dpt_ofs, u32 bo_
u32 src_idx = src_stride * (height - 1) + column + bo_ofs;
 
for (row = 0; row < height; row++) {
-   u64 pte = ggtt->pt_ops->pte_encode_bo(bo, src_idx * 
XE_PAGE_SIZE,
+   u64 pte = ggtt->pt_ops->pte_encode_bo(bo, 
mul_u32_u32(src_idx, XE_PAGE_SIZE),
  
xe->pat.idx[XE_CACHE_WB]);
 
iosys_map_wr(map, *dpt_ofs, u64, pte);
@@ -61,7 +61,7 @@ write_dpt_remapped(struct xe_bo *bo, struct iosys_map *map, 
u32 *dpt_ofs,
 
for (column = 0; column < width; column++) {
iosys_map_wr(map, *dpt_ofs, u64,
-pte_encode_bo(bo, src_idx * XE_PAGE_SIZE,
+pte_encode_bo(bo, mul_u32_u32(src_idx, 
XE_PAGE_SIZE),
 xe->pat.idx[XE_CACHE_WB]));
 
*dpt_ofs += 8;
@@ -118,7 +118,7 @@ static int __xe_pin_fb_vma_dpt(struct intel_framebuffer *fb,
u32 x;
 
for (x = 0; x < size / XE_PAGE_SIZE; x++) {
-   u64 pte = ggtt->pt_ops->pte_encode_bo(bo, x * 
XE_PAGE_SIZE,
+   u64 pte = ggtt->pt_ops->pte_encode_bo(bo, 
mul_u32_u32(x, XE_PAGE_SIZE),
  
xe->pat.idx[XE_CACHE_WB]);
 
iosys_map_wr(>vmap, x * 8, u64, pte);
@@ -164,7 +164,7 @@ write_ggtt_rotated(struct xe_bo *bo, struct xe_ggtt *ggtt, 
u32 *ggtt_ofs, u32 bo
u32 src_idx = src_stride * (height - 1) + column + bo_ofs;
 
for (row = 0; row < height; row++) {
-   u64 pte = ggtt->pt_ops->pte_encode_bo(bo, src_idx * 
XE_PAGE_SIZE,
+   u64 pte = ggtt->pt_ops->pte_encode_bo(bo, 
mul_u32_u32(src_idx, XE_PAGE_SIZE),
  
xe->pat.idx[XE_CACHE_WB]);
 
xe_ggtt_set_pte(ggtt, *ggtt_ofs, pte);
@@ -381,4 +381,4 @@ struct i915_address_space *intel_dpt_create(struct 
intel_framebuffer *fb)
 void intel_dpt_destroy(struct i915_address_space *vm)
 {
return;
-}
\ No newline at end of file
+}
-- 
2.25.1



Re: drm/i915/dp: Enable AUX based backlight for HDR

2024-03-18 Thread Sebastian Wick
On Fri, Mar 15, 2024 at 01:56:19PM +0200, Ville Syrjälä wrote:
> On Fri, Mar 15, 2024 at 12:33:52PM +0100, Sebastian Wick wrote:
> > On Fri, Mar 15, 2024 at 10:35:30AM +0530, Suraj Kandpal wrote:
> 
> > > @@ -318,11 +346,24 @@ intel_dp_aux_hdr_setup_backlight(struct 
> > > intel_connector *connector, enum pipe pi
> > >   panel->backlight.min = 0;
> > >   }
> > >  
> > > + if (DISPLAY_VER(i915) < 11) {
> > 
> > This should check for INTEL_EDP_HDR_TCON_SDP_COLORIMETRY_CAP instead!
> > There is no reason to bind this to any hardware version if the hardware
> > itself can tell you if it supports SDP signalling or needs to set it via
> > AUX.
> 
> That should be OK for icl+.
> 
> To extend this to pre-icl hardware I think we pretty much need both checks:
> - has_gamut_metadata_dip() -> can we actually transmit the SDP?
> - INTEL_EDP_HDR_TCON_SDP_COLORIMETRY_CAP -> can the tcon extract the data 
> from the SDP?
> and if either is false then we fall back to AUX.

Right, that's something my patch is missing as well.

> We should also change intel_dp_add_properties() to check
> the tcon caps instead of relying on has_gamut_metadata_dip(),
>   for eDP.
> 
> -- 
> Ville Syrjälä
> Intel
> 



[PATCH i-g-t v3 2/5] lib/kunit: Let igt_ktap_free() take care of pointer reset

2024-03-18 Thread Janusz Krzysztofik
Users who store a pointer to struct igt_ktap_results, obtained from
igt_ktap_alloc(), in a central location and then call igt_ktap_free() when
no longer needed, now have to reset that pointer to NULL to avoid double
free on final cleanup.  For their convenience, teach igt_ktap_free() to
accept that location as an argument and reset the pointer after freeing
the structure.

Signed-off-by: Janusz Krzysztofik 
---
 lib/igt_kmod.c  | 12 +---
 lib/igt_ktap.c  |  5 +++--
 lib/igt_ktap.h  |  2 +-
 lib/tests/igt_ktap_parser.c | 24 
 4 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index ca20012a97..8a6824ea7e 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -1094,7 +1094,7 @@ static void __igt_kunit_legacy(struct igt_ktest *tst,
 
if (igt_debug_on(pthread_create(, NULL,
modprobe_task, ))) {
-   igt_ktap_free(ktap);
+   igt_ktap_free();
igt_skip("Failed to create a modprobe thread\n");
}
 
@@ -1197,7 +1197,7 @@ static void __igt_kunit_legacy(struct igt_ktest *tst,
break;
}
 
-   igt_ktap_free(ktap);
+   igt_ktap_free();
 
igt_skip_on(modprobe.err);
igt_skip_on(igt_kernel_tainted());
@@ -1243,8 +1243,7 @@ static bool kunit_get_tests(struct igt_list_head *tests,
err = kunit_kmsg_result_get(tests, NULL, tst->kmsg, *ktap);
while (err == -EINPROGRESS);
 
-   igt_ktap_free(*ktap);
-   *ktap = NULL;
+   igt_ktap_free(ktap);
 
igt_skip_on_f(err,
  "KTAP parser failed while getting a list of test 
cases\n");
@@ -1405,8 +1404,7 @@ static void __igt_kunit(struct igt_ktest *tst,
}
}
 
-   igt_ktap_free(*ktap);
-   *ktap = NULL;
+   igt_ktap_free(ktap);
 
igt_skip_on(modprobe.err);
igt_skip_on(igt_kernel_tainted());
@@ -1487,7 +1485,7 @@ void igt_kunit(const char *module_name, const char 
*suite, const char *opts)
igt_fixture {
char *suite_name = NULL, *case_name = NULL;
 
-   igt_ktap_free(ktap);
+   igt_ktap_free();
 
kunit_results_free(, _name, _name);
 
diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c
index aa7ea84476..300fb2bb5a 100644
--- a/lib/igt_ktap.c
+++ b/lib/igt_ktap.c
@@ -310,7 +310,8 @@ struct igt_ktap_results *igt_ktap_alloc(struct 
igt_list_head *results)
return ktap;
 }
 
-void igt_ktap_free(struct igt_ktap_results *ktap)
+void igt_ktap_free(struct igt_ktap_results **ktap)
 {
-   free(ktap);
+   free(*ktap);
+   *ktap = NULL;
 }
diff --git a/lib/igt_ktap.h b/lib/igt_ktap.h
index c422636bfc..7684e859b3 100644
--- a/lib/igt_ktap.h
+++ b/lib/igt_ktap.h
@@ -41,6 +41,6 @@ struct igt_ktap_results;
 
 struct igt_ktap_results *igt_ktap_alloc(struct igt_list_head *results);
 int igt_ktap_parse(const char *buf, struct igt_ktap_results *ktap);
-void igt_ktap_free(struct igt_ktap_results *ktap);
+void igt_ktap_free(struct igt_ktap_results **ktap);
 
 #endif /* IGT_KTAP_H */
diff --git a/lib/tests/igt_ktap_parser.c b/lib/tests/igt_ktap_parser.c
index 6357bdf6a5..8c2d16080d 100644
--- a/lib/tests/igt_ktap_parser.c
+++ b/lib/tests/igt_ktap_parser.c
@@ -45,7 +45,7 @@ static void ktap_list(void)
igt_assert_eq(igt_ktap_parse("ok 4 test_case_4 # SKIP\n", ktap), 
-EINPROGRESS);
igt_assert_eq(igt_ktap_parse("ok 3 test_suite_3\n", ktap), 0);
 
-   igt_ktap_free(ktap);
+   igt_ktap_free();
 
igt_assert_eq(igt_list_length(), 8);
 
@@ -107,7 +107,7 @@ static void ktap_results(void)
igt_assert_eq(igt_ktap_parse("ok 1 test_case\n", ktap), 
-EINPROGRESS);
igt_assert_eq(igt_ktap_parse("not ok 1 test_suite\n", ktap), 0);
 
-   igt_ktap_free(ktap);
+   igt_ktap_free();
 
igt_assert_eq(igt_list_length(), 2);
 
@@ -162,7 +162,7 @@ static void ktap_success(void)
igt_assert_eq(igt_ktap_parse("not ok 1 test_suite\n", ktap), 0);
igt_assert_eq(igt_list_length(), 2);
 
-   igt_ktap_free(ktap);
+   igt_ktap_free();
 
result = igt_list_last_entry(, result, link);
igt_list_del(>link);
@@ -186,48 +186,48 @@ static void ktap_top_version(void)
ktap = igt_ktap_alloc();
igt_require(ktap);
igt_assert_eq(igt_ktap_parse("1..1\n", ktap), -EPROTO);
-   igt_ktap_free(ktap);
+   igt_ktap_free();
 
ktap = igt_ktap_alloc();
igt_require(ktap);
/* TODO: change to -EPROTO as soon as related workaround is dropped */
igt_assert_eq(igt_ktap_parse("KTAP version 1\n", ktap), 
-EINPROGRESS);
-   igt_ktap_free(ktap);
+   igt_ktap_free();
 
ktap = igt_ktap_alloc();
igt_require(ktap);
igt_assert_eq(igt_ktap_parse("# Subtest: test_suite\n", ktap), 
-EPROTO);
-   igt_ktap_free(ktap);
+   igt_ktap_free();
 
  

[PATCH i-g-t v3 5/5] lib/kunit: Minimize code duplication

2024-03-18 Thread Janusz Krzysztofik
A new helper has been introduced recently, used for fetching KTAP results
of a single test case.  Since that helper is called for that purpose
only after the test module is loaded with all other test cases filtered
out, its actual implementation is as simple as collecting all results from
a single KTAP report, no matter how many test suites and test cases it
covers.  Then, it's a good candidate for reuse in other scenarios when a
single KTAP report is handled, e.g., when we collect a list of test cases
from a single test suite or test module.  Go for it.

v3: Rebased on top of changes to struct igt_ktap_results pointer handling.
v2: Rebased on invalid test suite name workaround.

Signed-off-by: Janusz Krzysztofik 
Cc: Jonathan Cavitt 
---
 lib/igt_kmod.c | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index c495d11b16..8979a5928b 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -1262,21 +1262,14 @@ static bool kunit_get_tests(struct igt_list_head *tests,
igt_skip_on(modprobe(tst->kmod, opts));
igt_skip_on(igt_kernel_tainted());
 
-   *ktap = igt_ktap_alloc(tests);
-   igt_require(*ktap);
-
igt_skip_on(sigaction(SIGALRM, , saved));
alarm(10);
 
-   do
-   err = kunit_kmsg_result_get(tests, NULL, tst->kmsg, *ktap);
-   while (err == -EINPROGRESS);
+   err = kunit_get_results(tests, tst->kmsg, ktap);
 
alarm(0);
igt_debug_on(sigaction(SIGALRM, saved, NULL));
 
-   igt_ktap_free(ktap);
-
igt_skip_on_f(err,
  "KTAP parser failed while getting a list of test 
cases\n");
 
-- 
2.43.0



[PATCH i-g-t v3 4/5] lib/kunit: Execute test cases synchronously

2024-03-18 Thread Janusz Krzysztofik
Up to now we were loading a KUnit test module in test execution mode only
once per subtest, in background, and then, in parallel with execution of
test cases while the module was loading, we were looking through dmesg for
KTAP results from each expected test case.  As a consequence, our IGT
messages were more or less delayed, never in full sync with kernel
messages.  Moreover, parsing of KTAP results from already completed test
cases could be abandoned on a failure from loading the test module or
kernel taint caused by a subsequent test case.  Also, parsing of KTAP
results from all subsequent test cases could be abandoned on a failure of
the parser caused by any test case.  Other than that, if a user requested
a single dynamic sub-subtest, all test cases were executed anyway while
results from only one of them that corresponded to the selected dynamic
sub-subtest were reported.  That way, kernel messages from unrelated test
cases, not only the selected one, could contribute to dmesg-fail or dmesg-
warn CI results from that sub-subtest.

Since recent KUnit implementation is capable of executing only those test
cases that match a user filter, stop executing all of them asynchronously
and parsing their KTAP results as they appear.  Instead, reload the test
module once per each dynamic sub-subtest with a filter that selects a
specific test case and wait for its completion.  If successful and no
kernel taint has occurred then parse the whole KTAP report from a single
test case it has produced and translate it to IGT result of that single
corresponding sub-subtest.

With that in place, we no longer need to skip the whole subtest on a
failure from module loading or KTAP reading or parsing.  Since such event
is now local to execution of an individual test case, only fail its
corresponding dynamic sub-subtests and continue with subsequent ones.
However, still omit execution of subsequent test cases once the kernel
gets tainted.

v3: Refresh on top of changes to struct igt_ktap_results pointer handling,
  - use "for(;;) {}" instead of "do {} while();" when processing results
from parametrized test cases (Kamil).
v2: Refresh on top of changes to KUnit filters handling,
  - include the code of a new helper from a previously separate patch,
  - actually limit the scope of the helper to fetching a KTAP report from
a file descriptor, and let the caller decide on how other steps, like
setting up filters or loading a test module, and errors they return
are handled,
  - similar to kernel taint handling, just omit any remaining dynamic sub-
subtests if unloading the test module fails,
  - update commit description with a more detailed justification of why we
need these changes.

Signed-off-by: Janusz Krzysztofik 
Cc: Mauro Carvalho Chehab 
Cc: Jonathan Cavitt 
Cc: Kamil Konieczny 
---
 lib/igt_kmod.c | 156 +
 1 file changed, 54 insertions(+), 102 deletions(-)

diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index f0e4d5ec76..c495d11b16 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -1070,6 +1070,25 @@ static void kunit_results_free(struct igt_list_head 
*results,
free(*suite_name);
 }
 
+static int kunit_get_results(struct igt_list_head *results, int kmsg_fd,
+struct igt_ktap_results **ktap)
+{
+   int err;
+
+   *ktap = igt_ktap_alloc(results);
+   if (igt_debug_on(!*ktap))
+   return -ENOMEM;
+
+   do
+   igt_debug_on((err = kunit_kmsg_result_get(results, NULL, 
kmsg_fd, *ktap),
+ err && err != -EINPROGRESS));
+   while (err == -EINPROGRESS);
+
+   igt_ktap_free(ktap);
+
+   return err;
+}
+
 static void __igt_kunit_legacy(struct igt_ktest *tst,
   const char *subtest,
   const char *opts)
@@ -1277,82 +1296,52 @@ static void __igt_kunit(struct igt_ktest *tst,
struct igt_list_head *tests,
struct igt_ktap_results **ktap)
 {
-   struct modprobe_data modprobe = { tst->kmod, opts, 0, pthread_self(), };
-   char *suite_name = NULL, *case_name = NULL;
-   struct igt_ktap_result *t, *r = NULL;
-   pthread_mutexattr_t attr;
-   IGT_LIST_HEAD(results);
-   int ret = -EINPROGRESS;
-   unsigned long taints;
-
-   igt_skip_on(lseek(tst->kmsg, 0, SEEK_END) < 0);
-
-   *ktap = igt_ktap_alloc();
-   igt_require(*ktap);
+   struct igt_ktap_result *t;
 
igt_list_for_each_entry(t, tests, link) {
+   char *suite_name = NULL, *case_name = NULL;
+   IGT_LIST_HEAD(results);
+   unsigned long taints;
+
igt_dynamic_f("%s%s%s",
  strcmp(t->suite_name, subtest) ?  t->suite_name : 
"",
  strcmp(t->suite_name, subtest) ? "-" : "",
  t->case_name) {
+   

[PATCH i-g-t v3 3/5] lib/kunit: Time out promptly on missing KTAP report

2024-03-18 Thread Janusz Krzysztofik
If a test provides a subtest name that doesn't match any test suites
provided by the requested KUnit test module then no KTAP report appears in
dmesg, not even an empty one as one may expect.  As a consequence, we now
loop endlessly around reading potential lines of the missing report from
/dev/kmsg, until killed by IGT runner on timeout.

When trying to collect names of test cases from a KTAP report generated in
all skip mode, set an alarm that fires up 10 seconds after we start
waiting for the report, interrupts blocking read() if pending, and
terminates the subtest with SKIP result.

As soon as we have collected a non-empty list of test cases, we may as
well expect a non-empty KTAP report from actual execution of those test
cases, assuming successful load of the KUnit test module in execution
mode.  Then, there is no need to set up a similar timeout before we start
to extract and parse that report.

Suggested-by: Kamil Konieczny 
Signed-off-by: Janusz Krzysztofik 
---
 lib/igt_kmod.c | 13 +
 1 file changed, 13 insertions(+)

diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index 8a6824ea7e..f0e4d5ec76 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -1204,12 +1204,19 @@ static void __igt_kunit_legacy(struct igt_ktest *tst,
igt_skip_on_f(ret, "KTAP parser failed\n");
 }
 
+static void kunit_get_tests_timeout(int signal)
+{
+   igt_skip("Timed out while trying to extract a list of KUnit test cases 
from /dev/kmsg\n");
+}
+
 static bool kunit_get_tests(struct igt_list_head *tests,
struct igt_ktest *tst,
const char *suite,
const char *opts,
struct igt_ktap_results **ktap)
 {
+   struct sigaction sigalrm = { .sa_handler = kunit_get_tests_timeout, },
+*saved;
struct igt_ktap_result *r, *rn;
unsigned long taints;
int flags, err;
@@ -1239,10 +1246,16 @@ static bool kunit_get_tests(struct igt_list_head *tests,
*ktap = igt_ktap_alloc(tests);
igt_require(*ktap);
 
+   igt_skip_on(sigaction(SIGALRM, , saved));
+   alarm(10);
+
do
err = kunit_kmsg_result_get(tests, NULL, tst->kmsg, *ktap);
while (err == -EINPROGRESS);
 
+   alarm(0);
+   igt_debug_on(sigaction(SIGALRM, saved, NULL));
+
igt_ktap_free(ktap);
 
igt_skip_on_f(err,
-- 
2.43.0



[PATCH i-g-t v3 1/5] lib/kunit: Store igt_ktap_results pointer in a central location

2024-03-18 Thread Janusz Krzysztofik
To give more freedom to future enhancements of KUnit library (legacy path
excluded) in using IGT fails and skips, maintain a pointer to struct
igt_ktap_results, allocated by several functions, in a single central
location, and free it from a closing igt_fixture section before return.

Signed-off-by: Janusz Krzysztofik 
---
 lib/igt_kmod.c | 35 ---
 1 file changed, 20 insertions(+), 15 deletions(-)

diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index b4b8848983..ca20012a97 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -1207,10 +1207,10 @@ static void __igt_kunit_legacy(struct igt_ktest *tst,
 static bool kunit_get_tests(struct igt_list_head *tests,
struct igt_ktest *tst,
const char *suite,
-   const char *opts)
+   const char *opts,
+   struct igt_ktap_results **ktap)
 {
struct igt_ktap_result *r, *rn;
-   struct igt_ktap_results *ktap;
unsigned long taints;
int flags, err;
 
@@ -1236,14 +1236,15 @@ static bool kunit_get_tests(struct igt_list_head *tests,
igt_skip_on(modprobe(tst->kmod, opts));
igt_skip_on(igt_kernel_tainted());
 
-   ktap = igt_ktap_alloc(tests);
-   igt_require(ktap);
+   *ktap = igt_ktap_alloc(tests);
+   igt_require(*ktap);
 
do
-   err = kunit_kmsg_result_get(tests, NULL, tst->kmsg, ktap);
+   err = kunit_kmsg_result_get(tests, NULL, tst->kmsg, *ktap);
while (err == -EINPROGRESS);
 
-   igt_ktap_free(ktap);
+   igt_ktap_free(*ktap);
+   *ktap = NULL;
 
igt_skip_on_f(err,
  "KTAP parser failed while getting a list of test 
cases\n");
@@ -1261,12 +1262,12 @@ static void __igt_kunit(struct igt_ktest *tst,
const char *subtest,
const char *suite,
const char *opts,
-   struct igt_list_head *tests)
+   struct igt_list_head *tests,
+   struct igt_ktap_results **ktap)
 {
struct modprobe_data modprobe = { tst->kmod, opts, 0, pthread_self(), };
char *suite_name = NULL, *case_name = NULL;
struct igt_ktap_result *t, *r = NULL;
-   struct igt_ktap_results *ktap;
pthread_mutexattr_t attr;
IGT_LIST_HEAD(results);
int ret = -EINPROGRESS;
@@ -1274,8 +1275,8 @@ static void __igt_kunit(struct igt_ktest *tst,
 
igt_skip_on(lseek(tst->kmsg, 0, SEEK_END) < 0);
 
-   ktap = igt_ktap_alloc();
-   igt_require(ktap);
+   *ktap = igt_ktap_alloc();
+   igt_require(*ktap);
 
igt_list_for_each_entry(t, tests, link) {
igt_dynamic_f("%s%s%s",
@@ -1302,7 +1303,7 @@ static void __igt_kunit(struct igt_ktest *tst,
igt_assert(igt_list_empty());
igt_assert_eq(ret, -EINPROGRESS);
ret = kunit_kmsg_result_get(, ,
-   tst->kmsg, ktap);
+   tst->kmsg, *ktap);
igt_fail_on(igt_list_empty());
 
r = igt_list_first_entry(, r, link);
@@ -1324,7 +1325,7 @@ static void __igt_kunit(struct igt_ktest *tst,
ret = kunit_kmsg_result_get(,
,
tst->kmsg,
-   ktap);
+   *ktap);
igt_fail_on(igt_list_empty());
}
 
@@ -1404,7 +1405,8 @@ static void __igt_kunit(struct igt_ktest *tst,
}
}
 
-   igt_ktap_free(ktap);
+   igt_ktap_free(*ktap);
+   *ktap = NULL;
 
igt_skip_on(modprobe.err);
igt_skip_on(igt_kernel_tainted());
@@ -1427,6 +1429,7 @@ static void __igt_kunit(struct igt_ktest *tst,
 void igt_kunit(const char *module_name, const char *suite, const char *opts)
 {
struct igt_ktest tst = { .kmsg = -1, };
+   struct igt_ktap_results *ktap = NULL;
const char *subtest = suite;
IGT_LIST_HEAD(tests);
 
@@ -1475,15 +1478,17 @@ void igt_kunit(const char *module_name, const char 
*suite, const char *opts)
 *   LTS kernels not capable of using KUnit filters for
 *   listing test cases in KTAP format, with igt_require.
 */
-   if (!kunit_get_tests(, , suite, opts))
+   if (!kunit_get_tests(, , suite, opts, ))
__igt_kunit_legacy(, subtest, opts);
else
-   __igt_kunit(, subtest, 

[PATCH i-g-t v3 0/5] lib/kunit: Execute test cases synchronously

2024-03-18 Thread Janusz Krzysztofik
Up to now we were loading a KUnit test module in test execution mode only
once per subtest, in background, and then, in parallel with execution of
test cases while the module was loading, we were looking through dmesg for
KTAP results from each expected test case.  As a consequence, our IGT
messages were more or less delayed, never in full sync with kernel
messages.  Moreover, parsing of KTAP results from already completed test
cases could be abandoned on a failure from loading the test module or
kernel taint caused by a subsequent test case.  Also, parsing of KTAP
results from all subsequent test cases could be abandoned on a failure of
the parser caused by any test case.  Other than that, if a user requested
a single dynamic sub-subtest, all test cases were executed anyway while
results from only one of them that corresponded to the selected dynamic
sub-subtest were reported.  That way, kernel messages from unrelated test
cases, not only the selected one, could contribute to dmesg-fail or dmesg-
warn CI results from that sub-subtest.

Since recent KUnit implementation is capable of executing only those test
cases that match a user filter, stop executing all of them asynchronously
and parsing their KTAP results as they appear.  Instead, reload the test
module once per each dynamic sub-subtest with a filter that selects a
specific test case and wait for its completion.  If successful and no
kernel taint has occurred then parse the whole KTAP report from a single
test case it has produced and translate it to IGT result of that single
corresponding sub-subtest.

v3: Insert new patches 1-3 that fix an infinite loop when we try to get a
list of test cases from an unexpectedly missing KTAP report.
v2: Refresh the series on top of changes to KUnit filters handling,
  - move the code of a new helper from a previous patch 1 to a previous
patch 2 which now becomes patch 1,
  - actually limit the scope of the helper to fetching a KTAP report from
a file descriptor, and let the callers decide on how other steps, like
setting up filters or loading a test module, and errors they return
are handled,
  - update commit description with a more detailed justification of why we
need these changes,
  - rebase the former patch 1 on top of the new patch 1, update its commit
message and description and provide it as patch 2.

Janusz Krzysztofik (5):
  lib/kunit: Store igt_ktap_results pointer in a central location
  lib/kunit: Let igt_ktap_free() take care of pointer reset
  lib/kunit: Time out promptly on missing KTAP report
  lib/kunit: Execute test cases synchronously
  lib/kunit: Minimize code duplication

 lib/igt_kmod.c  | 193 ++--
 lib/igt_ktap.c  |   5 +-
 lib/igt_ktap.h  |   2 +-
 lib/tests/igt_ktap_parser.c |  24 ++---
 4 files changed, 93 insertions(+), 131 deletions(-)

-- 
2.43.0



Re: [PATCH] drm/i915: Do not match JSL in ehl_combo_pll_div_frac_wa_needed()

2024-03-18 Thread Jani Nikula
On Wed, 13 Mar 2024, Jani Nikula  wrote:
> On Wed, 13 Mar 2024, Jonathon Hall  wrote:
>> Since commit 0c65dc062611 ("drm/i915/jsl: s/JSL/JASPERLAKE for
>> platform/subplatform defines"), boot freezes on a Jasper Lake tablet
>> (Librem 11), usually with graphical corruption on the eDP display,
>> but sometimes just a black screen.  This commit was included in 6.6 and
>> later.
>>
>> That commit was intended to refactor EHL and JSL macros, but the change
>> to ehl_combo_pll_div_frac_wa_needed() started matching JSL incorrectly
>> when it was only intended to match EHL.
>>
>> It replaced:
>>  return ((IS_PLATFORM(i915, INTEL_ELKHARTLAKE) &&
>>   IS_JSL_EHL_DISPLAY_STEP(i915, STEP_B0, STEP_FOREVER)) ||
>> with:
>>  return (((IS_ELKHARTLAKE(i915) || IS_JASPERLAKE(i915)) &&
>>   IS_DISPLAY_STEP(i915, STEP_B0, STEP_FOREVER)) ||
>>
>> Remove IS_JASPERLAKE() to fix the regression.
>>
>> Signed-off-by: Jonathon Hall 
>> Cc: sta...@vger.kernel.org
>
> Thanks for the patch!
>
> Fixes: 0c65dc062611 ("drm/i915/jsl: s/JSL/JASPERLAKE for platform/subplatform 
> defines")
> Cc:  # v6.6+
> Reviewed-by: Jani Nikula 

And pushed to drm-intel-next.

BR,
Jani.


>
>> ---
>>  drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c 
>> b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
>> index ef57dad1a9cb..57a97880dcb3 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
>> @@ -2509,7 +2509,7 @@ static void icl_wrpll_params_populate(struct 
>> skl_wrpll_params *params,
>>  static bool
>>  ehl_combo_pll_div_frac_wa_needed(struct drm_i915_private *i915)
>>  {
>> -return (((IS_ELKHARTLAKE(i915) || IS_JASPERLAKE(i915)) &&
>> +return ((IS_ELKHARTLAKE(i915) &&
>>   IS_DISPLAY_STEP(i915, STEP_B0, STEP_FOREVER)) ||
>>   IS_TIGERLAKE(i915) || IS_ALDERLAKE_S(i915) || 
>> IS_ALDERLAKE_P(i915)) &&
>>   i915->display.dpll.ref_clks.nssc == 38400;

-- 
Jani Nikula, Intel


[PATCH 5/6] drm/i915: Handle joined pipes inside hsw_crtc_enable()

2024-03-18 Thread Stanislav Lisovskiy
Handle only bigjoiner masters in skl_commit_modeset_enables/disables,
slave crtcs should be handled by master hooks. Same for encoders.
That way we can also remove a bunch of checks like 
intel_crtc_is_bigjoiner_slave.

v2: - Moved skl_pfit_enable, intel_dsc_enable, intel_crtc_vblank_on to 
intel_enable_ddi,
  so that it is now finally symmetrical with the disable case, because 
currently
  for some weird reason we are calling those from 
skl_commit_modeset_enables, while
  for the disable case those are called from the ddi disable hooks.

v3: - Create intel_ddi_enable_hdmi_or_sst symmetrical to
  intel_ddi_post_disable_hdmi_or_sst and move it also under non-mst check.

v4: - Fix intel_enable_ddi sequence

Signed-off-by: Stanislav Lisovskiy 
---
 drivers/gpu/drm/i915/display/intel_ddi.c |  45 --
 drivers/gpu/drm/i915/display/intel_display.c | 162 +--
 drivers/gpu/drm/i915/display/intel_display.h |   7 +
 3 files changed, 124 insertions(+), 90 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c 
b/drivers/gpu/drm/i915/display/intel_ddi.c
index 290ccab7c9ee8..9128b82a49c31 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -3366,15 +3366,28 @@ static void intel_enable_ddi_hdmi(struct 
intel_atomic_state *state,
intel_wait_ddi_buf_active(dev_priv, port);
 }
 
-static void intel_enable_ddi(struct intel_atomic_state *state,
-struct intel_encoder *encoder,
-const struct intel_crtc_state *crtc_state,
-const struct drm_connector_state *conn_state)
+static void intel_ddi_enable_hdmi_or_sst(struct intel_atomic_state *state,
+struct intel_encoder *encoder,
+const struct intel_crtc_state 
*crtc_state,
+const struct drm_connector_state 
*conn_state)
 {
-   drm_WARN_ON(state->base.dev, crtc_state->has_pch_encoder);
+   struct drm_i915_private *i915 = to_i915(encoder->base.dev);
+   u8 pipe_mask = intel_crtc_joined_pipe_mask(crtc_state);
+   struct intel_crtc *crtc;
+
+   for_each_intel_crtc_in_pipe_mask_reverse(>drm, crtc, pipe_mask) {
+   const struct intel_crtc_state *new_crtc_state =
+   intel_atomic_get_new_crtc_state(state, crtc);
+
+   intel_dsc_enable(new_crtc_state);
+
+   if (DISPLAY_VER(i915) >= 9)
+   skl_pfit_enable(new_crtc_state);
+   else
+   ilk_pfit_enable(new_crtc_state);
+   }
 
-   if (!intel_crtc_is_bigjoiner_slave(crtc_state))
-   intel_ddi_enable_transcoder_func(encoder, crtc_state);
+   intel_ddi_enable_transcoder_func(encoder, crtc_state);
 
/* Enable/Disable DP2.0 SDP split config before transcoder */
intel_audio_sdp_split_update(crtc_state);
@@ -3383,7 +3396,22 @@ static void intel_enable_ddi(struct intel_atomic_state 
*state,
 
intel_ddi_wait_for_fec_status(encoder, crtc_state, true);
 
-   intel_crtc_vblank_on(crtc_state);
+   for_each_intel_crtc_in_pipe_mask_reverse(>drm, crtc, pipe_mask) {
+   const struct intel_crtc_state *new_crtc_state =
+   intel_atomic_get_new_crtc_state(state, crtc);
+   intel_crtc_vblank_on(new_crtc_state);
+   }
+}
+
+static void intel_enable_ddi(struct intel_atomic_state *state,
+struct intel_encoder *encoder,
+const struct intel_crtc_state *crtc_state,
+const struct drm_connector_state *conn_state)
+{
+   drm_WARN_ON(state->base.dev, crtc_state->has_pch_encoder);
+
+   if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST))
+   intel_ddi_enable_hdmi_or_sst(state, encoder, crtc_state, 
conn_state);
 
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
intel_enable_ddi_hdmi(state, encoder, crtc_state, conn_state);
@@ -3391,7 +3419,6 @@ static void intel_enable_ddi(struct intel_atomic_state 
*state,
intel_enable_ddi_dp(state, encoder, crtc_state, conn_state);
 
intel_hdcp_enable(state, encoder, crtc_state, conn_state);
-
 }
 
 static void intel_disable_ddi_dp(struct intel_atomic_state *state,
diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index a1eccefde9f09..eccc680affad7 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -794,7 +794,7 @@ intel_get_crtc_new_encoder(const struct intel_atomic_state 
*state,
return encoder;
 }
 
-static void ilk_pfit_enable(const struct intel_crtc_state *crtc_state)
+void ilk_pfit_enable(const struct intel_crtc_state *crtc_state)
 {
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);