✓ Fi.CI.BAT: success for drm/i915: Implemnt vblank sycnhronized mbus joining changes (rev2)

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

Series: drm/i915: Implemnt vblank sycnhronized mbus joining changes (rev2)
URL   : https://patchwork.freedesktop.org/series/131700/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14506 -> Patchwork_131700v2


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (37 -> 35)
--

  Additional (2): fi-bsw-nick fi-kbl-8809g 
  Missing(4): bat-mtlp-8 bat-kbl-2 bat-adlp-6 fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Suppressed 

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

  * igt@kms_flip@basic-flip-vs-modeset@a-dp6:
- {bat-mtlp-9}:   [PASS][1] -> [DMESG-WARN][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14506/bat-mtlp-9/igt@kms_flip@basic-flip-vs-mode...@a-dp6.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v2/bat-mtlp-9/igt@kms_flip@basic-flip-vs-mode...@a-dp6.html

  
Known issues


  Here are the changes found in Patchwork_131700v2 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_14506/bat-arls-3/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v2/bat-arls-3/boot.html
- bat-jsl-1:  [PASS][5] -> [FAIL][6] ([i915#8293])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14506/bat-jsl-1/boot.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v2/bat-jsl-1/boot.html

  
 Possible fixes 

  * boot:
- bat-dg2-11: [FAIL][7] ([i915#10491]) -> [PASS][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14506/bat-dg2-11/boot.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v2/bat-dg2-11/boot.html

  

### IGT changes ###

 Issues hit 

  * igt@gem_lmem_swapping@parallel-random-engines:
- fi-bsw-nick:NOTRUN -> [SKIP][9] +19 other tests skip
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v2/fi-bsw-nick/igt@gem_lmem_swapp...@parallel-random-engines.html

  * igt@gem_mmap@basic:
- bat-dg2-11: NOTRUN -> [SKIP][10] ([i915#4083])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v2/bat-dg2-11/igt@gem_m...@basic.html

  * igt@gem_tiled_fence_blits@basic:
- bat-dg2-11: NOTRUN -> [SKIP][11] ([i915#4077]) +2 other tests skip
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v2/bat-dg2-11/igt@gem_tiled_fence_bl...@basic.html

  * igt@gem_tiled_pread_basic:
- bat-dg2-11: NOTRUN -> [SKIP][12] ([i915#4079]) +1 other test skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v2/bat-dg2-11/igt@gem_tiled_pread_basic.html

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

  * igt@kms_addfb_basic@addfb25-x-tiled-mismatch-legacy:
- bat-dg2-11: NOTRUN -> [SKIP][14] ([i915#4212]) +7 other tests skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v2/bat-dg2-11/igt@kms_addfb_ba...@addfb25-x-tiled-mismatch-legacy.html

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-dg2-11: NOTRUN -> [SKIP][15] ([i915#5190])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v2/bat-dg2-11/igt@kms_addfb_ba...@addfb25-y-tiled-small-legacy.html

  * igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg2-11: NOTRUN -> [SKIP][16] ([i915#4215] / [i915#5190])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v2/bat-dg2-11/igt@kms_addfb_ba...@basic-y-tiled-legacy.html

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

  * igt@kms_dsc@dsc-basic:
- bat-dg2-11: NOTRUN -> [SKIP][18] ([i915#3555] / [i915#3840])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v2/bat-dg2-11/igt@kms_...@dsc-basic.html

  * igt@kms_force_connector_basic@force-connector-state:
- bat-dg2-8:  [PASS][19] -> [ABORT][20] ([i915#10476])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14506/bat-dg2-8/igt@kms_force_connector_ba...@force-connector-state.html
   [20]: 

✗ Fi.CI.SPARSE: warning for drm/i915: Implemnt vblank sycnhronized mbus joining changes (rev2)

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

Series: drm/i915: Implemnt vblank sycnhronized mbus joining changes (rev2)
URL   : https://patchwork.freedesktop.org/series/131700/
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 ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path (rev2)

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

Series: ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path 
(rev2)
URL   : https://patchwork.freedesktop.org/series/131767/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14506 -> Patchwork_131767v2


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (37 -> 38)
--

  Additional (3): fi-glk-j4005 fi-bsw-nick fi-kbl-8809g 
  Missing(2): bat-mtlp-8 fi-snb-2520m 

Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- bat-arls-3: [PASS][1] -> [FAIL][2] ([i915#10234])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14506/bat-arls-3/boot.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131767v2/bat-arls-3/boot.html

  
 Possible fixes 

  * boot:
- bat-dg2-11: [FAIL][3] ([i915#10491]) -> [PASS][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14506/bat-dg2-11/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131767v2/bat-dg2-11/boot.html

  

### IGT changes ###

 Issues hit 

  * igt@gem_huc_copy@huc-copy:
- fi-glk-j4005:   NOTRUN -> [SKIP][5] ([i915#2190])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131767v2/fi-glk-j4005/igt@gem_huc_c...@huc-copy.html

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

  * igt@gem_lmem_swapping@parallel-random-engines:
- fi-bsw-nick:NOTRUN -> [SKIP][7] +19 other tests skip
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131767v2/fi-bsw-nick/igt@gem_lmem_swapp...@parallel-random-engines.html

  * igt@gem_mmap@basic:
- bat-dg2-11: NOTRUN -> [SKIP][8] ([i915#4083])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131767v2/bat-dg2-11/igt@gem_m...@basic.html

  * igt@gem_tiled_fence_blits@basic:
- bat-dg2-11: NOTRUN -> [SKIP][9] ([i915#4077]) +2 other tests skip
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131767v2/bat-dg2-11/igt@gem_tiled_fence_bl...@basic.html

  * igt@gem_tiled_pread_basic:
- bat-dg2-11: NOTRUN -> [SKIP][10] ([i915#4079]) +1 other test skip
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131767v2/bat-dg2-11/igt@gem_tiled_pread_basic.html

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

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

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

  * igt@kms_addfb_basic@addfb25-x-tiled-mismatch-legacy:
- bat-dg2-11: NOTRUN -> [SKIP][16] ([i915#4212]) +7 other tests skip
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131767v2/bat-dg2-11/igt@kms_addfb_ba...@addfb25-x-tiled-mismatch-legacy.html

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-dg2-11: NOTRUN -> [SKIP][17] ([i915#5190])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131767v2/bat-dg2-11/igt@kms_addfb_ba...@addfb25-y-tiled-small-legacy.html

  * igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg2-11: NOTRUN -> [SKIP][18] ([i915#4215] / [i915#5190])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131767v2/bat-dg2-11/igt@kms_addfb_ba...@basic-y-tiled-legacy.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-glk-j4005:   NOTRUN -> [SKIP][19] +10 other tests skip
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131767v2/fi-glk-j4005/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-atomic.html
- bat-dg2-11: NOTRUN -> [SKIP][20] ([i915#4103] / [i915#4213]) +1 
other test skip
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131767v2/bat-dg2-11/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_dsc@dsc-basic:
- bat-dg2-11: NOTRUN -> [SKIP][21] ([i915#3555] / [i915#3840])
   [21]: 

✗ Fi.CI.SPARSE: warning for ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path (rev2)

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

Series: ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path 
(rev2)
URL   : https://patchwork.freedesktop.org/series/131767/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2




Re: [PATCH] drm/i915/hwmon: Remove i915_hwmon_unregister() during driver unbind

2024-03-28 Thread Dixit, Ashutosh
On Wed, 27 Mar 2024 13:37:19 -0700, Dixit, Ashutosh wrote:
>
> On Wed, 27 Mar 2024 02:15:27 -0700, Krzysztofik, Janusz wrote:
> >
>
> Hi Janusz,
>
> > For me, that still doesn't explain why you think that i915->hwmon reset to
> > NULL on i915 driver unregister can be the root cause of the reported UAF in
> > hwmon sysfs and this patch is going to fix that UAF issue.  I can see no
> > references to i915->hwmon in that code, and even then, that's not NULL what 
> > is
> > reported here as non-canonical address.  The code is using a no longer valid
> > pointer to an already freed (and poisoned) memory.
>
> Correct, I said basically the same thing in my reply to the patch. That the
> patch doesn't explain that ddat seems to have been freed and poisoned.
>
> > > > I think that instead of dropping i915_hwmon_unregister() we have to 
> > > > actually
> > > > unregister hwmon in the body of that function, which is called from
> > > > i915_driver_unregister() intended for closing user interfaces, then 
> > > > called
> > > > relatively early during driver unbind, so hwmon sysfs entries disappear 
> > > > before
> > > > i915 structures, especially uncore used by hwmon code, are freed.
> > >
> > > You mean uncore are freed before hwmon get unregistered, I don't think
> > > so. uncore is also drm device managed resource so in sequence I think it
> > > should be freed after i915 dev managed resources freed.
> >
> > If both uncore and hwmon are managed resources of i915 device then how can 
> > you
> > predict which of them is released first?
>
> Look at __hwmon_device_register. Here we see:
>
>   hdev->parent = dev
>
> So the hwmon device is a child device of the drm device (against which ddat
> is devm_kzalloc'd). Since a child device holds a reference against the
> parent (device_add() has get_device(dev->parent)), I would expect the hwmon
> device to disappear before the parent drm device. And I am assuming hwmon
> sysfs is linked to the hwmon device, so sysfs should disappear before ddat
> getting freed. But apparently this is not what is happening, so there's
> still something we are missing.

I looked into this a bit more. It doesn't seem to have to do with device
references. Basically, managed resources are maintained in a list and they
are removed in a reverse order from which they are added. See
release_nodes(). I believe (haven't really checked it but it looks to be
the case from the logs below) the call stack during release is:

device_release_driver ->
 __device_release_driver ->
  device_unbind_cleanup ->
   devres_release_all ->
release_nodes

With CONFIG_DEBUG_DEVRES=y and 'echo 1 > /sys/module/devres/parameters/log'
and running the selftests I always see:

Alloc:

[  878.406556] i915 :03:00.0: DEVRES ADD 88815d8d4000 
devm_kzalloc_release (616 bytes)
[  878.407632] i915 :03:00.0: DEVRES ADD 888199e6dd40 
devm_hwmon_release (8 bytes)

Dealloc:

[  879.317635] i915 :03:00.0: DEVRES REL 888199e6dd40 
devm_hwmon_release (8 bytes)
[  879.318261] i915 :03:00.0: DEVRES REL 88815d8d4000 
devm_kzalloc_release (616 bytes)

So from the above the memory is always freed after hwmon is
unregistered. 616 bytes is 'sizeof(struct i915_hwmon)'.

So the code seems to be correct. Unless something else is going on these CI
systems where we see this crash.

If we can repro the crash locally (as I described in my other email) that
would be the best. Then we can verify any fix. If we cannot repro it
locally, then we'll need to think of something else. Basically the
direction would be to see if we eliminate devm_ and if that makes the issue
go away.

Thanks.
--
Ashutosh


✓ Fi.CI.BAT: success for Disable automatic load CCS load balancing (rev14)

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

Series: Disable automatic load CCS load balancing (rev14)
URL   : https://patchwork.freedesktop.org/series/129951/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14506 -> Patchwork_129951v14


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (37 -> 35)
--

  Additional (1): fi-bsw-nick 
  Missing(3): bat-mtlp-8 bat-kbl-2 fi-snb-2520m 

Known issues


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

### CI changes ###

 Issues hit 

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

  
 Possible fixes 

  * boot:
- bat-dg2-11: [FAIL][5] ([i915#10491]) -> [PASS][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14506/bat-dg2-11/boot.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v14/bat-dg2-11/boot.html

  

### IGT changes ###

 Issues hit 

  * igt@gem_lmem_swapping@parallel-random-engines:
- fi-bsw-nick:NOTRUN -> [SKIP][7] +19 other tests skip
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v14/fi-bsw-nick/igt@gem_lmem_swapp...@parallel-random-engines.html

  * igt@gem_mmap@basic:
- bat-dg2-11: NOTRUN -> [SKIP][8] ([i915#4083])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v14/bat-dg2-11/igt@gem_m...@basic.html

  * igt@gem_tiled_fence_blits@basic:
- bat-dg2-11: NOTRUN -> [SKIP][9] ([i915#4077]) +2 other tests skip
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v14/bat-dg2-11/igt@gem_tiled_fence_bl...@basic.html

  * igt@gem_tiled_pread_basic:
- bat-dg2-11: NOTRUN -> [SKIP][10] ([i915#4079]) +1 other test skip
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v14/bat-dg2-11/igt@gem_tiled_pread_basic.html

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

  * igt@i915_selftest@live@workarounds:
- bat-dg2-11: NOTRUN -> [DMESG-FAIL][12] ([i915#9500])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v14/bat-dg2-11/igt@i915_selftest@l...@workarounds.html

  * igt@kms_addfb_basic@addfb25-x-tiled-mismatch-legacy:
- bat-dg2-11: NOTRUN -> [SKIP][13] ([i915#4212]) +7 other tests skip
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v14/bat-dg2-11/igt@kms_addfb_ba...@addfb25-x-tiled-mismatch-legacy.html

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-dg2-11: NOTRUN -> [SKIP][14] ([i915#5190])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v14/bat-dg2-11/igt@kms_addfb_ba...@addfb25-y-tiled-small-legacy.html

  * igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg2-11: NOTRUN -> [SKIP][15] ([i915#4215] / [i915#5190])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v14/bat-dg2-11/igt@kms_addfb_ba...@basic-y-tiled-legacy.html

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

  * igt@kms_dsc@dsc-basic:
- bat-dg2-11: NOTRUN -> [SKIP][17] ([i915#3555] / [i915#3840])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v14/bat-dg2-11/igt@kms_...@dsc-basic.html

  * igt@kms_force_connector_basic@force-load-detect:
- bat-dg2-11: NOTRUN -> [SKIP][18]
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v14/bat-dg2-11/igt@kms_force_connector_ba...@force-load-detect.html

  * igt@kms_force_connector_basic@prune-stale-modes:
- bat-dg2-11: NOTRUN -> [SKIP][19] ([i915#5274])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v14/bat-dg2-11/igt@kms_force_connector_ba...@prune-stale-modes.html

  * igt@kms_pm_backlight@basic-brightness:
- bat-dg2-11: NOTRUN -> [SKIP][20] ([i915#5354])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v14/bat-dg2-11/igt@kms_pm_backli...@basic-brightness.html

  * igt@kms_psr@psr-sprite-plane-onoff:
- bat-dg2-11: NOTRUN -> [SKIP][21] ([i915#1072] 

✗ Fi.CI.SPARSE: warning for Disable automatic load CCS load balancing (rev14)

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

Series: Disable automatic load CCS load balancing (rev14)
URL   : https://patchwork.freedesktop.org/series/129951/
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:147:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:179:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:181:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:181:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:185:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:187:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:191:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:194:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:194:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:236:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:238:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced 
symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced 
symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced 
symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced 
symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced 
symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced 
symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced 
symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced 
symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced 
symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced 
symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced 
symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced 
symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced 
symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:57:9: warning: unreplaced 
symbol 'mask'

✗ Fi.CI.CHECKPATCH: warning for Disable automatic load CCS load balancing (rev14)

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

Series: Disable automatic load CCS load balancing (rev14)
URL   : https://patchwork.freedesktop.org/series/129951/
State : warning

== Summary ==

Error: dim checkpatch failed
9e5c201ff6d6 drm/i915/gt: Disable HW load balancing for CCS
165039e14345 drm/i915/gt: Do not generate the command streamer for all the CCS
2c4979792953 drm/i915/gt: Enable only one CCS for compute workload
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'
-:37: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does 
MAINTAINERS need updating?
#37: 
new file mode 100644

-:111: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'cslice' may be better as 
'(cslice)' to avoid precedence issues
#111: FILE: drivers/gpu/drm/i915/gt/intel_gt_regs.h:1433:
+#define   XEHP_CCS_MODE_CSLICE(cslice, ccs)(ccs << (cslice * 
XEHP_CCS_MODE_CSLICE_WIDTH))

-:111: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'ccs' may be better as 
'(ccs)' to avoid precedence issues
#111: FILE: drivers/gpu/drm/i915/gt/intel_gt_regs.h:1433:
+#define   XEHP_CCS_MODE_CSLICE(cslice, ccs)(ccs << (cslice * 
XEHP_CCS_MODE_CSLICE_WIDTH))

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




✓ Fi.CI.BAT: success for drm/i915/display_debugfs: Remove check for crtc in force bigjoiner

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

Series: drm/i915/display_debugfs: Remove check for crtc in force bigjoiner
URL   : https://patchwork.freedesktop.org/series/131770/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14506 -> Patchwork_131770v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (37 -> 37)
--

  Additional (2): fi-bsw-nick fi-kbl-8809g 
  Missing(2): bat-kbl-2 fi-snb-2520m 

Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- fi-kbl-8809g:   NOTRUN -> [FAIL][1] ([i915#8293])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131770v1/fi-kbl-8809g/boot.html

  

### IGT changes ###

 Issues hit 

  * igt@gem_lmem_swapping@parallel-random-engines:
- fi-bsw-nick:NOTRUN -> [SKIP][2] +19 other tests skip
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131770v1/fi-bsw-nick/igt@gem_lmem_swapp...@parallel-random-engines.html

  
 Possible fixes 

  * igt@kms_cursor_legacy@basic-flip-before-cursor-atomic:
- {bat-mtlp-9}:   [DMESG-WARN][3] -> [PASS][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14506/bat-mtlp-9/igt@kms_cursor_leg...@basic-flip-before-cursor-atomic.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131770v1/bat-mtlp-9/igt@kms_cursor_leg...@basic-flip-before-cursor-atomic.html

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

  [i915#8293]: https://gitlab.freedesktop.org/drm/intel/issues/8293


Build changes
-

  * Linux: CI_DRM_14506 -> Patchwork_131770v1

  CI-20190529: 20190529
  CI_DRM_14506: 98f893b726e1ba5db2680da3f9f53ab2af9780be @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7790: 5ec1ff6da3535cf80fd4e1844867d75c481ef86a @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_131770v1: 98f893b726e1ba5db2680da3f9f53ab2af9780be @ 
git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

edc198699d31 drm/i915/display_debugfs: Remove check for crtc in force bigjoiner

== Logs ==

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


✓ Fi.CI.BAT: success for ALPM AUX-Less (rev8)

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

Series: ALPM AUX-Less (rev8)
URL   : https://patchwork.freedesktop.org/series/129938/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14505 -> Patchwork_129938v8


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (38 -> 37)
--

  Additional (1): bat-mtlp-8 
  Missing(2): fi-glk-j4005 fi-snb-2520m 

Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- fi-kbl-8809g:   [PASS][1] -> [FAIL][2] ([i915#8293])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14505/fi-kbl-8809g/boot.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/fi-kbl-8809g/boot.html

  
 Possible fixes 

  * boot:
- bat-jsl-1:  [FAIL][3] ([i915#8293]) -> [PASS][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14505/bat-jsl-1/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/bat-jsl-1/boot.html
- bat-dg2-11: [FAIL][5] ([i915#10491]) -> [PASS][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14505/bat-dg2-11/boot.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/bat-dg2-11/boot.html

  

### IGT changes ###

 Issues hit 

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

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

  * igt@gem_lmem_swapping@verify-random:
- bat-mtlp-8: NOTRUN -> [SKIP][10] ([i915#4613]) +3 other tests skip
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/bat-mtlp-8/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_129938v8/bat-jsl-1/igt@gem_lmem_swapp...@verify-random.html

  * igt@gem_mmap@basic:
- bat-dg2-11: NOTRUN -> [SKIP][12] ([i915#4083])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/bat-dg2-11/igt@gem_m...@basic.html
- bat-mtlp-8: NOTRUN -> [SKIP][13] ([i915#4083])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/bat-mtlp-8/igt@gem_m...@basic.html

  * igt@gem_mmap_gtt@basic:
- bat-mtlp-8: NOTRUN -> [SKIP][14] ([i915#4077]) +2 other tests skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/bat-mtlp-8/igt@gem_mmap_...@basic.html

  * igt@gem_render_tiled_blits@basic:
- bat-mtlp-8: NOTRUN -> [SKIP][15] ([i915#4079]) +1 other test skip
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/bat-mtlp-8/igt@gem_render_tiled_bl...@basic.html

  * igt@gem_tiled_fence_blits@basic:
- bat-dg2-11: NOTRUN -> [SKIP][16] ([i915#4077]) +2 other tests skip
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/bat-dg2-11/igt@gem_tiled_fence_bl...@basic.html

  * igt@gem_tiled_pread_basic:
- bat-dg2-11: NOTRUN -> [SKIP][17] ([i915#4079]) +1 other test skip
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/bat-dg2-11/igt@gem_tiled_pread_basic.html

  * igt@i915_pm_rps@basic-api:
- bat-dg2-9:  NOTRUN -> [SKIP][18] ([i915#6621])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/bat-dg2-9/igt@i915_pm_...@basic-api.html
- bat-dg2-11: NOTRUN -> [SKIP][19] ([i915#6621])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/bat-dg2-11/igt@i915_pm_...@basic-api.html
- bat-mtlp-8: NOTRUN -> [SKIP][20] ([i915#6621])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/bat-mtlp-8/igt@i915_pm_...@basic-api.html

  * igt@i915_selftest@live@hangcheck:
- bat-adls-6: NOTRUN -> [DMESG-WARN][21] ([i915#5591])
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/bat-adls-6/igt@i915_selftest@l...@hangcheck.html

  * igt@kms_addfb_basic@addfb25-x-tiled-mismatch-legacy:
- bat-dg2-11: NOTRUN -> [SKIP][22] ([i915#4212]) +7 other tests skip
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129938v8/bat-dg2-11/igt@kms_addfb_ba...@addfb25-x-tiled-mismatch-legacy.html

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-mtlp-8: NOTRUN -> [SKIP][23] ([i915#5190])
   [23]: 

✗ Fi.CI.SPARSE: warning for ALPM AUX-Less (rev8)

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

Series: ALPM AUX-Less (rev8)
URL   : https://patchwork.freedesktop.org/series/129938/
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'
+./arch/x86/include/asm/bitops.h:116:1: 

✗ Fi.CI.CHECKPATCH: warning for ALPM AUX-Less (rev8)

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

Series: ALPM AUX-Less (rev8)
URL   : https://patchwork.freedesktop.org/series/129938/
State : warning

== Summary ==

Error: dim checkpatch failed
b95867a71e6f drm/i915/psr: Add missing ALPM AUX-Less register definitions
-:33: WARNING:LONG_LINE: line length of 169 exceeds 100 columns
#33: FILE: drivers/gpu/drm/i915/display/intel_psr_regs.h:352:
+#define  PORT_ALPM_LFPS_CTL_LFPS_CYCLE_COUNT(val)  
REG_FIELD_PREP(PORT_ALPM_LFPS_CTL_LFPS_CYCLE_COUNT_MASK, (val) - 
PORT_ALPM_LFPS_CTL_LFPS_CYCLE_COUNT_MIN)

-:35: WARNING:LONG_LINE: line length of 133 exceeds 100 columns
#35: FILE: drivers/gpu/drm/i915/display/intel_psr_regs.h:354:
+#define  PORT_ALPM_LFPS_CTL_LFPS_HALF_CYCLE_DURATION(val)  
REG_FIELD_PREP(PORT_ALPM_LFPS_CTL_LFPS_HALF_CYCLE_DURATION_MASK, val)

-:37: WARNING:LONG_LINE: line length of 133 exceeds 100 columns
#37: FILE: drivers/gpu/drm/i915/display/intel_psr_regs.h:356:
+#define  PORT_ALPM_LFPS_CTL_FIRST_LFPS_HALF_CYCLE_DURATION(val)
REG_FIELD_PREP(PORT_ALPM_LFPS_CTL_LFPS_HALF_CYCLE_DURATION_MASK, val)

-:39: WARNING:LONG_LINE: line length of 133 exceeds 100 columns
#39: FILE: drivers/gpu/drm/i915/display/intel_psr_regs.h:358:
+#define  PORT_ALPM_LFPS_CTL_LAST_LFPS_HALF_CYCLE_DURATION(val) 
REG_FIELD_PREP(PORT_ALPM_LFPS_CTL_LFPS_HALF_CYCLE_DURATION_MASK, val)

total: 0 errors, 4 warnings, 0 checks, 17 lines checked
8e2ca58e16c2 drm/i915/psr: Calculate aux less wake time
53823066833d drm/i915/psr: Silence period and lfps half cycle
5f3e821d18fd drm/i915/psr: Enable ALPM on source side for eDP Panel replay
-:61: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#61: FILE: drivers/gpu/drm/i915/display/intel_psr.c:1742:
+  PORT_ALPM_CTL_SILENCE_PERIOD(

-:66: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#66: FILE: drivers/gpu/drm/i915/display/intel_psr.c:1747:
+  PORT_ALPM_LFPS_CTL_LFPS_HALF_CYCLE_DURATION(

-:68: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#68: FILE: drivers/gpu/drm/i915/display/intel_psr.c:1749:
+  
PORT_ALPM_LFPS_CTL_FIRST_LFPS_HALF_CYCLE_DURATION(

-:70: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#70: FILE: drivers/gpu/drm/i915/display/intel_psr.c:1751:
+  PORT_ALPM_LFPS_CTL_LAST_LFPS_HALF_CYCLE_DURATION(

total: 0 errors, 0 warnings, 4 checks, 63 lines checked
0f969e14db33 drm/i915/psr: Do not write ALPM configuration for PSR1 or DP2.0 
Panel Replay




Re: [PATCH] drm/i915/guc: Remove bogus null check

2024-03-28 Thread Rodrigo Vivi
On Thu, Mar 28, 2024 at 10:41:55PM +0100, Andi Shyti wrote:
> Hi Rodrigo,
> 
> On Thu, Mar 28, 2024 at 05:31:07PM -0400, Rodrigo Vivi wrote:
> > This null check is bogus because we are already using 'ce' stuff
> > in many places before this function is called.
> > 
> > Having this here is useless and confuses static analyzer tools
> > that can see:
> > 
> > struct intel_engine_cs *engine = ce->engine;
> > 
> > before this check, in the same function.
> > 
> > Fixes: cec82816d0d0 ("drm/i915/guc: Use context hints for GT frequency")
> 
> there is no need to have the Fixes tag here.

why not? I imagine distros that have this commit cec82816d0d0 and use
static analyzers would also want this patch ported to silent those, no?!

> 
> > Reported-by: kernel test robot 
> > Reported-by: Dan Carpenter 
> > Closes: https://lore.kernel.org/r/202403101225.7ahejhzj-...@intel.com/
> > Cc: Vinay Belgaumkar 
> > Cc: John Harrison 
> > Signed-off-by: Rodrigo Vivi 
> > ---
> >  drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c 
> > b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> > index 01d0ec1b30f2..24a82616f844 100644
> > --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> > +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> > @@ -2677,7 +2677,7 @@ static int guc_context_policy_init_v70(struct 
> > intel_context *ce, bool loop)
> > execution_quantum = engine->props.timeslice_duration_ms * 1000;
> > preemption_timeout = engine->props.preempt_timeout_ms * 1000;
> >  
> > -   if (ce && (ce->flags & BIT(CONTEXT_LOW_LATENCY)))
> > +   if (ce->flags & BIT(CONTEXT_LOW_LATENCY))
> 
> We could keep the check but make it earlier.

yes, that's another alternative.


-struct intel_engine_cs *engine = ce->engine;
+struct intel_engine_cs *engine;

if (!ce)
   return;

engine = ce->engine.

But looking to the 2 places where this function is getting called,
we already have ce->something used.

I can make the change to be like that if you believe that there's
a possibility in the future that we change that, just to be on
the safe side.

or anything else I might be missing?

Thanks for looking into this,
Rodrigo.

> 
> Thanks,
> Andi
> 
> > slpc_ctx_freq_req |= SLPC_CTX_FREQ_REQ_IS_COMPUTE;
> >  
> > __guc_context_policy_start_klv(, ce->guc_id.id);
> > -- 
> > 2.44.0


[PULL] drm-intel-fixes

2024-03-28 Thread Rodrigo Vivi
Hi Dave and Sima,

Here goes our first PR of this round.

Our CI is not working as I would expect:
https://intel-gfx-ci.01.org/tree/drm-intel-fixes/index.html?

Well, at least it caught some build failures on runds 832 and 833.
But after I fixed those, the 834 (with v6.9-rc1) and the 835 (with
all these patches here) didn't show up yet. So I have run manual validation
on my DG2+ADL here.

Everything looking good here, and it is yet -rc1. I'm confident
that we can move ahead with those while we work to get CI back.

Thanks,
Rodrigo

drm-intel-fixes-2024-03-28:

Core/GT Fixes:
- Fix for BUG_ON/BUILD_BUG_ON IN I915_memcpy.c (Joonas)
- Update a MTL workaround (Tejas)
- Fix locking inversion in hwmon's sysfs (Janusz)
- Remove a bogus error message around PXP (Jose)
- Fix UAF on VMA (Janusz)
- Reset queue_priority_hint on parking (Chris)

Display Fixes:
- Remove duplicated audio enable/disable on SDVO and DP (Ville)
- Disable AuxCCS for Xe driver (Juha-Pekka)
- Revert init order of MIPI DSI (Ville)
- DRRS debugfs fix with an extra refactor patch (Bhanuprakash)
- VRR related fixes (Ville)
- Fix a JSL eDP corruption (Jonathon)
- Fix the cursor physical dma address (Ville)
- BIOS VBT related fix (Ville)

Thanks,
Rodrigo.

The following changes since commit 4cece764965020c22cff7665b18a012006359095:

  Linux 6.9-rc1 (2024-03-24 14:10:05 -0700)

are available in the Git repository at:

  https://anongit.freedesktop.org/git/drm/drm-intel 
tags/drm-intel-fixes-2024-03-28

for you to fetch changes up to 32e39bab59934bfd3f37097d4dd85ac5eb0fd549:

  drm/i915/bios: Tolerate devdata==NULL in 
intel_bios_encoder_supports_dp_dual_mode() (2024-03-28 12:16:17 -0400)


Core/GT Fixes:
- Fix for BUG_ON/BUILD_BUG_ON IN I915_memcpy.c (Joonas)
- Update a MTL workaround (Tejas)
- Fix locking inversion in hwmon's sysfs (Janusz)
- Remove a bogus error message around PXP (Jose)
- Fix UAF on VMA (Janusz)
- Reset queue_priority_hint on parking (Chris)

Display Fixes:
- Remove duplicated audio enable/disable on SDVO and DP (Ville)
- Disable AuxCCS for Xe driver (Juha-Pekka)
- Revert init order of MIPI DSI (Ville)
- DRRS debugfs fix with an extra refactor patch (Bhanuprakash)
- VRR related fixes (Ville)
- Fix a JSL eDP corruption (Jonathon)
- Fix the cursor physical dma address (Ville)
- BIOS VBT related fix (Ville)


Bhanuprakash Modem (2):
  drm/i915/drrs: Refactor CPU transcoder DRRS check
  drm/i915/display/debugfs: Fix duplicate checks in i915_drrs_status

Chris Wilson (1):
  drm/i915/gt: Reset queue_priority_hint on parking

Janusz Krzysztofik (2):
  drm/i915/hwmon: Fix locking inversion in sysfs getter
  drm/i915/vma: Fix UAF on destroy against retire race

Jonathon Hall (1):
  drm/i915: Do not match JSL in ehl_combo_pll_div_frac_wa_needed()

Joonas Lahtinen (1):
  drm/i915: Add includes for BUG_ON/BUILD_BUG_ON in i915_memcpy.c

José Roberto de Souza (1):
  drm/i915: Do not print 'pxp init failed with 0' when it succeed

Juha-Pekka Heikkila (1):
  drm/i915/display: Disable AuxCCS framebuffers if built for Xe

Tejas Upadhyay (1):
  drm/i915/mtl: Update workaround 14018575942

Ville Syrjälä (6):
  drm/i915: Stop doing double audio enable/disable on SDVO and g4x+ DP
  drm/i915/dsi: Go back to the previous INIT_OTP/DISPLAY_ON order, mostly
  drm/i915/vrr: Generate VRR "safe window" for DSB
  drm/i915/dsb: Fix DSB vblank waits when using VRR
  drm/i915: Pre-populate the cursor physical dma address
  drm/i915/bios: Tolerate devdata==NULL in 
intel_bios_encoder_supports_dp_dual_mode()

 drivers/gpu/drm/i915/display/g4x_dp.c  |  2 -
 drivers/gpu/drm/i915/display/icl_dsi.c |  3 +-
 drivers/gpu/drm/i915/display/intel_bios.c  | 46 +---
 drivers/gpu/drm/i915/display/intel_cursor.c|  4 +-
 drivers/gpu/drm/i915/display/intel_display_types.h |  1 +
 drivers/gpu/drm/i915/display/intel_dp.c| 12 +-
 drivers/gpu/drm/i915/display/intel_dpll_mgr.c  |  2 +-
 drivers/gpu/drm/i915/display/intel_drrs.c  | 14 --
 drivers/gpu/drm/i915/display/intel_drrs.h  |  3 ++
 drivers/gpu/drm/i915/display/intel_dsb.c   | 14 ++
 drivers/gpu/drm/i915/display/intel_fb_pin.c| 10 +
 drivers/gpu/drm/i915/display/intel_sdvo.c  |  4 --
 drivers/gpu/drm/i915/display/intel_vrr.c   |  7 +--
 drivers/gpu/drm/i915/display/skl_universal_plane.c |  3 ++
 drivers/gpu/drm/i915/gt/intel_engine_pm.c  |  3 --
 .../gpu/drm/i915/gt/intel_execlists_submission.c   |  3 ++
 drivers/gpu/drm/i915/gt/intel_workarounds.c|  1 +
 drivers/gpu/drm/i915/i915_driver.c |  2 +-
 drivers/gpu/drm/i915/i915_hwmon.c  | 37 
 drivers/gpu/drm/i915/i915_memcpy.c |  2 +
 drivers/gpu/drm/i915/i915_reg.h 

✗ Fi.CI.IGT: failure for drm/i915/gt: Limit the reserved VM space to only the platforms that need it

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

Series: drm/i915/gt: Limit the reserved VM space to only the platforms that 
need it
URL   : https://patchwork.freedesktop.org/series/131707/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14495_full -> Patchwork_131707v1_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_131707v1_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_131707v1_full, 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.

  

Participating hosts (10 -> 10)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@gem_eio@in-flight-suspend:
- shard-dg2:  ([PASS][1], [PASS][2]) -> [INCOMPLETE][3]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg2-10/igt@gem_...@in-flight-suspend.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg2-5/igt@gem_...@in-flight-suspend.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/shard-dg2-8/igt@gem_...@in-flight-suspend.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@drm_fdinfo@most-busy-check-all@rcs0:
- shard-rkl:  [PASS][4] -> [FAIL][5] ([i915#7742])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-rkl-5/igt@drm_fdinfo@most-busy-check-...@rcs0.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/shard-rkl-3/igt@drm_fdinfo@most-busy-check-...@rcs0.html

  * igt@drm_fdinfo@virtual-busy-all:
- shard-dg2:  NOTRUN -> [SKIP][6] ([i915#8414])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/shard-dg2-6/igt@drm_fdi...@virtual-busy-all.html

  * igt@gem_bad_reloc@negative-reloc-lut:
- shard-rkl:  NOTRUN -> [SKIP][7] ([i915#3281]) +5 other tests skip
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/shard-rkl-5/igt@gem_bad_re...@negative-reloc-lut.html

  * igt@gem_ctx_persistence@heartbeat-close:
- shard-dg2:  NOTRUN -> [SKIP][8] ([i915#8555])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/shard-dg2-6/igt@gem_ctx_persiste...@heartbeat-close.html

  * igt@gem_eio@reset-stress:
- shard-dg1:  [PASS][9] -> [FAIL][10] ([i915#5784])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg1-14/igt@gem_...@reset-stress.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/shard-dg1-15/igt@gem_...@reset-stress.html

  * igt@gem_exec_capture@capture-recoverable:
- shard-rkl:  NOTRUN -> [SKIP][11] ([i915#6344])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/shard-rkl-5/igt@gem_exec_capt...@capture-recoverable.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-rkl:  [PASS][12] -> [FAIL][13] ([i915#2842]) +1 other test 
fail
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-rkl-2/igt@gem_exec_fair@basic-pace-s...@rcs0.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/shard-rkl-4/igt@gem_exec_fair@basic-pace-s...@rcs0.html
- shard-glk:  NOTRUN -> [FAIL][14] ([i915#2842])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/shard-glk3/igt@gem_exec_fair@basic-pace-s...@rcs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
- shard-tglu: ([PASS][15], [PASS][16]) -> [FAIL][17] ([i915#2842])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-tglu-7/igt@gem_exec_fair@basic-throt...@rcs0.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-tglu-9/igt@gem_exec_fair@basic-throt...@rcs0.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/shard-tglu-9/igt@gem_exec_fair@basic-throt...@rcs0.html

  * igt@gem_exec_params@rsvd2-dirt:
- shard-dg2:  NOTRUN -> [SKIP][18] ([i915#5107])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/shard-dg2-6/igt@gem_exec_par...@rsvd2-dirt.html

  * igt@gem_exec_schedule@semaphore-power:
- shard-rkl:  NOTRUN -> [SKIP][19] ([i915#7276])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/shard-rkl-5/igt@gem_exec_sched...@semaphore-power.html

  * igt@gem_lmem_swapping@heavy-verify-multi-ccs:
- shard-glk:  NOTRUN -> [SKIP][20] ([i915#4613]) +2 other tests skip
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/shard-glk3/igt@gem_lmem_swapp...@heavy-verify-multi-ccs.html

  * 

[PATCH] drm/i915: Fix i915_display_info output when connectors are not active

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

Currently intel_connector_info(), which prints the per-connector
output for i915_display_info, just bails out early if the connector
doesn't have a current encoder. That leads to very confusing output
where some of your connected (and properly detected) outputs appear
to have no enumerated modes.

Get rid of the encoder stuff and just rely on the connector itself
so that the output is always consistent.

Signed-off-by: Ville Syrjälä 
---
 .../gpu/drm/i915/display/intel_display_debugfs.c   | 14 +++---
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c 
b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index b99c024b0934..72efd92e5737 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -252,9 +252,6 @@ static void intel_connector_info(struct seq_file *m,
 struct drm_connector *connector)
 {
struct intel_connector *intel_connector = to_intel_connector(connector);
-   const struct drm_connector_state *conn_state = connector->state;
-   struct intel_encoder *encoder =
-   to_intel_encoder(conn_state->best_encoder);
const struct drm_display_mode *mode;
 
seq_printf(m, "[CONNECTOR:%d:%s]: status: %s\n",
@@ -271,28 +268,23 @@ static void intel_connector_info(struct seq_file *m,
   
drm_get_subpixel_order_name(connector->display_info.subpixel_order));
seq_printf(m, "\tCEA rev: %d\n", connector->display_info.cea_rev);
 
-   if (!encoder)
-   return;
-
switch (connector->connector_type) {
case DRM_MODE_CONNECTOR_DisplayPort:
case DRM_MODE_CONNECTOR_eDP:
-   if (encoder->type == INTEL_OUTPUT_DP_MST)
+   if (intel_connector->mst_port)
intel_dp_mst_info(m, intel_connector);
else
intel_dp_info(m, intel_connector);
break;
case DRM_MODE_CONNECTOR_HDMIA:
-   if (encoder->type == INTEL_OUTPUT_HDMI ||
-   encoder->type == INTEL_OUTPUT_DDI)
-   intel_hdmi_info(m, intel_connector);
+   intel_hdmi_info(m, intel_connector);
break;
default:
break;
}
 
seq_puts(m, "\tHDCP version: ");
-   if (intel_encoder_is_mst(encoder)) {
+   if (intel_connector->mst_port) {
intel_hdcp_info(m, intel_connector, true);
seq_puts(m, "\tMST Hub HDCP version: ");
}
-- 
2.43.2



✗ Fi.CI.BUILD: failure for spi: add driver for Intel discrete graphics

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

Series: spi: add driver for Intel discrete graphics
URL   : https://patchwork.freedesktop.org/series/131763/
State : failure

== Summary ==

Error: patch 
https://patchwork.freedesktop.org/api/1.0/series/131763/revisions/1/mbox/ not 
applied
Applying: spi: add auxiliary device for intel dg spi
Applying: drm/i915/spi: add spi device for discrete graphics
Applying: drm/i915/spi: add intel_spi_region map
Applying: drm/i915/spi: add support for access mode
Applying: spi: add driver for intel graphics on-die spi device
Applying: spi: intel-dg: implement region enumeration
Applying: spi: intel-dg: implement spi access functions
Applying: spi: intel-dg: spi register with mtd
Applying: spi: intel-dg: implement mtd access handlers
Applying: spi: intel-dg: align 64bit read and write
Applying: spi: intel-dg: wake card on operations
Applying: drm/xe/spi: add on-die spi device
Using index info to reconstruct a base tree...
M   drivers/gpu/drm/xe/Makefile
M   drivers/gpu/drm/xe/xe_device.c
M   drivers/gpu/drm/xe/xe_device_types.h
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/xe/xe_device_types.h
Auto-merging drivers/gpu/drm/xe/xe_device.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/xe/xe_device.c
Auto-merging drivers/gpu/drm/xe/Makefile
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0012 drm/xe/spi: add on-die spi device
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 22/22] drm/i915: Use debugfs_create_bool() for "i915_bigjoiner_force_enable"

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

There is no reason to make this debugfs file for a simple
boolean so complicated. Just use debugfs_create_bool().

Signed-off-by: Ville Syrjälä 
---
 .../drm/i915/display/intel_display_debugfs.c  | 44 +--
 1 file changed, 2 insertions(+), 42 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c 
b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index b99c024b0934..3e364891dcd0 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -1402,20 +1402,6 @@ out: 
drm_modeset_unlock(>drm.mode_config.connection_mutex);
return ret;
 }
 
-static int i915_bigjoiner_enable_show(struct seq_file *m, void *data)
-{
-   struct intel_connector *connector = m->private;
-   struct drm_crtc *crtc;
-
-   crtc = connector->base.state->crtc;
-   if (connector->base.status != connector_status_connected || !crtc)
-   return -ENODEV;
-
-   seq_printf(m, "Bigjoiner enable: %d\n", 
connector->force_bigjoiner_enable);
-
-   return 0;
-}
-
 static ssize_t i915_dsc_output_format_write(struct file *file,
const char __user *ubuf,
size_t len, loff_t *offp)
@@ -1437,30 +1423,6 @@ static ssize_t i915_dsc_output_format_write(struct file 
*file,
return len;
 }
 
-static ssize_t i915_bigjoiner_enable_write(struct file *file,
-  const char __user *ubuf,
-  size_t len, loff_t *offp)
-{
-   struct seq_file *m = file->private_data;
-   struct intel_connector *connector = m->private;
-   struct drm_crtc *crtc;
-   bool bigjoiner_en = 0;
-   int ret;
-
-   crtc = connector->base.state->crtc;
-   if (connector->base.status != connector_status_connected || !crtc)
-   return -ENODEV;
-
-   ret = kstrtobool_from_user(ubuf, len, _en);
-   if (ret < 0)
-   return ret;
-
-   connector->force_bigjoiner_enable = bigjoiner_en;
-   *offp += len;
-
-   return len;
-}
-
 static int i915_dsc_output_format_open(struct inode *inode,
   struct file *file)
 {
@@ -1554,8 +1516,6 @@ static const struct file_operations 
i915_dsc_fractional_bpp_fops = {
.write = i915_dsc_fractional_bpp_write
 };
 
-DEFINE_SHOW_STORE_ATTRIBUTE(i915_bigjoiner_enable);
-
 /*
  * Returns the Current CRTC's bpc.
  * Example usage: cat /sys/kernel/debug/dri/0/crtc-0/i915_current_bpc
@@ -1640,8 +1600,8 @@ void intel_connector_debugfs_add(struct intel_connector 
*connector)
if (DISPLAY_VER(i915) >= 11 &&
(connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
 connector_type == DRM_MODE_CONNECTOR_eDP)) {
-   debugfs_create_file("i915_bigjoiner_force_enable", 0644, root,
-   connector, _bigjoiner_enable_fops);
+   debugfs_create_bool("i915_bigjoiner_force_enable", 0644, root,
+   >force_bigjoiner_enable);
}
 
if (connector_type == DRM_MODE_CONNECTOR_DSI ||
-- 
2.43.2



[PATCH 21/22] drm/i915: Allow bigjoiner for MST

2024-03-28 Thread Ville Syrjala
From: Vidya Srinivas 

We need bigjoiner support with MST functionality
for MST monitor resolutions > 5K to work.
Adding support for the same.

v2: Addressed review comments from Jani.
Revert rejection of MST bigjoiner modes and add
functionality

v3: Fixed pipe_mismatch WARN for mst_master_transcoder
Credits-to: Manasi Navare 

v4: Utilize intel_crtc_joined_pipe_mask() also for handling
bigjoiner slave pipes for MST case(Stan)
[v5: vsyrjala: chunked the modeset squence stuff out,
   removed bogus mst master transcoder hack,
   keep mgr_lock near the full_pbn check]

Signed-off-by: Vidya Srinivas 
Reviewed-by: Manasi Navare 
Co-developed-by: Ville Syrjälä 
Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 25 -
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 2d601d214915..c1530c01f541 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -525,6 +525,7 @@ static int intel_dp_mst_compute_config(struct intel_encoder 
*encoder,
 {
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
struct intel_atomic_state *state = 
to_intel_atomic_state(conn_state->state);
+   struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
struct intel_dp_mst_encoder *intel_mst = enc_to_mst(encoder);
struct intel_dp *intel_dp = _mst->primary->dp;
struct intel_connector *connector =
@@ -542,6 +543,11 @@ static int intel_dp_mst_compute_config(struct 
intel_encoder *encoder,
if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
return -EINVAL;
 
+   if (intel_dp_need_bigjoiner(intel_dp, connector,
+   adjusted_mode->crtc_hdisplay,
+   adjusted_mode->crtc_clock))
+   pipe_config->bigjoiner_pipes = GENMASK(crtc->pipe + 1, 
crtc->pipe);
+
pipe_config->sink_format = INTEL_OUTPUT_FORMAT_RGB;
pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;
pipe_config->has_pch_encoder = false;
@@ -1341,10 +1347,6 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector 
*connector,
   max_link_clock, max_lanes);
mode_rate = intel_dp_link_required(mode->clock, min_bpp);
 
-   ret = drm_modeset_lock(>base.lock, ctx);
-   if (ret)
-   return ret;
-
/*
 * TODO:
 * - Also check if compression would allow for the mode
@@ -1357,17 +1359,18 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector 
*connector,
 *   corresponding link capabilities of the sink) in case the
 *   stream is uncompressed for it by the last branch device.
 */
-   if (mode_rate > max_rate || mode->clock > max_dotclk ||
-   drm_dp_calc_pbn_mode(mode->clock, min_bpp << 4) > port->full_pbn) {
-   *status = MODE_CLOCK_HIGH;
-   return 0;
-   }
if (intel_dp_need_bigjoiner(intel_dp, intel_connector,
mode->hdisplay, target_clock)) {
bigjoiner = true;
max_dotclk *= 2;
+   }
 
-   /* TODO: add support for bigjoiner */
+   ret = drm_modeset_lock(>base.lock, ctx);
+   if (ret)
+   return ret;
+
+   if (mode_rate > max_rate || mode->clock > max_dotclk ||
+   drm_dp_calc_pbn_mode(mode->clock, min_bpp << 4) > port->full_pbn) {
*status = MODE_CLOCK_HIGH;
return 0;
}
@@ -1410,7 +1413,7 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector 
*connector,
return 0;
}
 
-   *status = intel_mode_valid_max_plane_size(dev_priv, mode, false);
+   *status = intel_mode_valid_max_plane_size(dev_priv, mode, bigjoiner);
return 0;
 }
 
-- 
2.43.2



[PATCH 20/22] drm/i915/mst: Add bigjoiner handling to MST modeset sequence

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

Loop over all joined pipes at relevant points in the MST
modeset sequence.

Carved out from Vidya's earlier big patch, with naming/etc.
changed to match the earlier hsw_crtc_enable() stuff.

Co-developed-by: Vidya Srinivas 
Signed-off-by: Vidya Srinivas 
Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 34 -
 1 file changed, 27 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index de364ed77c08..2d601d214915 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -956,6 +956,7 @@ static void intel_mst_post_disable_dp(struct 
intel_atomic_state *state,
struct drm_dp_mst_atomic_payload *new_payload =
drm_atomic_get_mst_payload_state(new_mst_state, 
connector->port);
struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
+   struct intel_crtc *pipe_crtc;
bool last_mst_stream;
 
intel_dp->active_mst_links--;
@@ -964,7 +965,13 @@ static void intel_mst_post_disable_dp(struct 
intel_atomic_state *state,
DISPLAY_VER(dev_priv) >= 12 && last_mst_stream &&
!intel_dp_mst_is_master_trans(old_crtc_state));
 
-   intel_crtc_vblank_off(old_crtc_state);
+   for_each_intel_crtc_in_pipe_mask(_priv->drm, pipe_crtc,
+
intel_crtc_joined_pipe_mask(old_crtc_state)) {
+   const struct intel_crtc_state *old_pipe_crtc_state =
+   intel_atomic_get_old_crtc_state(state, pipe_crtc);
+
+   intel_crtc_vblank_off(old_pipe_crtc_state);
+   }
 
intel_disable_transcoder(old_crtc_state);
 
@@ -982,12 +989,18 @@ static void intel_mst_post_disable_dp(struct 
intel_atomic_state *state,
 
intel_ddi_disable_transcoder_func(old_crtc_state);
 
-   intel_dsc_disable(old_crtc_state);
+   for_each_intel_crtc_in_pipe_mask(_priv->drm, pipe_crtc,
+
intel_crtc_joined_pipe_mask(old_crtc_state)) {
+   const struct intel_crtc_state *old_pipe_crtc_state =
+   intel_atomic_get_old_crtc_state(state, pipe_crtc);
 
-   if (DISPLAY_VER(dev_priv) >= 9)
-   skl_scaler_disable(old_crtc_state);
-   else
-   ilk_pfit_disable(old_crtc_state);
+   intel_dsc_disable(old_pipe_crtc_state);
+
+   if (DISPLAY_VER(dev_priv) >= 9)
+   skl_scaler_disable(old_pipe_crtc_state);
+   else
+   ilk_pfit_disable(old_pipe_crtc_state);
+   }
 
/*
 * Power down mst path before disabling the port, otherwise we end
@@ -1133,6 +1146,7 @@ static void intel_mst_enable_dp(struct intel_atomic_state 
*state,
drm_atomic_get_new_mst_topology_state(>base, 
_dp->mst_mgr);
enum transcoder trans = pipe_config->cpu_transcoder;
bool first_mst_stream = intel_dp->active_mst_links == 1;
+   struct intel_crtc *pipe_crtc;
 
drm_WARN_ON(_priv->drm, pipe_config->has_pch_encoder);
 
@@ -1174,7 +1188,13 @@ static void intel_mst_enable_dp(struct 
intel_atomic_state *state,
 
intel_enable_transcoder(pipe_config);
 
-   intel_crtc_vblank_on(pipe_config);
+   for_each_intel_crtc_in_pipe_mask_reverse(_priv->drm, pipe_crtc,
+
intel_crtc_joined_pipe_mask(pipe_config)) {
+   const struct intel_crtc_state *pipe_crtc_state =
+   intel_atomic_get_new_crtc_state(state, pipe_crtc);
+
+   intel_crtc_vblank_on(pipe_crtc_state);
+   }
 
intel_hdcp_enable(state, encoder, pipe_config, conn_state);
 }
-- 
2.43.2



[PATCH 18/22] drm/i915: Handle joined pipes inside hsw_crtc_disable()

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

Reorganize the crtc disable path to only deal with the
master pipes/transcoders in intel_old_crtc_state_disables()
and offload the handling of joined pipes to hsw_crtc_disable().
This makes the whole thing much more sensible since we can
actually control the order in which we do the per-pipe vs.
per-transcoder modeset steps.

v2: Use the name 'pipe_crtc' for the per-pipe crtc pointer

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_display.c | 64 
 1 file changed, 39 insertions(+), 25 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index 58ee40786d5c..c15ea046c62a 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1791,29 +1791,28 @@ static void hsw_crtc_disable(struct intel_atomic_state 
*state,
const struct intel_crtc_state *old_crtc_state =
intel_atomic_get_old_crtc_state(state, crtc);
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
+   struct intel_crtc *pipe_crtc;
 
/*
 * FIXME collapse everything to one hook.
 * Need care with mst->ddi interactions.
 */
-   if (!intel_crtc_is_bigjoiner_slave(old_crtc_state)) {
-   intel_encoders_disable(state, crtc);
-   intel_encoders_post_disable(state, crtc);
-   }
-
-   intel_disable_shared_dpll(old_crtc_state);
+   intel_encoders_disable(state, crtc);
+   intel_encoders_post_disable(state, crtc);
 
-   if (!intel_crtc_is_bigjoiner_slave(old_crtc_state)) {
-   struct intel_crtc *slave_crtc;
+   for_each_intel_crtc_in_pipe_mask(>drm, pipe_crtc,
+
intel_crtc_joined_pipe_mask(old_crtc_state)) {
+   const struct intel_crtc_state *old_pipe_crtc_state =
+   intel_atomic_get_old_crtc_state(state, pipe_crtc);
 
-   intel_encoders_post_pll_disable(state, crtc);
+   intel_disable_shared_dpll(old_pipe_crtc_state);
+   }
 
-   intel_dmc_disable_pipe(i915, crtc->pipe);
+   intel_encoders_post_pll_disable(state, crtc);
 
-   for_each_intel_crtc_in_pipe_mask(>drm, slave_crtc,
-
intel_crtc_bigjoiner_slave_pipes(old_crtc_state))
-   intel_dmc_disable_pipe(i915, slave_crtc->pipe);
-   }
+   for_each_intel_crtc_in_pipe_mask(>drm, pipe_crtc,
+
intel_crtc_joined_pipe_mask(old_crtc_state))
+   intel_dmc_disable_pipe(i915, pipe_crtc->pipe);
 }
 
 static void i9xx_pfit_enable(const struct intel_crtc_state *crtc_state)
@@ -6784,21 +6783,31 @@ static void intel_old_crtc_state_disables(struct 
intel_atomic_state *state,
  struct intel_crtc *crtc)
 {
struct drm_i915_private *dev_priv = to_i915(state->base.dev);
-   const struct intel_crtc_state *new_crtc_state =
-   intel_atomic_get_new_crtc_state(state, crtc);
+   const struct intel_crtc_state *old_crtc_state =
+   intel_atomic_get_old_crtc_state(state, crtc);
+   struct intel_crtc *pipe_crtc;
 
/*
 * We need to disable pipe CRC before disabling the pipe,
 * or we race against vblank off.
 */
-   intel_crtc_disable_pipe_crc(crtc);
+   for_each_intel_crtc_in_pipe_mask(_priv->drm, pipe_crtc,
+
intel_crtc_joined_pipe_mask(old_crtc_state))
+   intel_crtc_disable_pipe_crc(pipe_crtc);
 
dev_priv->display.funcs.display->crtc_disable(state, crtc);
-   crtc->active = false;
-   intel_fbc_disable(crtc);
 
-   if (!new_crtc_state->hw.active)
-   intel_initial_watermarks(state, crtc);
+   for_each_intel_crtc_in_pipe_mask(_priv->drm, pipe_crtc,
+
intel_crtc_joined_pipe_mask(old_crtc_state)) {
+   const struct intel_crtc_state *new_pipe_crtc_state =
+   intel_atomic_get_new_crtc_state(state, pipe_crtc);
+
+   pipe_crtc->active = false;
+   intel_fbc_disable(pipe_crtc);
+
+   if (!new_pipe_crtc_state->hw.active)
+   intel_initial_watermarks(state, pipe_crtc);
+   }
 }
 
 static void intel_commit_modeset_disables(struct intel_atomic_state *state)
@@ -6838,19 +6847,21 @@ static void intel_commit_modeset_disables(struct 
intel_atomic_state *state)
if ((disable_pipes & BIT(crtc->pipe)) == 0)
continue;
 
+   if (intel_crtc_is_bigjoiner_slave(old_crtc_state))
+   continue;
+
/* In case of Transcoder port Sync master slave CRTCs can be
 * assigned in any order and we need to make sure that
 * slave CRTCs are disabled 

[PATCH 19/22] drm/i915: Handle joined pipes inside hsw_crtc_enable()

2024-03-28 Thread Ville Syrjala
From: 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
- Call intel_crtc_update_active_timings for slave pipes as well
[v5: vsyrjala: Use the name 'pipe_crtc' for the per-pipe crtc pointer
   Use consistent style and naming
   Protect macro arguments properly
   Drop superfluous changes to the modeset sequence,
   this now follows the old non-joiner sequence 100%
   apart from just looping in places]

Signed-off-by: Stanislav Lisovskiy 
Tested-by: Vidya Srinivas  #v4?
Reviewed-by: Manasi Navare  #v4?
Co-developed-by: Ville Syrjälä 
Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_ddi.c |  14 +-
 drivers/gpu/drm/i915/display/intel_display.c | 188 ++-
 drivers/gpu/drm/i915/display/intel_display.h |   6 +
 3 files changed, 116 insertions(+), 92 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c 
b/drivers/gpu/drm/i915/display/intel_ddi.c
index af34e905a85d..f81843058e79 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -3364,10 +3364,10 @@ static void intel_enable_ddi(struct intel_atomic_state 
*state,
 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);
+   struct intel_crtc *pipe_crtc;
 
-   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);
@@ -3376,7 +3376,13 @@ 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, pipe_crtc,
+
intel_crtc_joined_pipe_mask(crtc_state)) {
+   const struct intel_crtc_state *pipe_crtc_state =
+   intel_atomic_get_new_crtc_state(state, pipe_crtc);
+
+   intel_crtc_vblank_on(pipe_crtc_state);
+   }
 
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
intel_enable_ddi_hdmi(state, encoder, crtc_state, conn_state);
diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index c15ea046c62a..bebc4463ed4a 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1595,24 +1595,6 @@ static void hsw_set_frame_start_delay(const struct 
intel_crtc_state *crtc_state)
 HSW_FRAME_START_DELAY(crtc_state->framestart_delay - 1));
 }
 
-static void icl_ddi_bigjoiner_pre_enable(struct intel_atomic_state *state,
-const struct intel_crtc_state 
*crtc_state)
-{
-   struct intel_crtc *master_crtc = intel_master_crtc(crtc_state);
-
-   /*
-* Enable sequence steps 1-7 on bigjoiner master
-*/
-   if (intel_crtc_is_bigjoiner_slave(crtc_state))
-   intel_encoders_pre_pll_enable(state, master_crtc);
-
-   if (crtc_state->shared_dpll)
-   intel_enable_shared_dpll(crtc_state);
-
-   if (intel_crtc_is_bigjoiner_slave(crtc_state))
-   intel_encoders_pre_enable(state, master_crtc);
-}
-
 static void hsw_configure_cpu_transcoder(const struct intel_crtc_state 
*crtc_state)
 {
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
@@ -1649,85 +1631,106 @@ static void hsw_crtc_enable(struct intel_atomic_state 
*state,
intel_atomic_get_new_crtc_state(state, crtc);
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
enum transcoder cpu_transcoder = new_crtc_state->cpu_transcoder;
-   enum pipe hsw_workaround_pipe;
+   struct intel_crtc *pipe_crtc;
 
if (drm_WARN_ON(_priv->drm, crtc->active))
return;
 
-   intel_dmc_enable_pipe(dev_priv, crtc->pipe);
+ 

[PATCH 17/22] drm/i915: Utilize intel_crtc_joined_pipe_mask() more

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

Unify the master vs. slave handling in
intel_ddi_post_disable_hdmi_or_sst() by looping over all the
pipes in one go.

This also lets us move the intel_crtc_vblank_off() calls to
happen in a consistent place vs. the transcoder disable.
Previously we did the master vs. slaves on different sides
of that.

v2: Use the name 'pipe_crtc' for the per-pipe crtc pointer

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 25 ++--
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c 
b/drivers/gpu/drm/i915/display/intel_ddi.c
index 1130bfb7363c..af34e905a85d 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -3098,19 +3098,32 @@ static void intel_ddi_post_disable_hdmi_or_sst(struct 
intel_atomic_state *state,
   const struct drm_connector_state 
*old_conn_state)
 {
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+   struct intel_crtc *pipe_crtc;
 
-   intel_crtc_vblank_off(old_crtc_state);
+   for_each_intel_crtc_in_pipe_mask(_priv->drm, pipe_crtc,
+
intel_crtc_joined_pipe_mask(old_crtc_state)) {
+   const struct intel_crtc_state *old_pipe_crtc_state =
+   intel_atomic_get_old_crtc_state(state, pipe_crtc);
+
+   intel_crtc_vblank_off(old_pipe_crtc_state);
+   }
 
intel_disable_transcoder(old_crtc_state);
 
intel_ddi_disable_transcoder_func(old_crtc_state);
 
-   intel_dsc_disable(old_crtc_state);
+   for_each_intel_crtc_in_pipe_mask(_priv->drm, pipe_crtc,
+
intel_crtc_joined_pipe_mask(old_crtc_state)) {
+   const struct intel_crtc_state *old_pipe_crtc_state =
+   intel_atomic_get_old_crtc_state(state, pipe_crtc);
 
-   if (DISPLAY_VER(dev_priv) >= 9)
-   skl_scaler_disable(old_crtc_state);
-   else
-   ilk_pfit_disable(old_crtc_state);
+   intel_dsc_disable(old_pipe_crtc_state);
+
+   if (DISPLAY_VER(dev_priv) >= 9)
+   skl_scaler_disable(old_pipe_crtc_state);
+   else
+   ilk_pfit_disable(old_pipe_crtc_state);
+   }
 }
 
 static void intel_ddi_post_disable(struct intel_atomic_state *state,
-- 
2.43.2



[PATCH 16/22] drm/i915: Extract intel_ddi_post_disable_hdmi_or_sst()

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

Extract the "not-MST" stuff from intel_ddi_post_disable() so that
the whole thing isn't so cluttered.

The bigjoiner slave handling was outside of the !MST check,
but it really should have been inside it as its the counterpart
to the master handling inside the check. So we pull that
in as well. There is no functional change here as we don't
currently support bigjoiner+MST anyway.

v2: Rebase

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 52 +++-
 1 file changed, 24 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c 
b/drivers/gpu/drm/i915/display/intel_ddi.c
index 24a9be2a217f..1130bfb7363c 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -3092,39 +3092,35 @@ static void intel_ddi_post_disable_hdmi(struct 
intel_atomic_state *state,
intel_dp_dual_mode_set_tmds_output(intel_hdmi, false);
 }
 
+static void intel_ddi_post_disable_hdmi_or_sst(struct intel_atomic_state 
*state,
+  struct intel_encoder *encoder,
+  const struct intel_crtc_state 
*old_crtc_state,
+  const struct drm_connector_state 
*old_conn_state)
+{
+   struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+
+   intel_crtc_vblank_off(old_crtc_state);
+
+   intel_disable_transcoder(old_crtc_state);
+
+   intel_ddi_disable_transcoder_func(old_crtc_state);
+
+   intel_dsc_disable(old_crtc_state);
+
+   if (DISPLAY_VER(dev_priv) >= 9)
+   skl_scaler_disable(old_crtc_state);
+   else
+   ilk_pfit_disable(old_crtc_state);
+}
+
 static void intel_ddi_post_disable(struct intel_atomic_state *state,
   struct intel_encoder *encoder,
   const struct intel_crtc_state 
*old_crtc_state,
   const struct drm_connector_state 
*old_conn_state)
 {
-   struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-   struct intel_crtc *slave_crtc;
-
-   if (!intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DP_MST)) {
-   intel_crtc_vblank_off(old_crtc_state);
-
-   intel_disable_transcoder(old_crtc_state);
-
-   intel_ddi_disable_transcoder_func(old_crtc_state);
-
-   intel_dsc_disable(old_crtc_state);
-
-   if (DISPLAY_VER(dev_priv) >= 9)
-   skl_scaler_disable(old_crtc_state);
-   else
-   ilk_pfit_disable(old_crtc_state);
-   }
-
-   for_each_intel_crtc_in_pipe_mask(_priv->drm, slave_crtc,
-
intel_crtc_bigjoiner_slave_pipes(old_crtc_state)) {
-   const struct intel_crtc_state *old_slave_crtc_state =
-   intel_atomic_get_old_crtc_state(state, slave_crtc);
-
-   intel_crtc_vblank_off(old_slave_crtc_state);
-
-   intel_dsc_disable(old_slave_crtc_state);
-   skl_scaler_disable(old_slave_crtc_state);
-   }
+   if (!intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DP_MST))
+   intel_ddi_post_disable_hdmi_or_sst(state, encoder,
+  old_crtc_state, 
old_conn_state);
 
/*
 * When called from DP MST code:
-- 
2.43.2



[PATCH 15/22] drm/i915: Introduce intel_crtc_joined_pipe_mask()

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

Add a small helper to compute the set of pipes that the current
crtc is using.

And we have at least one trivial place in
intel_ddi_update_active_dpll() where we can use it
immediately, so let's do that.

v2: Use the name 'pipe_crtc' for the per-pipe crtc pointer

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 11 +--
 drivers/gpu/drm/i915/display/intel_display.c |  7 +++
 drivers/gpu/drm/i915/display/intel_display.h |  1 +
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c 
b/drivers/gpu/drm/i915/display/intel_ddi.c
index fa6fe9ec8027..24a9be2a217f 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -3463,18 +3463,17 @@ void intel_ddi_update_active_dpll(struct 
intel_atomic_state *state,
  struct intel_crtc *crtc)
 {
struct drm_i915_private *i915 = to_i915(encoder->base.dev);
-   struct intel_crtc_state *crtc_state =
+   const struct intel_crtc_state *crtc_state =
intel_atomic_get_new_crtc_state(state, crtc);
-   struct intel_crtc *slave_crtc;
+   struct intel_crtc *pipe_crtc;
 
/* FIXME: Add MTL pll_mgr */
if (DISPLAY_VER(i915) >= 14 || !intel_encoder_is_tc(encoder))
return;
 
-   intel_update_active_dpll(state, crtc, encoder);
-   for_each_intel_crtc_in_pipe_mask(>drm, slave_crtc,
-
intel_crtc_bigjoiner_slave_pipes(crtc_state))
-   intel_update_active_dpll(state, slave_crtc, encoder);
+   for_each_intel_crtc_in_pipe_mask(>drm, pipe_crtc,
+
intel_crtc_joined_pipe_mask(crtc_state))
+   intel_update_active_dpll(state, pipe_crtc, encoder);
 }
 
 static void
diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index 6197b62dac55..58ee40786d5c 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -275,6 +275,13 @@ static int intel_bigjoiner_num_pipes(const struct 
intel_crtc_state *crtc_state)
return hweight8(crtc_state->bigjoiner_pipes);
 }
 
+u8 intel_crtc_joined_pipe_mask(const struct intel_crtc_state *crtc_state)
+{
+   struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+
+   return BIT(crtc->pipe) | crtc_state->bigjoiner_pipes;
+}
+
 struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state)
 {
struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
diff --git a/drivers/gpu/drm/i915/display/intel_display.h 
b/drivers/gpu/drm/i915/display/intel_display.h
index 986ec77490de..31ee34c59844 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -408,6 +408,7 @@ intel_cpu_transcoder_mode_valid(struct drm_i915_private 
*i915,
 enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
 bool is_trans_port_sync_mode(const struct intel_crtc_state *state);
 bool is_trans_port_sync_master(const struct intel_crtc_state *state);
+u8 intel_crtc_joined_pipe_mask(const struct intel_crtc_state *crtc_state);
 bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state);
 bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state);
 u8 intel_crtc_bigjoiner_slave_pipes(const struct intel_crtc_state *crtc_state);
-- 
2.43.2



[PATCH 14/22] drm/i915/mst: Reject FEC+MST on ICL

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

ICL supposedly doesn't support FEC on MST. Reject it.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index cbabd1924474..8b8059b6bb21 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1415,7 +1415,8 @@ static bool intel_dp_source_supports_fec(struct intel_dp 
*intel_dp,
if (DISPLAY_VER(dev_priv) >= 12)
return true;
 
-   if (DISPLAY_VER(dev_priv) == 11 && encoder->port != PORT_A)
+   if (DISPLAY_VER(dev_priv) == 11 && encoder->port != PORT_A &&
+   !intel_crtc_has_type(pipe_config, INTEL_OUTPUT_DP_MST))
return true;
 
return false;
-- 
2.43.2



[PATCH 13/22] drm/i915/mst: Limit MST+DSC to TGL+

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

The MST code currently assumes that glk+ alerady supports MST+DSC,
which is incorrect. We need to check for TGL+ actually. ICL does
support SST+DSC, but supposedly it can't do MST+FEC which will
also rule MST+DSC.

Note that a straight TGL+ check doesn't work here because DSC
support can get fused out, so we do need to also check 'has_dsc'.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_display_device.h | 1 +
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h 
b/drivers/gpu/drm/i915/display/intel_display_device.h
index fe4268813786..9b1bce2624b9 100644
--- a/drivers/gpu/drm/i915/display/intel_display_device.h
+++ b/drivers/gpu/drm/i915/display/intel_display_device.h
@@ -47,6 +47,7 @@ struct drm_printer;
 #define HAS_DPT(i915)  (DISPLAY_VER(i915) >= 13)
 #define HAS_DSB(i915)  (DISPLAY_INFO(i915)->has_dsb)
 #define HAS_DSC(__i915)
(DISPLAY_RUNTIME_INFO(__i915)->has_dsc)
+#define HAS_DSC_MST(__i915)(DISPLAY_VER(__i915) >= 12 && 
HAS_DSC(__i915))
 #define HAS_FBC(i915)  (DISPLAY_RUNTIME_INFO(i915)->fbc_mask 
!= 0)
 #define HAS_FPGA_DBG_UNCLAIMED(i915)   (DISPLAY_INFO(i915)->has_fpga_dbg)
 #define HAS_FW_BLC(i915)   (DISPLAY_VER(i915) >= 3)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index a3b0026adb2d..de364ed77c08 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -1352,7 +1352,7 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector 
*connector,
return 0;
}
 
-   if (DISPLAY_VER(dev_priv) >= 10 &&
+   if (HAS_DSC_MST(dev_priv) &&
drm_dp_sink_supports_dsc(intel_connector->dp.dsc_dpcd)) {
/*
 * TBD pass the connector BPC,
-- 
2.43.2



[PATCH 12/22] drm/i915: Pass connector to intel_dp_need_bigjoiner()

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

Pass the connector explicitly to intel_dp_need_bigjoiner()
so that it'll actually check the correct place for the
bigjoiner force flag.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp.c | 10 ++
 drivers/gpu/drm/i915/display/intel_dp.h |  1 +
 drivers/gpu/drm/i915/display/intel_dp_mst.c |  5 +++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index 6fa8fc56a39c..cbabd1924474 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1194,10 +1194,10 @@ intel_dp_mode_valid_downstream(struct intel_connector 
*connector,
 }
 
 bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp,
+struct intel_connector *connector,
 int hdisplay, int clock)
 {
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
-   struct intel_connector *connector = intel_dp->attached_connector;
 
if (!intel_dp_has_bigjoiner(intel_dp))
return false;
@@ -1241,7 +1241,8 @@ intel_dp_mode_valid(struct drm_connector *_connector,
target_clock = fixed_mode->clock;
}
 
-   if (intel_dp_need_bigjoiner(intel_dp, mode->hdisplay, target_clock)) {
+   if (intel_dp_need_bigjoiner(intel_dp, connector,
+   mode->hdisplay, target_clock)) {
bigjoiner = true;
max_dotclk *= 2;
}
@@ -2409,7 +2410,7 @@ intel_dp_compute_link_config(struct intel_encoder 
*encoder,
 {
struct drm_i915_private *i915 = to_i915(encoder->base.dev);
struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
-   const struct intel_connector *connector =
+   struct intel_connector *connector =
to_intel_connector(conn_state->connector);
const struct drm_display_mode *adjusted_mode =
_config->hw.adjusted_mode;
@@ -2422,7 +2423,8 @@ intel_dp_compute_link_config(struct intel_encoder 
*encoder,
!intel_dp_supports_fec(intel_dp, connector, pipe_config))
return -EINVAL;
 
-   if (intel_dp_need_bigjoiner(intel_dp, adjusted_mode->crtc_hdisplay,
+   if (intel_dp_need_bigjoiner(intel_dp, connector,
+   adjusted_mode->crtc_hdisplay,
adjusted_mode->crtc_clock))
pipe_config->bigjoiner_pipes = GENMASK(crtc->pipe + 1, 
crtc->pipe);
 
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h 
b/drivers/gpu/drm/i915/display/intel_dp.h
index d5697b99ac21..cd6969d05fe3 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -150,6 +150,7 @@ u8 intel_dp_dsc_get_slice_count(const struct 
intel_connector *connector,
int mode_clock, int mode_hdisplay,
bool bigjoiner);
 bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp,
+struct intel_connector *connector,
 int hdisplay, int clock);
 
 static inline unsigned int intel_dp_unused_lane_mask(int lane_count)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 1cf6241a7d53..a3b0026adb2d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -527,7 +527,7 @@ static int intel_dp_mst_compute_config(struct intel_encoder 
*encoder,
struct intel_atomic_state *state = 
to_intel_atomic_state(conn_state->state);
struct intel_dp_mst_encoder *intel_mst = enc_to_mst(encoder);
struct intel_dp *intel_dp = _mst->primary->dp;
-   const struct intel_connector *connector =
+   struct intel_connector *connector =
to_intel_connector(conn_state->connector);
const struct drm_display_mode *adjusted_mode =
_config->hw.adjusted_mode;
@@ -1342,7 +1342,8 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector 
*connector,
*status = MODE_CLOCK_HIGH;
return 0;
}
-   if (intel_dp_need_bigjoiner(intel_dp, mode->hdisplay, target_clock)) {
+   if (intel_dp_need_bigjoiner(intel_dp, intel_connector,
+   mode->hdisplay, target_clock)) {
bigjoiner = true;
max_dotclk *= 2;
 
-- 
2.43.2



[PATCH 10/22] drm/i915: Extract intel_dp_joiner_needs_dsc()

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

Pull the "does joiner need DSC?" check into a helper. MST will
want to use this too at some point.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp.c | 26 ++---
 drivers/gpu/drm/i915/display/intel_dp.h |  1 +
 drivers/gpu/drm/i915/display/intel_dp_mst.c |  6 +
 3 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index 402b3b8f6382..6fa8fc56a39c 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1302,11 +1302,7 @@ intel_dp_mode_valid(struct drm_connector *_connector,
dsc = dsc_max_compressed_bpp && dsc_slice_count;
}
 
-   /*
-* Big joiner configuration needs DSC for TGL which is not true for
-* XE_LPD where uncompressed joiner is supported.
-*/
-   if (DISPLAY_VER(dev_priv) < 13 && bigjoiner && !dsc)
+   if (intel_dp_joiner_needs_dsc(dev_priv, bigjoiner) && !dsc)
return MODE_CLOCK_HIGH;
 
if (mode_rate > max_rate && !dsc)
@@ -2395,6 +2391,16 @@ int intel_dp_config_required_rate(const struct 
intel_crtc_state *crtc_state)
return intel_dp_link_required(adjusted_mode->crtc_clock, bpp);
 }
 
+bool intel_dp_joiner_needs_dsc(struct drm_i915_private *i915, bool use_joiner)
+{
+   /*
+* Pipe joiner needs compression up to display 12 due to bandwidth
+* limitation. DG2 onwards pipe joiner can be enabled without
+* compression.
+*/
+   return DISPLAY_VER(i915) < 13 && use_joiner;
+}
+
 static int
 intel_dp_compute_link_config(struct intel_encoder *encoder,
 struct intel_crtc_state *pipe_config,
@@ -2409,8 +2415,7 @@ intel_dp_compute_link_config(struct intel_encoder 
*encoder,
_config->hw.adjusted_mode;
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
struct link_config_limits limits;
-   bool joiner_needs_dsc = false;
-   bool dsc_needed;
+   bool dsc_needed, joiner_needs_dsc;
int ret = 0;
 
if (pipe_config->fec_enable &&
@@ -2421,12 +2426,7 @@ intel_dp_compute_link_config(struct intel_encoder 
*encoder,
adjusted_mode->crtc_clock))
pipe_config->bigjoiner_pipes = GENMASK(crtc->pipe + 1, 
crtc->pipe);
 
-   /*
-* Pipe joiner needs compression up to display 12 due to bandwidth
-* limitation. DG2 onwards pipe joiner can be enabled without
-* compression.
-*/
-   joiner_needs_dsc = DISPLAY_VER(i915) < 13 && 
pipe_config->bigjoiner_pipes;
+   joiner_needs_dsc = intel_dp_joiner_needs_dsc(i915, 
pipe_config->bigjoiner_pipes);
 
dsc_needed = joiner_needs_dsc || intel_dp->force_dsc_en ||
 !intel_dp_compute_config_limits(intel_dp, pipe_config,
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h 
b/drivers/gpu/drm/i915/display/intel_dp.h
index 4a4b39f2748b..d5697b99ac21 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -119,6 +119,7 @@ int intel_dp_effective_data_rate(int pixel_clock, int 
bpp_x16,
 int bw_overhead);
 int intel_dp_max_link_data_rate(struct intel_dp *intel_dp,
int max_dprx_rate, int max_dprx_lanes);
+bool intel_dp_joiner_needs_dsc(struct drm_i915_private *i915, bool use_joiner);
 bool intel_dp_has_bigjoiner(struct intel_dp *intel_dp);
 bool intel_dp_needs_vsc_sdp(const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state);
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 1405ab5e3acc..6da031f9724d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -1377,11 +1377,7 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector 
*connector,
dsc = dsc_max_compressed_bpp && dsc_slice_count;
}
 
-   /*
-* Big joiner configuration needs DSC for TGL which is not true for
-* XE_LPD where uncompressed joiner is supported.
-*/
-   if (DISPLAY_VER(dev_priv) < 13 && bigjoiner && !dsc) {
+   if (intel_dp_joiner_needs_dsc(dev_priv, bigjoiner) && !dsc) {
*status = MODE_CLOCK_HIGH;
return 0;
}
-- 
2.43.2



[PATCH 11/22] drm/i915/mst: Check intel_dp_joiner_needs_dsc()

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

intel_dp_mst_compute_config() is missing the "does the
joiner need DSC?" check despite claiming to have a lot
of other joiner/dsc stuff in there (albeit disabled).
Replicate the logic from the SST side.

TODO: refactor all this duplicated code!

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 6da031f9724d..1cf6241a7d53 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -532,7 +532,7 @@ static int intel_dp_mst_compute_config(struct intel_encoder 
*encoder,
const struct drm_display_mode *adjusted_mode =
_config->hw.adjusted_mode;
struct link_config_limits limits;
-   bool dsc_needed;
+   bool dsc_needed, joiner_needs_dsc;
int ret = 0;
 
if (pipe_config->fec_enable &&
@@ -546,7 +546,9 @@ static int intel_dp_mst_compute_config(struct intel_encoder 
*encoder,
pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;
pipe_config->has_pch_encoder = false;
 
-   dsc_needed = intel_dp->force_dsc_en ||
+   joiner_needs_dsc = intel_dp_joiner_needs_dsc(dev_priv, 
pipe_config->bigjoiner_pipes);
+
+   dsc_needed = joiner_needs_dsc || intel_dp->force_dsc_en ||
 !intel_dp_mst_compute_config_limits(intel_dp,
 connector,
 pipe_config,
@@ -566,8 +568,8 @@ static int intel_dp_mst_compute_config(struct intel_encoder 
*encoder,
 
/* enable compression if the mode doesn't fit available BW */
if (dsc_needed) {
-   drm_dbg_kms(_priv->drm, "Try DSC (fallback=%s, force=%s)\n",
-   str_yes_no(ret),
+   drm_dbg_kms(_priv->drm, "Try DSC (fallback=%s, joiner=%s, 
force=%s)\n",
+   str_yes_no(ret), str_yes_no(joiner_needs_dsc),
str_yes_no(intel_dp->force_dsc_en));
 
if (!intel_dp_mst_dsc_source_support(pipe_config))
-- 
2.43.2



[PATCH 09/22] drm/i915: s/intel_dp_can_bigjoiner()/intel_dp_can_bigjoiner()/

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

Rename intel_dp_can_bigjoiner() to intel_dp_has_bigjoiner()
to better reflect its function.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp.c | 4 ++--
 drivers/gpu/drm/i915/display/intel_dp.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index 2490ce32da50..402b3b8f6382 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -425,7 +425,7 @@ int intel_dp_max_link_data_rate(struct intel_dp *intel_dp,
return max_rate;
 }
 
-bool intel_dp_can_bigjoiner(struct intel_dp *intel_dp)
+bool intel_dp_has_bigjoiner(struct intel_dp *intel_dp)
 {
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
struct intel_encoder *encoder = _dig_port->base;
@@ -1199,7 +1199,7 @@ bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp,
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
struct intel_connector *connector = intel_dp->attached_connector;
 
-   if (!intel_dp_can_bigjoiner(intel_dp))
+   if (!intel_dp_has_bigjoiner(intel_dp))
return false;
 
return clock > i915->max_dotclk_freq || hdisplay > 5120 ||
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h 
b/drivers/gpu/drm/i915/display/intel_dp.h
index c540d3a73fe7..4a4b39f2748b 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -119,7 +119,7 @@ int intel_dp_effective_data_rate(int pixel_clock, int 
bpp_x16,
 int bw_overhead);
 int intel_dp_max_link_data_rate(struct intel_dp *intel_dp,
int max_dprx_rate, int max_dprx_lanes);
-bool intel_dp_can_bigjoiner(struct intel_dp *intel_dp);
+bool intel_dp_has_bigjoiner(struct intel_dp *intel_dp);
 bool intel_dp_needs_vsc_sdp(const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state);
 void intel_dp_set_infoframes(struct intel_encoder *encoder, bool enable,
-- 
2.43.2



[PATCH 08/22] drm/i915: Extract glk_need_scaler_clock_gating_wa()

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

Simplify our life by extracting the "do we need the glk scaler
clock gating w/a?" check into a small helper.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_display.c | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index 83474fcf4131..6197b62dac55 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1551,6 +1551,14 @@ static void ilk_crtc_enable(struct intel_atomic_state 
*state,
intel_set_pch_fifo_underrun_reporting(dev_priv, pipe, true);
 }
 
+/* Display WA #1180: WaDisableScalarClockGating: glk */
+static bool glk_need_scaler_clock_gating_wa(const struct intel_crtc_state 
*crtc_state)
+{
+   struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
+
+   return DISPLAY_VER(i915) == 10 && crtc_state->pch_pfit.enabled;
+}
+
 static void glk_pipe_scaler_clock_gating_wa(struct intel_crtc *crtc, bool 
enable)
 {
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
@@ -1635,7 +1643,6 @@ static void hsw_crtc_enable(struct intel_atomic_state 
*state,
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
enum transcoder cpu_transcoder = new_crtc_state->cpu_transcoder;
enum pipe hsw_workaround_pipe;
-   bool psl_clkgate_wa;
 
if (drm_WARN_ON(_priv->drm, crtc->active))
return;
@@ -1668,10 +1675,7 @@ static void hsw_crtc_enable(struct intel_atomic_state 
*state,
 
crtc->active = true;
 
-   /* Display WA #1180: WaDisableScalarClockGating: glk */
-   psl_clkgate_wa = DISPLAY_VER(dev_priv) == 10 &&
-   new_crtc_state->pch_pfit.enabled;
-   if (psl_clkgate_wa)
+   if (glk_need_scaler_clock_gating_wa(new_crtc_state))
glk_pipe_scaler_clock_gating_wa(crtc, true);
 
if (DISPLAY_VER(dev_priv) >= 9)
@@ -1702,7 +1706,7 @@ static void hsw_crtc_enable(struct intel_atomic_state 
*state,
 
intel_encoders_enable(state, crtc);
 
-   if (psl_clkgate_wa) {
+   if (glk_need_scaler_clock_gating_wa(new_crtc_state)) {
intel_crtc_wait_for_next_vblank(crtc);
glk_pipe_scaler_clock_gating_wa(crtc, false);
}
-- 
2.43.2



[PATCH 07/22] drm/i915: Clean up glk_pipe_scaler_clock_gating_wa()

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

glk_pipe_scaler_clock_gating_wa() is messy. Clean it up via
intel_de_rmw(), and also just pass in the whole crtc so the
caller doesn't dance around so much.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_display.c | 19 +++
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index 08705042b4f8..83474fcf4131 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1551,18 +1551,13 @@ static void ilk_crtc_enable(struct intel_atomic_state 
*state,
intel_set_pch_fifo_underrun_reporting(dev_priv, pipe, true);
 }
 
-static void glk_pipe_scaler_clock_gating_wa(struct drm_i915_private *dev_priv,
-   enum pipe pipe, bool apply)
+static void glk_pipe_scaler_clock_gating_wa(struct intel_crtc *crtc, bool 
enable)
 {
-   u32 val = intel_de_read(dev_priv, CLKGATE_DIS_PSL(pipe));
+   struct drm_i915_private *i915 = to_i915(crtc->base.dev);
u32 mask = DPF_GATING_DIS | DPF_RAM_GATING_DIS | DPFR_GATING_DIS;
 
-   if (apply)
-   val |= mask;
-   else
-   val &= ~mask;
-
-   intel_de_write(dev_priv, CLKGATE_DIS_PSL(pipe), val);
+   intel_de_rmw(i915, CLKGATE_DIS_PSL(crtc->pipe),
+mask, enable ? mask : 0);
 }
 
 static void hsw_set_linetime_wm(const struct intel_crtc_state *crtc_state)
@@ -1638,8 +1633,8 @@ static void hsw_crtc_enable(struct intel_atomic_state 
*state,
const struct intel_crtc_state *new_crtc_state =
intel_atomic_get_new_crtc_state(state, crtc);
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
-   enum pipe pipe = crtc->pipe, hsw_workaround_pipe;
enum transcoder cpu_transcoder = new_crtc_state->cpu_transcoder;
+   enum pipe hsw_workaround_pipe;
bool psl_clkgate_wa;
 
if (drm_WARN_ON(_priv->drm, crtc->active))
@@ -1677,7 +1672,7 @@ static void hsw_crtc_enable(struct intel_atomic_state 
*state,
psl_clkgate_wa = DISPLAY_VER(dev_priv) == 10 &&
new_crtc_state->pch_pfit.enabled;
if (psl_clkgate_wa)
-   glk_pipe_scaler_clock_gating_wa(dev_priv, pipe, true);
+   glk_pipe_scaler_clock_gating_wa(crtc, true);
 
if (DISPLAY_VER(dev_priv) >= 9)
skl_pfit_enable(new_crtc_state);
@@ -1709,7 +1704,7 @@ static void hsw_crtc_enable(struct intel_atomic_state 
*state,
 
if (psl_clkgate_wa) {
intel_crtc_wait_for_next_vblank(crtc);
-   glk_pipe_scaler_clock_gating_wa(dev_priv, pipe, false);
+   glk_pipe_scaler_clock_gating_wa(crtc, false);
}
 
/* If we change the relative order between pipe/planes enabling, we need
-- 
2.43.2



[PATCH 06/22] drm/i915: Shuffle DP .mode_valid() checks

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

Move some of the more trivial checks in the DP .mode_valid()
hooks upwards to lessen the noise amongst the more complex
checks.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp.c |  6 +++---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 21 ++---
 2 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index bc9d6efc99ee..2490ce32da50 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1229,6 +1229,9 @@ intel_dp_mode_valid(struct drm_connector *_connector,
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
return MODE_H_ILLEGAL;
 
+   if (mode->clock < 1)
+   return MODE_CLOCK_LOW;
+
fixed_mode = intel_panel_fixed_mode(connector, mode);
if (intel_dp_is_edp(intel_dp) && fixed_mode) {
status = intel_panel_mode_valid(connector, mode);
@@ -1238,9 +1241,6 @@ intel_dp_mode_valid(struct drm_connector *_connector,
target_clock = fixed_mode->clock;
}
 
-   if (mode->clock < 1)
-   return MODE_CLOCK_LOW;
-
if (intel_dp_need_bigjoiner(intel_dp, mode->hdisplay, target_clock)) {
bigjoiner = true;
max_dotclk *= 2;
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 9a7c75039989..1405ab5e3acc 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -1302,6 +1302,16 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector 
*connector,
if (*status != MODE_OK)
return 0;
 
+   if (mode->flags & DRM_MODE_FLAG_DBLCLK) {
+   *status = MODE_H_ILLEGAL;
+   return 0;
+   }
+
+   if (mode->clock < 1) {
+   *status = MODE_CLOCK_LOW;
+   return 0;
+   }
+
max_link_clock = intel_dp_max_link_rate(intel_dp);
max_lanes = intel_dp_max_lane_count(intel_dp);
 
@@ -1330,17 +1340,6 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector 
*connector,
*status = MODE_CLOCK_HIGH;
return 0;
}
-
-   if (mode->clock < 1) {
-   *status = MODE_CLOCK_LOW;
-   return 0;
-   }
-
-   if (mode->flags & DRM_MODE_FLAG_DBLCLK) {
-   *status = MODE_H_ILLEGAL;
-   return 0;
-   }
-
if (intel_dp_need_bigjoiner(intel_dp, mode->hdisplay, target_clock)) {
bigjoiner = true;
max_dotclk *= 2;
-- 
2.43.2



[PATCH 05/22] drm/i915: Remove DRM_MODE_FLAG_DBLSCAN checks from .mode_valid() hooks

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

We never set connector->doublescan_allowed, so the probe helper
already filters out all doublescan modes for us.

Sadly we still need to keep the explicit doublescan checks
in .compute_config as outlined in commit e4dd27aadd20
("drm/i915: Allow DBLSCAN user modes with eDP/LVDS/DSI")

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_crt.c| 3 ---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 -
 drivers/gpu/drm/i915/display/intel_dsi.c| 3 ---
 drivers/gpu/drm/i915/display/intel_dvo.c| 3 ---
 drivers/gpu/drm/i915/display/intel_lvds.c   | 3 ---
 drivers/gpu/drm/i915/display/intel_sdvo.c   | 3 ---
 drivers/gpu/drm/i915/display/intel_tv.c | 3 ---
 7 files changed, 23 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_crt.c 
b/drivers/gpu/drm/i915/display/intel_crt.c
index 93479db0f89f..2e95093aa4d4 100644
--- a/drivers/gpu/drm/i915/display/intel_crt.c
+++ b/drivers/gpu/drm/i915/display/intel_crt.c
@@ -356,9 +356,6 @@ intel_crt_mode_valid(struct drm_connector *connector,
if (status != MODE_OK)
return status;
 
-   if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
-   return MODE_NO_DBLESCAN;
-
if (mode->clock < 25000)
return MODE_CLOCK_LOW;
 
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 53aec023ce92..9a7c75039989 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -1302,11 +1302,6 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector 
*connector,
if (*status != MODE_OK)
return 0;
 
-   if (mode->flags & DRM_MODE_FLAG_DBLSCAN) {
-   *status = MODE_NO_DBLESCAN;
-   return 0;
-   }
-
max_link_clock = intel_dp_max_link_rate(intel_dp);
max_lanes = intel_dp_max_lane_count(intel_dp);
 
diff --git a/drivers/gpu/drm/i915/display/intel_dsi.c 
b/drivers/gpu/drm/i915/display/intel_dsi.c
index d3cf6a652221..2dfc60e4b615 100644
--- a/drivers/gpu/drm/i915/display/intel_dsi.c
+++ b/drivers/gpu/drm/i915/display/intel_dsi.c
@@ -69,9 +69,6 @@ enum drm_mode_status intel_dsi_mode_valid(struct 
drm_connector *connector,
 
drm_dbg_kms(_priv->drm, "\n");
 
-   if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
-   return MODE_NO_DBLESCAN;
-
status = intel_panel_mode_valid(intel_connector, mode);
if (status != MODE_OK)
return status;
diff --git a/drivers/gpu/drm/i915/display/intel_dvo.c 
b/drivers/gpu/drm/i915/display/intel_dvo.c
index c076da75b066..060328c0df7e 100644
--- a/drivers/gpu/drm/i915/display/intel_dvo.c
+++ b/drivers/gpu/drm/i915/display/intel_dvo.c
@@ -231,9 +231,6 @@ intel_dvo_mode_valid(struct drm_connector *_connector,
if (status != MODE_OK)
return status;
 
-   if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
-   return MODE_NO_DBLESCAN;
-
/* XXX: Validate clock range */
 
if (fixed_mode) {
diff --git a/drivers/gpu/drm/i915/display/intel_lvds.c 
b/drivers/gpu/drm/i915/display/intel_lvds.c
index 221f5c6c871b..24860945f2e4 100644
--- a/drivers/gpu/drm/i915/display/intel_lvds.c
+++ b/drivers/gpu/drm/i915/display/intel_lvds.c
@@ -399,9 +399,6 @@ intel_lvds_mode_valid(struct drm_connector *_connector,
if (status != MODE_OK)
return status;
 
-   if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
-   return MODE_NO_DBLESCAN;
-
status = intel_panel_mode_valid(connector, mode);
if (status != MODE_OK)
return status;
diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c 
b/drivers/gpu/drm/i915/display/intel_sdvo.c
index 50f0557d9ca2..df76044a739a 100644
--- a/drivers/gpu/drm/i915/display/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
@@ -1952,9 +1952,6 @@ intel_sdvo_mode_valid(struct drm_connector *connector,
if (status != MODE_OK)
return status;
 
-   if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
-   return MODE_NO_DBLESCAN;
-
if (clock > max_dotclk)
return MODE_CLOCK_HIGH;
 
diff --git a/drivers/gpu/drm/i915/display/intel_tv.c 
b/drivers/gpu/drm/i915/display/intel_tv.c
index ba5d2b7174b7..79d35c1b3c81 100644
--- a/drivers/gpu/drm/i915/display/intel_tv.c
+++ b/drivers/gpu/drm/i915/display/intel_tv.c
@@ -969,9 +969,6 @@ intel_tv_mode_valid(struct drm_connector *connector,
if (status != MODE_OK)
return status;
 
-   if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
-   return MODE_NO_DBLESCAN;
-
if (mode->clock > max_dotclk)
return MODE_CLOCK_HIGH;
 
-- 
2.43.2



[PATCH 04/22] drm/i915/vrr: Disable VRR when using bigjoiner

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

All joined pipes share the same transcoder/timing generator.
Currently we just do the commits per-pipe, which doesn't really
work if we need to change switch between non-VRR and VRR timings
generators on the fly, or even when sending the push to the
transcoder. For now just disable VRR when bigjoiner is needed.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_vrr.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c 
b/drivers/gpu/drm/i915/display/intel_vrr.c
index eb5bd0743902..f542ee1db1d9 100644
--- a/drivers/gpu/drm/i915/display/intel_vrr.c
+++ b/drivers/gpu/drm/i915/display/intel_vrr.c
@@ -117,6 +117,13 @@ intel_vrr_compute_config(struct intel_crtc_state 
*crtc_state,
const struct drm_display_info *info = >base.display_info;
int vmin, vmax;
 
+   /*
+* FIXME all joined pipes share the same transcoder.
+* Need to account for that during VRR toggle/push/etc.
+*/
+   if (crtc_state->bigjoiner_pipes)
+   return;
+
if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
return;
 
-- 
2.43.2



[PATCH 03/22] drm/i915: Disable live M/N updates when using bigjoiner

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

All joined pipes share the same transcoder/timing generator.
Currently we just do the commits per-pipe, which doesn't really
work if we need to change the timings at the same time. For
now just disable live M/N updates when bigjoiner is needed.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index f755fd974da2..bc9d6efc99ee 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2719,7 +2719,11 @@ intel_dp_drrs_compute_config(struct intel_connector 
*connector,
intel_panel_downclock_mode(connector, 
_config->hw.adjusted_mode);
int pixel_clock;
 
-   if (has_seamless_m_n(connector))
+   /*
+* FIXME all joined pipes share the same transcoder.
+* Need to account for that when updating M/N live.
+*/
+   if (has_seamless_m_n(connector) && !pipe_config->bigjoiner_pipes)
pipe_config->update_m_n = true;
 
if (!can_enable_drrs(connector, pipe_config, downclock_mode)) {
-- 
2.43.2



[PATCH 02/22] drm/i915: Fix intel_modeset_pipe_config_late() for bigjoiner

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

Currently intel_modeset_pipe_config_late() is called after the
bigjoiner state copy, and it will actually not do anything for
bigjoiner slaves. This can lead to a mismatched state between
the master and slave.

The two things that we do in the encoder .compute_config_late()
hook are mst master transcoder and port sync master transcoder
elections. So if either of either MST or port sync is combined
with bigjoiner then we can see the mismatch.

Currently this problem is more or less theoretical; MST+bigjoiner
has not been implemented yet, and port sync+bigjoiner would
require a tiled display with >5k tiles (or a very high
dotclock per tile). Although we do have kms_tiled_display in
igt which can fake a tiled display, and we can now force bigjoiner
via debugfs, so it is possible to trigger this if you try hard
enough.

Reorder the code such that intel_modeset_pipe_config_late()
will be called before the bigjoiner state copy happens so
that both pipes will end up with the same state.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_display.c | 46 ++--
 1 file changed, 32 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index 614e60420a29..08705042b4f8 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4753,8 +4753,6 @@ intel_modeset_pipe_config_late(struct intel_atomic_state 
*state,
struct drm_connector *connector;
int i;
 
-   intel_bigjoiner_adjust_pipe_src(crtc_state);
-
for_each_new_connector_in_state(>base, connector,
conn_state, i) {
struct intel_encoder *encoder =
@@ -6248,27 +6246,37 @@ static int intel_atomic_check_config(struct 
intel_atomic_state *state,
continue;
}
 
-   if (intel_crtc_is_bigjoiner_slave(new_crtc_state)) {
-   drm_WARN_ON(>drm, new_crtc_state->uapi.enable);
+   if (drm_WARN_ON(>drm, 
intel_crtc_is_bigjoiner_slave(new_crtc_state)))
continue;
-   }
 
ret = intel_crtc_prepare_cleared_state(state, crtc);
if (ret)
-   break;
+   goto fail;
 
if (!new_crtc_state->hw.enable)
continue;
 
ret = intel_modeset_pipe_config(state, crtc, limits);
if (ret)
-   break;
+   goto fail;
+   }
 
-   ret = intel_atomic_check_bigjoiner(state, crtc);
+   for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) {
+   if (!intel_crtc_needs_modeset(new_crtc_state))
+   continue;
+
+   if (drm_WARN_ON(>drm, 
intel_crtc_is_bigjoiner_slave(new_crtc_state)))
+   continue;
+
+   if (!new_crtc_state->hw.enable)
+   continue;
+
+   ret = intel_modeset_pipe_config_late(state, crtc);
if (ret)
-   break;
+   goto fail;
}
 
+fail:
if (ret)
*failed_pipe = crtc->pipe;
 
@@ -6364,16 +6372,26 @@ int intel_atomic_check(struct drm_device *dev,
if (ret)
goto fail;
 
+   for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) {
+   if (!intel_crtc_needs_modeset(new_crtc_state))
+   continue;
+
+   if (intel_crtc_is_bigjoiner_slave(new_crtc_state)) {
+   drm_WARN_ON(_priv->drm, 
new_crtc_state->uapi.enable);
+   continue;
+   }
+
+   ret = intel_atomic_check_bigjoiner(state, crtc);
+   if (ret)
+   goto fail;
+   }
+
for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state,
new_crtc_state, i) {
if (!intel_crtc_needs_modeset(new_crtc_state))
continue;
 
-   if (new_crtc_state->hw.enable) {
-   ret = intel_modeset_pipe_config_late(state, crtc);
-   if (ret)
-   goto fail;
-   }
+   intel_bigjoiner_adjust_pipe_src(new_crtc_state);
 
intel_crtc_check_fastset(old_crtc_state, new_crtc_state);
}
-- 
2.43.2



[PATCH 00/22] drm/i915: Bigjoiner modeset sequence redesign and MST support

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

I started to look at the MST+bignoier stuff floating around
and then decided that there's just too much noise in the way,
and so did a quick pass over the whole thing to clean and
fix things up ahead of time.

I then applied the stuff from Stan and Vidya on top of what
I had and fixed it up enough to do a quick smoke test on my
ADL. It survived a 2x2 MST configuration with uncompressed
joiner enabled on both outputs. I don't have any DSC capable
hardware around so couldn't test bigjoiner.

Anyways, here's the whole pile for people to ruminate
over during Easter.

Also pushed it here:
https://github.com/vsyrjala/linux.git bigjoiner_mst_etc

Stanislav Lisovskiy (1):
  drm/i915: Handle joined pipes inside hsw_crtc_enable()

Vidya Srinivas (1):
  drm/i915: Allow bigjoiner for MST

Ville Syrjälä (20):
  drm/i915: Disable port sync when bigjoiner is used
  drm/i915: Fix intel_modeset_pipe_config_late() for bigjoiner
  drm/i915: Disable live M/N updates when using bigjoiner
  drm/i915/vrr: Disable VRR when using bigjoiner
  drm/i915: Remove DRM_MODE_FLAG_DBLSCAN checks from .mode_valid() hooks
  drm/i915: Shuffle DP .mode_valid() checks
  drm/i915: Clean up glk_pipe_scaler_clock_gating_wa()
  drm/i915: Extract glk_need_scaler_clock_gating_wa()
  drm/i915: s/intel_dp_can_bigjoiner()/intel_dp_can_bigjoiner()/
  drm/i915: Extract intel_dp_joiner_needs_dsc()
  drm/i915/mst: Check intel_dp_joiner_needs_dsc()
  drm/i915: Pass connector to intel_dp_need_bigjoiner()
  drm/i915/mst: Limit MST+DSC to TGL+
  drm/i915/mst: Reject FEC+MST on ICL
  drm/i915: Introduce intel_crtc_joined_pipe_mask()
  drm/i915: Extract intel_ddi_post_disable_hdmi_or_sst()
  drm/i915: Utilize intel_crtc_joined_pipe_mask() more
  drm/i915: Handle joined pipes inside hsw_crtc_disable()
  drm/i915/mst: Add bigjoiner handling to MST modeset sequence
  drm/i915: Use debugfs_create_bool() for "i915_bigjoiner_force_enable"

 drivers/gpu/drm/i915/display/intel_crt.c  |   3 -
 drivers/gpu/drm/i915/display/intel_ddi.c  |  79 +++--
 drivers/gpu/drm/i915/display/intel_display.c  | 330 ++
 drivers/gpu/drm/i915/display/intel_display.h  |   7 +
 .../drm/i915/display/intel_display_debugfs.c  |  44 +--
 .../drm/i915/display/intel_display_device.h   |   1 +
 drivers/gpu/drm/i915/display/intel_dp.c   |  55 +--
 drivers/gpu/drm/i915/display/intel_dp.h   |   4 +-
 drivers/gpu/drm/i915/display/intel_dp_mst.c   | 102 +++---
 drivers/gpu/drm/i915/display/intel_dsi.c  |   3 -
 drivers/gpu/drm/i915/display/intel_dvo.c  |   3 -
 drivers/gpu/drm/i915/display/intel_lvds.c |   3 -
 drivers/gpu/drm/i915/display/intel_sdvo.c |   3 -
 drivers/gpu/drm/i915/display/intel_tv.c   |   3 -
 drivers/gpu/drm/i915/display/intel_vrr.c  |   7 +
 15 files changed, 347 insertions(+), 300 deletions(-)

-- 
2.43.2



[PATCH 01/22] drm/i915: Disable port sync when bigjoiner is used

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

The current modeset sequence can't handle port sync and bigjoiner
at the same time. Refuse port sync when bigjoiner is needed,
at least until we fix the modeset sequence.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c 
b/drivers/gpu/drm/i915/display/intel_ddi.c
index a3d3d4942eb1..fa6fe9ec8027 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -4244,6 +4244,7 @@ static bool crtcs_port_sync_compatible(const struct 
intel_crtc_state *crtc_state
   const struct intel_crtc_state 
*crtc_state2)
 {
return crtc_state1->hw.active && crtc_state2->hw.active &&
+   !crtc_state1->bigjoiner_pipes && !crtc_state2->bigjoiner_pipes 
&&
crtc_state1->output_types == crtc_state2->output_types &&
crtc_state1->output_format == crtc_state2->output_format &&
crtc_state1->lane_count == crtc_state2->lane_count &&
-- 
2.43.2



✓ Fi.CI.BAT: success for drm/i915: use fine grained -Woverride-init disable

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

Series: drm/i915: use fine grained -Woverride-init disable
URL   : https://patchwork.freedesktop.org/series/131753/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14504 -> Patchwork_131753v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (37 -> 34)
--

  Additional (3): bat-arls-4 fi-glk-j4005 bat-mtlp-8 
  Missing(6): bat-kbl-2 fi-snb-2520m bat-atsm-1 fi-kbl-8809g bat-dg2-11 
bat-arls-3 

Known issues


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

### CI changes ###

 Issues hit 

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

  

### IGT changes ###

 Issues hit 

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

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

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

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

  * igt@gem_mmap@basic:
- bat-mtlp-8: NOTRUN -> [SKIP][7] ([i915#4083])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131753v1/bat-mtlp-8/igt@gem_m...@basic.html

  * igt@gem_mmap_gtt@basic:
- bat-mtlp-8: NOTRUN -> [SKIP][8] ([i915#4077]) +2 other tests skip
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131753v1/bat-mtlp-8/igt@gem_mmap_...@basic.html

  * igt@gem_render_tiled_blits@basic:
- bat-mtlp-8: NOTRUN -> [SKIP][9] ([i915#4079]) +1 other test skip
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131753v1/bat-mtlp-8/igt@gem_render_tiled_bl...@basic.html

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

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-mtlp-8: NOTRUN -> [SKIP][11] ([i915#5190])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131753v1/bat-mtlp-8/igt@kms_addfb_ba...@addfb25-y-tiled-small-legacy.html

  * igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-mtlp-8: NOTRUN -> [SKIP][12] ([i915#4212]) +8 other tests skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131753v1/bat-mtlp-8/igt@kms_addfb_ba...@basic-y-tiled-legacy.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-glk-j4005:   NOTRUN -> [SKIP][13] +10 other tests skip
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131753v1/fi-glk-j4005/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-atomic.html

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

  * igt@kms_dsc@dsc-basic:
- bat-mtlp-8: NOTRUN -> [SKIP][15] ([i915#3555] / [i915#3840] / 
[i915#9159])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131753v1/bat-mtlp-8/igt@kms_...@dsc-basic.html

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

  * igt@kms_force_connector_basic@prune-stale-modes:
- bat-mtlp-8: NOTRUN -> [SKIP][17] ([i915#5274])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131753v1/bat-mtlp-8/igt@kms_force_connector_ba...@prune-stale-modes.html

  * igt@kms_psr@psr-primary-mmap-gtt@edp-1:
- bat-mtlp-8: NOTRUN -> [SKIP][18] ([i915#4077] / [i915#9688])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131753v1/bat-mtlp-8/igt@kms_psr@psr-primary-mmap-...@edp-1.html

  * igt@kms_setmode@basic-clone-single-crtc:
- bat-mtlp-8: NOTRUN -> [SKIP][19] ([i915#3555] / [i915#8809])
   [19]: 

✗ Fi.CI.IGT: failure for drm/i915: A few bigjoiner fixes

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

Series: drm/i915: A few bigjoiner fixes
URL   : https://patchwork.freedesktop.org/series/131711/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14495_full -> Patchwork_131711v1_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_131711v1_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_131711v1_full, 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.

  

Participating hosts (10 -> 10)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@kms_pipe_crc_basic@suspend-read-crc@pipe-b-hdmi-a-1:
- shard-rkl:  NOTRUN -> [FAIL][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/shard-rkl-5/igt@kms_pipe_crc_basic@suspend-read-...@pipe-b-hdmi-a-1.html

  
 Warnings 

  * igt@i915_pm_rc6_residency@rc6-fence@gt0:
- shard-dg2:  ([INCOMPLETE][2], [PASS][3]) -> [INCOMPLETE][4]
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg2-6/igt@i915_pm_rc6_residency@rc6-fe...@gt0.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg2-3/igt@i915_pm_rc6_residency@rc6-fe...@gt0.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/shard-dg2-11/igt@i915_pm_rc6_residency@rc6-fe...@gt0.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@drm_fdinfo@virtual-busy-hang-all:
- shard-dg1:  NOTRUN -> [SKIP][5] ([i915#8414])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/shard-dg1-15/igt@drm_fdi...@virtual-busy-hang-all.html

  * igt@gem_bad_reloc@negative-reloc-lut:
- shard-rkl:  NOTRUN -> [SKIP][6] ([i915#3281]) +5 other tests skip
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/shard-rkl-5/igt@gem_bad_re...@negative-reloc-lut.html
- shard-dg1:  NOTRUN -> [SKIP][7] ([i915#3281]) +1 other test skip
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/shard-dg1-15/igt@gem_bad_re...@negative-reloc-lut.html

  * igt@gem_exec_capture@capture-recoverable:
- shard-rkl:  NOTRUN -> [SKIP][8] ([i915#6344])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/shard-rkl-5/igt@gem_exec_capt...@capture-recoverable.html

  * igt@gem_exec_fair@basic-deadline:
- shard-glk:  NOTRUN -> [FAIL][9] ([i915#2846])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/shard-glk1/igt@gem_exec_f...@basic-deadline.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-tglu: ([PASS][10], [PASS][11]) -> [FAIL][12] ([i915#2842]) 
+1 other test fail
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-tglu-8/igt@gem_exec_fair@basic-pace-s...@rcs0.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-tglu-2/igt@gem_exec_fair@basic-pace-s...@rcs0.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/shard-tglu-4/igt@gem_exec_fair@basic-pace-s...@rcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
- shard-rkl:  [PASS][13] -> [FAIL][14] ([i915#2842]) +4 other tests 
fail
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-rkl-6/igt@gem_exec_fair@basic-p...@vecs0.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/shard-rkl-3/igt@gem_exec_fair@basic-p...@vecs0.html

  * igt@gem_exec_flush@basic-wb-prw-default:
- shard-dg1:  NOTRUN -> [SKIP][15] ([i915#3539] / [i915#4852])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/shard-dg1-15/igt@gem_exec_fl...@basic-wb-prw-default.html

  * igt@gem_exec_schedule@semaphore-power:
- shard-rkl:  NOTRUN -> [SKIP][16] ([i915#7276])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/shard-rkl-5/igt@gem_exec_sched...@semaphore-power.html
- shard-dg1:  NOTRUN -> [SKIP][17] ([i915#4812])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/shard-dg1-15/igt@gem_exec_sched...@semaphore-power.html

  * igt@gem_lmem_swapping@heavy-verify-random:
- shard-rkl:  NOTRUN -> [SKIP][18] ([i915#4613]) +2 other tests skip
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/shard-rkl-5/igt@gem_lmem_swapp...@heavy-verify-random.html

  * igt@gem_lmem_swapping@heavy-verify-random@lmem0:
- shard-dg1:  NOTRUN -> [FAIL][19] ([i915#10378])
   [19]: 

✗ Fi.CI.SPARSE: warning for drm/i915: use fine grained -Woverride-init disable

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

Series: drm/i915: use fine grained -Woverride-init disable
URL   : https://patchwork.freedesktop.org/series/131753/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
+drivers/gpu/drm/i915/display/intel_display_device.c:507:9: warning: 
Initializer entry defined twice
+drivers/gpu/drm/i915/display/intel_display_device.c:509:9:   also defined here
+drivers/gpu/drm/i915/display/intel_display_device.c:629:9: warning: 
Initializer entry defined twice
+drivers/gpu/drm/i915/display/intel_display_device.c:634:10:   also defined here
+drivers/gpu/drm/i915/display/intel_display_device.c:642:9: warning: 
Initializer entry defined twice
+drivers/gpu/drm/i915/display/intel_display_device.c:644:10:   also defined here
+drivers/gpu/drm/i915/display/intel_display_device.c:767:9: warning: 
Initializer entry defined twice
+drivers/gpu/drm/i915/display/intel_display_device.c:769:10:   also defined here
+drivers/gpu/drm/i915/display/intel_fbdev.c:144:9: warning: Initializer entry 
defined twice
+drivers/gpu/drm/i915/display/intel_fbdev.c:145:10:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:146:9: warning: Initializer entry defined twice
+drivers/gpu/drm/i915/i915_pci.c:148:10:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:177:9: warning: Initializer entry defined twice
+drivers/gpu/drm/i915/i915_pci.c:179:10:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:183:9: warning: Initializer entry defined twice
+drivers/gpu/drm/i915/i915_pci.c:185:10:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:189:9: warning: Initializer entry defined twice
+drivers/gpu/drm/i915/i915_pci.c:192:10:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:209:9: warning: Initializer entry defined twice
+drivers/gpu/drm/i915/i915_pci.c:212:10:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:216:9: warning: Initializer entry defined twice
+drivers/gpu/drm/i915/i915_pci.c:220:10:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:224:9: warning: Initializer entry defined twice
+drivers/gpu/drm/i915/i915_pci.c:226:10:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:231:9: warning: Initializer entry defined twice
+drivers/gpu/drm/i915/i915_pci.c:234:10:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:400:9:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:400:9: warning: Initializer entry defined twice
+drivers/gpu/drm/i915/i915_pci.c:405:9:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:405:9: warning: Initializer entry defined twice
+drivers/gpu/drm/i915/i915_pci.c:410:9:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:410:9: warning: Initializer entry defined twice
+drivers/gpu/drm/i915/i915_pci.c:428:9:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:428:9: warning: Initializer entry defined twice
+drivers/gpu/drm/i915/i915_pci.c:433:9:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:433:9: warning: Initializer entry defined twice
+drivers/gpu/drm/i915/i915_pci.c:438:9:   also defined here
+drivers/gpu/drm/i915/i915_pci.c:438:9: warning: Initializer entry defined twice
+drivers/gpu/drm/i915/i915_pci.c:446:9: warning: too many warnings




✗ Fi.CI.CHECKPATCH: warning for drm/i915: use fine grained -Woverride-init disable

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

Series: drm/i915: use fine grained -Woverride-init disable
URL   : https://patchwork.freedesktop.org/series/131753/
State : warning

== Summary ==

Error: dim checkpatch failed
bee34a0221ee drm/i915: use fine grained -Woverride-init disable
-:14: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ 
chars of sha1> ("")' - ie: 'commit 689b097a06ba ("compiler-gcc: 
Suppress -Wmissing-prototypes warning for all supported GCC")'
#14: 
in __diag_ignore_all() and it was fixed by commit 689b097a06ba

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




✗ Fi.CI.IGT: failure for drm/i915/gem: Replace dev_priv with i915

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

Series: drm/i915/gem: Replace dev_priv with i915
URL   : https://patchwork.freedesktop.org/series/131736/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14495_full -> Patchwork_131736v1_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_131736v1_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_131736v1_full, 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_131736v1/index.html

Participating hosts (10 -> 10)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@gem_eio@in-flight-suspend:
- shard-dg2:  ([PASS][1], [PASS][2]) -> [INCOMPLETE][3]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg2-10/igt@gem_...@in-flight-suspend.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg2-5/igt@gem_...@in-flight-suspend.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/shard-dg2-10/igt@gem_...@in-flight-suspend.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@drm_fdinfo@most-busy-check-all@rcs0:
- shard-rkl:  [PASS][4] -> [FAIL][5] ([i915#7742])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-rkl-5/igt@drm_fdinfo@most-busy-check-...@rcs0.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/shard-rkl-5/igt@drm_fdinfo@most-busy-check-...@rcs0.html

  * igt@drm_fdinfo@virtual-busy-all:
- shard-dg2:  NOTRUN -> [SKIP][6] ([i915#8414])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/shard-dg2-8/igt@drm_fdi...@virtual-busy-all.html

  * igt@drm_fdinfo@virtual-busy-hang-all:
- shard-dg1:  NOTRUN -> [SKIP][7] ([i915#8414])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/shard-dg1-16/igt@drm_fdi...@virtual-busy-hang-all.html

  * igt@gem_bad_reloc@negative-reloc-lut:
- shard-dg1:  NOTRUN -> [SKIP][8] ([i915#3281]) +1 other test skip
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/shard-dg1-16/igt@gem_bad_re...@negative-reloc-lut.html

  * igt@gem_close_race@multigpu-basic-process:
- shard-rkl:  NOTRUN -> [SKIP][9] ([i915#7697])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/shard-rkl-5/igt@gem_close_r...@multigpu-basic-process.html

  * igt@gem_ctx_persistence@heartbeat-close:
- shard-dg2:  NOTRUN -> [SKIP][10] ([i915#8555])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/shard-dg2-8/igt@gem_ctx_persiste...@heartbeat-close.html

  * igt@gem_eio@hibernate:
- shard-rkl:  NOTRUN -> [ABORT][11] ([i915#7975] / [i915#8213])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/shard-rkl-5/igt@gem_...@hibernate.html

  * igt@gem_exec_capture@many-4k-incremental:
- shard-glk:  NOTRUN -> [FAIL][12] ([i915#9606])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/shard-glk3/igt@gem_exec_capt...@many-4k-incremental.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
- shard-tglu: ([PASS][13], [PASS][14]) -> [FAIL][15] ([i915#2842])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-tglu-7/igt@gem_exec_fair@basic-throt...@rcs0.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-tglu-9/igt@gem_exec_fair@basic-throt...@rcs0.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/shard-tglu-4/igt@gem_exec_fair@basic-throt...@rcs0.html

  * igt@gem_exec_flush@basic-wb-prw-default:
- shard-dg1:  NOTRUN -> [SKIP][16] ([i915#3539] / [i915#4852])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/shard-dg1-16/igt@gem_exec_fl...@basic-wb-prw-default.html

  * igt@gem_exec_params@rsvd2-dirt:
- shard-dg2:  NOTRUN -> [SKIP][17] ([i915#5107])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/shard-dg2-8/igt@gem_exec_par...@rsvd2-dirt.html

  * igt@gem_exec_reloc@basic-write-wc-active:
- shard-rkl:  NOTRUN -> [SKIP][18] ([i915#3281]) +1 other test skip
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/shard-rkl-5/igt@gem_exec_re...@basic-write-wc-active.html

  * igt@gem_exec_schedule@semaphore-power:
- shard-dg1:  NOTRUN -> [SKIP][19] ([i915#4812])
   [19]: 

✗ Fi.CI.IGT: failure for drm/xe/display: check for error on drmm_mutex_init (rev3)

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

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

== Summary ==

CI Bug Log - changes from CI_DRM_14496_full -> Patchwork_131301v3_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_131301v3_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_131301v3_full, 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.

  

Participating hosts (10 -> 10)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@kms_plane@pixel-format@pipe-a:
- shard-mtlp: ([PASS][1], [PASS][2]) -> [ABORT][3] +1 other test 
abort
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14496/shard-mtlp-7/igt@kms_plane@pixel-for...@pipe-a.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14496/shard-mtlp-2/igt@kms_plane@pixel-for...@pipe-a.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-mtlp-3/igt@kms_plane@pixel-for...@pipe-a.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@drm_fdinfo@virtual-busy-all:
- shard-dg2:  NOTRUN -> [SKIP][4] ([i915#8414])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-dg2-2/igt@drm_fdi...@virtual-busy-all.html

  * igt@gem_close_race@multigpu-basic-process:
- shard-rkl:  NOTRUN -> [SKIP][5] ([i915#7697])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-rkl-5/igt@gem_close_r...@multigpu-basic-process.html

  * igt@gem_ctx_persistence@heartbeat-stop:
- shard-dg1:  NOTRUN -> [SKIP][6] ([i915#8555])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-dg1-15/igt@gem_ctx_persiste...@heartbeat-stop.html

  * igt@gem_eio@hibernate:
- shard-rkl:  NOTRUN -> [ABORT][7] ([i915#7975] / [i915#8213])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-rkl-5/igt@gem_...@hibernate.html

  * igt@gem_exec_capture@many-4k-zero:
- shard-glk:  NOTRUN -> [FAIL][8] ([i915#9606])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-glk5/igt@gem_exec_capt...@many-4k-zero.html

  * igt@gem_exec_fence@submit3:
- shard-dg2:  NOTRUN -> [SKIP][9] ([i915#4812])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-dg2-7/igt@gem_exec_fe...@submit3.html

  * igt@gem_exec_flush@basic-batch-kernel-default-cmd:
- shard-dg1:  NOTRUN -> [SKIP][10] ([i915#3539] / [i915#4852]) +1 
other test skip
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-dg1-15/igt@gem_exec_fl...@basic-batch-kernel-default-cmd.html

  * igt@gem_exec_params@rsvd2-dirt:
- shard-dg2:  NOTRUN -> [SKIP][11] ([i915#5107])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-dg2-2/igt@gem_exec_par...@rsvd2-dirt.html

  * igt@gem_exec_reloc@basic-cpu-read:
- shard-dg2:  NOTRUN -> [SKIP][12] ([i915#3281]) +1 other test skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-dg2-7/igt@gem_exec_re...@basic-cpu-read.html

  * igt@gem_exec_reloc@basic-wc-cpu-noreloc:
- shard-dg1:  NOTRUN -> [SKIP][13] ([i915#3281]) +2 other tests skip
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-dg1-15/igt@gem_exec_re...@basic-wc-cpu-noreloc.html

  * igt@gem_exec_reloc@basic-write-wc-active:
- shard-rkl:  NOTRUN -> [SKIP][14] ([i915#3281]) +1 other test skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-rkl-5/igt@gem_exec_re...@basic-write-wc-active.html

  * igt@gem_exec_schedule@preempt-queue-contexts:
- shard-dg1:  NOTRUN -> [SKIP][15] ([i915#4812])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-dg1-15/igt@gem_exec_sched...@preempt-queue-contexts.html

  * igt@gem_fence_thrash@bo-write-verify-y:
- shard-dg2:  NOTRUN -> [SKIP][16] ([i915#4860])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-dg2-7/igt@gem_fence_thr...@bo-write-verify-y.html

  * igt@gem_fenced_exec_thrash@no-spare-fences-busy:
- shard-dg1:  NOTRUN -> [SKIP][17] ([i915#4860])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/shard-dg1-15/igt@gem_fenced_exec_thr...@no-spare-fences-busy.html

  * igt@gem_lmem_evict@dontneed-evict-race:
- 

Re: [PATCH] drm/i915/guc: Remove bogus null check

2024-03-28 Thread Andi Shyti
Hi Rodrigo,

On Thu, Mar 28, 2024 at 05:31:07PM -0400, Rodrigo Vivi wrote:
> This null check is bogus because we are already using 'ce' stuff
> in many places before this function is called.
> 
> Having this here is useless and confuses static analyzer tools
> that can see:
> 
> struct intel_engine_cs *engine = ce->engine;
> 
> before this check, in the same function.
> 
> Fixes: cec82816d0d0 ("drm/i915/guc: Use context hints for GT frequency")

there is no need to have the Fixes tag here.

> Reported-by: kernel test robot 
> Reported-by: Dan Carpenter 
> Closes: https://lore.kernel.org/r/202403101225.7ahejhzj-...@intel.com/
> Cc: Vinay Belgaumkar 
> Cc: John Harrison 
> Signed-off-by: Rodrigo Vivi 
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c 
> b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> index 01d0ec1b30f2..24a82616f844 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -2677,7 +2677,7 @@ static int guc_context_policy_init_v70(struct 
> intel_context *ce, bool loop)
>   execution_quantum = engine->props.timeslice_duration_ms * 1000;
>   preemption_timeout = engine->props.preempt_timeout_ms * 1000;
>  
> - if (ce && (ce->flags & BIT(CONTEXT_LOW_LATENCY)))
> + if (ce->flags & BIT(CONTEXT_LOW_LATENCY))

We could keep the check but make it earlier.

Thanks,
Andi

>   slpc_ctx_freq_req |= SLPC_CTX_FREQ_REQ_IS_COMPUTE;
>  
>   __guc_context_policy_start_klv(, ce->guc_id.id);
> -- 
> 2.44.0


[PATCH] drm/i915/guc: Remove bogus null check

2024-03-28 Thread Rodrigo Vivi
This null check is bogus because we are already using 'ce' stuff
in many places before this function is called.

Having this here is useless and confuses static analyzer tools
that can see:

struct intel_engine_cs *engine = ce->engine;

before this check, in the same function.

Fixes: cec82816d0d0 ("drm/i915/guc: Use context hints for GT frequency")
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 
Closes: https://lore.kernel.org/r/202403101225.7ahejhzj-...@intel.com/
Cc: Vinay Belgaumkar 
Cc: John Harrison 
Signed-off-by: Rodrigo Vivi 
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index 01d0ec1b30f2..24a82616f844 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -2677,7 +2677,7 @@ static int guc_context_policy_init_v70(struct 
intel_context *ce, bool loop)
execution_quantum = engine->props.timeslice_duration_ms * 1000;
preemption_timeout = engine->props.preempt_timeout_ms * 1000;
 
-   if (ce && (ce->flags & BIT(CONTEXT_LOW_LATENCY)))
+   if (ce->flags & BIT(CONTEXT_LOW_LATENCY))
slpc_ctx_freq_req |= SLPC_CTX_FREQ_REQ_IS_COMPUTE;
 
__guc_context_policy_start_klv(, ce->guc_id.id);
-- 
2.44.0



✗ Fi.CI.IGT: failure for drm/i915: Implemnt vblank sycnhronized mbus joining changes

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

Series: drm/i915: Implemnt vblank sycnhronized mbus joining changes
URL   : https://patchwork.freedesktop.org/series/131700/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14495_full -> Patchwork_131700v1_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_131700v1_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_131700v1_full, 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_131700v1/index.html

Participating hosts (10 -> 10)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@gem_eio@in-flight-suspend:
- shard-dg2:  ([PASS][1], [PASS][2]) -> [INCOMPLETE][3]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg2-10/igt@gem_...@in-flight-suspend.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg2-5/igt@gem_...@in-flight-suspend.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-dg2-7/igt@gem_...@in-flight-suspend.html

  * igt@kms_flip@dpms-off-confusion@d-hdmi-a3:
- shard-dg2:  [PASS][4] -> [INCOMPLETE][5]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg2-6/igt@kms_flip@dpms-off-confus...@d-hdmi-a3.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-dg2-5/igt@kms_flip@dpms-off-confus...@d-hdmi-a3.html

  * igt@kms_plane@pixel-format-source-clamping@pipe-a:
- shard-mtlp: [PASS][6] -> [ABORT][7]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-mtlp-6/igt@kms_plane@pixel-format-source-clamp...@pipe-a.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-mtlp-5/igt@kms_plane@pixel-format-source-clamp...@pipe-a.html

  
 Warnings 

  * igt@gem_workarounds@basic-read-context:
- shard-dg2:  ([PASS][8], [TIMEOUT][9]) -> [TIMEOUT][10]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg2-8/igt@gem_workarou...@basic-read-context.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg2-6/igt@gem_workarou...@basic-read-context.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-dg2-6/igt@gem_workarou...@basic-read-context.html

  * igt@kms_vrr@flipline:
- shard-dg2:  ([TIMEOUT][11], [SKIP][12]) ([i915#3555]) -> 
[TIMEOUT][13]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg2-6/igt@kms_...@flipline.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg2-8/igt@kms_...@flipline.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-dg2-6/igt@kms_...@flipline.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@drm_fdinfo@most-busy-check-all@rcs0:
- shard-rkl:  [PASS][14] -> [FAIL][15] ([i915#7742])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-rkl-5/igt@drm_fdinfo@most-busy-check-...@rcs0.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-rkl-4/igt@drm_fdinfo@most-busy-check-...@rcs0.html

  * igt@drm_fdinfo@virtual-busy-all:
- shard-dg2:  NOTRUN -> [SKIP][16] ([i915#8414])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-dg2-10/igt@drm_fdi...@virtual-busy-all.html

  * igt@drm_fdinfo@virtual-busy-idle:
- shard-mtlp: NOTRUN -> [SKIP][17] ([i915#8414])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-mtlp-4/igt@drm_fdi...@virtual-busy-idle.html

  * igt@gem_ctx_isolation@preservation-s3@vcs0:
- shard-dg1:  [PASS][18] -> [FAIL][19] ([i915#10086]) +2 other 
tests fail
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg1-18/igt@gem_ctx_isolation@preservation...@vcs0.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-dg1-16/igt@gem_ctx_isolation@preservation...@vcs0.html

  * igt@gem_ctx_persistence@heartbeat-close:
- shard-dg2:  NOTRUN -> [SKIP][20] ([i915#8555])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-dg2-10/igt@gem_ctx_persiste...@heartbeat-close.html

  * igt@gem_eio@kms:
- shard-tglu: ([PASS][21], [PASS][22]) -> [INCOMPLETE][23] 
([i915#10513])
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-tglu-5/igt@gem_...@kms.html
   [22]: 

✓ Fi.CI.IGT: success for drm/i915: Implemnt vblank sycnhronized mbus joining changes

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

Series: drm/i915: Implemnt vblank sycnhronized mbus joining changes
URL   : https://patchwork.freedesktop.org/series/131700/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14495_full -> Patchwork_131700v1_full


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (9 -> 10)
--

  Additional (1): shard-snb-0 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@drm_fdinfo@all-busy-check-all:
- shard-mtlp: NOTRUN -> [SKIP][1] ([i915#8414])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-mtlp-8/igt@drm_fdi...@all-busy-check-all.html

  * igt@drm_fdinfo@virtual-busy-all:
- shard-dg2:  NOTRUN -> [SKIP][2] ([i915#8414])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-dg2-10/igt@drm_fdi...@virtual-busy-all.html

  * igt@gem_ctx_persistence@heartbeat-close:
- shard-dg2:  NOTRUN -> [SKIP][3] ([i915#8555])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-dg2-10/igt@gem_ctx_persiste...@heartbeat-close.html

  * igt@gem_ctx_sseu@invalid-sseu:
- shard-mtlp: NOTRUN -> [SKIP][4] ([i915#280])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-mtlp-8/igt@gem_ctx_s...@invalid-sseu.html

  * igt@gem_eio@kms:
- shard-tglu: [PASS][5] -> [INCOMPLETE][6] ([i915#10513])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-tglu-5/igt@gem_...@kms.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-tglu-9/igt@gem_...@kms.html

  * igt@gem_exec_fair@basic-deadline:
- shard-glk:  NOTRUN -> [FAIL][7] ([i915#2846])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-glk3/igt@gem_exec_f...@basic-deadline.html

  * igt@gem_exec_fair@basic-none-rrul@rcs0:
- shard-glk:  NOTRUN -> [FAIL][8] ([i915#2842])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-glk5/igt@gem_exec_fair@basic-none-r...@rcs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
- shard-tglu: [PASS][9] -> [FAIL][10] ([i915#2842])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-tglu-9/igt@gem_exec_fair@basic-throt...@rcs0.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-tglu-3/igt@gem_exec_fair@basic-throt...@rcs0.html

  * igt@gem_exec_params@rsvd2-dirt:
- shard-dg2:  NOTRUN -> [SKIP][11] ([i915#5107])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-dg2-10/igt@gem_exec_par...@rsvd2-dirt.html

  * igt@gem_lmem_swapping@heavy-multi@lmem0:
- shard-dg2:  [PASS][12] -> [FAIL][13] ([i915#10378])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/shard-dg2-8/igt@gem_lmem_swapping@heavy-mu...@lmem0.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-dg2-10/igt@gem_lmem_swapping@heavy-mu...@lmem0.html

  * igt@gem_lmem_swapping@verify-ccs@lmem0:
- shard-dg2:  NOTRUN -> [FAIL][14] ([i915#10446])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-dg2-10/igt@gem_lmem_swapping@verify-...@lmem0.html

  * igt@gem_media_fill@media-fill:
- shard-mtlp: NOTRUN -> [SKIP][15] ([i915#8289])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-mtlp-8/igt@gem_media_f...@media-fill.html

  * igt@gem_mmap_gtt@basic-write-read-distinct:
- shard-mtlp: NOTRUN -> [SKIP][16] ([i915#4077]) +2 other tests skip
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-mtlp-8/igt@gem_mmap_...@basic-write-read-distinct.html

  * igt@gem_mmap_wc@read-write-distinct:
- shard-mtlp: NOTRUN -> [SKIP][17] ([i915#4083])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-mtlp-8/igt@gem_mmap...@read-write-distinct.html

  * igt@gem_mmap_wc@write:
- shard-dg2:  NOTRUN -> [SKIP][18] ([i915#4083])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-dg2-10/igt@gem_mmap...@write.html

  * igt@gem_partial_pwrite_pread@write:
- shard-mtlp: NOTRUN -> [SKIP][19] ([i915#3282]) +1 other test skip
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-mtlp-8/igt@gem_partial_pwrite_pr...@write.html

  * igt@gem_pxp@create-regular-buffer:
- shard-glk:  NOTRUN -> [SKIP][20] +134 other tests skip
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/shard-glk5/igt@gem_...@create-regular-buffer.html

  * igt@gem_pxp@regular-baseline-src-copy-readible:
- shard-mtlp: NOTRUN -> [SKIP][21] ([i915#4270])
   [21]: 

✓ Fi.CI.IGT: success for drm/i915/gt: Limit the reserved VM space to only the platforms that need it

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

Series: drm/i915/gt: Limit the reserved VM space to only the platforms that 
need it
URL   : https://patchwork.freedesktop.org/series/131707/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14495_full -> Patchwork_131707v1_full


Summary
---

  **SUCCESS**

  No regressions found.

  

Participating hosts (9 -> 7)
--

  Additional (1): shard-snb-0 
  Missing(3): shard-snb shard-dg2 shard-glk 


Changes
---

  No changes found


Build changes
-

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_14495 -> Patchwork_131707v1

  CI-20190529: 20190529
  CI_DRM_14495: 07c774152cf8a034784b40978a77b5ee66e4779b @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7786: 1e4a3cd0a4bb3419fb70ed3e01259485b056dcfd @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_131707v1: 07c774152cf8a034784b40978a77b5ee66e4779b @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

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


✓ Fi.CI.IGT: success for drm/i915: A few bigjoiner fixes

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

Series: drm/i915: A few bigjoiner fixes
URL   : https://patchwork.freedesktop.org/series/131711/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14495_full -> Patchwork_131711v1_full


Summary
---

  **SUCCESS**

  No regressions found.

  

Participating hosts (9 -> 7)
--

  Additional (1): shard-snb-0 
  Missing(3): shard-snb shard-dg2 shard-glk 


Changes
---

  No changes found


Build changes
-

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_14495 -> Patchwork_131711v1

  CI-20190529: 20190529
  CI_DRM_14495: 07c774152cf8a034784b40978a77b5ee66e4779b @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7786: 1e4a3cd0a4bb3419fb70ed3e01259485b056dcfd @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_131711v1: 07c774152cf8a034784b40978a77b5ee66e4779b @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

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


✓ Fi.CI.IGT: success for drm/i915/panelreplay: Panel replay workaround with VRR (rev4)

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

Series: drm/i915/panelreplay: Panel replay workaround with VRR (rev4)
URL   : https://patchwork.freedesktop.org/series/129632/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14495_full -> Patchwork_129632v4_full


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (9 -> 7)
--

  Additional (1): shard-snb-0 
  Missing(3): shard-snb shard-dg2 shard-glk 


Changes
---

  No changes found


Build changes
-

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_14495 -> Patchwork_129632v4
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_14495: 07c774152cf8a034784b40978a77b5ee66e4779b @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7786: 1e4a3cd0a4bb3419fb70ed3e01259485b056dcfd @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_129632v4: 07c774152cf8a034784b40978a77b5ee66e4779b @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

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


✓ Fi.CI.IGT: success for drm/i915/gem: Replace dev_priv with i915

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

Series: drm/i915/gem: Replace dev_priv with i915
URL   : https://patchwork.freedesktop.org/series/131736/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14495_full -> Patchwork_131736v1_full


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (9 -> 7)
--

  Additional (1): shard-snb-0 
  Missing(3): shard-snb shard-dg2 shard-glk 


Changes
---

  No changes found


Build changes
-

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_14495 -> Patchwork_131736v1
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_14495: 07c774152cf8a034784b40978a77b5ee66e4779b @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7786: 1e4a3cd0a4bb3419fb70ed3e01259485b056dcfd @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_131736v1: 07c774152cf8a034784b40978a77b5ee66e4779b @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

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


✓ Fi.CI.IGT: success for Disable automatic load CCS load balancing (rev13)

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

Series: Disable automatic load CCS load balancing (rev13)
URL   : https://patchwork.freedesktop.org/series/129951/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14496_full -> Patchwork_129951v13_full


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (10 -> 7)
--

  Missing(3): shard-snb shard-dg2 shard-glk 


Changes
---

  No changes found


Build changes
-

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_14496 -> Patchwork_129951v13

  CI-20190529: 20190529
  CI_DRM_14496: 8d398ffc40ac37d1589214c28b69c651c1a20792 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7786: 1e4a3cd0a4bb3419fb70ed3e01259485b056dcfd @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_129951v13: 8d398ffc40ac37d1589214c28b69c651c1a20792 @ 
git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

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


Re: [topic/core-for-CI] ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path

2024-03-28 Thread Lucas De Marchi

On Thu, Mar 28, 2024 at 09:52:33AM -0400, Rodrigo Vivi wrote:

From: Chaitanya Kumar Borah 

In cases where the sof driver is unable to find the firmware and/or
topology file [1], it exits without releasing the i915 runtime
pm wakeref [2]. This results in dmesg warnings[3] during
suspend/resume or driver unbind. Add remove_late() to the failure path
of sof_init_environment so that i915 wakeref is released appropriately

[1]

[8.990366] sof-audio-pci-intel-mtl :00:1f.3: SOF firmware and/or 
topology file not found.
[8.990396] sof-audio-pci-intel-mtl :00:1f.3: Supported default profiles
[8.990398] sof-audio-pci-intel-mtl :00:1f.3: - ipc type 1 (Requested):
[8.990399] sof-audio-pci-intel-mtl :00:1f.3:  Firmware file: 
intel/sof-ipc4/mtl/sof-mtl.ri
[8.990401] sof-audio-pci-intel-mtl :00:1f.3:  Topology file: 
intel/sof-ace-tplg/sof-mtl-rt711-2ch.tplg
[8.990402] sof-audio-pci-intel-mtl :00:1f.3: Check if you have 
'sof-firmware' package installed.
[8.990403] sof-audio-pci-intel-mtl :00:1f.3: Optionally it can be 
manually downloaded from:
[8.990404] sof-audio-pci-intel-mtl :00:1f.3:
https://github.com/thesofproject/sof-bin/
[8.999088] sof-audio-pci-intel-mtl :00:1f.3: error: sof_probe_work 
failed err: -2

[2]

ref_tracker: :00:02.0@9b8511b6a378 has 1/5 users at
track_intel_runtime_pm_wakeref.part.0+0x36/0x70 [i915]
__intel_runtime_pm_get+0x51/0xb0 [i915]
intel_runtime_pm_get+0x17/0x20 [i915]
intel_display_power_get+0x2f/0x70 [i915]
i915_audio_component_get_power+0x23/0x120 [i915]
snd_hdac_display_power+0x89/0x130 [snd_hda_core]
hda_codec_i915_init+0x3f/0x50 [snd_sof_intel_hda]
hda_dsp_probe_early+0x170/0x250 [snd_sof_intel_hda_common]
snd_sof_device_probe+0x224/0x320 [snd_sof]
sof_pci_probe+0x15b/0x220 [snd_sof_pci]
hda_pci_intel_probe+0x30/0x70 [snd_sof_intel_hda_common]
local_pci_probe+0x4c/0xb0
pci_device_probe+0xcc/0x250
really_probe+0x18e/0x420
__driver_probe_device+0x7e/0x170
driver_probe_device+0x23/0xa0

[3]
[  484.105070] [ cut here ]
[  484.108238] thunderbolt :00:0d.2: PM: pci_pm_suspend_late+0x0/0x50 
returned 0 after 0 usecs
[  484.117106] i915 :00:02.0: i915 raw-wakerefs=1 wakelocks=1 on cleanup
[  484.792005] WARNING: CPU: 2 PID: 2405 at 
drivers/gpu/drm/i915/intel_runtime_pm.c:444 
intel_runtime_pm_driver_release+0x6c/0x80

Signed-off-by: Chaitanya Kumar Borah 
Tested-by: Rodrigo Vivi 
Reviewed-by: Rodrigo Vivi 
[This commit is still under review on the sof tree, but likely targeting 6.10
Adding to topic branch to unblock RPM in LNL VLK-56970]
Link: https://github.com/thesofproject/linux/pull/4878
Signed-off-by: Rodrigo Vivi 



Acked-by: Lucas De Marchi 

to merge in our topic/core-for-CI branch.

thanks
Lucas De Marchi


---
sound/soc/sof/core.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c
index 425b023b03b4..3e41821562f0 100644
--- a/sound/soc/sof/core.c
+++ b/sound/soc/sof/core.c
@@ -339,8 +339,7 @@ static int sof_init_environment(struct snd_sof_dev *sdev)
ret = snd_sof_probe(sdev);
if (ret < 0) {
dev_err(sdev->dev, "failed to probe DSP %d\n", ret);
-   sof_ops_free(sdev);
-   return ret;
+   goto err_sof_probe;
}

/* check machine info */
@@ -358,15 +357,18 @@ static int sof_init_environment(struct snd_sof_dev *sdev)
ret = validate_sof_ops(sdev);
if (ret < 0) {
snd_sof_remove(sdev);
+   snd_sof_remove_late(sdev);
return ret;
}
}

+   return 0;
+
err_machine_check:
-   if (ret) {
-   snd_sof_remove(sdev);
-   sof_ops_free(sdev);
-   }
+   snd_sof_remove(sdev);
+err_sof_probe:
+   snd_sof_remove_late(sdev);
+   sof_ops_free(sdev);

return ret;
}
--
2.44.0



✓ Fi.CI.IGT: success for drm/xe/display: check for error on drmm_mutex_init (rev3)

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

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

== Summary ==

CI Bug Log - changes from CI_DRM_14496_full -> Patchwork_131301v3_full


Summary
---

  **SUCCESS**

  No regressions found.

  

Participating hosts (10 -> 7)
--

  Missing(3): shard-snb shard-dg2 shard-glk 


Changes
---

  No changes found


Build changes
-

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_14496 -> Patchwork_131301v3
  * Piglit: None -> piglit_4509

  CI-20190529: 20190529
  CI_DRM_14496: 8d398ffc40ac37d1589214c28b69c651c1a20792 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7786: 1e4a3cd0a4bb3419fb70ed3e01259485b056dcfd @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_131301v3: 8d398ffc40ac37d1589214c28b69c651c1a20792 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

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


Re: [PATCH] drm/i915/display_debugfs: Remove check for crtc in force bigjoiner

2024-03-28 Thread Ville Syrjälä
On Thu, Mar 28, 2024 at 07:44:21PM +0530, Ankit Nautiyal wrote:
> At the moment, we allow force joiner debugs to work only for connector
> with status connected and a crtc attached to it.
> This creates a problem when we force bigjoiner and then pipe gets reset
> before the force bigjoiner is disabled.
> Relax the condition to check for crtc while exposing the debugfs.
> 
> Signed-off-by: Ankit Nautiyal 
> ---
>  drivers/gpu/drm/i915/display/intel_display_debugfs.c | 8 ++--
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c 
> b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index b99c024b0934..94bc9e0d30fe 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -1405,10 +1405,8 @@ out:   
> drm_modeset_unlock(>drm.mode_config.connection_mutex);
>  static int i915_bigjoiner_enable_show(struct seq_file *m, void *data)
>  {
>   struct intel_connector *connector = m->private;
> - struct drm_crtc *crtc;
>  
> - crtc = connector->base.state->crtc;
> - if (connector->base.status != connector_status_connected || !crtc)
> + if (connector->base.status != connector_status_connected)

Just remove all of it. It serves no purpose.

>   return -ENODEV;
>  
>   seq_printf(m, "Bigjoiner enable: %d\n", 
> connector->force_bigjoiner_enable);
> @@ -1443,12 +1441,10 @@ static ssize_t i915_bigjoiner_enable_write(struct 
> file *file,
>  {
>   struct seq_file *m = file->private_data;
>   struct intel_connector *connector = m->private;
> - struct drm_crtc *crtc;
>   bool bigjoiner_en = 0;
>   int ret;
>  
> - crtc = connector->base.state->crtc;
> - if (connector->base.status != connector_status_connected || !crtc)
> + if (connector->base.status != connector_status_connected)
>   return -ENODEV;
>  
>   ret = kstrtobool_from_user(ubuf, len, _en);
> -- 
> 2.40.1

-- 
Ville Syrjälä
Intel


[PATCH] ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path

2024-03-28 Thread Rodrigo Vivi
From: Chaitanya Kumar Borah 

In cases where the sof driver is unable to find the firmware and/or
topology file [1], it exits without releasing the i915 runtime
pm wakeref [2]. This results in dmesg warnings[3] during
suspend/resume or driver unbind. Add remove_late() to the failure path
of sof_init_environment so that i915 wakeref is released appropriately

[1]

[8.990366] sof-audio-pci-intel-mtl :00:1f.3: SOF firmware and/or 
topology file not found.
[8.990396] sof-audio-pci-intel-mtl :00:1f.3: Supported default profiles
[8.990398] sof-audio-pci-intel-mtl :00:1f.3: - ipc type 1 (Requested):
[8.990399] sof-audio-pci-intel-mtl :00:1f.3:  Firmware file: 
intel/sof-ipc4/mtl/sof-mtl.ri
[8.990401] sof-audio-pci-intel-mtl :00:1f.3:  Topology file: 
intel/sof-ace-tplg/sof-mtl-rt711-2ch.tplg
[8.990402] sof-audio-pci-intel-mtl :00:1f.3: Check if you have 
'sof-firmware' package installed.
[8.990403] sof-audio-pci-intel-mtl :00:1f.3: Optionally it can be 
manually downloaded from:
[8.990404] sof-audio-pci-intel-mtl :00:1f.3:
https://github.com/thesofproject/sof-bin/
[8.999088] sof-audio-pci-intel-mtl :00:1f.3: error: sof_probe_work 
failed err: -2

[2]

ref_tracker: :00:02.0@9b8511b6a378 has 1/5 users at
 track_intel_runtime_pm_wakeref.part.0+0x36/0x70 [i915]
 __intel_runtime_pm_get+0x51/0xb0 [i915]
 intel_runtime_pm_get+0x17/0x20 [i915]
 intel_display_power_get+0x2f/0x70 [i915]
 i915_audio_component_get_power+0x23/0x120 [i915]
 snd_hdac_display_power+0x89/0x130 [snd_hda_core]
 hda_codec_i915_init+0x3f/0x50 [snd_sof_intel_hda]
 hda_dsp_probe_early+0x170/0x250 [snd_sof_intel_hda_common]
 snd_sof_device_probe+0x224/0x320 [snd_sof]
 sof_pci_probe+0x15b/0x220 [snd_sof_pci]
 hda_pci_intel_probe+0x30/0x70 [snd_sof_intel_hda_common]
 local_pci_probe+0x4c/0xb0
 pci_device_probe+0xcc/0x250
 really_probe+0x18e/0x420
 __driver_probe_device+0x7e/0x170
 driver_probe_device+0x23/0xa0

[3]
[  484.105070] [ cut here ]
[  484.108238] thunderbolt :00:0d.2: PM: pci_pm_suspend_late+0x0/0x50 
returned 0 after 0 usecs
[  484.117106] i915 :00:02.0: i915 raw-wakerefs=1 wakelocks=1 on cleanup
[  484.792005] WARNING: CPU: 2 PID: 2405 at 
drivers/gpu/drm/i915/intel_runtime_pm.c:444 
intel_runtime_pm_driver_release+0x6c/0x80

Signed-off-by: Chaitanya Kumar Borah 
Tested-by: Rodrigo Vivi 
Reviewed-by: Rodrigo Vivi 
[This commit is still under review on the sof tree, but likely targeting 6.10
Adding to topic branch to unblock RPM in LNL VLK-56970]
Link: https://github.com/thesofproject/linux/pull/4878
References: https://gitlab.freedesktop.org/drm/intel/-/issues/10603
Signed-off-by: Rodrigo Vivi 
---
 sound/soc/sof/core.c | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c
index 425b023b03b4..3e41821562f0 100644
--- a/sound/soc/sof/core.c
+++ b/sound/soc/sof/core.c
@@ -339,8 +339,7 @@ static int sof_init_environment(struct snd_sof_dev *sdev)
ret = snd_sof_probe(sdev);
if (ret < 0) {
dev_err(sdev->dev, "failed to probe DSP %d\n", ret);
-   sof_ops_free(sdev);
-   return ret;
+   goto err_sof_probe;
}
 
/* check machine info */
@@ -358,15 +357,18 @@ static int sof_init_environment(struct snd_sof_dev *sdev)
ret = validate_sof_ops(sdev);
if (ret < 0) {
snd_sof_remove(sdev);
+   snd_sof_remove_late(sdev);
return ret;
}
}
 
+   return 0;
+
 err_machine_check:
-   if (ret) {
-   snd_sof_remove(sdev);
-   sof_ops_free(sdev);
-   }
+   snd_sof_remove(sdev);
+err_sof_probe:
+   snd_sof_remove_late(sdev);
+   sof_ops_free(sdev);
 
return ret;
 }
-- 
2.44.0



RE: [PATCH 00/13] drm/i915: Implemnt vblank sycnhronized mbus joining changes

2024-03-28 Thread Shankar, Uma


> -Original Message-
> From: Intel-gfx  On Behalf Of Ville
> Syrjala
> Sent: Wednesday, March 27, 2024 11:16 PM
> To: intel-gfx@lists.freedesktop.org
> Subject: [PATCH 00/13] drm/i915: Implemnt vblank sycnhronized mbus joining
> changes

Nit: Typo in implement and synchronized

> From: Ville Syrjälä 
> 
> Get rid of the full modeset requirement for changing mbus joining. Things got
> quite a bit more complicated than originally envisioned due to the dynamic
> cdclk/mdclk ratio.
> Sadly we have to do a fairly careful dance between the dbuf and cdclk code to
> make sure everything is programmed in the correct sequence.
> 
> Stan did the grunt work, but the sequence vs. cdclk updates was still not 
> right so I
> finished that part.
> I also reorganized the code quite a bit to make the resulting patches more 
> legible.
> And I tossed in more debugs and whatnot so we can actually observe what it's
> doing.
> 
> Quickly smoke tested on tgl and adl, and things seem pretty decent.
> Unfortunately I don't have a LNL on me right now so I haven't fully tested the
> mdclk/cdclk ratio changes on real hw, but I did hack my adl to pretend that 
> the
> ratio changes with cdclk and double checked that the logs look sensible for 
> all the
> combinations of cdclk increase/decrease and mbus join enable/disable.
> So should work (tm) on real hw too.

Reviewed the series and it looks good to me.

This is ready for merge.
Reviewed-by: Uma Shankar 

Regards,
Uma Shankar

> Stanislav Lisovskiy (3):
>   drm/i915: Loop over all active pipes in intel_mbus_dbox_update
>   drm/i915: Use old mbus_join value when increasing CDCLK
>   drm/i915: Implement vblank synchronized MBUS join changes
> 
> Ville Syrjälä (10):
>   drm/i915/cdclk: Fix CDCLK programming order when pipes are active
>   drm/i915/cdclk: Fix voltage_level programming edge case
>   drm/i915/cdclk: Drop tgl/dg2 cdclk bump hacks
>   drm/i915/cdclk: Indicate whether CDCLK change happens during pre or
> post plane update
>   drm/i915: Relocate intel_mbus_dbox_update()
>   drm/i915: Extract intel_dbuf_mbus_join_update()
>   drm/i915: Extract intel_dbuf_mdclk_min_tracker_update()
>   drm/i915: Add debugs for mbus joining and dbuf ratio programming
>   drm/i915: Use a plain old int for the cdclk/mdclk ratio
>   drm/i915: Optimize out redundant dbuf slice updates
> 
>  drivers/gpu/drm/i915/display/intel_cdclk.c   |  85 +++--
>  drivers/gpu/drm/i915/display/intel_cdclk.h   |   8 +-
>  drivers/gpu/drm/i915/display/intel_display.c |   5 +-
>  drivers/gpu/drm/i915/display/skl_watermark.c | 344 ---
>  drivers/gpu/drm/i915/display/skl_watermark.h |   9 +-
>  5 files changed, 271 insertions(+), 180 deletions(-)
> 
> --
> 2.43.2



✓ Fi.CI.IGT: success for drm/i915: Implemnt vblank sycnhronized mbus joining changes

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

Series: drm/i915: Implemnt vblank sycnhronized mbus joining changes
URL   : https://patchwork.freedesktop.org/series/131700/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14495_full -> Patchwork_131700v1_full


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (9 -> 7)
--

  Additional (1): shard-snb-0 
  Missing(3): shard-snb shard-dg2 shard-glk 


Changes
---

  No changes found


Build changes
-

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_14495 -> Patchwork_131700v1
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_14495: 07c774152cf8a034784b40978a77b5ee66e4779b @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7786: 1e4a3cd0a4bb3419fb70ed3e01259485b056dcfd @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_131700v1: 07c774152cf8a034784b40978a77b5ee66e4779b @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

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


RE: [PATCH 13/13] drm/i915: Optimize out redundant dbuf slice updates

2024-03-28 Thread Shankar, Uma


> -Original Message-
> From: Intel-gfx  On Behalf Of Ville
> Syrjala
> Sent: Wednesday, March 27, 2024 11:16 PM
> To: intel-gfx@lists.freedesktop.org
> Subject: [PATCH 13/13] drm/i915: Optimize out redundant dbuf slice updates
> 
> From: Ville Syrjälä 
> 
> if the new dbuf slices are a superset of the old dbuf slices then we don't 
> have to
> do anything in intel_dbuf_post_plane_update(). Restructure the code to skip 
> such
> redundant dbuf slice updates. The main benefit is slightly less confusing 
> logs.

Looks Good to me.
Reviewed-by: Uma Shankar 

> Signed-off-by: Ville Syrjälä 
> ---
>  drivers/gpu/drm/i915/display/skl_watermark.c | 27 +---
>  1 file changed, 18 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c
> b/drivers/gpu/drm/i915/display/skl_watermark.c
> index 1b48009efe2b..50ec51065118 100644
> --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> @@ -3788,16 +3788,20 @@ void intel_dbuf_pre_plane_update(struct
> intel_atomic_state *state)
>   intel_atomic_get_new_dbuf_state(state);
>   const struct intel_dbuf_state *old_dbuf_state =
>   intel_atomic_get_old_dbuf_state(state);
> + u8 old_slices, new_slices;
> 
> - if (!new_dbuf_state ||
> - new_dbuf_state->enabled_slices == old_dbuf_state->enabled_slices)
> + if (!new_dbuf_state)
> + return;
> +
> + old_slices = old_dbuf_state->enabled_slices;
> + new_slices = old_dbuf_state->enabled_slices |
> +new_dbuf_state->enabled_slices;
> +
> + if (old_slices == new_slices)
>   return;
> 
>   WARN_ON(!new_dbuf_state->base.changed);
> 
> - gen9_dbuf_slices_update(i915,
> - old_dbuf_state->enabled_slices |
> - new_dbuf_state->enabled_slices);
> + gen9_dbuf_slices_update(i915, new_slices);
>  }
> 
>  void intel_dbuf_post_plane_update(struct intel_atomic_state *state) @@ -
> 3807,15 +3811,20 @@ void intel_dbuf_post_plane_update(struct
> intel_atomic_state *state)
>   intel_atomic_get_new_dbuf_state(state);
>   const struct intel_dbuf_state *old_dbuf_state =
>   intel_atomic_get_old_dbuf_state(state);
> + u8 old_slices, new_slices;
> 
> - if (!new_dbuf_state ||
> - new_dbuf_state->enabled_slices == old_dbuf_state->enabled_slices)
> + if (!new_dbuf_state)
> + return;
> +
> + old_slices = old_dbuf_state->enabled_slices | new_dbuf_state-
> >enabled_slices;
> + new_slices = new_dbuf_state->enabled_slices;
> +
> + if (old_slices == new_slices)
>   return;
> 
>   WARN_ON(!new_dbuf_state->base.changed);
> 
> - gen9_dbuf_slices_update(i915,
> - new_dbuf_state->enabled_slices);
> + gen9_dbuf_slices_update(i915, new_slices);
>  }
> 
>  static int skl_watermark_ipc_status_show(struct seq_file *m, void *data)
> --
> 2.43.2



RE: [PATCH 12/13] drm/i915: Use a plain old int for the cdclk/mdclk ratio

2024-03-28 Thread Shankar, Uma


> -Original Message-
> From: Intel-gfx  On Behalf Of Ville
> Syrjala
> Sent: Wednesday, March 27, 2024 11:16 PM
> To: intel-gfx@lists.freedesktop.org
> Subject: [PATCH 12/13] drm/i915: Use a plain old int for the cdclk/mdclk ratio
> 
> From: Ville Syrjälä 
> 
> No point in throwing around u8 when we're dealing with just an integer. Use a
> plain old boring 'int'.

Looks Good to me.
Reviewed-by: Uma Shankar 

> Signed-off-by: Ville Syrjälä 
> ---
>  drivers/gpu/drm/i915/display/intel_cdclk.c   | 6 +++---
>  drivers/gpu/drm/i915/display/intel_cdclk.h   | 4 ++--
>  drivers/gpu/drm/i915/display/skl_watermark.c | 6 --
> drivers/gpu/drm/i915/display/skl_watermark.h | 6 --
>  4 files changed, 13 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c
> b/drivers/gpu/drm/i915/display/intel_cdclk.c
> index 66c161d7b485..5cba0d08189b 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> @@ -1893,8 +1893,8 @@ static u32 xe2lpd_mdclk_source_sel(struct
> drm_i915_private *i915)
>   return MDCLK_SOURCE_SEL_CD2XCLK;
>  }
> 
> -u8 intel_mdclk_cdclk_ratio(struct drm_i915_private *i915,
> -const struct intel_cdclk_config *cdclk_config)
> +int intel_mdclk_cdclk_ratio(struct drm_i915_private *i915,
> + const struct intel_cdclk_config *cdclk_config)
>  {
>   if (mdclk_source_is_cdclk_pll(i915))
>   return DIV_ROUND_UP(cdclk_config->vco, cdclk_config->cdclk);
> @@ -3321,7 +3321,7 @@ int intel_modeset_calc_cdclk(struct
> intel_atomic_state *state)
> 
>   if (intel_mdclk_cdclk_ratio(dev_priv, _cdclk_state->actual) !=
>   intel_mdclk_cdclk_ratio(dev_priv, _cdclk_state->actual)) {
> - u8 ratio = intel_mdclk_cdclk_ratio(dev_priv, _cdclk_state-
> >actual);
> + int ratio = intel_mdclk_cdclk_ratio(dev_priv,
> +_cdclk_state->actual);
> 
>   ret = intel_dbuf_state_set_mdclk_cdclk_ratio(state, ratio);
>   if (ret)
> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.h
> b/drivers/gpu/drm/i915/display/intel_cdclk.h
> index 5d4faf401774..cfdcdec07a4d 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.h
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.h
> @@ -67,8 +67,8 @@ void intel_update_cdclk(struct drm_i915_private
> *dev_priv);
>  u32 intel_read_rawclk(struct drm_i915_private *dev_priv);  bool
> intel_cdclk_clock_changed(const struct intel_cdclk_config *a,
>  const struct intel_cdclk_config *b);
> -u8 intel_mdclk_cdclk_ratio(struct drm_i915_private *i915,
> -const struct intel_cdclk_config *cdclk_config);
> +int intel_mdclk_cdclk_ratio(struct drm_i915_private *i915,
> + const struct intel_cdclk_config *cdclk_config);
>  bool intel_cdclk_is_decreasing_later(struct intel_atomic_state *state);  void
> intel_set_cdclk_pre_plane_update(struct intel_atomic_state *state);  void
> intel_set_cdclk_post_plane_update(struct intel_atomic_state *state); diff 
> --git
> a/drivers/gpu/drm/i915/display/skl_watermark.c
> b/drivers/gpu/drm/i915/display/skl_watermark.c
> index ca0f1f89e6d9..1b48009efe2b 100644
> --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> @@ -3616,7 +3616,8 @@ static void intel_mbus_dbox_update(struct
> intel_atomic_state *state)
>   }
>  }
> 
> -int intel_dbuf_state_set_mdclk_cdclk_ratio(struct intel_atomic_state *state, 
> u8
> ratio)
> +int intel_dbuf_state_set_mdclk_cdclk_ratio(struct intel_atomic_state *state,
> +int ratio)
>  {
>   struct intel_dbuf_state *dbuf_state;
> 
> @@ -3629,7 +3630,8 @@ int intel_dbuf_state_set_mdclk_cdclk_ratio(struct
> intel_atomic_state *state, u8
>   return intel_atomic_lock_global_state(_state->base);
>  }
> 
> -void intel_dbuf_mdclk_cdclk_ratio_update(struct drm_i915_private *i915, u8
> ratio, bool joined_mbus)
> +void intel_dbuf_mdclk_cdclk_ratio_update(struct drm_i915_private *i915,
> +  int ratio, bool joined_mbus)
>  {
>   enum dbuf_slice slice;
> 
> diff --git a/drivers/gpu/drm/i915/display/skl_watermark.h
> b/drivers/gpu/drm/i915/display/skl_watermark.h
> index 3323a1d973f9..ef1a008466be 100644
> --- a/drivers/gpu/drm/i915/display/skl_watermark.h
> +++ b/drivers/gpu/drm/i915/display/skl_watermark.h
> @@ -74,11 +74,13 @@ intel_atomic_get_dbuf_state(struct intel_atomic_state
> *state);
>   to_intel_dbuf_state(intel_atomic_get_new_global_obj_state(state,
> _i915(state->base.dev)->display.dbuf.obj))
> 
>  int intel_dbuf_init(struct drm_i915_private *i915); -int
> intel_dbuf_state_set_mdclk_cdclk_ratio(struct intel_atomic_state *state, u8
> ratio);
> +int intel_dbuf_state_set_mdclk_cdclk_ratio(struct intel_atomic_state *state,
> +int ratio);
> 
>  void intel_dbuf_pre_plane_update(struct 

RE: [PATCH 11/13] drm/i915: Implement vblank synchronized MBUS join changes

2024-03-28 Thread Shankar, Uma


> -Original Message-
> From: Intel-gfx  On Behalf Of Ville
> Syrjala
> Sent: Wednesday, March 27, 2024 11:16 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Ville Syrjälä 
> Subject: [PATCH 11/13] drm/i915: Implement vblank synchronized MBUS join
> changes
> 
> From: Stanislav Lisovskiy 
> 
> Currently we can't change MBUS join status without doing a modeset, because
> we are lacking mechanism to synchronize those with vblank.
> However then this means that we can't do a fastset, if there is a need to 
> change
> MBUS join state. Fix that by implementing such change.
> We already call correspondent check and update at pre_plane dbuf update, so 
> the
> only thing left is to have a non-modeset version of that.
> If active pipes stay the same then fastset is possible and only MBUS join
> state/ddb allocation updates would be committed.
> 
> The full mbus/cdclk sequence will look as follows:
> 1. disable pipes
> 2. increase cdclk if necessary
>  2.1 reprogram cdclk
>  2.2 update dbuf tracker value
> 3. enable mbus joining if necessary
>  3.1 update mbus_ctl
>  3.2 update dbuf tracker value
> 4. reallocate dbuf for planes on active pipes 5. disable mbus joining if 
> necessary
>  5.1 update dbuf tracker value
>  5.2 update mbus_ctl
> 6. enable pipes
> 7. decrease cdclk if necessary
>   7.1 update dbuf tracker value
>   7.2 reprogram cdclk
> 
> And in order to keep things in sync we need:
> Step 2:
> - mbus_join == old
> - mdclk/cdclk ratio == new
> Step 3:
> - mbus_join == new
> - mdclk/cdclk ratio == old when cdclk is changing in step 7
> - mdclk/cdclk ratio == new when cdclk is changing in step 2 Step 5:
> - mbus_join == new
> - mdclk/cdclk ratio == old when cdclk is changing in step 7
> - mdclk/cdclk ratio == new when cdclk is changing in step 2 Step 7:
> - mbus_join == new
> - mdclk/cdclk ratio == new
> 
> v2: - Removed redundant parentheses(Ville Syrjälä)
> - Constified new_crtc_state in intel_mbus_joined_pipe(Ville Syrjälä)
> - Removed pipe_select variable(Ville Syrjälä)
> [v3: vsyrjala: Correctly sequence vs. cdclk updates,
>properly describe the full sequence,
>  shuffle code around to make the diff more legible,
>  streamline a few things]

Looks Good to me.
Reviewed-by: Uma Shankar 

> Signed-off-by: Stanislav Lisovskiy 
> Co-developed-by: Ville Syrjälä 
> Signed-off-by: Ville Syrjälä 
> ---
>  drivers/gpu/drm/i915/display/intel_cdclk.c   |  11 ++
>  drivers/gpu/drm/i915/display/intel_cdclk.h   |   1 +
>  drivers/gpu/drm/i915/display/intel_display.c |   5 +-
>  drivers/gpu/drm/i915/display/skl_watermark.c | 141 ---
>  drivers/gpu/drm/i915/display/skl_watermark.h |   3 +-
>  5 files changed, 112 insertions(+), 49 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c
> b/drivers/gpu/drm/i915/display/intel_cdclk.c
> index 4024118a7ffb..66c161d7b485 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> @@ -2576,6 +2576,17 @@ static void intel_cdclk_pcode_post_notify(struct
> intel_atomic_state *state)
>  update_cdclk, update_pipe_count);  }
> 
> +bool intel_cdclk_is_decreasing_later(struct intel_atomic_state *state)
> +{
> + const struct intel_cdclk_state *old_cdclk_state =
> + intel_atomic_get_old_cdclk_state(state);
> + const struct intel_cdclk_state *new_cdclk_state =
> + intel_atomic_get_new_cdclk_state(state);
> +
> + return new_cdclk_state && !new_cdclk_state->disable_pipes &&
> + new_cdclk_state->actual.cdclk < old_cdclk_state->actual.cdclk;
> }
> +
>  /**
>   * intel_set_cdclk_pre_plane_update - Push the CDCLK state to the hardware
>   * @state: intel atomic state
> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.h
> b/drivers/gpu/drm/i915/display/intel_cdclk.h
> index 2843fc091086..5d4faf401774 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.h
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.h
> @@ -69,6 +69,7 @@ bool intel_cdclk_clock_changed(const struct
> intel_cdclk_config *a,
>  const struct intel_cdclk_config *b);
>  u8 intel_mdclk_cdclk_ratio(struct drm_i915_private *i915,
>  const struct intel_cdclk_config *cdclk_config);
> +bool intel_cdclk_is_decreasing_later(struct intel_atomic_state *state);
>  void intel_set_cdclk_pre_plane_update(struct intel_atomic_state *state);  
> void
> intel_set_cdclk_post_plane_update(struct intel_atomic_state *state);  void
> intel_cdclk_dump_config(struct drm_i915_private *i915, diff --git
> a/drivers/gpu/drm/i915/display/intel_display.c
> b/drivers/gpu/drm/i915/display/intel_display.c
> index 4d6668a5f1ab..023cf4a77e6f 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -6915,6 +6915,8 @@ static void skl_commit_modeset_enables(struct
> intel_atomic_state *state)
>   intel_pre_update_crtc(state, 

✓ Fi.CI.BAT: success for drm/i915: Implemnt vblank sycnhronized mbus joining changes

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

Series: drm/i915: Implemnt vblank sycnhronized mbus joining changes
URL   : https://patchwork.freedesktop.org/series/131700/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14495 -> Patchwork_131700v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (38 -> 36)
--

  Additional (1): fi-kbl-8809g 
  Missing(3): bat-arls-4 fi-glk-j4005 fi-snb-2520m 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@kms_force_connector_basic@force-edid:
- bat-dg2-8:  [PASS][1] -> [INCOMPLETE][2] ([i915#10419])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-dg2-8/igt@kms_force_connector_ba...@force-edid.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/bat-dg2-8/igt@kms_force_connector_ba...@force-edid.html

  * igt@runner@aborted:
- fi-kbl-8809g:   NOTRUN -> [FAIL][3] ([i915#4991])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/fi-kbl-8809g/igt@run...@aborted.html

  
 Possible fixes 

  * igt@dmabuf@all-tests@dma_fence:
- bat-arls-3: [DMESG-FAIL][4] ([i915#10602]) -> [PASS][5]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-arls-3/igt@dmabuf@all-tests@dma_fence.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/bat-arls-3/igt@dmabuf@all-tests@dma_fence.html

  * igt@dmabuf@all-tests@sanitycheck:
- bat-arls-3: [ABORT][6] ([i915#10601]) -> [PASS][7]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-arls-3/igt@dmabuf@all-te...@sanitycheck.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/bat-arls-3/igt@dmabuf@all-te...@sanitycheck.html

  * igt@gem_lmem_swapping@basic@lmem0:
- bat-dg2-14: [FAIL][8] ([i915#10378]) -> [PASS][9]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-dg2-14/igt@gem_lmem_swapping@ba...@lmem0.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/bat-dg2-14/igt@gem_lmem_swapping@ba...@lmem0.html

  * igt@i915_pm_rpm@module-reload:
- {bat-mtlp-9}:   [WARN][10] ([i915#10436]) -> [PASS][11]
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-mtlp-9/igt@i915_pm_...@module-reload.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/bat-mtlp-9/igt@i915_pm_...@module-reload.html

  * igt@i915_selftest@live@coherency:
- bat-dg2-9:  [ABORT][12] ([i915#10366]) -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-dg2-9/igt@i915_selftest@l...@coherency.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/bat-dg2-9/igt@i915_selftest@l...@coherency.html

  * igt@i915_selftest@live@hangcheck:
- bat-mtlp-8: [DMESG-FAIL][14] ([i915#9840]) -> [PASS][15]
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-mtlp-8/igt@i915_selftest@l...@hangcheck.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/bat-mtlp-8/igt@i915_selftest@l...@hangcheck.html
- bat-rpls-3: [DMESG-WARN][16] ([i915#5591]) -> [PASS][17]
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-rpls-3/igt@i915_selftest@l...@hangcheck.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/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#10366]: https://gitlab.freedesktop.org/drm/intel/issues/10366
  [i915#10378]: https://gitlab.freedesktop.org/drm/intel/issues/10378
  [i915#10419]: https://gitlab.freedesktop.org/drm/intel/issues/10419
  [i915#10436]: https://gitlab.freedesktop.org/drm/intel/issues/10436
  [i915#10601]: https://gitlab.freedesktop.org/drm/intel/issues/10601
  [i915#10602]: https://gitlab.freedesktop.org/drm/intel/issues/10602
  [i915#4991]: https://gitlab.freedesktop.org/drm/intel/issues/4991
  [i915#5591]: https://gitlab.freedesktop.org/drm/intel/issues/5591
  [i915#9840]: https://gitlab.freedesktop.org/drm/intel/issues/9840


Build changes
-

  * Linux: CI_DRM_14495 -> Patchwork_131700v1

  CI-20190529: 20190529
  CI_DRM_14495: 07c774152cf8a034784b40978a77b5ee66e4779b @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7786: 1e4a3cd0a4bb3419fb70ed3e01259485b056dcfd @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_131700v1: 07c774152cf8a034784b40978a77b5ee66e4779b @ 
git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

45360b754e0c drm/i915: Optimize out redundant dbuf slice updates
5b77718cde22 drm/i915: Use a plain old int for the cdclk/mdclk ratio

✓ Fi.CI.BAT: success for drm/i915/gt: Limit the reserved VM space to only the platforms that need it

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

Series: drm/i915/gt: Limit the reserved VM space to only the platforms that 
need it
URL   : https://patchwork.freedesktop.org/series/131707/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14495 -> Patchwork_131707v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (38 -> 36)
--

  Additional (1): bat-atsm-1 
  Missing(3): bat-kbl-2 fi-bsw-nick fi-snb-2520m 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_huc_copy@huc-copy:
- bat-atsm-1: NOTRUN -> [FAIL][1] ([i915#10563])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/bat-atsm-1/igt@gem_huc_c...@huc-copy.html

  * igt@gem_mmap@basic:
- bat-atsm-1: NOTRUN -> [SKIP][2] ([i915#4083])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/bat-atsm-1/igt@gem_m...@basic.html

  * igt@gem_tiled_pread_basic:
- bat-atsm-1: NOTRUN -> [SKIP][3] ([i915#4079]) +1 other test skip
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/bat-atsm-1/igt@gem_tiled_pread_basic.html

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

  * igt@i915_selftest@live@gem:
- bat-atsm-1: NOTRUN -> [ABORT][5] ([i915#10564])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/bat-atsm-1/igt@i915_selftest@l...@gem.html

  * igt@kms_addfb_basic@size-max:
- bat-atsm-1: NOTRUN -> [SKIP][6] ([i915#6077]) +37 other tests skip
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/bat-atsm-1/igt@kms_addfb_ba...@size-max.html

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- bat-atsm-1: NOTRUN -> [SKIP][7] ([i915#6078]) +22 other tests skip
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/bat-atsm-1/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html

  * igt@kms_force_connector_basic@force-edid:
- bat-dg2-8:  [PASS][8] -> [INCOMPLETE][9] ([i915#10419])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-dg2-8/igt@kms_force_connector_ba...@force-edid.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/bat-dg2-8/igt@kms_force_connector_ba...@force-edid.html

  * igt@kms_force_connector_basic@prune-stale-modes:
- bat-atsm-1: NOTRUN -> [SKIP][10] ([i915#6093]) +4 other tests skip
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/bat-atsm-1/igt@kms_force_connector_ba...@prune-stale-modes.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-xr24:
- bat-atsm-1: NOTRUN -> [SKIP][11] ([i915#1836]) +6 other tests skip
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/bat-atsm-1/igt@kms_pipe_crc_ba...@compare-crc-sanitycheck-xr24.html

  * igt@kms_prop_blob@basic:
- bat-atsm-1: NOTRUN -> [SKIP][12] ([i915#7357])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/bat-atsm-1/igt@kms_prop_b...@basic.html

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

  * igt@prime_vgem@basic-fence-mmap:
- bat-atsm-1: NOTRUN -> [SKIP][14] ([i915#4077]) +4 other tests skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/bat-atsm-1/igt@prime_v...@basic-fence-mmap.html

  * igt@prime_vgem@basic-write:
- bat-atsm-1: NOTRUN -> [SKIP][15] +2 other tests skip
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/bat-atsm-1/igt@prime_v...@basic-write.html

  
 Possible fixes 

  * igt@dmabuf@all-tests@dma_fence:
- bat-arls-3: [DMESG-FAIL][16] ([i915#10602]) -> [PASS][17]
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-arls-3/igt@dmabuf@all-tests@dma_fence.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/bat-arls-3/igt@dmabuf@all-tests@dma_fence.html

  * igt@dmabuf@all-tests@sanitycheck:
- bat-arls-3: [ABORT][18] ([i915#10601]) -> [PASS][19]
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-arls-3/igt@dmabuf@all-te...@sanitycheck.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131707v1/bat-arls-3/igt@dmabuf@all-te...@sanitycheck.html

  * igt@gem_lmem_swapping@basic@lmem0:
- bat-dg2-14: [FAIL][20] ([i915#10378]) -> [PASS][21]
   [20]: 

✓ Fi.CI.BAT: success for drm/i915: A few bigjoiner fixes

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

Series: drm/i915: A few bigjoiner fixes
URL   : https://patchwork.freedesktop.org/series/131711/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14495 -> Patchwork_131711v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (38 -> 36)
--

  Additional (1): bat-atsm-1 
  Missing(3): fi-glk-j4005 fi-bsw-nick fi-snb-2520m 

Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- bat-arls-3: [PASS][1] -> [FAIL][2] ([i915#10234])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-arls-3/boot.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-arls-3/boot.html
- bat-dg2-11: [PASS][3] -> [FAIL][4] ([i915#10491])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-dg2-11/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-dg2-11/boot.html

  

### IGT changes ###

 Issues hit 

  * igt@gem_huc_copy@huc-copy:
- bat-atsm-1: NOTRUN -> [FAIL][5] ([i915#10563])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-atsm-1/igt@gem_huc_c...@huc-copy.html

  * igt@gem_mmap@basic:
- bat-atsm-1: NOTRUN -> [SKIP][6] ([i915#4083])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-atsm-1/igt@gem_m...@basic.html

  * igt@gem_tiled_pread_basic:
- bat-atsm-1: NOTRUN -> [SKIP][7] ([i915#4079]) +1 other test skip
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-atsm-1/igt@gem_tiled_pread_basic.html

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

  * igt@i915_selftest@live@gem:
- bat-atsm-1: NOTRUN -> [ABORT][9] ([i915#10564])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-atsm-1/igt@i915_selftest@l...@gem.html

  * igt@kms_addfb_basic@size-max:
- bat-atsm-1: NOTRUN -> [SKIP][10] ([i915#6077]) +37 other tests 
skip
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-atsm-1/igt@kms_addfb_ba...@size-max.html

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- bat-atsm-1: NOTRUN -> [SKIP][11] ([i915#6078]) +22 other tests 
skip
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-atsm-1/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html

  * igt@kms_force_connector_basic@prune-stale-modes:
- bat-atsm-1: NOTRUN -> [SKIP][12] ([i915#6093]) +4 other tests skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-atsm-1/igt@kms_force_connector_ba...@prune-stale-modes.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-xr24:
- bat-atsm-1: NOTRUN -> [SKIP][13] ([i915#1836]) +6 other tests skip
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-atsm-1/igt@kms_pipe_crc_ba...@compare-crc-sanitycheck-xr24.html

  * igt@kms_prop_blob@basic:
- bat-atsm-1: NOTRUN -> [SKIP][14] ([i915#7357])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-atsm-1/igt@kms_prop_b...@basic.html

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

  * igt@prime_vgem@basic-fence-mmap:
- bat-atsm-1: NOTRUN -> [SKIP][16] ([i915#4077]) +4 other tests skip
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-atsm-1/igt@prime_v...@basic-fence-mmap.html

  * igt@prime_vgem@basic-write:
- bat-atsm-1: NOTRUN -> [SKIP][17] +2 other tests skip
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-atsm-1/igt@prime_v...@basic-write.html

  
 Possible fixes 

  * igt@gem_lmem_swapping@basic@lmem0:
- bat-dg2-14: [FAIL][18] ([i915#10378]) -> [PASS][19]
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-dg2-14/igt@gem_lmem_swapping@ba...@lmem0.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-dg2-14/igt@gem_lmem_swapping@ba...@lmem0.html

  * igt@i915_selftest@live@coherency:
- bat-dg2-9:  [ABORT][20] ([i915#10366]) -> [PASS][21]
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-dg2-9/igt@i915_selftest@l...@coherency.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131711v1/bat-dg2-9/igt@i915_selftest@l...@coherency.html

  * igt@i915_selftest@live@hangcheck:
- bat-mtlp-8: 

✗ Fi.CI.BAT: failure for drm/i915/panelreplay: Panel replay workaround with VRR (rev4)

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

Series: drm/i915/panelreplay: Panel replay workaround with VRR (rev4)
URL   : https://patchwork.freedesktop.org/series/129632/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14495 -> Patchwork_129632v4


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_129632v4 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_129632v4, 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_129632v4/index.html

Participating hosts (38 -> 39)
--

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

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

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

  * igt@i915_selftest@live@gt_timelines:
- bat-arls-1: [PASS][3] -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-arls-1/igt@i915_selftest@live@gt_timelines.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129632v4/bat-arls-1/igt@i915_selftest@live@gt_timelines.html

  
Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- bat-dg2-11: [PASS][5] -> [FAIL][6] ([i915#10491])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-dg2-11/boot.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129632v4/bat-dg2-11/boot.html

  

### IGT changes ###

 Issues hit 

  * igt@gem_huc_copy@huc-copy:
- bat-atsm-1: NOTRUN -> [FAIL][7] ([i915#10563])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129632v4/bat-atsm-1/igt@gem_huc_c...@huc-copy.html

  * igt@gem_mmap@basic:
- bat-atsm-1: NOTRUN -> [SKIP][8] ([i915#4083])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129632v4/bat-atsm-1/igt@gem_m...@basic.html

  * igt@gem_tiled_pread_basic:
- bat-atsm-1: NOTRUN -> [SKIP][9] ([i915#4079]) +1 other test skip
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129632v4/bat-atsm-1/igt@gem_tiled_pread_basic.html

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

  * igt@i915_selftest@live@gem:
- bat-atsm-1: NOTRUN -> [ABORT][11] ([i915#10564])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129632v4/bat-atsm-1/igt@i915_selftest@l...@gem.html

  * igt@kms_addfb_basic@size-max:
- bat-atsm-1: NOTRUN -> [SKIP][12] ([i915#6077]) +37 other tests 
skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129632v4/bat-atsm-1/igt@kms_addfb_ba...@size-max.html

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- bat-atsm-1: NOTRUN -> [SKIP][13] ([i915#6078]) +22 other tests 
skip
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129632v4/bat-atsm-1/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html

  * igt@kms_force_connector_basic@prune-stale-modes:
- bat-atsm-1: NOTRUN -> [SKIP][14] ([i915#6093]) +4 other tests skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129632v4/bat-atsm-1/igt@kms_force_connector_ba...@prune-stale-modes.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-xr24:
- bat-atsm-1: NOTRUN -> [SKIP][15] ([i915#1836]) +6 other tests skip
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129632v4/bat-atsm-1/igt@kms_pipe_crc_ba...@compare-crc-sanitycheck-xr24.html

  * igt@kms_prop_blob@basic:
- bat-atsm-1: NOTRUN -> [SKIP][16] ([i915#7357])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129632v4/bat-atsm-1/igt@kms_prop_b...@basic.html

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

  * igt@prime_vgem@basic-fence-mmap:
- bat-atsm-1: NOTRUN -> [SKIP][18] ([i915#4077]) +4 other tests skip
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129632v4/bat-atsm-1/igt@prime_v...@basic-fence-mmap.html

  * igt@prime_vgem@basic-write:
   

✓ Fi.CI.BAT: success for drm/i915/gem: Replace dev_priv with i915

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

Series: drm/i915/gem: Replace dev_priv with i915
URL   : https://patchwork.freedesktop.org/series/131736/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14495 -> Patchwork_131736v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (38 -> 37)
--

  Additional (3): fi-blb-e6850 bat-atsm-1 fi-kbl-8809g 
  Missing(4): fi-glk-j4005 bat-kbl-2 fi-bsw-nick fi-snb-2520m 

Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- bat-arls-3: [PASS][1] -> [FAIL][2] ([i915#10234])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-arls-3/boot.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/bat-arls-3/boot.html
- bat-jsl-1:  [PASS][3] -> [FAIL][4] ([i915#8293])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-jsl-1/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/bat-jsl-1/boot.html

  

### IGT changes ###

 Issues hit 

  * igt@dmabuf@all-tests@dma_fence_chain:
- bat-adlp-6: [PASS][5] -> [INCOMPLETE][6] ([i915#10600])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-adlp-6/igt@dmabuf@all-tests@dma_fence_chain.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/bat-adlp-6/igt@dmabuf@all-tests@dma_fence_chain.html

  * igt@gem_huc_copy@huc-copy:
- bat-atsm-1: NOTRUN -> [FAIL][7] ([i915#10563])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/bat-atsm-1/igt@gem_huc_c...@huc-copy.html

  * igt@gem_mmap@basic:
- bat-atsm-1: NOTRUN -> [SKIP][8] ([i915#4083])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/bat-atsm-1/igt@gem_m...@basic.html

  * igt@gem_tiled_pread_basic:
- bat-atsm-1: NOTRUN -> [SKIP][9] ([i915#4079]) +1 other test skip
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/bat-atsm-1/igt@gem_tiled_pread_basic.html

  * igt@i915_pm_rpm@module-reload:
- fi-blb-e6850:   NOTRUN -> [SKIP][10] +32 other tests skip
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/fi-blb-e6850/igt@i915_pm_...@module-reload.html

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

  * igt@i915_selftest@live@gem:
- bat-atsm-1: NOTRUN -> [ABORT][12] ([i915#10564])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/bat-atsm-1/igt@i915_selftest@l...@gem.html

  * igt@i915_selftest@live@gt_lrc:
- bat-dg2-9:  [PASS][13] -> [ABORT][14] ([i915#10366])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-dg2-9/igt@i915_selftest@live@gt_lrc.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/bat-dg2-9/igt@i915_selftest@live@gt_lrc.html

  * igt@kms_addfb_basic@size-max:
- bat-atsm-1: NOTRUN -> [SKIP][15] ([i915#6077]) +37 other tests 
skip
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/bat-atsm-1/igt@kms_addfb_ba...@size-max.html

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- bat-atsm-1: NOTRUN -> [SKIP][16] ([i915#6078]) +22 other tests 
skip
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/bat-atsm-1/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html

  * igt@kms_force_connector_basic@prune-stale-modes:
- bat-atsm-1: NOTRUN -> [SKIP][17] ([i915#6093]) +4 other tests skip
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/bat-atsm-1/igt@kms_force_connector_ba...@prune-stale-modes.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-xr24:
- bat-atsm-1: NOTRUN -> [SKIP][18] ([i915#1836]) +6 other tests skip
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/bat-atsm-1/igt@kms_pipe_crc_ba...@compare-crc-sanitycheck-xr24.html

  * igt@kms_prop_blob@basic:
- bat-atsm-1: NOTRUN -> [SKIP][19] ([i915#7357])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/bat-atsm-1/igt@kms_prop_b...@basic.html

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

  * igt@prime_vgem@basic-fence-mmap:
- bat-atsm-1: NOTRUN -> [SKIP][21] ([i915#4077]) +4 other tests skip
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131736v1/bat-atsm-1/igt@prime_v...@basic-fence-mmap.html

  * igt@prime_vgem@basic-write:
- bat-atsm-1: 

✗ Fi.CI.BAT: failure for Disable automatic load CCS load balancing (rev13)

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

Series: Disable automatic load CCS load balancing (rev13)
URL   : https://patchwork.freedesktop.org/series/129951/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14496 -> Patchwork_129951v13


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_129951v13 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_129951v13, 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_129951v13/index.html

Participating hosts (38 -> 37)
--

  Additional (2): bat-mtlp-8 bat-jsl-1 
  Missing(3): fi-glk-j4005 fi-bsw-nick fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@kms_force_connector_basic@force-edid:
- bat-dg2-9:  [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14496/bat-dg2-9/igt@kms_force_connector_ba...@force-edid.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v13/bat-dg2-9/igt@kms_force_connector_ba...@force-edid.html

  
Known issues


  Here are the changes found in Patchwork_129951v13 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_14496/bat-arls-3/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v13/bat-arls-3/boot.html

  
 Possible fixes 

  * boot:
- bat-dg2-11: [FAIL][5] ([i915#10491]) -> [PASS][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14496/bat-dg2-11/boot.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v13/bat-dg2-11/boot.html
- fi-kbl-8809g:   [FAIL][7] ([i915#8293]) -> [PASS][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14496/fi-kbl-8809g/boot.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v13/fi-kbl-8809g/boot.html

  

### IGT changes ###

 Issues hit 

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

  * igt@gem_huc_copy@huc-copy:
- bat-jsl-1:  NOTRUN -> [SKIP][11] ([i915#2190])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v13/bat-jsl-1/igt@gem_huc_c...@huc-copy.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_129951v13/bat-adlm-1/igt@gem_lmem_swapp...@parallel-random-engines.html

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

  * igt@gem_mmap@basic:
- bat-dg2-11: NOTRUN -> [SKIP][15] ([i915#4083])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v13/bat-dg2-11/igt@gem_m...@basic.html
- bat-mtlp-8: NOTRUN -> [SKIP][16] ([i915#4083])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v13/bat-mtlp-8/igt@gem_m...@basic.html

  * igt@gem_mmap_gtt@basic:
- bat-mtlp-8: NOTRUN -> [SKIP][17] ([i915#4077]) +2 other tests skip
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v13/bat-mtlp-8/igt@gem_mmap_...@basic.html

  * igt@gem_render_tiled_blits@basic:
- bat-mtlp-8: NOTRUN -> [SKIP][18] ([i915#4079]) +1 other test skip
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v13/bat-mtlp-8/igt@gem_render_tiled_bl...@basic.html

  * igt@gem_tiled_fence_blits@basic:
- bat-dg2-11: NOTRUN -> [SKIP][19] ([i915#4077]) +2 other tests skip
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129951v13/bat-dg2-11/igt@gem_tiled_fence_bl...@basic.html

  * igt@gem_tiled_pread_basic:
- bat-dg2-11: NOTRUN -> [SKIP][20] ([i915#4079]) +1 other test skip
   [20]: 

✓ Fi.CI.BAT: success for drm/xe/display: check for error on drmm_mutex_init (rev3)

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

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

== Summary ==

CI Bug Log - changes from CI_DRM_14496 -> Patchwork_131301v3


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (38 -> 36)
--

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

Possible new issues
---

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

### IGT changes ###

 Suppressed 

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

  * igt@i915_selftest@live@hangcheck:
- {bat-arls-4}:   [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14496/bat-arls-4/igt@i915_selftest@l...@hangcheck.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/bat-arls-4/igt@i915_selftest@l...@hangcheck.html

  
Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- fi-tgl-1115g4:  [PASS][3] -> [FAIL][4] ([i915#8293])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14496/fi-tgl-1115g4/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/fi-tgl-1115g4/boot.html

  
 Possible fixes 

  * boot:
- bat-dg2-11: [FAIL][5] ([i915#10491]) -> [PASS][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14496/bat-dg2-11/boot.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/bat-dg2-11/boot.html
- fi-kbl-8809g:   [FAIL][7] ([i915#8293]) -> [PASS][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14496/fi-kbl-8809g/boot.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/fi-kbl-8809g/boot.html

  

### IGT changes ###

 Issues hit 

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

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

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

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

  * igt@gem_mmap@basic:
- bat-dg2-11: NOTRUN -> [SKIP][13] ([i915#4083])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/bat-dg2-11/igt@gem_m...@basic.html

  * igt@gem_tiled_fence_blits@basic:
- bat-dg2-11: NOTRUN -> [SKIP][14] ([i915#4077]) +2 other tests skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/bat-dg2-11/igt@gem_tiled_fence_bl...@basic.html

  * igt@gem_tiled_pread_basic:
- bat-dg2-11: NOTRUN -> [SKIP][15] ([i915#4079]) +1 other test skip
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/bat-dg2-11/igt@gem_tiled_pread_basic.html

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

  * igt@kms_addfb_basic@addfb25-x-tiled-mismatch-legacy:
- bat-dg2-11: NOTRUN -> [SKIP][18] ([i915#4212]) +7 other tests skip
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/bat-dg2-11/igt@kms_addfb_ba...@addfb25-x-tiled-mismatch-legacy.html

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-dg2-11: NOTRUN -> [SKIP][19] ([i915#5190])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/bat-dg2-11/igt@kms_addfb_ba...@addfb25-y-tiled-small-legacy.html

  * igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg2-11: NOTRUN -> [SKIP][20] ([i915#4215] / [i915#5190])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131301v3/bat-dg2-11/igt@kms_addfb_ba...@basic-y-tiled-legacy.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- bat-dg2-11: NOTRUN -> 

✓ Fi.CI.BAT: success for drm/i915: Implemnt vblank sycnhronized mbus joining changes

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

Series: drm/i915: Implemnt vblank sycnhronized mbus joining changes
URL   : https://patchwork.freedesktop.org/series/131700/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14495 -> Patchwork_131700v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (38 -> 36)
--

  Additional (1): fi-kbl-8809g 
  Missing(3): bat-arls-4 fi-glk-j4005 fi-snb-2520m 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@kms_force_connector_basic@force-edid:
- bat-dg2-8:  [PASS][1] -> [INCOMPLETE][2] ([i915#10419])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-dg2-8/igt@kms_force_connector_ba...@force-edid.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/bat-dg2-8/igt@kms_force_connector_ba...@force-edid.html

  * igt@runner@aborted:
- fi-kbl-8809g:   NOTRUN -> [FAIL][3] ([i915#4991])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/fi-kbl-8809g/igt@run...@aborted.html

  
 Possible fixes 

  * igt@dmabuf@all-tests@dma_fence:
- bat-arls-3: [DMESG-FAIL][4] -> [PASS][5]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-arls-3/igt@dmabuf@all-tests@dma_fence.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/bat-arls-3/igt@dmabuf@all-tests@dma_fence.html

  * igt@dmabuf@all-tests@sanitycheck:
- bat-arls-3: [ABORT][6] -> [PASS][7]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-arls-3/igt@dmabuf@all-te...@sanitycheck.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/bat-arls-3/igt@dmabuf@all-te...@sanitycheck.html

  * igt@gem_lmem_swapping@basic@lmem0:
- bat-dg2-14: [FAIL][8] ([i915#10378]) -> [PASS][9]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-dg2-14/igt@gem_lmem_swapping@ba...@lmem0.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/bat-dg2-14/igt@gem_lmem_swapping@ba...@lmem0.html

  * igt@i915_pm_rpm@module-reload:
- {bat-mtlp-9}:   [WARN][10] ([i915#10436]) -> [PASS][11]
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-mtlp-9/igt@i915_pm_...@module-reload.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/bat-mtlp-9/igt@i915_pm_...@module-reload.html

  * igt@i915_selftest@live@coherency:
- bat-dg2-9:  [ABORT][12] ([i915#10366]) -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-dg2-9/igt@i915_selftest@l...@coherency.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/bat-dg2-9/igt@i915_selftest@l...@coherency.html

  * igt@i915_selftest@live@hangcheck:
- bat-mtlp-8: [DMESG-FAIL][14] -> [PASS][15]
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-mtlp-8/igt@i915_selftest@l...@hangcheck.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/bat-mtlp-8/igt@i915_selftest@l...@hangcheck.html
- bat-rpls-3: [DMESG-WARN][16] ([i915#5591]) -> [PASS][17]
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14495/bat-rpls-3/igt@i915_selftest@l...@hangcheck.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v1/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#10366]: https://gitlab.freedesktop.org/drm/intel/issues/10366
  [i915#10378]: https://gitlab.freedesktop.org/drm/intel/issues/10378
  [i915#10419]: https://gitlab.freedesktop.org/drm/intel/issues/10419
  [i915#10436]: https://gitlab.freedesktop.org/drm/intel/issues/10436
  [i915#4991]: https://gitlab.freedesktop.org/drm/intel/issues/4991
  [i915#5591]: https://gitlab.freedesktop.org/drm/intel/issues/5591


Build changes
-

  * Linux: CI_DRM_14495 -> Patchwork_131700v1

  CI-20190529: 20190529
  CI_DRM_14495: 07c774152cf8a034784b40978a77b5ee66e4779b @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7786: 1e4a3cd0a4bb3419fb70ed3e01259485b056dcfd @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_131700v1: 07c774152cf8a034784b40978a77b5ee66e4779b @ 
git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

45360b754e0c drm/i915: Optimize out redundant dbuf slice updates
5b77718cde22 drm/i915: Use a plain old int for the cdclk/mdclk ratio
20e24ebfb8f0 drm/i915: Implement vblank synchronized MBUS join changes
998a8d1a3fe6 drm/i915: Use old mbus_join value when increasing CDCLK
5bd07eef2032 drm/i915: Add debugs for mbus joining and dbuf ratio programming
ea274a22cf64 drm/i915: Extract 

RE: [PATCH] drm/i915/display_debugfs: Remove check for crtc in force bigjoiner

2024-03-28 Thread Joshi, Kunal1
Tested-by: Kunal Joshi 


[PATCH] drm/i915/display_debugfs: Remove check for crtc in force bigjoiner

2024-03-28 Thread Ankit Nautiyal
At the moment, we allow force joiner debugs to work only for connector
with status connected and a crtc attached to it.
This creates a problem when we force bigjoiner and then pipe gets reset
before the force bigjoiner is disabled.
Relax the condition to check for crtc while exposing the debugfs.

Signed-off-by: Ankit Nautiyal 
---
 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c 
b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index b99c024b0934..94bc9e0d30fe 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -1405,10 +1405,8 @@ out: 
drm_modeset_unlock(>drm.mode_config.connection_mutex);
 static int i915_bigjoiner_enable_show(struct seq_file *m, void *data)
 {
struct intel_connector *connector = m->private;
-   struct drm_crtc *crtc;
 
-   crtc = connector->base.state->crtc;
-   if (connector->base.status != connector_status_connected || !crtc)
+   if (connector->base.status != connector_status_connected)
return -ENODEV;
 
seq_printf(m, "Bigjoiner enable: %d\n", 
connector->force_bigjoiner_enable);
@@ -1443,12 +1441,10 @@ static ssize_t i915_bigjoiner_enable_write(struct file 
*file,
 {
struct seq_file *m = file->private_data;
struct intel_connector *connector = m->private;
-   struct drm_crtc *crtc;
bool bigjoiner_en = 0;
int ret;
 
-   crtc = connector->base.state->crtc;
-   if (connector->base.status != connector_status_connected || !crtc)
+   if (connector->base.status != connector_status_connected)
return -ENODEV;
 
ret = kstrtobool_from_user(ubuf, len, _en);
-- 
2.40.1



[PATCH v6 5/5] drm/i915/psr: Do not write ALPM configuration for PSR1 or DP2.0 Panel Replay

2024-03-28 Thread Jouni Högander
No need to write ALPM configuration for DP2.0 Panel Replay or PSR1.

Signed-off-by: Jouni Högander 
Reviewed-by: Animesh Manna 
---
 drivers/gpu/drm/i915/display/intel_psr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c 
b/drivers/gpu/drm/i915/display/intel_psr.c
index 345493c85322..eef62983e9db 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1723,7 +1723,8 @@ static void lnl_alpm_configure(struct intel_dp *intel_dp)
struct intel_psr *psr = _dp->psr;
u32 alpm_ctl;
 
-   if (DISPLAY_VER(dev_priv) < 20)
+   if (DISPLAY_VER(dev_priv) < 20 || (!intel_dp->psr.psr2_enabled &&
+  !intel_dp_is_edp(intel_dp)))
return;
 
/*
-- 
2.34.1



[PATCH v6 4/5] drm/i915/psr: Enable ALPM on source side for eDP Panel replay

2024-03-28 Thread Jouni Högander
Enable ALPM AUX-Less on source side for Panel Replay eDP. Also write all
calculated AUX-Less configuration values accordingly. Enabling it on sink
side is in upcoming patch.

Bspec: 71477

v5:
  - mention enable is only on source side in commit message
v4:
  - add comment explaining why AUX less is enabled on eDP panel replay
without any extra checks
v3:
  - do not use alpm_ctl as uninitialized variable
v2:
  - do not set AUX-Wake related bits for AUX-Less case
  - drop switch to active latency
  - add SLEEP_HOLD_TIME_50_SYMBOLS
  - add PORT_ALPM_CTL_MAX_PHY_SWING_HOLD

Signed-off-by: Jouni Högander 
Reviewed-by: Animesh Manna 
---
 drivers/gpu/drm/i915/display/intel_psr.c | 47 ++--
 1 file changed, 43 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c 
b/drivers/gpu/drm/i915/display/intel_psr.c
index 9c33549454e7..345493c85322 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1721,14 +1721,43 @@ static void lnl_alpm_configure(struct intel_dp 
*intel_dp)
struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
enum transcoder cpu_transcoder = intel_dp->psr.transcoder;
struct intel_psr *psr = _dp->psr;
+   u32 alpm_ctl;
 
if (DISPLAY_VER(dev_priv) < 20)
return;
 
-   intel_de_write(dev_priv, ALPM_CTL(cpu_transcoder),
-  ALPM_CTL_EXTENDED_FAST_WAKE_ENABLE |
-  
ALPM_CTL_ALPM_ENTRY_CHECK(psr->alpm_parameters.check_entry_lines) |
-  
ALPM_CTL_EXTENDED_FAST_WAKE_TIME(psr->alpm_parameters.fast_wake_lines));
+   /*
+* Panel Replay on eDP is always using ALPM aux less. I.e. no need to
+* check panel support at this point.
+*/
+   if (intel_dp->psr.panel_replay_enabled && intel_dp_is_edp(intel_dp)) {
+   alpm_ctl = ALPM_CTL_ALPM_ENABLE |
+   ALPM_CTL_ALPM_AUX_LESS_ENABLE |
+   ALPM_CTL_AUX_LESS_SLEEP_HOLD_TIME_50_SYMBOLS;
+
+   intel_de_write(dev_priv, PORT_ALPM_CTL(cpu_transcoder),
+  PORT_ALPM_CTL_ALPM_AUX_LESS_ENABLE |
+  PORT_ALPM_CTL_MAX_PHY_SWING_SETUP(15) |
+  PORT_ALPM_CTL_MAX_PHY_SWING_HOLD(0) |
+  PORT_ALPM_CTL_SILENCE_PERIOD(
+  
psr->alpm_parameters.silence_period_sym_clocks));
+
+   intel_de_write(dev_priv, PORT_ALPM_LFPS_CTL(cpu_transcoder),
+  PORT_ALPM_LFPS_CTL_LFPS_CYCLE_COUNT(10) |
+  PORT_ALPM_LFPS_CTL_LFPS_HALF_CYCLE_DURATION(
+  
psr->alpm_parameters.lfps_half_cycle_num_of_syms) |
+  
PORT_ALPM_LFPS_CTL_FIRST_LFPS_HALF_CYCLE_DURATION(
+  
psr->alpm_parameters.lfps_half_cycle_num_of_syms) |
+  PORT_ALPM_LFPS_CTL_LAST_LFPS_HALF_CYCLE_DURATION(
+  
psr->alpm_parameters.lfps_half_cycle_num_of_syms));
+   } else {
+   alpm_ctl = ALPM_CTL_EXTENDED_FAST_WAKE_ENABLE |
+   
ALPM_CTL_EXTENDED_FAST_WAKE_TIME(psr->alpm_parameters.fast_wake_lines);
+   }
+
+   alpm_ctl |= 
ALPM_CTL_ALPM_ENTRY_CHECK(psr->alpm_parameters.check_entry_lines);
+
+   intel_de_write(dev_priv, ALPM_CTL(cpu_transcoder), alpm_ctl);
 }
 
 static void intel_psr_enable_source(struct intel_dp *intel_dp,
@@ -1996,6 +2025,16 @@ static void intel_psr_disable_locked(struct intel_dp 
*intel_dp)
 
intel_snps_phy_update_psr_power_state(_to_dig_port(intel_dp)->base, 
false);
 
+   /* Panel Replay on eDP is always using ALPM aux less. */
+   if (intel_dp->psr.panel_replay_enabled && intel_dp_is_edp(intel_dp)) {
+   intel_de_rmw(dev_priv, ALPM_CTL(cpu_transcoder),
+ALPM_CTL_ALPM_ENABLE |
+ALPM_CTL_ALPM_AUX_LESS_ENABLE, 0);
+
+   intel_de_rmw(dev_priv, PORT_ALPM_CTL(cpu_transcoder),
+PORT_ALPM_CTL_ALPM_AUX_LESS_ENABLE, 0);
+   }
+
/* Disable PSR on Sink */
drm_dp_dpcd_writeb(_dp->aux, DP_PSR_EN_CFG, 0);
 
-- 
2.34.1



[PATCH v6 3/5] drm/i915/psr: Silence period and lfps half cycle

2024-03-28 Thread Jouni Högander
Add get function for silence period and lfps half cycle. Values are taken
from the tables in bspec.

Bspec: 71632

v3:
  - use PORT_ALPM_CTL_SILENCE_PERIOD_MASK instead of value 255
  - use PORT_ALPM_LFPS_CTL_LAST_LFPS_HALF_CYCLE_DURATION_MASK instead of
value 31
v2:
  - fix some checks
  - add some more comments

Signed-off-by: Jouni Högander 
Reviewed-by: Animesh Manna 
---
 .../drm/i915/display/intel_display_types.h|  2 +
 drivers/gpu/drm/i915/display/intel_psr.c  | 82 ++-
 2 files changed, 82 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h 
b/drivers/gpu/drm/i915/display/intel_display_types.h
index bec5e1103d20..4ef1f5f709d8 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1746,6 +1746,8 @@ struct intel_psr {
 
/* LNL and beyond */
u8 check_entry_lines;
+   u8 silence_period_sym_clocks;
+   u8 lfps_half_cycle_num_of_syms;
} alpm_parameters;
 
ktime_t last_entry_attempt;
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c 
b/drivers/gpu/drm/i915/display/intel_psr.c
index d5337b289434..9c33549454e7 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1126,6 +1126,74 @@ static bool 
_compute_psr2_sdp_prior_scanline_indication(struct intel_dp *intel_d
return true;
 }
 
+/*
+ * See Bspec: 71632 for the table
+ *
+ * Silence_period = tSilence,Min + ((tSilence,Max - tSilence,Min) / 2)
+ *
+ * Half cycle duration:
+ *
+ * Link rates 1.62 - 4.32 and tLFPS_Cycle = 70 ns
+ * FLOOR( (Link Rate * tLFPS_Cycle) / (2 * 10) )
+ *
+ * Link rates 5.4 - 8.1
+ * PORT_ALPM_LFPS_CTL[ LFPS Cycle Count ] = 10
+ * LFPS Period chosen is the mid-point of the min:max values from the table
+ * FLOOR( LFPS Period in Symbol clocks /
+ * (2 * PORT_ALPM_LFPS_CTL[ LFPS Cycle Count ]) )
+ */
+static bool _lnl_get_silence_period_and_lfps_half_cycle(int link_rate,
+   int *silence_period,
+   int *lfps_half_cycle)
+{
+   switch (link_rate) {
+   case 162000:
+   *silence_period = 20;
+   *lfps_half_cycle = 5;
+   break;
+   case 216000:
+   *silence_period = 27;
+   *lfps_half_cycle = 7;
+   break;
+   case 243000:
+   *silence_period = 31;
+   *lfps_half_cycle = 8;
+   break;
+   case 27:
+   *silence_period = 34;
+   *lfps_half_cycle = 9;
+   break;
+   case 324000:
+   *silence_period = 41;
+   *lfps_half_cycle = 11;
+   break;
+   case 432000:
+   *silence_period = 56;
+   *lfps_half_cycle = 15;
+   break;
+   case 54:
+   *silence_period = 69;
+   *lfps_half_cycle = 12;
+   break;
+   case 648000:
+   *silence_period = 84;
+   *lfps_half_cycle = 15;
+   break;
+   case 675000:
+   *silence_period = 87;
+   *lfps_half_cycle = 15;
+   break;
+   case 81:
+   *silence_period = 104;
+   *lfps_half_cycle = 19;
+   break;
+   default:
+   *silence_period = *lfps_half_cycle = -1;
+   return false;
+   }
+   return true;
+}
+
 /*
  * AUX-Less Wake Time = CEILING( ((PHY P2 to P0) + tLFPS_Period, Max+
  * tSilence, Max+ tPHY Establishment + tCDS) / tline)
@@ -1165,20 +1233,30 @@ static int _lnl_compute_aux_less_alpm_params(struct 
intel_dp *intel_dp,
 struct intel_crtc_state 
*crtc_state)
 {
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
-   int aux_less_wake_time, aux_less_wake_lines;
+   int aux_less_wake_time, aux_less_wake_lines, silence_period,
+   lfps_half_cycle;
 
aux_less_wake_time =
_lnl_compute_aux_less_wake_time(crtc_state->port_clock);
aux_less_wake_lines = 
intel_usecs_to_scanlines(_state->hw.adjusted_mode,
   aux_less_wake_time);
 
-   if (aux_less_wake_lines > ALPM_CTL_AUX_LESS_WAKE_TIME_MASK)
+   if (!_lnl_get_silence_period_and_lfps_half_cycle(intel_dp->link_rate,
+_period,
+_half_cycle))
+   return false;
+
+   if (aux_less_wake_lines > ALPM_CTL_AUX_LESS_WAKE_TIME_MASK ||
+   silence_period > PORT_ALPM_CTL_SILENCE_PERIOD_MASK ||
+   lfps_half_cycle > 
PORT_ALPM_LFPS_CTL_LAST_LFPS_HALF_CYCLE_DURATION_MASK)
return false;
 
if (i915->display.params.psr_safest_params)

[PATCH v6 2/5] drm/i915/psr: Calculate aux less wake time

2024-03-28 Thread Jouni Högander
Calculate aux less wake time and store it into alpm_params struct

Bspec: 71477

v4:
  - re-use fast_wake_lines to store aux_less_wake_lines
v3:
  - use ALPM_CTL_AUX_LESS_WAKE_TIME_MASK instead of value 63
v2:
  - use variables instead of values directly
  - fix max value
  - move converting port clock to Mhz into _lnl_compute_aux_less_wake_time

Signed-off-by: Jouni Högander 
Reviewed-by: Animesh Manna 
---
 drivers/gpu/drm/i915/display/intel_psr.c | 60 
 1 file changed, 60 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c 
b/drivers/gpu/drm/i915/display/intel_psr.c
index 33e427816be6..d5337b289434 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1126,6 +1126,63 @@ static bool 
_compute_psr2_sdp_prior_scanline_indication(struct intel_dp *intel_d
return true;
 }
 
+/*
+ * AUX-Less Wake Time = CEILING( ((PHY P2 to P0) + tLFPS_Period, Max+
+ * tSilence, Max+ tPHY Establishment + tCDS) / tline)
+ * For the "PHY P2 to P0" latency see the PHY Power Control page
+ * (PHY P2 to P0) : https://gfxspecs.intel.com/Predator/Home/Index/68965
+ * : 12 us
+ * The tLFPS_Period, Max term is 800ns
+ * The tSilence, Max term is 180ns
+ * The tPHY Establishment (a.k.a. t1) term is 50us
+ * The tCDS term is 1 or 2 times t2
+ * t2 = Number ML_PHY_LOCK * tML_PHY_LOCK
+ * Number ML_PHY_LOCK = ( 7 + CEILING( 6.5us / tML_PHY_LOCK ) + 1)
+ * Rounding up the 6.5us padding to the next ML_PHY_LOCK boundary and
+ * adding the "+ 1" term ensures all ML_PHY_LOCK sequences that start
+ * within the CDS period complete within the CDS period regardless of
+ * entry into the period
+ * tML_PHY_LOCK = TPS4 Length * ( 10 / (Link Rate in MHz) )
+ * TPS4 Length = 252 Symbols
+ */
+static int _lnl_compute_aux_less_wake_time(int port_clock)
+{
+   int tphy2_p2_to_p0 = 12 * 1000;
+   int tlfps_period_max = 800;
+   int tsilence_max = 180;
+   int t1 = 50 * 1000;
+   int tps4 = 252;
+   int tml_phy_lock = 1000 * 1000 * tps4 * 10 / port_clock;
+   int num_ml_phy_lock = 7 + DIV_ROUND_UP(6500, tml_phy_lock) + 1;
+   int t2 = num_ml_phy_lock * tml_phy_lock;
+   int tcds = 1 * t2;
+
+   return DIV_ROUND_UP(tphy2_p2_to_p0 + tlfps_period_max + tsilence_max +
+   t1 + tcds, 1000);
+}
+
+static int _lnl_compute_aux_less_alpm_params(struct intel_dp *intel_dp,
+struct intel_crtc_state 
*crtc_state)
+{
+   struct drm_i915_private *i915 = dp_to_i915(intel_dp);
+   int aux_less_wake_time, aux_less_wake_lines;
+
+   aux_less_wake_time =
+   _lnl_compute_aux_less_wake_time(crtc_state->port_clock);
+   aux_less_wake_lines = 
intel_usecs_to_scanlines(_state->hw.adjusted_mode,
+  aux_less_wake_time);
+
+   if (aux_less_wake_lines > ALPM_CTL_AUX_LESS_WAKE_TIME_MASK)
+   return false;
+
+   if (i915->display.params.psr_safest_params)
+   aux_less_wake_lines = ALPM_CTL_AUX_LESS_WAKE_TIME_MASK;
+
+   intel_dp->psr.alpm_parameters.fast_wake_lines = aux_less_wake_lines;
+
+   return true;
+}
+
 static bool _lnl_compute_alpm_params(struct intel_dp *intel_dp,
 struct intel_crtc_state *crtc_state)
 {
@@ -1142,6 +1199,9 @@ static bool _lnl_compute_alpm_params(struct intel_dp 
*intel_dp,
if (check_entry_lines > 15)
return false;
 
+   if (!_lnl_compute_aux_less_alpm_params(intel_dp, crtc_state))
+   return false;
+
if (i915->display.params.psr_safest_params)
check_entry_lines = 15;
 
-- 
2.34.1



[PATCH v6 1/5] drm/i915/psr: Add missing ALPM AUX-Less register definitions

2024-03-28 Thread Jouni Högander
Couple of ALPM AUX-Less related fields are missing from ALPM register
definitions. Add these and remove some duplicate definitions.

Bspec: 70294

V2: add Bspec reference

Signed-off-by: Jouni Högander 
Reviewed-by: Arun R Murthy 
Reviewed-by: Animesh Manna 
---
 drivers/gpu/drm/i915/display/intel_psr_regs.h | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_psr_regs.h 
b/drivers/gpu/drm/i915/display/intel_psr_regs.h
index 8427a736f639..b004672d1deb 100644
--- a/drivers/gpu/drm/i915/display/intel_psr_regs.h
+++ b/drivers/gpu/drm/i915/display/intel_psr_regs.h
@@ -348,9 +348,13 @@
 #define PORT_ALPM_LFPS_CTL(tran)   
_MMIO_TRANS2(tran, _PORT_ALPM_LFPS_CTL_A)
 #define  PORT_ALPM_LFPS_CTL_LFPS_START_POLARITY
REG_BIT(31)
 #define  PORT_ALPM_LFPS_CTL_LFPS_CYCLE_COUNT_MASK  REG_GENMASK(27, 
24)
-#define  ALPM_CTL_EXTENDED_FAST_WAKE_MIN_LINES 5
-#define  ALPM_CTL_EXTENDED_FAST_WAKE_TIME(lines)   
REG_FIELD_PREP(ALPM_CTL_EXTENDED_FAST_WAKE_TIME_MASK, (lines) - 
ALPM_CTL_EXTENDED_FAST_WAKE_MIN_LINES)
-#define  ALPM_CTL_AUX_LESS_WAKE_TIME_MASK  REG_GENMASK(5, 0)
-#define  ALPM_CTL_AUX_LESS_WAKE_TIME(val)  
REG_FIELD_PREP(ALPM_CTL_AUX_LESS_WAKE_TIME_MASK, val)
+#define  PORT_ALPM_LFPS_CTL_LFPS_CYCLE_COUNT_MIN   7
+#define  PORT_ALPM_LFPS_CTL_LFPS_CYCLE_COUNT(val)  
REG_FIELD_PREP(PORT_ALPM_LFPS_CTL_LFPS_CYCLE_COUNT_MASK, (val) - 
PORT_ALPM_LFPS_CTL_LFPS_CYCLE_COUNT_MIN)
+#define  PORT_ALPM_LFPS_CTL_LFPS_HALF_CYCLE_DURATION_MASK  REG_GENMASK(20, 
16)
+#define  PORT_ALPM_LFPS_CTL_LFPS_HALF_CYCLE_DURATION(val)  
REG_FIELD_PREP(PORT_ALPM_LFPS_CTL_LFPS_HALF_CYCLE_DURATION_MASK, val)
+#define  PORT_ALPM_LFPS_CTL_FIRST_LFPS_HALF_CYCLE_DURATION_MASK
REG_GENMASK(12, 8)
+#define  PORT_ALPM_LFPS_CTL_FIRST_LFPS_HALF_CYCLE_DURATION(val)
REG_FIELD_PREP(PORT_ALPM_LFPS_CTL_LFPS_HALF_CYCLE_DURATION_MASK, val)
+#define  PORT_ALPM_LFPS_CTL_LAST_LFPS_HALF_CYCLE_DURATION_MASK REG_GENMASK(4, 
0)
+#define  PORT_ALPM_LFPS_CTL_LAST_LFPS_HALF_CYCLE_DURATION(val) 
REG_FIELD_PREP(PORT_ALPM_LFPS_CTL_LFPS_HALF_CYCLE_DURATION_MASK, val)
 
 #endif /* __INTEL_PSR_REGS_H__ */
-- 
2.34.1



[PATCH v6 0/5] ALPM AUX-Less

2024-03-28 Thread Jouni Högander
This patch set is implementing calculation of ALPM AUX-Less parameters
for Intel HW and writing them in case of AUX-Less is enabled. It is
also enabling ALPM AUX-Less for eDP Panel Replay. Current code is not
allowing Panel Replay on eDP. Patches for this are coming later.

This implementation is only for Panel Replay usage. LOBF (Link Off
Between Active Frames) usage needs more work.

v6:
  - rebase
v5:
  - mention AUX Less enable is only on source side in commit message
v4:
  - drop patch adding AUX LESS dpcd defines
  - re-use fast_wake_lines to store aux_less_wake_lines
  - add comment explaining why AUX less is enabled on eDP panel replay
without any extra checks
v3:
  - use definitions instead of numbers for max values
  - do not use alpm_ctl as uninitialized variable
v2:
  - use variables instead of values directly
  - fix several max values
  - move converting port clock to Mhz into _lnl_compute_*
  - do not set AUX-Wake related bits for AUX-Less case
  - do not write ALPM configuration for DP2.0 Panel Replay or PSR1

Jouni Högander (5):
  drm/i915/psr: Add missing ALPM AUX-Less register definitions
  drm/i915/psr: Calculate aux less wake time
  drm/i915/psr: Silence period and lfps half cycle
  drm/i915/psr: Enable ALPM on source side for eDP Panel replay
  drm/i915/psr: Do not write ALPM configuration for PSR1 or DP2.0 Panel
Replay

 .../drm/i915/display/intel_display_types.h|   2 +
 drivers/gpu/drm/i915/display/intel_psr.c  | 188 +-
 drivers/gpu/drm/i915/display/intel_psr_regs.h |  12 +-
 3 files changed, 193 insertions(+), 9 deletions(-)

-- 
2.34.1



[topic/core-for-CI] ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path

2024-03-28 Thread Rodrigo Vivi
From: Chaitanya Kumar Borah 

In cases where the sof driver is unable to find the firmware and/or
topology file [1], it exits without releasing the i915 runtime
pm wakeref [2]. This results in dmesg warnings[3] during
suspend/resume or driver unbind. Add remove_late() to the failure path
of sof_init_environment so that i915 wakeref is released appropriately

[1]

[8.990366] sof-audio-pci-intel-mtl :00:1f.3: SOF firmware and/or 
topology file not found.
[8.990396] sof-audio-pci-intel-mtl :00:1f.3: Supported default profiles
[8.990398] sof-audio-pci-intel-mtl :00:1f.3: - ipc type 1 (Requested):
[8.990399] sof-audio-pci-intel-mtl :00:1f.3:  Firmware file: 
intel/sof-ipc4/mtl/sof-mtl.ri
[8.990401] sof-audio-pci-intel-mtl :00:1f.3:  Topology file: 
intel/sof-ace-tplg/sof-mtl-rt711-2ch.tplg
[8.990402] sof-audio-pci-intel-mtl :00:1f.3: Check if you have 
'sof-firmware' package installed.
[8.990403] sof-audio-pci-intel-mtl :00:1f.3: Optionally it can be 
manually downloaded from:
[8.990404] sof-audio-pci-intel-mtl :00:1f.3:
https://github.com/thesofproject/sof-bin/
[8.999088] sof-audio-pci-intel-mtl :00:1f.3: error: sof_probe_work 
failed err: -2

[2]

ref_tracker: :00:02.0@9b8511b6a378 has 1/5 users at
 track_intel_runtime_pm_wakeref.part.0+0x36/0x70 [i915]
 __intel_runtime_pm_get+0x51/0xb0 [i915]
 intel_runtime_pm_get+0x17/0x20 [i915]
 intel_display_power_get+0x2f/0x70 [i915]
 i915_audio_component_get_power+0x23/0x120 [i915]
 snd_hdac_display_power+0x89/0x130 [snd_hda_core]
 hda_codec_i915_init+0x3f/0x50 [snd_sof_intel_hda]
 hda_dsp_probe_early+0x170/0x250 [snd_sof_intel_hda_common]
 snd_sof_device_probe+0x224/0x320 [snd_sof]
 sof_pci_probe+0x15b/0x220 [snd_sof_pci]
 hda_pci_intel_probe+0x30/0x70 [snd_sof_intel_hda_common]
 local_pci_probe+0x4c/0xb0
 pci_device_probe+0xcc/0x250
 really_probe+0x18e/0x420
 __driver_probe_device+0x7e/0x170
 driver_probe_device+0x23/0xa0

[3]
[  484.105070] [ cut here ]
[  484.108238] thunderbolt :00:0d.2: PM: pci_pm_suspend_late+0x0/0x50 
returned 0 after 0 usecs
[  484.117106] i915 :00:02.0: i915 raw-wakerefs=1 wakelocks=1 on cleanup
[  484.792005] WARNING: CPU: 2 PID: 2405 at 
drivers/gpu/drm/i915/intel_runtime_pm.c:444 
intel_runtime_pm_driver_release+0x6c/0x80

Signed-off-by: Chaitanya Kumar Borah 
Tested-by: Rodrigo Vivi 
Reviewed-by: Rodrigo Vivi 
[This commit is still under review on the sof tree, but likely targeting 6.10
Adding to topic branch to unblock RPM in LNL VLK-56970]
Link: https://github.com/thesofproject/linux/pull/4878
Signed-off-by: Rodrigo Vivi 
---
 sound/soc/sof/core.c | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c
index 425b023b03b4..3e41821562f0 100644
--- a/sound/soc/sof/core.c
+++ b/sound/soc/sof/core.c
@@ -339,8 +339,7 @@ static int sof_init_environment(struct snd_sof_dev *sdev)
ret = snd_sof_probe(sdev);
if (ret < 0) {
dev_err(sdev->dev, "failed to probe DSP %d\n", ret);
-   sof_ops_free(sdev);
-   return ret;
+   goto err_sof_probe;
}
 
/* check machine info */
@@ -358,15 +357,18 @@ static int sof_init_environment(struct snd_sof_dev *sdev)
ret = validate_sof_ops(sdev);
if (ret < 0) {
snd_sof_remove(sdev);
+   snd_sof_remove_late(sdev);
return ret;
}
}
 
+   return 0;
+
 err_machine_check:
-   if (ret) {
-   snd_sof_remove(sdev);
-   sof_ops_free(sdev);
-   }
+   snd_sof_remove(sdev);
+err_sof_probe:
+   snd_sof_remove_late(sdev);
+   sof_ops_free(sdev);
 
return ret;
 }
-- 
2.44.0



[PULL] drm-misc-fixes

2024-03-28 Thread Thomas Zimmermann
Hi Dave, Sima,

this is the weekly PR for drm-misc-fixes.

Best regards
Thomas

drm-misc-fixes-2024-03-28:
Short summary of fixes pull:

bridge:
- select DRM_KMS_HELPER

dma-buf:
- fix NULL-pointer deref

dp:
- fix div-by-zero in DP MST unplug code

fbdev:
- select FB_IOMEM_FOPS for SBus

nouveau:
- dmem: handle kcalloc() allocation failures

qxl:
- remove unused variables

rockchip:
- vop2: remove support for AR30 and AB30 formats

sched:
- fix NULL-pointer deref

vmwgfx:
- debugfs: create ttm_resource_manager entry only if needed
The following changes since commit 4cece764965020c22cff7665b18a012006359095:

  Linux 6.9-rc1 (2024-03-24 14:10:05 -0700)

are available in the Git repository at:

  https://gitlab.freedesktop.org/drm/misc/kernel.git 
tags/drm-misc-fixes-2024-03-28

for you to fetch changes up to aba2a144c0bf1ecdcbc520525712fb661392e509:

  drm/qxl: remove unused variable from `qxl_process_single_command()` 
(2024-03-28 11:15:48 +0100)


Short summary of fixes pull:

bridge:
- select DRM_KMS_HELPER

dma-buf:
- fix NULL-pointer deref

dp:
- fix div-by-zero in DP MST unplug code

fbdev:
- select FB_IOMEM_FOPS for SBus

nouveau:
- dmem: handle kcalloc() allocation failures

qxl:
- remove unused variables

rockchip:
- vop2: remove support for AR30 and AB30 formats

sched:
- fix NULL-pointer deref

vmwgfx:
- debugfs: create ttm_resource_manager entry only if needed


Andy Yan (1):
  drm/rockchip: vop2: Remove AR30 and AB30 format support

Chris Bainbridge (1):
  drm/dp: Fix divide-by-zero regression on DP MST unplug with nouveau

Duoming Zhou (1):
  nouveau/dmem: handle kcalloc() allocation failure

Jocelyn Falempe (1):
  drm/vmwgfx: Create debugfs ttm_resource_manager entry only if needed

Luca Weiss (1):
  drm/bridge: Select DRM_KMS_HELPER for DRM_PANEL_BRIDGE

Miguel Ojeda (2):
  drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()`
  drm/qxl: remove unused variable from `qxl_process_single_command()`

Neil Armstrong (1):
  Revert "drm/bridge: Select DRM_KMS_HELPER for DRM_PANEL_BRIDGE"

Pavel Sakharov (1):
  dma-buf: Fix NULL pointer dereference in sanitycheck()

Thomas Zimmermann (3):
  Merge drm/drm-fixes into drm-misc-fixes
  Merge drm/drm-fixes into drm-misc-fixes
  fbdev: Select I/O-memory framebuffer ops for SBus

Vitaly Prosyak (1):
  drm/sched: fix null-ptr-deref in init entity

 drivers/dma-buf/st-dma-fence-chain.c |  6 +++---
 drivers/gpu/drm/display/drm_dp_helper.c  |  7 +++
 drivers/gpu/drm/nouveau/nouveau_dmem.c   | 12 ++--
 drivers/gpu/drm/qxl/qxl_cmd.c|  2 --
 drivers/gpu/drm/qxl/qxl_ioctl.c  |  4 +---
 drivers/gpu/drm/rockchip/rockchip_vop2_reg.c |  2 --
 drivers/gpu/drm/scheduler/sched_entity.c | 12 +---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c  | 15 +--
 drivers/video/fbdev/Kconfig  |  3 +++
 9 files changed, 38 insertions(+), 25 deletions(-)

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)


Re: [PATCH 01/11] drm/i915/dp: Fix DSC line buffer depth programming

2024-03-28 Thread Imre Deak
On Wed, Mar 20, 2024 at 10:11:41PM +0200, Imre Deak wrote:
> Fix the calculation of the DSC line buffer depth. This is limited both
> by the source's and sink's maximum line buffer depth, but the former one
> was not taken into account. On all Intel platform's the source's maximum
> buffer depth is 13, so the overall limit is simply the minimum of the
> source/sink's limit, regardless of the DSC version.
> 
> This leaves the DSI DSC line buffer depth calculation as-is, trusting
> VBT.
> 
> On DSC version 1.2 for sinks reporting a maximum line buffer depth of 16
> the line buffer depth was incorrectly programmed as 0, leading to a
> corruption in color gradients / lines on the decompressed screen image.
> 
> Cc: dri-de...@lists.freedesktop.org
> Signed-off-by: Imre Deak 

Hi Maarten, Thomas, Maxime,

are you ok to merge the DRM DP-DSC/MST changes in patches 1, 7-9, 11 via
drm-intel-next?

--Imre

> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 16 ++--
>  include/drm/display/drm_dsc.h   |  3 ---
>  2 files changed, 6 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index af7ca00e9bc0a..dbe65651bf277 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -89,6 +89,9 @@
>  #define DP_DSC_MAX_ENC_THROUGHPUT_0  34
>  #define DP_DSC_MAX_ENC_THROUGHPUT_1  40
>  
> +/* Max DSC line buffer depth supported by HW. */
> +#define INTEL_DP_DSC_MAX_LINE_BUF_DEPTH  13
> +
>  /* DP DSC FEC Overhead factor in ppm = 1/(0.972261) = 1.028530 */
>  #define DP_DSC_FEC_OVERHEAD_FACTOR   1028530
>  
> @@ -1703,7 +1706,6 @@ static int intel_dp_dsc_compute_params(const struct 
> intel_connector *connector,
>  {
>   struct drm_i915_private *i915 = to_i915(connector->base.dev);
>   struct drm_dsc_config *vdsc_cfg = _state->dsc.config;
> - u8 line_buf_depth;
>   int ret;
>  
>   /*
> @@ -1732,20 +1734,14 @@ static int intel_dp_dsc_compute_params(const struct 
> intel_connector *connector,
>   connector->dp.dsc_dpcd[DP_DSC_DEC_COLOR_FORMAT_CAP - 
> DP_DSC_SUPPORT] &
>   DP_DSC_RGB;
>  
> - line_buf_depth = drm_dp_dsc_sink_line_buf_depth(connector->dp.dsc_dpcd);
> - if (!line_buf_depth) {
> + vdsc_cfg->line_buf_depth = min(INTEL_DP_DSC_MAX_LINE_BUF_DEPTH,
> +
> drm_dp_dsc_sink_line_buf_depth(connector->dp.dsc_dpcd));
> + if (!vdsc_cfg->line_buf_depth) {
>   drm_dbg_kms(>drm,
>   "DSC Sink Line Buffer Depth invalid\n");
>   return -EINVAL;
>   }
>  
> - if (vdsc_cfg->dsc_version_minor == 2)
> - vdsc_cfg->line_buf_depth = (line_buf_depth == 
> DSC_1_2_MAX_LINEBUF_DEPTH_BITS) ?
> - DSC_1_2_MAX_LINEBUF_DEPTH_VAL : line_buf_depth;
> - else
> - vdsc_cfg->line_buf_depth = (line_buf_depth > 
> DSC_1_1_MAX_LINEBUF_DEPTH_BITS) ?
> - DSC_1_1_MAX_LINEBUF_DEPTH_BITS : line_buf_depth;
> -
>   vdsc_cfg->block_pred_enable =
>   connector->dp.dsc_dpcd[DP_DSC_BLK_PREDICTION_SUPPORT - 
> DP_DSC_SUPPORT] &
>   DP_DSC_BLK_PREDICTION_IS_SUPPORTED;
> diff --git a/include/drm/display/drm_dsc.h b/include/drm/display/drm_dsc.h
> index bc90273d06a62..bbbe7438473d3 100644
> --- a/include/drm/display/drm_dsc.h
> +++ b/include/drm/display/drm_dsc.h
> @@ -40,9 +40,6 @@
>  #define DSC_PPS_RC_RANGE_MINQP_SHIFT 11
>  #define DSC_PPS_RC_RANGE_MAXQP_SHIFT 6
>  #define DSC_PPS_NATIVE_420_SHIFT 1
> -#define DSC_1_2_MAX_LINEBUF_DEPTH_BITS   16
> -#define DSC_1_2_MAX_LINEBUF_DEPTH_VAL0
> -#define DSC_1_1_MAX_LINEBUF_DEPTH_BITS   13
>  
>  /**
>   * struct drm_dsc_rc_range_parameters - DSC Rate Control range parameters
> -- 
> 2.43.3
> 


Re: [PATCH 5/5] drm/i915/display: Implement Wa_16021440873

2024-03-28 Thread Hogander, Jouni
On Thu, 2024-03-28 at 12:57 +, Kahola, Mika wrote:
> > -Original Message-
> > From: Hogander, Jouni 
> > Sent: Tuesday, March 19, 2024 2:33 PM
> > To: intel-gfx@lists.freedesktop.org
> > Cc: Kahola, Mika ; Hogander, Jouni
> > 
> > Subject: [PATCH 5/5] drm/i915/display: Implement Wa_16021440873
> > 
> > This patch is implementing Wa_16021440873.
> > 
> > Bspec: 74151
> > 
> 
> Reviewed-by: Mika Kahola 

Thank you Mika for your review. These are now pushed to drm-intel-next.

BR,

Jouni Högander

> 
> > Signed-off-by: Jouni Högander 
> > ---
> >  drivers/gpu/drm/i915/display/intel_cursor.c | 24
> > -
> >  drivers/gpu/drm/i915/display/intel_psr.c    | 20 +++--
> >  2 files changed, 37 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c
> > b/drivers/gpu/drm/i915/display/intel_cursor.c
> > index f8b33999d43f..838d1a723ff1 100644
> > --- a/drivers/gpu/drm/i915/display/intel_cursor.c
> > +++ b/drivers/gpu/drm/i915/display/intel_cursor.c
> > @@ -511,6 +511,24 @@ static void
> > i9xx_cursor_disable_sel_fetch_arm(struct intel_plane *plane,
> > intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_CTL(pipe,
> > plane->id), 0);  }
> > 
> > +static void wa_16021440873(struct intel_plane *plane,
> > +  const struct intel_crtc_state
> > *crtc_state,
> > +  const struct intel_plane_state
> > *plane_state) {
> > +   struct drm_i915_private *dev_priv = to_i915(plane-
> > >base.dev);
> > +   u32 ctl = plane_state->ctl;
> > +   int et_y_position = drm_rect_height(_state->pipe_src)
> > + 1;
> > +   enum pipe pipe = plane->pipe;
> > +
> > +   ctl &= ~MCURSOR_MODE_MASK;
> > +   ctl |= MCURSOR_MODE_64_2B;
> > +
> > +   intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_CTL(pipe,
> > plane->id),
> > +ctl);
> > +
> > +   intel_de_write(dev_priv, PIPE_SRCSZ_ERLY_TPT(pipe),
> > +  PIPESRC_HEIGHT(et_y_position)); }
> > +
> >  static void i9xx_cursor_update_sel_fetch_arm(struct intel_plane
> > *plane,
> >  const struct
> > intel_crtc_state *crtc_state,
> >  const struct
> > intel_plane_state *plane_state) @@ -531,7 +549,11 @@ static void
> > i9xx_cursor_update_sel_fetch_arm(struct intel_plane *plane,
> > intel_de_write_fw(dev_priv,
> > PLANE_SEL_FETCH_CTL(pipe, plane->id),
> >   plane_state->ctl);
> > } else {
> > -   i9xx_cursor_disable_sel_fetch_arm(plane,
> > crtc_state);
> > +   /* Wa_16021440873 */
> > +   if (crtc_state->enable_psr2_su_region_et)
> > +   wa_16021440873(plane, crtc_state,
> > plane_state);
> > +   else
> > +   i9xx_cursor_disable_sel_fetch_arm(plane,
> > crtc_state);
> > }
> >  }
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index e1a9399aa503..7ecf1b35c1ef 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -2082,14 +2082,19 @@ static void psr2_man_trk_ctl_calc(struct
> > intel_crtc_state *crtc_state,
> > crtc_state->psr2_man_track_ctl = val;
> >  }
> > 
> > -static u32 psr2_pipe_srcsz_early_tpt_calc(struct intel_crtc_state
> > *crtc_state,
> > - bool full_update)
> > +static u32
> > +psr2_pipe_srcsz_early_tpt_calc(struct intel_crtc_state
> > *crtc_state,
> > +  bool full_update, bool
> > cursor_in_su_area)
> >  {
> > int width, height;
> > 
> > if (!crtc_state->enable_psr2_su_region_et || full_update)
> > return 0;
> > 
> > +   if (!cursor_in_su_area)
> > +   return PIPESRC_WIDTH(0) |
> > +   PIPESRC_HEIGHT(drm_rect_height(_state-
> > >pipe_src));
> > +
> > width = drm_rect_width(_state->psr2_su_area);
> > height = drm_rect_height(_state->psr2_su_area);
> > 
> > @@ -2141,7 +2146,8 @@ static void
> > intel_psr2_sel_fetch_pipe_alignment(struct intel_crtc_state
> > *crtc_st
> >   */
> >  static void
> >  intel_psr2_sel_fetch_et_alignment(struct intel_atomic_state
> > *state,
> > - struct intel_crtc *crtc)
> > + struct intel_crtc *crtc,
> > + bool *cursor_in_su_area)
> >  {
> > struct intel_crtc_state *crtc_state =
> > intel_atomic_get_new_crtc_state(state, crtc);
> > struct intel_plane_state *new_plane_state; @@ -2169,6
> > +2175,7 @@ intel_psr2_sel_fetch_et_alignment(struct
> > intel_atomic_state *state,
> > 
> > clip_area_update(_state->psr2_su_area,
> > _plane_state->uapi.dst,
> >  _state->pipe_src);
> > +   *cursor_in_su_area = true;
> >   

Re: [PATCH] drm/i915: use fine grained -Woverride-init disable

2024-03-28 Thread Lucas De Marchi

On Thu, Mar 28, 2024 at 12:24:55PM +0200, Jani Nikula wrote:

Use localized __diag_push(), __diag_ignore_all() with rationale, and
__diag_pop() for specific initializations instead of blanket disabling
of -Woverride-init across several files.

Note that we've tried this before with commit 88e9664434c9 ("drm/i915:
use localized __diag_ignore_all() instead of per file") and reverted in
commit 290d16104575 ("Revert "drm/i915: use localized
__diag_ignore_all() instead of per file""). The issue turned out to be
in __diag_ignore_all() and it was fixed by commit 689b097a06ba
("compiler-gcc: Suppress -Wmissing-prototypes warning for all supported
GCC"). So we should be able to pull this off now.

Cc: "Arnd Bergmann" 
Cc: Lucas De Marchi 
Signed-off-by: Jani Nikula 


great! I had a vague memory of us using these localized warning-suppress
rather than doing it on the entire files.

Reviewed-by: Lucas De Marchi 

Lucas De Marchi


Re: [PATCH i-g-t] lib/kunit: Read results from debugfs

2024-03-28 Thread Lucas De Marchi

On Wed, Mar 27, 2024 at 10:54:53PM +0100, Janusz Krzysztofik wrote:

>+static DIR *kunit_debugfs_open(void)
>+{
>+   const char *debugfs_path = igt_debugfs_mount();
>+   int debugfs_fd, kunit_fd;
>+   DIR *kunit_dir;
>+
>+   if (igt_debug_on(!debugfs_path))
>+   return NULL;
>+
>+   debugfs_fd = open(debugfs_path, O_DIRECTORY);
>+   if (igt_debug_on(debugfs_fd < 0))
>+   return NULL;
>+
>+   kunit_fd = openat(debugfs_fd, "kunit", O_DIRECTORY);
>+   close(debugfs_fd);
>+   if (igt_debug_on(kunit_fd < 0))
>+   return NULL;
>+
>+   kunit_dir = fdopendir(kunit_fd);
>+   if (igt_debug_on(!kunit_dir))
>+   close(kunit_fd);
>+
>+   return kunit_dir;


any reason not to use strcat() + return fopen()


To me the code looked simpler than if I copied and concatenated strings to a
local buffer of fixed size with potential truncation handling.  I guess
you prefer your pattern over mine, but you haven't explained why.  Would you
like to convince me?


not really important. It just seems simpler to me, with no calls into
the kernel... completely untested, but something like:

const char *debugfs_path = igt_debugfs_mount();
char path[PATH_MAX];

if (igt_debug_on(!debugfs_path || (strlen(debugfs_path) + strlen("/kunit") 
>= PATH_MAX)))
return NULL;

strcat(stpcpy(path, debugfs_path), "/kunit");

return opendir(path);

Lucas De Marchi


RE: [PATCH 5/5] drm/i915/display: Implement Wa_16021440873

2024-03-28 Thread Kahola, Mika
> -Original Message-
> From: Hogander, Jouni 
> Sent: Tuesday, March 19, 2024 2:33 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Kahola, Mika ; Hogander, Jouni 
> 
> Subject: [PATCH 5/5] drm/i915/display: Implement Wa_16021440873
> 
> This patch is implementing Wa_16021440873.
> 
> Bspec: 74151
> 

Reviewed-by: Mika Kahola 

> Signed-off-by: Jouni Högander 
> ---
>  drivers/gpu/drm/i915/display/intel_cursor.c | 24 -
>  drivers/gpu/drm/i915/display/intel_psr.c| 20 +++--
>  2 files changed, 37 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c 
> b/drivers/gpu/drm/i915/display/intel_cursor.c
> index f8b33999d43f..838d1a723ff1 100644
> --- a/drivers/gpu/drm/i915/display/intel_cursor.c
> +++ b/drivers/gpu/drm/i915/display/intel_cursor.c
> @@ -511,6 +511,24 @@ static void i9xx_cursor_disable_sel_fetch_arm(struct 
> intel_plane *plane,
>   intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_CTL(pipe, plane->id), 0);  }
> 
> +static void wa_16021440873(struct intel_plane *plane,
> +const struct intel_crtc_state *crtc_state,
> +const struct intel_plane_state *plane_state) {
> + struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
> + u32 ctl = plane_state->ctl;
> + int et_y_position = drm_rect_height(_state->pipe_src) + 1;
> + enum pipe pipe = plane->pipe;
> +
> + ctl &= ~MCURSOR_MODE_MASK;
> + ctl |= MCURSOR_MODE_64_2B;
> +
> + intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_CTL(pipe, plane->id),
> +ctl);
> +
> + intel_de_write(dev_priv, PIPE_SRCSZ_ERLY_TPT(pipe),
> +PIPESRC_HEIGHT(et_y_position)); }
> +
>  static void i9xx_cursor_update_sel_fetch_arm(struct intel_plane *plane,
>const struct intel_crtc_state 
> *crtc_state,
>const struct intel_plane_state 
> *plane_state) @@ -531,7 +549,11 @@ static void
> i9xx_cursor_update_sel_fetch_arm(struct intel_plane *plane,
>   intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_CTL(pipe, 
> plane->id),
> plane_state->ctl);
>   } else {
> - i9xx_cursor_disable_sel_fetch_arm(plane, crtc_state);
> + /* Wa_16021440873 */
> + if (crtc_state->enable_psr2_su_region_et)
> + wa_16021440873(plane, crtc_state, plane_state);
> + else
> + i9xx_cursor_disable_sel_fetch_arm(plane, crtc_state);
>   }
>  }
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c 
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index e1a9399aa503..7ecf1b35c1ef 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -2082,14 +2082,19 @@ static void psr2_man_trk_ctl_calc(struct 
> intel_crtc_state *crtc_state,
>   crtc_state->psr2_man_track_ctl = val;
>  }
> 
> -static u32 psr2_pipe_srcsz_early_tpt_calc(struct intel_crtc_state 
> *crtc_state,
> -   bool full_update)
> +static u32
> +psr2_pipe_srcsz_early_tpt_calc(struct intel_crtc_state *crtc_state,
> +bool full_update, bool cursor_in_su_area)
>  {
>   int width, height;
> 
>   if (!crtc_state->enable_psr2_su_region_et || full_update)
>   return 0;
> 
> + if (!cursor_in_su_area)
> + return PIPESRC_WIDTH(0) |
> + PIPESRC_HEIGHT(drm_rect_height(_state->pipe_src));
> +
>   width = drm_rect_width(_state->psr2_su_area);
>   height = drm_rect_height(_state->psr2_su_area);
> 
> @@ -2141,7 +2146,8 @@ static void intel_psr2_sel_fetch_pipe_alignment(struct 
> intel_crtc_state *crtc_st
>   */
>  static void
>  intel_psr2_sel_fetch_et_alignment(struct intel_atomic_state *state,
> -   struct intel_crtc *crtc)
> +   struct intel_crtc *crtc,
> +   bool *cursor_in_su_area)
>  {
>   struct intel_crtc_state *crtc_state = 
> intel_atomic_get_new_crtc_state(state, crtc);
>   struct intel_plane_state *new_plane_state; @@ -2169,6 +2175,7 @@ 
> intel_psr2_sel_fetch_et_alignment(struct
> intel_atomic_state *state,
> 
>   clip_area_update(_state->psr2_su_area, 
> _plane_state->uapi.dst,
>_state->pipe_src);
> + *cursor_in_su_area = true;
>   }
>  }
> 
> @@ -2214,7 +2221,7 @@ int intel_psr2_sel_fetch_update(struct 
> intel_atomic_state *state,
>   struct intel_crtc_state *crtc_state = 
> intel_atomic_get_new_crtc_state(state, crtc);
>   struct intel_plane_state *new_plane_state, *old_plane_state;
>   struct intel_plane *plane;
> - bool full_update = false;
> + bool full_update = false, cursor_in_su_area = false;
>   int i, ret;
> 
>   if (!crtc_state->enable_psr2_sel_fetch)
> @@ -2331,7 +2338,7 @@ int 

Re: [PATCH i-g-t] lib/kunit: Read results from debugfs

2024-03-28 Thread Janusz Krzysztofik
On Wednesday, 27 March 2024 22:54:53 CET Janusz Krzysztofik wrote:
> On Wednesday, 27 March 2024 17:03:01 CET Lucas De Marchi wrote:
> > On Wed, Mar 27, 2024 at 12:22:54PM +0100, Janusz Krzysztofik wrote:
> > >KUnit can provide KTAP reports from test modules via debugfs files, one
> > >per test suite.  Using that source of test results instead of extracting
> > >them from dmesg, where they may be interleaved with other kernel messages,
> > >seems more easy to handle and less error prone.  Switch to it.
> > >
> > >If KUnit debugfs support is found not configured then fall back to legacy
> > >processing path.
> > >
> > >Signed-off-by: Janusz Krzysztofik 
> > >---
> > > lib/igt_kmod.c | 143 -
> > > 1 file changed, 105 insertions(+), 38 deletions(-)
> > >
> > >diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
> > >index 1ec9c8a602..a5b170ca9c 100644
> > >--- a/lib/igt_kmod.c
> > >+++ b/lib/igt_kmod.c
> > >@@ -28,6 +28,7 @@
> > > #include 
> > > #include 
> > > #include 
> > >+#include 
> > > #include 
> > > #include 
> > > #include 
> > >@@ -39,6 +40,7 @@
> > >
> > > #include "igt_aux.h"
> > > #include "igt_core.h"
> > >+#include "igt_debugfs.h"
> > > #include "igt_kmod.h"
> > > #include "igt_ktap.h"
> > > #include "igt_sysfs.h"
> > >@@ -864,6 +866,31 @@ static int open_parameters(const char *module_name)
> > >   return open(path, O_RDONLY);
> > > }
> > >
> > >+static DIR *kunit_debugfs_open(void)
> > >+{
> > >+  const char *debugfs_path = igt_debugfs_mount();
> > >+  int debugfs_fd, kunit_fd;
> > >+  DIR *kunit_dir;
> > >+
> > >+  if (igt_debug_on(!debugfs_path))
> > >+  return NULL;
> > >+
> > >+  debugfs_fd = open(debugfs_path, O_DIRECTORY);
> > >+  if (igt_debug_on(debugfs_fd < 0))
> > >+  return NULL;
> > >+
> > >+  kunit_fd = openat(debugfs_fd, "kunit", O_DIRECTORY);
> > >+  close(debugfs_fd);
> > >+  if (igt_debug_on(kunit_fd < 0))
> > >+  return NULL;
> > >+
> > >+  kunit_dir = fdopendir(kunit_fd);
> > >+  if (igt_debug_on(!kunit_dir))
> > >+  close(kunit_fd);
> > >+
> > >+  return kunit_dir;
> > 
> > 
> > any reason not to use strcat() + return fopen()
> 
> To me the code looked simpler than if I copied and concatenated strings to a 
> local buffer of fixed size with potential truncation handling.  I guess 
> you prefer your pattern over mine, but you haven't explained why.  Would you 
> like to convince me?
> 
> > 
> > >+}
> > >+
> > > static bool kunit_set_filtering(const char *filter_glob, const char 
> > > *filter,
> > >   const char *filter_action)
> > > {
> > >@@ -1071,23 +1098,48 @@ 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)
> > >+static int kunit_get_results(struct igt_list_head *results, int 
> > >debugfs_fd,
> > >+   const char *suite, struct igt_ktap_results **ktap)
> > > {
> > >-  int err;
> > >+  FILE *results_stream;
> > >+  int ret, results_fd;
> > >+  char *buf = NULL;
> > >+  size_t size = 0;
> > >+  ssize_t len;
> > >+
> > >+  if (igt_debug_on((ret = openat(debugfs_fd, suite, O_DIRECTORY), ret < 
> > >0)))
> > 
> > a little odd to return on any value != 0, but log on < 0. did you mean
> > to compare < 0 in the first arg?.
> 
> I'm not able to recall what I could mean, but anyway, you are right, 
>   if (igt_debug_on((ret = openat(...)) < 0))
> will be more correct.

At a second glance, my

if (igt_debug_on((ret = openat(...), ret < 0)))

was equally correct (both log and return on ret < 0), and now I recall what I 
meant: I tried to work around checkpatch rule of not using assignment 
expressions in if conditions -- with no success.  Let me refactor that line to 
make checkpatch happy.

Thanks,
Janusz

> 
> > 
> > >+  return ret;
> > >+
> > >+  results_fd = openat(ret, "results", O_RDONLY);
> > >+  close(ret);
> > >+  if (igt_debug_on(results_fd < 0))
> > >+  return results_fd;
> > >+
> > >+  results_stream = fdopen(results_fd, "r");
> > >+  if (igt_debug_on(!results_stream)) {
> > >+  close(results_fd);
> > >+  return -errno;
> > >+  }
> > >
> > >   *ktap = igt_ktap_alloc(results);
> > >-  if (igt_debug_on(!*ktap))
> > >-  return -ENOMEM;
> > >+  if (igt_debug_on(!*ktap)) {
> > >+  ret = -ENOMEM;
> > >+  goto out_fclose;
> > >+  }
> > >+
> > >+  while (len = getline(, , results_stream), len > 0) {
> > >+  ret = igt_ktap_parse(buf, *ktap);
> > >+  if (ret != -EINPROGRESS)
> > >+  break;
> > >+  }
> > >
> > >-  do
> > >-  igt_debug_on((err = kunit_kmsg_result_get(results, NULL, 
> > >kmsg_fd, *ktap),
> > >-err && err != -EINPROGRESS));
> > >-  while (err == -EINPROGRESS);
> > >+  free(buf);
> > >
> > >   igt_ktap_free(ktap);
> > 

Re: [PATCH 01/13] drm/i915/cdclk: Fix CDCLK programming order when pipes are active

2024-03-28 Thread Ville Syrjälä
On Thu, Mar 28, 2024 at 09:16:06AM +, Murthy, Arun R wrote:
> 
> > -Original Message-
> > From: Intel-gfx  On Behalf Of Ville
> > Syrjala
> > Sent: Wednesday, March 27, 2024 11:16 PM
> > To: intel-gfx@lists.freedesktop.org
> > Subject: [PATCH 01/13] drm/i915/cdclk: Fix CDCLK programming order when
> > pipes are active
> > 
> > From: Ville Syrjälä 
> > 
> > Currently we always reprogram CDCLK from the
> > intel_set_cdclk_pre_plane_update() when using squahs/crawl.
> Typo squashs->squash
> 
> > The code only works correctly for the cd2x update or full modeset cases, 
> > and it
> > was simply never updated to deal with squash/crawl.
> > 
> > If the CDCLK frequency is increasing we must reprogram it before we do
> > anything else that might depend on the new higher frequency, and conversely
> > we must not decrease the frequency until everything that might still depend 
> > on
> > the old higher frequency has been dealt with.
> > 
> > Since cdclk_state->pipe is only relevant when doing a cd2x update we can't 
> > use
> > it to determine the correct sequence during squash/crawl. To that end
> > introduce cdclk_state->disable_pipes which simply indicates that we must
> > perform the update while the pipes are disable (ie. during
> > intel_set_cdclk_pre_plane_update()). Otherwise we use the same old vs. new
> > CDCLK frequency comparsiong as for cd2x updates.
> > 
> > The only remaining problem case is when the voltage_level needs to increase
> > due to a DDI port, but the CDCLK frequency is decreasing (and not all pipes 
> > are
> > being disabled). The current approach will not bump the voltage level up 
> > until
> > after the port has already been enabled, which is too late.
> > But we'll take care of that case separately.
> > 
> > v2: Don't break the "must disable pipes case"
> > 
> > Signed-off-by: Ville Syrjälä 
> > ---
> >  drivers/gpu/drm/i915/display/intel_cdclk.c | 15 +--
> > drivers/gpu/drm/i915/display/intel_cdclk.h |  3 +++
> >  2 files changed, 12 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c
> > b/drivers/gpu/drm/i915/display/intel_cdclk.c
> > index 31aaa9780dfc..619529dba095 100644
> > --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> > +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> > @@ -2600,7 +2600,6 @@ intel_set_cdclk_pre_plane_update(struct
> > intel_atomic_state *state)
> > intel_atomic_get_old_cdclk_state(state);
> > const struct intel_cdclk_state *new_cdclk_state =
> > intel_atomic_get_new_cdclk_state(state);
> > -   enum pipe pipe = new_cdclk_state->pipe;
> Looks like this cdclk_state->pipe is not more used in the driver and can it 
> be removed?

It is still used for its primary purpose (cd2x update pipe select).

The only thing changing here is that we no longer use it as a
canary to indicate whether we need to do the cdclk programming
with pipes off or not.

-- 
Ville Syrjälä
Intel


[PATCH 13/13] drm/xe/spi: add support for access mode

2024-03-28 Thread Alexander Usyskin
Check SPI access mode from GSC FW status registers
and overwrite access status read from SPI descriptor, if needed.

Signed-off-by: Alexander Usyskin 
---
 drivers/gpu/drm/xe/regs/xe_gsc_regs.h |  5 +
 drivers/gpu/drm/xe/xe_heci_gsc.c  |  5 +
 drivers/gpu/drm/xe/xe_spi.c   | 31 ++-
 3 files changed, 36 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/xe/regs/xe_gsc_regs.h 
b/drivers/gpu/drm/xe/regs/xe_gsc_regs.h
index 9886ec9cb08e..ef04fab3a4b0 100644
--- a/drivers/gpu/drm/xe/regs/xe_gsc_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_gsc_regs.h
@@ -16,6 +16,11 @@
 #define MTL_GSC_HECI1_BASE 0x00116000
 #define MTL_GSC_HECI2_BASE 0x00117000
 
+#define DG1_GSC_HECI2_BASE 0x00259000
+#define PVC_GSC_HECI2_BASE 0x00285000
+#define DG2_GSC_HECI2_BASE 0x00374000
+
+
 #define HECI_H_CSR(base)   XE_REG((base) + 0x4)
 #define   HECI_H_CSR_IEREG_BIT(0)
 #define   HECI_H_CSR_ISREG_BIT(1)
diff --git a/drivers/gpu/drm/xe/xe_heci_gsc.c b/drivers/gpu/drm/xe/xe_heci_gsc.c
index bfdd33b9b23b..f240a3fbb507 100644
--- a/drivers/gpu/drm/xe/xe_heci_gsc.c
+++ b/drivers/gpu/drm/xe/xe_heci_gsc.c
@@ -11,14 +11,11 @@
 #include "xe_device_types.h"
 #include "xe_drv.h"
 #include "xe_heci_gsc.h"
+#include "regs/xe_gsc_regs.h"
 #include "xe_platform_types.h"
 
 #define GSC_BAR_LENGTH  0x0FFC
 
-#define DG1_GSC_HECI2_BASE 0x259000
-#define PVC_GSC_HECI2_BASE 0x285000
-#define DG2_GSC_HECI2_BASE 0x374000
-
 static void heci_gsc_irq_mask(struct irq_data *d)
 {
/* generic irq handling */
diff --git a/drivers/gpu/drm/xe/xe_spi.c b/drivers/gpu/drm/xe/xe_spi.c
index 3dde2ec9c389..91632d68db8a 100644
--- a/drivers/gpu/drm/xe/xe_spi.c
+++ b/drivers/gpu/drm/xe/xe_spi.c
@@ -5,7 +5,10 @@
 
 #include 
 #include 
+#include "xe_device.h"
 #include "xe_device_types.h"
+#include "xe_mmio.h"
+#include "regs/xe_gsc_regs.h"
 #include "xe_spi.h"
 
 #define GEN12_GUNIT_SPI_BASE 0x00102040
@@ -23,6 +26,32 @@ static void xe_spi_release_dev(struct device *dev)
 {
 }
 
+static bool xe_spi_writeable_override(struct xe_device *xe)
+{
+   struct xe_gt *gt = xe_root_mmio_gt(xe);
+   struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
+   resource_size_t base;
+   bool writeable_override;
+
+   if (xe->info.platform == XE_PVC) {
+   base = PVC_GSC_HECI2_BASE;
+   } else if (xe->info.platform == XE_DG2) {
+   base = DG2_GSC_HECI2_BASE;
+   } else if (xe->info.platform == XE_DG1) {
+   base = DG1_GSC_HECI2_BASE;
+   } else {
+   dev_err(>dev, "Unknown platform\n");
+   return true;
+   }
+
+   writeable_override =
+   !(xe_mmio_read32(gt, HECI_H_GS1(base)) &
+ HECI_FW_STATUS_2_SPI_ACCESS_MODE);
+   if (writeable_override)
+   dev_info(>dev, "SPI access overridden by jumper\n");
+   return writeable_override;
+}
+
 void xe_spi_init(struct xe_device *xe)
 {
struct intel_dg_spi_dev *spi = >spi;
@@ -34,7 +63,7 @@ void xe_spi_init(struct xe_device *xe)
if (!IS_DGFX(xe))
return;
 
-   spi->writeable_override = false;
+   spi->writeable_override = xe_spi_writeable_override(xe);
spi->bar.parent = >resource[0];
spi->bar.start = GEN12_GUNIT_SPI_BASE + pdev->resource[0].start;
spi->bar.end = spi->bar.start + GEN12_GUNIT_SPI_SIZE - 1;
-- 
2.34.1



[PATCH 12/13] drm/xe/spi: add on-die spi device

2024-03-28 Thread Alexander Usyskin
Signed-off-by: Alexander Usyskin 
---
 drivers/gpu/drm/xe/Makefile  |  1 +
 drivers/gpu/drm/xe/xe_device.c   |  3 ++
 drivers/gpu/drm/xe/xe_device_types.h |  5 ++
 drivers/gpu/drm/xe/xe_spi.c  | 78 
 drivers/gpu/drm/xe/xe_spi.h  | 15 ++
 5 files changed, 102 insertions(+)
 create mode 100644 drivers/gpu/drm/xe/xe_spi.c
 create mode 100644 drivers/gpu/drm/xe/xe_spi.h

diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index efcf0ab7a1a6..3ea829591b8e 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -124,6 +124,7 @@ xe-y += xe_bb.o \
xe_ring_ops.o \
xe_sa.o \
xe_sched_job.o \
+   xe_spi.o \
xe_step.o \
xe_sync.o \
xe_tile.o \
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index b8d8da546670..5c9351f2c35f 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -35,6 +35,7 @@
 #include "xe_pcode.h"
 #include "xe_pm.h"
 #include "xe_query.h"
+#include "xe_spi.h"
 #include "xe_tile.h"
 #include "xe_ttm_stolen_mgr.h"
 #include "xe_ttm_sys_mgr.h"
@@ -515,6 +516,7 @@ int xe_device_probe(struct xe_device *xe)
goto err_irq_shutdown;
}
 
+   xe_spi_init(xe);
xe_heci_gsc_init(xe);
 
err = xe_display_init(xe);
@@ -562,6 +564,7 @@ void xe_device_remove(struct xe_device *xe)
xe_display_fini(xe);
 
xe_heci_gsc_fini(xe);
+   xe_spi_fini(xe);
 
xe_irq_shutdown(xe);
 }
diff --git a/drivers/gpu/drm/xe/xe_device_types.h 
b/drivers/gpu/drm/xe/xe_device_types.h
index 5dc9127a2029..dbb686a2ae53 100644
--- a/drivers/gpu/drm/xe/xe_device_types.h
+++ b/drivers/gpu/drm/xe/xe_device_types.h
@@ -12,6 +12,8 @@
 #include 
 #include 
 
+#include 
+
 #include "xe_devcoredump_types.h"
 #include "xe_heci_gsc.h"
 #include "xe_gt_types.h"
@@ -432,6 +434,9 @@ struct xe_device {
/** @heci_gsc: graphics security controller */
struct xe_heci_gsc heci_gsc;
 
+   /** @spi: discrete graphics spi */
+   struct intel_dg_spi_dev spi;
+
/** @needs_flr_on_fini: requests function-reset on fini */
bool needs_flr_on_fini;
 
diff --git a/drivers/gpu/drm/xe/xe_spi.c b/drivers/gpu/drm/xe/xe_spi.c
new file mode 100644
index ..3dde2ec9c389
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_spi.c
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright(c) 2019-2024, Intel Corporation. All rights reserved.
+ */
+
+#include 
+#include 
+#include "xe_device_types.h"
+#include "xe_spi.h"
+
+#define GEN12_GUNIT_SPI_BASE 0x00102040
+#define GEN12_GUNIT_SPI_SIZE 0x80
+#define HECI_FW_STATUS_2_SPI_ACCESS_MODE BIT(3)
+
+static const struct intel_dg_spi_region regions[INTEL_DG_SPI_REGIONS] = {
+   [0] = { .name = "DESCRIPTOR", },
+   [2] = { .name = "GSC", },
+   [11] = { .name = "OptionROM", },
+   [12] = { .name = "DAM", },
+};
+
+static void xe_spi_release_dev(struct device *dev)
+{
+}
+
+void xe_spi_init(struct xe_device *xe)
+{
+   struct intel_dg_spi_dev *spi = >spi;
+   struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
+   struct auxiliary_device *aux_dev = >aux_dev;
+   int ret;
+
+   /* Only the DGFX devices have internal SPI */
+   if (!IS_DGFX(xe))
+   return;
+
+   spi->writeable_override = false;
+   spi->bar.parent = >resource[0];
+   spi->bar.start = GEN12_GUNIT_SPI_BASE + pdev->resource[0].start;
+   spi->bar.end = spi->bar.start + GEN12_GUNIT_SPI_SIZE - 1;
+   spi->bar.flags = IORESOURCE_MEM;
+   spi->bar.desc = IORES_DESC_NONE;
+   spi->regions = regions;
+
+   aux_dev->name = "spi";
+   aux_dev->id = (pci_domain_nr(pdev->bus) << 16) |
+  PCI_DEVID(pdev->bus->number, pdev->devfn);
+   aux_dev->dev.parent = >dev;
+   aux_dev->dev.release = xe_spi_release_dev;
+
+   ret = auxiliary_device_init(aux_dev);
+   if (ret) {
+   dev_err(>dev, "xe-spi aux init failed %d\n", ret);
+   return;
+   }
+
+   ret = auxiliary_device_add(aux_dev);
+   if (ret) {
+   dev_err(>dev, "xe-spi aux add failed %d\n", ret);
+   auxiliary_device_uninit(aux_dev);
+   return;
+   }
+}
+
+void xe_spi_fini(struct xe_device *xe)
+{
+   struct intel_dg_spi_dev *spi = >spi;
+   struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
+
+   /* Only the DGFX devices have internal SPI */
+   if (!IS_DGFX(xe))
+   return;
+
+   dev_dbg(>dev, "removing xe-spi cell\n");
+
+   auxiliary_device_delete(>aux_dev);
+   auxiliary_device_uninit(>aux_dev);
+}
diff --git a/drivers/gpu/drm/xe/xe_spi.h b/drivers/gpu/drm/xe/xe_spi.h
new file mode 100644
index ..aef79893a864
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_spi.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright(c) 2019-2024 Intel Corporation. All 

[PATCH 11/13] spi: intel-dg: wake card on operations

2024-03-28 Thread Alexander Usyskin
Enable runtime PM in spi driver to notify graphics driver that
whole card should be kept awake while spi operations are
performed through this driver.

CC: Lucas De Marchi 
Signed-off-by: Alexander Usyskin 
---
 drivers/spi/spi-intel-dg.c | 44 ++
 1 file changed, 44 insertions(+)

diff --git a/drivers/spi/spi-intel-dg.c b/drivers/spi/spi-intel-dg.c
index d626e9526631..24be2f7e14d7 100644
--- a/drivers/spi/spi-intel-dg.c
+++ b/drivers/spi/spi-intel-dg.c
@@ -12,11 +12,14 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 
+#define INTEL_DG_SPI_RPM_TIMEOUT 500
+
 struct intel_dg_spi {
struct kref refcnt;
struct mtd_info mtd;
@@ -471,6 +474,12 @@ static int intel_dg_spi_erase(struct mtd_info *mtd, struct 
erase_info *info)
total_len = info->len;
addr = info->addr;
 
+   ret = pm_runtime_resume_and_get(mtd->dev.parent);
+   if (ret < 0) {
+   dev_err(>dev, "rpm: get failed %d\n", ret);
+   return ret;
+   }
+
mutex_lock(>lock);
 
while (total_len > 0) {
@@ -512,6 +521,8 @@ static int intel_dg_spi_erase(struct mtd_info *mtd, struct 
erase_info *info)
 
 out:
mutex_unlock(>lock);
+   pm_runtime_mark_last_busy(mtd->dev.parent);
+   pm_runtime_put_autosuspend(mtd->dev.parent);
return ret;
 }
 
@@ -545,6 +556,12 @@ static int intel_dg_spi_read(struct mtd_info *mtd, loff_t 
from, size_t len,
if (len > spi->regions[idx].size - from)
len = spi->regions[idx].size - from;
 
+   ret = pm_runtime_resume_and_get(mtd->dev.parent);
+   if (ret < 0) {
+   dev_err(>dev, "rpm: get failed %zd\n", ret);
+   return ret;
+   }
+
mutex_lock(>lock);
 
ret = spi_read(spi, region, from, len, buf);
@@ -557,6 +574,8 @@ static int intel_dg_spi_read(struct mtd_info *mtd, loff_t 
from, size_t len,
*retlen = ret;
 
mutex_unlock(>lock);
+   pm_runtime_mark_last_busy(mtd->dev.parent);
+   pm_runtime_put_autosuspend(mtd->dev.parent);
return 0;
 }
 
@@ -590,6 +609,12 @@ static int intel_dg_spi_write(struct mtd_info *mtd, loff_t 
to, size_t len,
if (len > spi->regions[idx].size - to)
len = spi->regions[idx].size - to;
 
+   ret = pm_runtime_resume_and_get(mtd->dev.parent);
+   if (ret < 0) {
+   dev_err(>dev, "rpm: get failed %zd\n", ret);
+   return ret;
+   }
+
mutex_lock(>lock);
 
ret = spi_write(spi, region, to, len, buf);
@@ -602,6 +627,8 @@ static int intel_dg_spi_write(struct mtd_info *mtd, loff_t 
to, size_t len,
*retlen = ret;
 
mutex_unlock(>lock);
+   pm_runtime_mark_last_busy(mtd->dev.parent);
+   pm_runtime_put_autosuspend(mtd->dev.parent);
return 0;
 }
 
@@ -747,6 +774,17 @@ static int intel_dg_spi_probe(struct auxiliary_device 
*aux_dev,
}
}
 
+   pm_runtime_enable(device);
+
+   pm_runtime_set_autosuspend_delay(device, INTEL_DG_SPI_RPM_TIMEOUT);
+   pm_runtime_use_autosuspend(device);
+
+   ret = pm_runtime_resume_and_get(device);
+   if (ret < 0) {
+   dev_err(device, "rpm: get failed %d\n", ret);
+   goto err_norpm;
+   }
+
spi->base = devm_ioremap_resource(device, >bar);
if (IS_ERR(spi->base)) {
dev_err(device, "mmio not mapped\n");
@@ -771,9 +809,13 @@ static int intel_dg_spi_probe(struct auxiliary_device 
*aux_dev,
 
dev_dbg(device, "bound\n");
 
+   pm_runtime_put(device);
return 0;
 
 err:
+   pm_runtime_put(device);
+err_norpm:
+   pm_runtime_disable(device);
kref_put(>refcnt, intel_dg_spi_release);
return ret;
 }
@@ -785,6 +827,8 @@ static void intel_dg_spi_remove(struct auxiliary_device 
*aux_dev)
if (!spi)
return;
 
+   pm_runtime_disable(_dev->dev);
+
mtd_device_unregister(>mtd);
 
dev_set_drvdata(_dev->dev, NULL);
-- 
2.34.1



[PATCH 09/13] spi: intel-dg: implement mtd access handlers

2024-03-28 Thread Alexander Usyskin
Implement mtd read, erase, and write handlers.
For erase operation address and size should be 4K aligned.
For write operation address and size has to be 4bytes aligned.

CC: Rodrigo Vivi 
CC: Lucas De Marchi 
Signed-off-by: Tomas Winkler 
Signed-off-by: Vitaly Lubart 
Signed-off-by: Alexander Usyskin 
---
 drivers/spi/spi-intel-dg.c | 152 +++--
 1 file changed, 147 insertions(+), 5 deletions(-)

diff --git a/drivers/spi/spi-intel-dg.c b/drivers/spi/spi-intel-dg.c
index 4af8a2314fc7..9e8be7713f1a 100644
--- a/drivers/spi/spi-intel-dg.c
+++ b/drivers/spi/spi-intel-dg.c
@@ -174,7 +174,6 @@ static int intel_dg_spi_is_valid(struct intel_dg_spi *spi)
return 0;
 }
 
-__maybe_unused
 static unsigned int spi_get_region(const struct intel_dg_spi *spi, loff_t from)
 {
unsigned int i;
@@ -206,7 +205,6 @@ static ssize_t spi_rewrite_partial(struct intel_dg_spi 
*spi, loff_t to,
return len;
 }
 
-__maybe_unused
 static ssize_t spi_write(struct intel_dg_spi *spi, u8 region,
 loff_t to, size_t len, const unsigned char *buf)
 {
@@ -265,7 +263,6 @@ static ssize_t spi_write(struct intel_dg_spi *spi, u8 
region,
return len;
 }
 
-__maybe_unused
 static ssize_t spi_read(struct intel_dg_spi *spi, u8 region,
loff_t from, size_t len, unsigned char *buf)
 {
@@ -324,7 +321,6 @@ static ssize_t spi_read(struct intel_dg_spi *spi, u8 region,
return len;
 }
 
-__maybe_unused
 static ssize_t
 spi_erase(struct intel_dg_spi *spi, u8 region, loff_t from, u64 len, u64 
*fail_addr)
 {
@@ -413,18 +409,164 @@ static int intel_dg_spi_init(struct intel_dg_spi *spi, 
struct device *device)
 
 static int intel_dg_spi_erase(struct mtd_info *mtd, struct erase_info *info)
 {
-   return 0;
+   struct intel_dg_spi *spi;
+   unsigned int idx;
+   u8 region;
+   u64 addr;
+   ssize_t bytes;
+   loff_t from;
+   size_t len;
+   size_t total_len;
+   int ret = 0;
+
+   if (!mtd || !info)
+   return -EINVAL;
+
+   spi = mtd->priv;
+   if (WARN_ON(!spi))
+   return -EINVAL;
+
+   if (!IS_ALIGNED(info->addr, SZ_4K) || !IS_ALIGNED(info->len, SZ_4K)) {
+   dev_err(>dev, "unaligned erase %llx %llx\n",
+   info->addr, info->len);
+   info->fail_addr = MTD_FAIL_ADDR_UNKNOWN;
+   return -EINVAL;
+   }
+
+   total_len = info->len;
+   addr = info->addr;
+
+   mutex_lock(>lock);
+
+   while (total_len > 0) {
+   if (!IS_ALIGNED(addr, SZ_4K) || !IS_ALIGNED(total_len, SZ_4K)) {
+   dev_err(>dev, "unaligned erase %llx %zx\n", addr, 
total_len);
+   info->fail_addr = addr;
+   ret = -ERANGE;
+   goto out;
+   }
+
+   idx = spi_get_region(spi, addr);
+   if (idx >= spi->nregions) {
+   dev_err(>dev, "out of range");
+   info->fail_addr = MTD_FAIL_ADDR_UNKNOWN;
+   ret = -ERANGE;
+   goto out;
+   }
+
+   from = addr - spi->regions[idx].offset;
+   region = spi->regions[idx].id;
+   len = total_len;
+   if (len > spi->regions[idx].size - from)
+   len = spi->regions[idx].size - from;
+
+   dev_dbg(>dev, "erasing region[%d] %s from %llx len %zx\n",
+   region, spi->regions[idx].name, from, len);
+
+   bytes = spi_erase(spi, region, from, len, >fail_addr);
+   if (bytes < 0) {
+   dev_dbg(>dev, "erase failed with %zd\n", bytes);
+   info->fail_addr += spi->regions[idx].offset;
+   ret = bytes;
+   goto out;
+   }
+
+   addr += len;
+   total_len -= len;
+   }
+
+out:
+   mutex_unlock(>lock);
+   return ret;
 }
 
 static int intel_dg_spi_read(struct mtd_info *mtd, loff_t from, size_t len,
 size_t *retlen, u_char *buf)
 {
+   struct intel_dg_spi *spi;
+   ssize_t ret;
+   unsigned int idx;
+   u8 region;
+
+   if (!mtd)
+   return -EINVAL;
+
+   spi = mtd->priv;
+   if (WARN_ON(!spi))
+   return -EINVAL;
+
+   idx = spi_get_region(spi, from);
+
+   dev_dbg(>dev, "reading region[%d] %s from %lld len %zd\n",
+   spi->regions[idx].id, spi->regions[idx].name, from, len);
+
+   if (idx >= spi->nregions) {
+   dev_err(>dev, "out of ragnge");
+   return -ERANGE;
+   }
+
+   from -= spi->regions[idx].offset;
+   region = spi->regions[idx].id;
+   if (len > spi->regions[idx].size - from)
+   len = spi->regions[idx].size - from;
+
+   mutex_lock(>lock);
+
+   ret = spi_read(spi, region, from, 

[PATCH 10/13] spi: intel-dg: align 64bit read and write

2024-03-28 Thread Alexander Usyskin
GSC SPI HW errors on quad access overlapping 1K border.
Align 64bit read and write to avoid readq/writeq over 1K border.

Signed-off-by: Alexander Usyskin 
---
 drivers/spi/spi-intel-dg.c | 35 +++
 1 file changed, 35 insertions(+)

diff --git a/drivers/spi/spi-intel-dg.c b/drivers/spi/spi-intel-dg.c
index 9e8be7713f1a..d626e9526631 100644
--- a/drivers/spi/spi-intel-dg.c
+++ b/drivers/spi/spi-intel-dg.c
@@ -231,6 +231,24 @@ static ssize_t spi_write(struct intel_dg_spi *spi, u8 
region,
len_s -= to_shift;
}
 
+   if (!IS_ALIGNED(to, sizeof(u64)) &&
+   ((to ^ (to + len_s)) & GENMASK(31, 10))) {
+   /*
+* Workaround reads/writes across 1k-aligned addresses
+* (start u32 before 1k, end u32 after)
+* as this fails on hardware.
+*/
+   u32 data;
+
+   memcpy(, [0], sizeof(u32));
+   spi_write32(spi, to, data);
+   if (spi_error(spi))
+   return -EIO;
+   buf += sizeof(u32);
+   to += sizeof(u32);
+   len_s -= sizeof(u32);
+   }
+
len8 = ALIGN_DOWN(len_s, sizeof(u64));
for (i = 0; i < len8; i += sizeof(u64)) {
u64 data;
@@ -289,6 +307,23 @@ static ssize_t spi_read(struct intel_dg_spi *spi, u8 
region,
from += from_shift;
}
 
+   if (!IS_ALIGNED(from, sizeof(u64)) &&
+   ((from ^ (from + len_s)) & GENMASK(31, 10))) {
+   /*
+* Workaround reads/writes across 1k-aligned addresses
+* (start u32 before 1k, end u32 after)
+* as this fails on hardware.
+*/
+   u32 data = spi_read32(spi, from);
+
+   if (spi_error(spi))
+   return -EIO;
+   memcpy([0], , sizeof(data));
+   len_s -= sizeof(u32);
+   buf += sizeof(u32);
+   from += sizeof(u32);
+   }
+
len8 = ALIGN_DOWN(len_s, sizeof(u64));
for (i = 0; i < len8; i += sizeof(u64)) {
u64 data = spi_read64(spi, from + i);
-- 
2.34.1



[PATCH 08/13] spi: intel-dg: spi register with mtd

2024-03-28 Thread Alexander Usyskin
Register the on-die spi device with the mtd subsystem.
Refcount spi object on _get and _put mtd callbacks.

CC: Rodrigo Vivi 
CC: Lucas De Marchi 
Signed-off-by: Tomas Winkler 
Signed-off-by: Alexander Usyskin 
---
 drivers/spi/spi-intel-dg.c | 111 +
 1 file changed, 111 insertions(+)

diff --git a/drivers/spi/spi-intel-dg.c b/drivers/spi/spi-intel-dg.c
index af65101456a4..4af8a2314fc7 100644
--- a/drivers/spi/spi-intel-dg.c
+++ b/drivers/spi/spi-intel-dg.c
@@ -10,6 +10,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -17,6 +19,8 @@
 
 struct intel_dg_spi {
struct kref refcnt;
+   struct mtd_info mtd;
+   struct mutex lock; /* region access lock */
void __iomem *base;
size_t size;
unsigned int nregions;
@@ -407,6 +411,23 @@ static int intel_dg_spi_init(struct intel_dg_spi *spi, 
struct device *device)
return n;
 }
 
+static int intel_dg_spi_erase(struct mtd_info *mtd, struct erase_info *info)
+{
+   return 0;
+}
+
+static int intel_dg_spi_read(struct mtd_info *mtd, loff_t from, size_t len,
+size_t *retlen, u_char *buf)
+{
+   return 0;
+}
+
+static int intel_dg_spi_write(struct mtd_info *mtd, loff_t to, size_t len,
+ size_t *retlen, const u_char *buf)
+{
+   return 0;
+}
+
 static void intel_dg_spi_release(struct kref *kref)
 {
struct intel_dg_spi *spi = container_of(kref, struct intel_dg_spi, 
refcnt);
@@ -415,9 +436,90 @@ static void intel_dg_spi_release(struct kref *kref)
pr_debug("freeing spi memory\n");
for (i = 0; i < spi->nregions; i++)
kfree(spi->regions[i].name);
+   mutex_destroy(>lock);
kfree(spi);
 }
 
+static int intel_dg_spi_get_device(struct mtd_info *mtd)
+{
+   struct mtd_info *master;
+   struct intel_dg_spi *spi;
+
+   if (!mtd)
+   return -ENODEV;
+
+   master = mtd_get_master(mtd);
+   spi = master->priv;
+   if (WARN_ON(!spi))
+   return -EINVAL;
+   pr_debug("get spi %s %d\n", mtd->name, kref_read(>refcnt));
+   kref_get(>refcnt);
+
+   return 0;
+}
+
+static void intel_dg_spi_put_device(struct mtd_info *mtd)
+{
+   struct mtd_info *master;
+   struct intel_dg_spi *spi;
+
+   if (!mtd)
+   return;
+
+   master = mtd_get_master(mtd);
+   spi = master->priv;
+   if (WARN_ON(!spi))
+   return;
+   pr_debug("put spi %s %d\n", mtd->name, kref_read(>refcnt));
+   kref_put(>refcnt, intel_dg_spi_release);
+}
+
+static int intel_dg_spi_init_mtd(struct intel_dg_spi *spi, struct device 
*device,
+unsigned int nparts, bool writeable_override)
+{
+   unsigned int i;
+   unsigned int n;
+   struct mtd_partition *parts = NULL;
+   int ret;
+
+   dev_dbg(device, "registering with mtd\n");
+
+   spi->mtd.owner = THIS_MODULE;
+   spi->mtd.dev.parent = device;
+   spi->mtd.flags = MTD_CAP_NORFLASH | MTD_WRITEABLE;
+   spi->mtd.type = MTD_DATAFLASH;
+   spi->mtd.priv = spi;
+   spi->mtd._write = intel_dg_spi_write;
+   spi->mtd._read = intel_dg_spi_read;
+   spi->mtd._erase = intel_dg_spi_erase;
+   spi->mtd._get_device = intel_dg_spi_get_device;
+   spi->mtd._put_device = intel_dg_spi_put_device;
+   spi->mtd.writesize = SZ_1; /* 1 byte granularity */
+   spi->mtd.erasesize = SZ_4K; /* 4K bytes granularity */
+   spi->mtd.size = spi->size;
+
+   parts = kcalloc(spi->nregions, sizeof(*parts), GFP_KERNEL);
+   if (!parts)
+   return -ENOMEM;
+
+   for (i = 0, n = 0; i < spi->nregions && n < nparts; i++) {
+   if (!spi->regions[i].is_readable)
+   continue;
+   parts[n].name = spi->regions[i].name;
+   parts[n].offset  = spi->regions[i].offset;
+   parts[n].size = spi->regions[i].size;
+   if (!spi->regions[i].is_writable && !writeable_override)
+   parts[n].mask_flags = MTD_WRITEABLE;
+   n++;
+   }
+
+   ret = mtd_device_register(>mtd, parts, n);
+
+   kfree(parts);
+
+   return ret;
+}
+
 static int intel_dg_spi_probe(struct auxiliary_device *aux_dev,
  const struct auxiliary_device_id *aux_dev_id)
 {
@@ -449,6 +551,7 @@ static int intel_dg_spi_probe(struct auxiliary_device 
*aux_dev,
if (!spi)
return -ENOMEM;
 
+   mutex_init(>lock);
kref_init(>refcnt);
 
spi->nregions = nregions;
@@ -481,6 +584,12 @@ static int intel_dg_spi_probe(struct auxiliary_device 
*aux_dev,
goto err;
}
 
+   ret = intel_dg_spi_init_mtd(spi, device, ret, ispi->writeable_override);
+   if (ret) {
+   dev_err(device, "failed init mtd %d\n", ret);
+   goto err;
+   }
+

[PATCH 07/13] spi: intel-dg: implement spi access functions

2024-03-28 Thread Alexander Usyskin
Implement spi_read(), spi_erase() and spi_write() functions.

CC: Lucas De Marchi 
CC: Rodrigo Vivi 
Signed-off-by: Tomas Winkler 
Signed-off-by: Alexander Usyskin 
Signed-off-by: Vitaly Lubart 
---
 drivers/spi/spi-intel-dg.c | 199 +
 1 file changed, 199 insertions(+)

diff --git a/drivers/spi/spi-intel-dg.c b/drivers/spi/spi-intel-dg.c
index 8ef9dccc9062..af65101456a4 100644
--- a/drivers/spi/spi-intel-dg.c
+++ b/drivers/spi/spi-intel-dg.c
@@ -3,13 +3,16 @@
  * Copyright(c) 2019-2024, Intel Corporation. All rights reserved.
  */
 
+#include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 
 struct intel_dg_spi {
@@ -84,6 +87,33 @@ static inline u32 spi_read32(struct intel_dg_spi *spi, u32 
address)
return ioread32(base + SPI_TRIGGER_REG);
 }
 
+static inline u64 spi_read64(struct intel_dg_spi *spi, u32 address)
+{
+   void __iomem *base = spi->base;
+
+   iowrite32(address, base + SPI_ADDRESS_REG);
+
+   return readq(base + SPI_TRIGGER_REG);
+}
+
+static void spi_write32(struct intel_dg_spi *spi, u32 address, u32 data)
+{
+   void __iomem *base = spi->base;
+
+   iowrite32(address, base + SPI_ADDRESS_REG);
+
+   iowrite32(data, base + SPI_TRIGGER_REG);
+}
+
+static void spi_write64(struct intel_dg_spi *spi, u32 address, u64 data)
+{
+   void __iomem *base = spi->base;
+
+   iowrite32(address, base + SPI_ADDRESS_REG);
+
+   writeq(data, base + SPI_TRIGGER_REG);
+}
+
 static int spi_get_access_map(struct intel_dg_spi *spi)
 {
u32 flmap1;
@@ -140,6 +170,175 @@ static int intel_dg_spi_is_valid(struct intel_dg_spi *spi)
return 0;
 }
 
+__maybe_unused
+static unsigned int spi_get_region(const struct intel_dg_spi *spi, loff_t from)
+{
+   unsigned int i;
+
+   for (i = 0; i < spi->nregions; i++) {
+   if ((spi->regions[i].offset + spi->regions[i].size - 1) > from 
&&
+   spi->regions[i].offset <= from &&
+   spi->regions[i].size != 0)
+   break;
+   }
+
+   return i;
+}
+
+static ssize_t spi_rewrite_partial(struct intel_dg_spi *spi, loff_t to,
+  loff_t offset, size_t len, const u32 *newdata)
+{
+   u32 data = spi_read32(spi, to);
+
+   if (spi_error(spi))
+   return -EIO;
+
+   memcpy((u8 *) + offset, newdata, len);
+
+   spi_write32(spi, to, data);
+   if (spi_error(spi))
+   return -EIO;
+
+   return len;
+}
+
+__maybe_unused
+static ssize_t spi_write(struct intel_dg_spi *spi, u8 region,
+loff_t to, size_t len, const unsigned char *buf)
+{
+   size_t i;
+   size_t len8;
+   size_t len4;
+   size_t to4;
+   size_t to_shift;
+   size_t len_s = len;
+   ssize_t ret;
+
+   spi_set_region_id(spi, region);
+
+   to4 = ALIGN_DOWN(to, sizeof(u32));
+   to_shift = min(sizeof(u32) - ((size_t)to - to4), len);
+   if (to - to4) {
+   ret = spi_rewrite_partial(spi, to4, to - to4, to_shift,
+ (uint32_t *)[0]);
+   if (ret < 0)
+   return ret;
+
+   buf += to_shift;
+   to += to_shift;
+   len_s -= to_shift;
+   }
+
+   len8 = ALIGN_DOWN(len_s, sizeof(u64));
+   for (i = 0; i < len8; i += sizeof(u64)) {
+   u64 data;
+
+   memcpy(, [i], sizeof(u64));
+   spi_write64(spi, to + i, data);
+   if (spi_error(spi))
+   return -EIO;
+   }
+
+   len4 = len_s - len8;
+   if (len4 >= sizeof(u32)) {
+   u32 data;
+
+   memcpy(, [i], sizeof(u32));
+   spi_write32(spi, to + i, data);
+   if (spi_error(spi))
+   return -EIO;
+   i += sizeof(u32);
+   len4 -= sizeof(u32);
+   }
+
+   if (len4 > 0) {
+   ret = spi_rewrite_partial(spi, to + i, 0, len4,
+ (uint32_t *)[i]);
+   if (ret < 0)
+   return ret;
+   }
+
+   return len;
+}
+
+__maybe_unused
+static ssize_t spi_read(struct intel_dg_spi *spi, u8 region,
+   loff_t from, size_t len, unsigned char *buf)
+{
+   size_t i;
+   size_t len8;
+   size_t len4;
+   size_t from4;
+   size_t from_shift;
+   size_t len_s = len;
+
+   spi_set_region_id(spi, region);
+
+   from4 = ALIGN_DOWN(from, sizeof(u32));
+   from_shift = min(sizeof(u32) - ((size_t)from - from4), len);
+
+   if (from - from4) {
+   u32 data = spi_read32(spi, from4);
+
+   if (spi_error(spi))
+   return -EIO;
+   memcpy([0], (u8 *) + (from - from4), from_shift);
+   len_s -= from_shift;
+   buf += from_shift;
+   

[PATCH 05/13] spi: add driver for intel graphics on-die spi device

2024-03-28 Thread Alexander Usyskin
Add auxiliary driver for intel discrete graphics
on-die spi device.

CC: Rodrigo Vivi 
Signed-off-by: Tomas Winkler 
Signed-off-by: Lucas De Marchi 
Signed-off-by: Alexander Usyskin 
---
 drivers/spi/Kconfig|  11 +++
 drivers/spi/Makefile   |   1 +
 drivers/spi/spi-intel-dg.c | 146 +
 3 files changed, 158 insertions(+)
 create mode 100644 drivers/spi/spi-intel-dg.c

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index ddae0fde798e..d84896e6e7a0 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -507,6 +507,17 @@ config SPI_INTEL_PLATFORM
  To compile this driver as a module, choose M here: the module
  will be called spi-intel-platform.
 
+config SPI_INTEL_DG
+   tristate "Intel Discrete Graphic SPI flash driver"
+   depends on AUXILIARY_BUS || COMPILE_TEST
+   depends on MTD
+   help
+ This enables support for Intel Discrete Graphic SPI
+ auxiliary device.
+
+ To compile this driver as a module, choose M here: the module
+ will be called spi-intel-dg.
+
 config SPI_JCORE
tristate "J-Core SPI Master"
depends on OF && (SUPERH || COMPILE_TEST)
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index 4ff8d725ba5e..e158761d6844 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -69,6 +69,7 @@ obj-$(CONFIG_SPI_INGENIC) += spi-ingenic.o
 obj-$(CONFIG_SPI_INTEL)+= spi-intel.o
 obj-$(CONFIG_SPI_INTEL_PCI)+= spi-intel-pci.o
 obj-$(CONFIG_SPI_INTEL_PLATFORM)   += spi-intel-platform.o
+obj-$(CONFIG_SPI_INTEL_DG) += spi-intel-dg.o
 obj-$(CONFIG_SPI_LANTIQ_SSC)   += spi-lantiq-ssc.o
 obj-$(CONFIG_SPI_JCORE)+= spi-jcore.o
 obj-$(CONFIG_SPI_LJCA) += spi-ljca.o
diff --git a/drivers/spi/spi-intel-dg.c b/drivers/spi/spi-intel-dg.c
new file mode 100644
index ..8dc5448fc901
--- /dev/null
+++ b/drivers/spi/spi-intel-dg.c
@@ -0,0 +1,146 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright(c) 2019-2024, Intel Corporation. All rights reserved.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct intel_dg_spi {
+   struct kref refcnt;
+   void __iomem *base;
+   size_t size;
+   unsigned int nregions;
+   struct {
+   const char *name;
+   u8 id;
+   u64 offset;
+   u64 size;
+   } regions[];
+};
+
+static void intel_dg_spi_release(struct kref *kref)
+{
+   struct intel_dg_spi *spi = container_of(kref, struct intel_dg_spi, 
refcnt);
+   int i;
+
+   pr_debug("freeing spi memory\n");
+   for (i = 0; i < spi->nregions; i++)
+   kfree(spi->regions[i].name);
+   kfree(spi);
+}
+
+static int intel_dg_spi_probe(struct auxiliary_device *aux_dev,
+ const struct auxiliary_device_id *aux_dev_id)
+{
+   struct intel_dg_spi_dev *ispi = 
auxiliary_dev_to_intel_dg_spi_dev(aux_dev);
+   struct device *device;
+   struct intel_dg_spi *spi;
+   unsigned int nregions;
+   unsigned int i, n;
+   size_t size;
+   char *name;
+   size_t name_size;
+   int ret;
+
+   device = _dev->dev;
+
+   /* count available regions */
+   for (nregions = 0, i = 0; i < INTEL_DG_SPI_REGIONS; i++) {
+   if (ispi->regions[i].name)
+   nregions++;
+   }
+
+   if (!nregions) {
+   dev_err(device, "no regions defined\n");
+   return -ENODEV;
+   }
+
+   size = sizeof(*spi) + sizeof(spi->regions[0]) * nregions;
+   spi = kzalloc(size, GFP_KERNEL);
+   if (!spi)
+   return -ENOMEM;
+
+   kref_init(>refcnt);
+
+   spi->nregions = nregions;
+   for (n = 0, i = 0; i < INTEL_DG_SPI_REGIONS; i++) {
+   if (ispi->regions[i].name) {
+   name_size = strlen(dev_name(_dev->dev)) +
+   strlen(ispi->regions[i].name) + 2; /* for 
point */
+   name = kzalloc(name_size, GFP_KERNEL);
+   if (!name)
+   continue;
+   snprintf(name, name_size, "%s.%s",
+dev_name(_dev->dev), 
ispi->regions[i].name);
+   spi->regions[n].name = name;
+   spi->regions[n].id = i;
+   n++;
+   }
+   }
+
+   spi->base = devm_ioremap_resource(device, >bar);
+   if (IS_ERR(spi->base)) {
+   dev_err(device, "mmio not mapped\n");
+   ret = PTR_ERR(spi->base);
+   goto err;
+   }
+
+   dev_set_drvdata(_dev->dev, spi);
+
+   dev_dbg(device, "bound\n");
+
+   return 0;
+
+err:
+   kref_put(>refcnt, intel_dg_spi_release);
+   return ret;
+}
+
+static void intel_dg_spi_remove(struct 

[PATCH 06/13] spi: intel-dg: implement region enumeration

2024-03-28 Thread Alexander Usyskin
In intel-dg spi, there is no access to the spi controller,
the information is extracted from the descriptor region.

CC: Rodrigo Vivi 
CC: Lucas De Marchi 
Signed-off-by: Tomas Winkler 
Signed-off-by: Alexander Usyskin 
---
 drivers/spi/spi-intel-dg.c | 190 +
 1 file changed, 190 insertions(+)

diff --git a/drivers/spi/spi-intel-dg.c b/drivers/spi/spi-intel-dg.c
index 8dc5448fc901..8ef9dccc9062 100644
--- a/drivers/spi/spi-intel-dg.c
+++ b/drivers/spi/spi-intel-dg.c
@@ -17,14 +17,197 @@ struct intel_dg_spi {
void __iomem *base;
size_t size;
unsigned int nregions;
+   u32 access_map;
struct {
const char *name;
u8 id;
u64 offset;
u64 size;
+   unsigned int is_readable:1;
+   unsigned int is_writable:1;
} regions[];
 };
 
+#define SPI_TRIGGER_REG   0x
+#define SPI_VALSIG_REG0x0010
+#define SPI_ADDRESS_REG   0x0040
+#define SPI_REGION_ID_REG 0x0044
+/*
+ * [15:0]-Erase size = 0x0010 4K 0x0080 32K 0x0100 64K
+ * [23:16]-Reserved
+ * [31:24]-Erase SPI RegionID
+ */
+#define SPI_ERASE_REG 0x0048
+#define SPI_ACCESS_ERROR_REG  0x0070
+#define SPI_ADDRESS_ERROR_REG 0x0074
+
+/* Flash Valid Signature */
+#define SPI_FLVALSIG  0x0FF0A55A
+
+#define SPI_MAP_ADDR_MASK 0x00FF
+#define SPI_MAP_ADDR_SHIFT0x0004
+
+#define REGION_ID_DESCRIPTOR  0
+/* Flash Region Base Address */
+#define FRBA  0x40
+/* Flash Region __n - Flash Descriptor Record */
+#define FLREG(__n)  (FRBA + ((__n) * 4))
+/*  Flash Map 1 Register */
+#define FLMAP1_REG  0x18
+#define FLMSTR4_OFFSET 0x00C
+
+#define SPI_ACCESS_ERROR_PCIE_MASK 0x7
+
+static inline void spi_set_region_id(struct intel_dg_spi *spi, u8 region)
+{
+   iowrite32((u32)region, spi->base + SPI_REGION_ID_REG);
+}
+
+static inline u32 spi_error(struct intel_dg_spi *spi)
+{
+   u32 reg = ioread32(spi->base + SPI_ACCESS_ERROR_REG) &
+ SPI_ACCESS_ERROR_PCIE_MASK;
+
+   /* reset error bits */
+   if (reg)
+   iowrite32(reg, spi->base + SPI_ACCESS_ERROR_REG);
+
+   return reg;
+}
+
+static inline u32 spi_read32(struct intel_dg_spi *spi, u32 address)
+{
+   void __iomem *base = spi->base;
+
+   iowrite32(address, base + SPI_ADDRESS_REG);
+
+   return ioread32(base + SPI_TRIGGER_REG);
+}
+
+static int spi_get_access_map(struct intel_dg_spi *spi)
+{
+   u32 flmap1;
+   u32 fmba;
+   u32 fmstr4;
+   u32 fmstr4_addr;
+
+   spi_set_region_id(spi, REGION_ID_DESCRIPTOR);
+
+   flmap1 = spi_read32(spi, FLMAP1_REG);
+   if (spi_error(spi))
+   return -EIO;
+   /* Get Flash Master Baser Address (FMBA) */
+   fmba = ((flmap1 & SPI_MAP_ADDR_MASK) << SPI_MAP_ADDR_SHIFT);
+   fmstr4_addr = fmba + FLMSTR4_OFFSET;
+
+   fmstr4 = spi_read32(spi, fmstr4_addr);
+   if (spi_error(spi))
+   return -EIO;
+
+   spi->access_map = fmstr4;
+   return 0;
+}
+
+static bool spi_region_readable(struct intel_dg_spi *spi, u8 region)
+{
+   if (region < 12)
+   return spi->access_map & (1 << (region + 8)); /* [19:8] */
+   else
+   return spi->access_map & (1 << (region - 12)); /* [3:0] */
+}
+
+static bool spi_region_writeable(struct intel_dg_spi *spi, u8 region)
+{
+   if (region < 12)
+   return spi->access_map & (1 << (region + 20)); /* [31:20] */
+   else
+   return spi->access_map & (1 << (region - 8)); /* [7:4] */
+}
+
+static int intel_dg_spi_is_valid(struct intel_dg_spi *spi)
+{
+   u32 is_valid;
+
+   spi_set_region_id(spi, REGION_ID_DESCRIPTOR);
+
+   is_valid = spi_read32(spi, SPI_VALSIG_REG);
+   if (spi_error(spi))
+   return -EIO;
+
+   if (is_valid != SPI_FLVALSIG)
+   return -ENODEV;
+
+   return 0;
+}
+
+static int intel_dg_spi_init(struct intel_dg_spi *spi, struct device *device)
+{
+   int ret;
+   unsigned int i, n;
+
+   /* clean error register, previous errors are ignored */
+   spi_error(spi);
+
+   ret = intel_dg_spi_is_valid(spi);
+   if (ret) {
+   dev_err(device, "The SPI is not valid %d\n", ret);
+   return ret;
+   }
+
+   if (spi_get_access_map(spi))
+   return -EIO;
+
+   for (i = 0, n = 0; i < spi->nregions; i++) {
+   u32 address, base, limit, region;
+   u8 id = spi->regions[i].id;
+
+   address = FLREG(id);
+   region = spi_read32(spi, address);
+
+   base = (region & 0x) << 12;
+   limit = (((region & 0x) >> 16) << 12) | 0xFFF;
+
+   dev_dbg(device, "[%d] %s: region: 0x%08X base: 0x%08x limit: 
0x%08x\n",
+   id, spi->regions[i].name, region, base, limit);
+
+   if (base >= limit || (i > 

[PATCH 03/13] drm/i915/spi: add intel_spi_region map

2024-03-28 Thread Alexander Usyskin
Add the dGFX spi region map and convey it via auxiliary device
to the spi child device.

CC: Rodrigo Vivi 
CC: Lucas De Marchi 
Signed-off-by: Alexander Usyskin 
Signed-off-by: Tomas Winkler 
---
 drivers/gpu/drm/i915/spi/intel_spi.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/spi/intel_spi.c 
b/drivers/gpu/drm/i915/spi/intel_spi.c
index 17e4c7861ef5..8dd4065551e2 100644
--- a/drivers/gpu/drm/i915/spi/intel_spi.c
+++ b/drivers/gpu/drm/i915/spi/intel_spi.c
@@ -11,6 +11,13 @@
 
 #define GEN12_GUNIT_SPI_SIZE 0x80
 
+static const struct intel_dg_spi_region regions[INTEL_DG_SPI_REGIONS] = {
+   [0] = { .name = "DESCRIPTOR", },
+   [2] = { .name = "GSC", },
+   [11] = { .name = "OptionROM", },
+   [12] = { .name = "DAM", },
+};
+
 static void i915_spi_release_dev(struct device *dev)
 {
 }
@@ -31,6 +38,7 @@ void intel_spi_init(struct drm_i915_private *dev_priv)
spi->bar.end = spi->bar.start + GEN12_GUNIT_SPI_SIZE - 1;
spi->bar.flags = IORESOURCE_MEM;
spi->bar.desc = IORES_DESC_NONE;
+   spi->regions = regions;
 
aux_dev->name = "spi";
aux_dev->id = (pci_domain_nr(pdev->bus) << 16) |
-- 
2.34.1



[PATCH 04/13] drm/i915/spi: add support for access mode

2024-03-28 Thread Alexander Usyskin
Check SPI access mode from GSC FW status registers
and overwrite access status read from SPI descriptor, if needed.

Signed-off-by: Alexander Usyskin 
---
 drivers/gpu/drm/i915/spi/intel_spi.c | 25 +
 1 file changed, 25 insertions(+)

diff --git a/drivers/gpu/drm/i915/spi/intel_spi.c 
b/drivers/gpu/drm/i915/spi/intel_spi.c
index 8dd4065551e2..747e43313c6f 100644
--- a/drivers/gpu/drm/i915/spi/intel_spi.c
+++ b/drivers/gpu/drm/i915/spi/intel_spi.c
@@ -10,6 +10,7 @@
 #include "spi/intel_spi.h"
 
 #define GEN12_GUNIT_SPI_SIZE 0x80
+#define HECI_FW_STATUS_2_SPI_ACCESS_MODE BIT(3)
 
 static const struct intel_dg_spi_region regions[INTEL_DG_SPI_REGIONS] = {
[0] = { .name = "DESCRIPTOR", },
@@ -22,6 +23,29 @@ static void i915_spi_release_dev(struct device *dev)
 {
 }
 
+static bool i915_spi_writeable_override(struct drm_i915_private *dev_priv)
+{
+   struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev);
+   resource_size_t base;
+   bool writeable_override;
+
+   if (IS_DG1(dev_priv)) {
+   base = DG1_GSC_HECI2_BASE;
+   } else if (IS_DG2(dev_priv)) {
+   base = DG2_GSC_HECI2_BASE;
+   } else {
+   dev_err(>dev, "Unknown platform\n");
+   return true;
+   }
+
+   writeable_override =
+   !(intel_uncore_read(_priv->uncore, HECI_FWSTS(base, 2)) &
+ HECI_FW_STATUS_2_SPI_ACCESS_MODE);
+   if (writeable_override)
+   dev_info(>dev, "SPI access overridden by jumper\n");
+   return writeable_override;
+}
+
 void intel_spi_init(struct drm_i915_private *dev_priv)
 {
struct intel_dg_spi_dev *spi = _priv->spi;
@@ -33,6 +57,7 @@ void intel_spi_init(struct drm_i915_private *dev_priv)
if (!IS_DGFX(dev_priv))
return;
 
+   spi->writeable_override = i915_spi_writeable_override(dev_priv);
spi->bar.parent = >resource[0];
spi->bar.start = GEN12_GUNIT_SPI_BASE + pdev->resource[0].start;
spi->bar.end = spi->bar.start + GEN12_GUNIT_SPI_SIZE - 1;
-- 
2.34.1



  1   2   >