Re: v6.8 stable backport request for drm/i915

2024-04-04 Thread Greg KH
On Thu, Apr 04, 2024 at 05:25:29PM -0400, Rodrigo Vivi wrote:
> On Thu, Apr 04, 2024 at 04:53:07PM +0300, Imre Deak wrote:
> > On Thu, Apr 04, 2024 at 04:29:04PM +0300, Imre Deak wrote:
> > > Stable team, please backport the following upstream commit to 6.8:
> > > 
> > > commit 7a51a2aa2384 ("drm/i915/dp: Fix DSC state HW readout for SST 
> > > connectors")
> > 
> > Just noticed that the above commit is not yet upstream, still only
> > queued in drm-intel-next. I presumed patches will be cherry-picked from
> > drm-intel-next to drm-intel-fixes based on the Fixes: tag, so I only
> > pushed the above patch to drm-intel-next; maybe the cherry picking
> > doesn't (always) happen automatically.
> 
> This patch was cherry-picked this week and sent with the drm-intel-fixes
> pull request targeting v6.9-rc3
> 
> Since it has the proper 'Fixes:' tag, it will likely get propagated to
> the stable branches 'automagically' in some near future.



This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.




Re: [PATCH 05/12] drm/client: Nuke outdated fastboot comment

2024-04-04 Thread Dmitry Baryshkov
On Thu, Apr 04, 2024 at 11:33:29PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> Remove the tall tale about fastboot vs. user mode vs.
> adjusted mode. crtc->mode == crtc->state->mode, so none
> of this makes any sense. I suppose it may have been true
> long ago in the past.
> 
> Signed-off-by: Ville Syrjälä 
> ---
>  drivers/gpu/drm/drm_client_modeset.c | 10 --
>  1 file changed, 10 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov 

-- 
With best wishes
Dmitry


Re: [PATCH 04/12] drm/client: Add a FIXME around crtc->mode usage

2024-04-04 Thread Dmitry Baryshkov
On Thu, Apr 04, 2024 at 11:33:28PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> crtc->mode is legacy junk and shouldn't really be used with
> atomic drivers.
> 
> Most (all?) atomic drivers do end up still calling
> drm_atomic_helper_update_legacy_modeset_state() at some
> point, so crtc->mode does still get populated, and this
> does work for now. But eventually would be nice to eliminate
> all the legacy stuff from atomic drivers.
> 
> Switching to crtc->state->mode would require some bigger
> changes however, as we currently drop the crtc->mutex
> before we're done using the mode. So leave the junk in
> for now and just add a FIXME to remind us that this
> needs fixing.


What about using allocated duplicate modes to fill modes[] array? This
requires additional allocations, but it will solve most if not all modes
lifetime issues.

> 
> Signed-off-by: Ville Syrjälä 
> ---
>  drivers/gpu/drm/drm_client_modeset.c | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_client_modeset.c 
> b/drivers/gpu/drm/drm_client_modeset.c
> index 2b7d0be04911..8ef03608b424 100644
> --- a/drivers/gpu/drm/drm_client_modeset.c
> +++ b/drivers/gpu/drm/drm_client_modeset.c
> @@ -699,6 +699,10 @@ static bool drm_client_firmware_config(struct 
> drm_client_dev *client,
>*
>* This is crtc->mode and not crtc->state->mode for the
>* fastboot check to work correctly.
> +  *
> +  * FIXME using legacy crtc->mode with atomic drivers
> +  * is dodgy. Switch to crtc->state->mode, after taking
> +  * care of the resulting locking/lifetime issues.
>*/
>   DRM_DEBUG_KMS("looking for current mode on connector 
> %s\n",
> connector->name);
> -- 
> 2.43.2
> 

-- 
With best wishes
Dmitry


Re: [PATCH 03/12] drm/client: Use drm_mode_destroy()

2024-04-04 Thread Dmitry Baryshkov
On Thu, Apr 04, 2024 at 11:33:27PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> Prefer drm_mode_destroy() over bare kfree(), for consistency
> and setting a good example.
> 
> Signed-off-by: Ville Syrjälä 
> ---
>  drivers/gpu/drm/drm_client_modeset.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov 

-- 
With best wishes
Dmitry


Re: [PATCH 02/12] drm/client: s/drm_connector_has_preferred_mode/drm_connector_preferred_mode/

2024-04-04 Thread Dmitry Baryshkov
On Thu, Apr 04, 2024 at 11:33:26PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> Drop the "has" from drm_connector_has_preferred_mode() to better
> describe what it does.
> 
> Signed-off-by: Ville Syrjälä 
> ---
>  drivers/gpu/drm/drm_client_modeset.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Dmitry Baryshkov 

-- 
With best wishes
Dmitry


Re: [PATCH 01/12] drm/client: Fully protect modes[] with dev->mode_config.mutex

2024-04-04 Thread Dmitry Baryshkov
On Thu, Apr 04, 2024 at 11:33:25PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> The modes[] array contains pointers to modes on the connectors'
> mode lists, which are protected by dev->mode_config.mutex.
> Thus we need to extend modes[] the same protection or by the
> time we use it the elements may already be pointing to
> freed/reused memory.
> 
> Cc: sta...@vger.kernel.org
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10583
> Signed-off-by: Ville Syrjälä 

Reviewed-by: Dmitry Baryshkov 

I tried looking for the proper Fixes tag, but it looks like it might be
something like 386516744ba4 ("drm/fb: fix fbdev object model + cleanup 
properly.")


> ---
>  drivers/gpu/drm/drm_client_modeset.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_client_modeset.c 
> b/drivers/gpu/drm/drm_client_modeset.c
> index 871e4e2129d6..0683a129b362 100644
> --- a/drivers/gpu/drm/drm_client_modeset.c
> +++ b/drivers/gpu/drm/drm_client_modeset.c
> @@ -777,6 +777,7 @@ int drm_client_modeset_probe(struct drm_client_dev 
> *client, unsigned int width,
>   unsigned int total_modes_count = 0;
>   struct drm_client_offset *offsets;
>   unsigned int connector_count = 0;
> + /* points to modes protected by mode_config.mutex */
>   struct drm_display_mode **modes;
>   struct drm_crtc **crtcs;
>   int i, ret = 0;
> @@ -845,7 +846,6 @@ int drm_client_modeset_probe(struct drm_client_dev 
> *client, unsigned int width,
>   drm_client_pick_crtcs(client, connectors, connector_count,
> crtcs, modes, 0, width, height);
>   }
> - mutex_unlock(>mode_config.mutex);
>  
>   drm_client_modeset_release(client);
>  
> @@ -875,6 +875,7 @@ int drm_client_modeset_probe(struct drm_client_dev 
> *client, unsigned int width,
>   modeset->y = offset->y;
>   }
>   }
> + mutex_unlock(>mode_config.mutex);
>  
>   mutex_unlock(>modeset_mutex);
>  out:
> -- 
> 2.43.2
> 

-- 
With best wishes
Dmitry


linux-next: build warnings after merge of the drm-intel tree

2024-04-04 Thread Stephen Rothwell
Hi all,

After merging the drm-intel tree, today's linux-next build (htmldocs)
produced these warnings:

include/drm/display/drm_dp_helper.h:126: warning: Function parameter or struct 
member 'mode' not described in 'drm_dp_as_sdp'
include/drm/display/drm_dp_helper.h:126: warning: Excess struct member 
'operation_mode' description in 'drm_dp_as_sdp'

Introduced by commit

  0bbb8f594e33 ("drm/dp: Add Adaptive Sync SDP logging")

-- 
Cheers,
Stephen Rothwell


pgph2aHlroqT0.pgp
Description: OpenPGP digital signature


✓ Fi.CI.BAT: success for drm/i915: Bigjoiner modeset sequence redesign and MST support (rev3)

2024-04-04 Thread Patchwork
== Series Details ==

Series: drm/i915: Bigjoiner modeset sequence redesign and MST support (rev3)
URL   : https://patchwork.freedesktop.org/series/131797/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14528 -> Patchwork_131797v3


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (39 -> 37)
--

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

Known issues


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

### IGT changes ###

 Issues hit 

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

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

  * igt@gem_lmem_swapping@basic@lmem0:
- bat-dg2-11: NOTRUN -> [FAIL][3] ([i915#10378])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131797v3/bat-dg2-11/igt@gem_lmem_swapping@ba...@lmem0.html

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

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

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

  * igt@gem_render_tiled_blits@basic:
- bat-arls-2: NOTRUN -> [SKIP][9] ([i915#10197] / [i915#10211] / 
[i915#4079])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131797v3/bat-arls-2/igt@gem_render_tiled_bl...@basic.html

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

  * igt@gem_tiled_pread_basic:
- bat-dg2-11: NOTRUN -> [SKIP][11] ([i915#4079]) +1 other test skip
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131797v3/bat-dg2-11/igt@gem_tiled_pread_basic.html
- bat-arls-2: NOTRUN -> [SKIP][12] ([i915#10206] / [i915#4079])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131797v3/bat-arls-2/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_131797v3/bat-dg2-11/igt@i915_pm_...@basic-api.html
- bat-arls-2: NOTRUN -> [SKIP][14] ([i915#10209])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131797v3/bat-arls-2/igt@i915_pm_...@basic-api.html

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

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-arls-2: NOTRUN -> [SKIP][16] ([i915#10200]) +9 other tests 
skip
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131797v3/bat-arls-2/igt@kms_addfb_ba...@addfb25-y-tiled-small-legacy.html
- bat-dg2-11: NOTRUN -> [SKIP][17] ([i915#5190])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131797v3/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_131797v3/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][19] ([i915#4103] / [i915#4213]) +1 
other test skip
   [19]: 

✗ Fi.CI.SPARSE: warning for drm/i915: Bigjoiner modeset sequence redesign and MST support (rev3)

2024-04-04 Thread Patchwork
== Series Details ==

Series: drm/i915: Bigjoiner modeset sequence redesign and MST support (rev3)
URL   : https://patchwork.freedesktop.org/series/131797/
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 

✗ Fi.CI.CHECKPATCH: warning for drm/i915: Bigjoiner modeset sequence redesign and MST support (rev3)

2024-04-04 Thread Patchwork
== Series Details ==

Series: drm/i915: Bigjoiner modeset sequence redesign and MST support (rev3)
URL   : https://patchwork.freedesktop.org/series/131797/
State : warning

== Summary ==

Error: dim checkpatch failed
64805a6e8087 drm/i915: Update pipes in reverse order for bigjoiner
-:86: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__state' - possible 
side-effects?
#86: FILE: drivers/gpu/drm/i915/display/intel_display.h:347:
+#define for_each_new_intel_crtc_in_state_reverse(__state, crtc, 
new_crtc_state, __i) \
+   for ((__i) = (__state)->base.dev->mode_config.num_crtc - 1; \
+(__i) >= 0  && \
+((crtc) = to_intel_crtc((__state)->base.crtcs[__i].ptr), \
+ (new_crtc_state) = 
to_intel_crtc_state((__state)->base.crtcs[__i].new_state), 1); \
+(__i)--) \
+   for_each_if(crtc)

-:86: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'crtc' - possible 
side-effects?
#86: FILE: drivers/gpu/drm/i915/display/intel_display.h:347:
+#define for_each_new_intel_crtc_in_state_reverse(__state, crtc, 
new_crtc_state, __i) \
+   for ((__i) = (__state)->base.dev->mode_config.num_crtc - 1; \
+(__i) >= 0  && \
+((crtc) = to_intel_crtc((__state)->base.crtcs[__i].ptr), \
+ (new_crtc_state) = 
to_intel_crtc_state((__state)->base.crtcs[__i].new_state), 1); \
+(__i)--) \
+   for_each_if(crtc)

-:86: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__i' - possible side-effects?
#86: FILE: drivers/gpu/drm/i915/display/intel_display.h:347:
+#define for_each_new_intel_crtc_in_state_reverse(__state, crtc, 
new_crtc_state, __i) \
+   for ((__i) = (__state)->base.dev->mode_config.num_crtc - 1; \
+(__i) >= 0  && \
+((crtc) = to_intel_crtc((__state)->base.crtcs[__i].ptr), \
+ (new_crtc_state) = 
to_intel_crtc_state((__state)->base.crtcs[__i].new_state), 1); \
+(__i)--) \
+   for_each_if(crtc)

total: 0 errors, 0 warnings, 3 checks, 40 lines checked
109ce10fb958 drm/i915/psr: Disable PSR when bigjoiner is used
092a582e7793 drm/i915: Disable port sync when bigjoiner is used
ab6f55f1c1f9 drm/i915: Disable live M/N updates when using bigjoiner
b8d2a8a7126c drm/i915/vrr: Disable VRR when using bigjoiner
8cf2e8910507 drm/i915: Fix intel_modeset_pipe_config_late() for bigjoiner
31c625608506 drm/i915: s/intel_dp_can_bigjoiner()/intel_dp_has_bigjoiner()/
b75e532ae3f2 drm/i915: Extract intel_dp_joiner_needs_dsc()
43196b2562b6 drm/i915/mst: Check intel_dp_joiner_needs_dsc()
4ed822db08f4 drm/i915: Pass connector to intel_dp_need_bigjoiner()
07fd4e245f9e drm/i915: Introduce intel_crtc_joined_pipe_mask()
77c9494e9ab0 drm/i915: Extract intel_ddi_post_disable_hdmi_or_sst()
0a8a9cd81700 drm/i915: Utilize intel_crtc_joined_pipe_mask() more
fe7a5e821875 drm/i915: Handle joined pipes inside hsw_crtc_disable()
cf1c9bf0f176 drm/i915: Handle joined pipes inside hsw_crtc_enable()
-:11: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line 
(possible unwrapped commit description?)
#11: 
That way we can also remove a bunch of checks like 
intel_crtc_is_bigjoiner_slave.

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

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

total: 1 errors, 1 warnings, 1 checks, 275 lines checked
aedefafbd992 drm/i915/mst: Add bigjoiner handling to MST modeset sequence
68f275de39a5 drm/i915: Allow bigjoiner for MST




✗ Fi.CI.BAT: failure for drm/i915: Bigjoiner modeset sequence redesign and MST support (rev2)

2024-04-04 Thread Patchwork
== Series Details ==

Series: drm/i915: Bigjoiner modeset sequence redesign and MST support (rev2)
URL   : https://patchwork.freedesktop.org/series/131797/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14528 -> Patchwork_131797v2


Summary
---

  **FAILURE**

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

Participating hosts (39 -> 38)
--

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

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_selftest@live@gt_timelines:
- bat-arls-2: NOTRUN -> [ABORT][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131797v2/bat-arls-2/igt@i915_selftest@live@gt_timelines.html

  
Known issues


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

### IGT changes ###

 Issues hit 

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

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

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

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

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

  * igt@gem_render_tiled_blits@basic:
- bat-arls-2: NOTRUN -> [SKIP][9] ([i915#10197] / [i915#10211] / 
[i915#4079])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131797v2/bat-arls-2/igt@gem_render_tiled_bl...@basic.html

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

  * igt@gem_tiled_pread_basic:
- bat-dg2-11: NOTRUN -> [SKIP][11] ([i915#4079]) +1 other test skip
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131797v2/bat-dg2-11/igt@gem_tiled_pread_basic.html
- bat-arls-2: NOTRUN -> [SKIP][12] ([i915#10206] / [i915#4079])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131797v2/bat-arls-2/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_131797v2/bat-dg2-11/igt@i915_pm_...@basic-api.html
- bat-arls-2: NOTRUN -> [SKIP][14] ([i915#10209])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131797v2/bat-arls-2/igt@i915_pm_...@basic-api.html

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

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-arls-2: NOTRUN -> [SKIP][16] ([i915#10200]) +9 other tests 
skip
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131797v2/bat-arls-2/igt@kms_addfb_ba...@addfb25-y-tiled-small-legacy.html
- bat-dg2-11: NOTRUN -> [SKIP][17] ([i915#5190])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131797v2/bat-dg2-11/igt@kms_addfb_ba...@addfb25-y-tiled-small-legacy.html

  * 

✗ Fi.CI.SPARSE: warning for drm/i915: Bigjoiner modeset sequence redesign and MST support (rev2)

2024-04-04 Thread Patchwork
== Series Details ==

Series: drm/i915: Bigjoiner modeset sequence redesign and MST support (rev2)
URL   : https://patchwork.freedesktop.org/series/131797/
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 

✗ Fi.CI.CHECKPATCH: warning for drm/i915: Bigjoiner modeset sequence redesign and MST support (rev2)

2024-04-04 Thread Patchwork
== Series Details ==

Series: drm/i915: Bigjoiner modeset sequence redesign and MST support (rev2)
URL   : https://patchwork.freedesktop.org/series/131797/
State : warning

== Summary ==

Error: dim checkpatch failed
f817bfecf2ae drm/i915: Update pipes in reverse order for bigjoiner
-:86: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__state' - possible 
side-effects?
#86: FILE: drivers/gpu/drm/i915/display/intel_display.h:347:
+#define for_each_new_intel_crtc_in_state_reverse(__state, crtc, 
new_crtc_state, __i) \
+   for ((__i) = (__state)->base.dev->mode_config.num_crtc - 1; \
+(__i) >= 0  && \
+((crtc) = to_intel_crtc((__state)->base.crtcs[__i].ptr), \
+ (new_crtc_state) = 
to_intel_crtc_state((__state)->base.crtcs[__i].new_state), 1); \
+(__i)--) \
+   for_each_if(crtc)

-:86: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'crtc' - possible 
side-effects?
#86: FILE: drivers/gpu/drm/i915/display/intel_display.h:347:
+#define for_each_new_intel_crtc_in_state_reverse(__state, crtc, 
new_crtc_state, __i) \
+   for ((__i) = (__state)->base.dev->mode_config.num_crtc - 1; \
+(__i) >= 0  && \
+((crtc) = to_intel_crtc((__state)->base.crtcs[__i].ptr), \
+ (new_crtc_state) = 
to_intel_crtc_state((__state)->base.crtcs[__i].new_state), 1); \
+(__i)--) \
+   for_each_if(crtc)

-:86: CHECK:MACRO_ARG_REUSE: Macro argument reuse '__i' - possible side-effects?
#86: FILE: drivers/gpu/drm/i915/display/intel_display.h:347:
+#define for_each_new_intel_crtc_in_state_reverse(__state, crtc, 
new_crtc_state, __i) \
+   for ((__i) = (__state)->base.dev->mode_config.num_crtc - 1; \
+(__i) >= 0  && \
+((crtc) = to_intel_crtc((__state)->base.crtcs[__i].ptr), \
+ (new_crtc_state) = 
to_intel_crtc_state((__state)->base.crtcs[__i].new_state), 1); \
+(__i)--) \
+   for_each_if(crtc)

total: 0 errors, 0 warnings, 3 checks, 40 lines checked
1c096c7c7f11 drm/i915/psr: Disable PSR when bigjoiner is used
92634f79c716 drm/i915: Disable port sync when bigjoiner is used
5ccab6f2d622 drm/i915: Disable live M/N updates when using bigjoiner
4c078f970c6d drm/i915/vrr: Disable VRR when using bigjoiner
b5c1397ace26 drm/i915: Fix intel_modeset_pipe_config_late() for bigjoiner
475267775ae9 drm/i915: s/intel_dp_can_bigjoiner()/intel_dp_has_bigjoiner()/
3a923fd6f3c7 drm/i915: Extract intel_dp_joiner_needs_dsc()
cda03d83a42d drm/i915/mst: Check intel_dp_joiner_needs_dsc()
8f9d67357dbc drm/i915: Pass connector to intel_dp_need_bigjoiner()
5d9d0c9c8d82 drm/i915: Introduce intel_crtc_joined_pipe_mask()
32258cb98972 drm/i915: Extract intel_ddi_post_disable_hdmi_or_sst()
a553727cc947 drm/i915: Utilize intel_crtc_joined_pipe_mask() more
ae82df63aaca drm/i915: Handle joined pipes inside hsw_crtc_disable()
657f77a42177 drm/i915: Handle joined pipes inside hsw_crtc_enable()
-:11: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line 
(possible unwrapped commit description?)
#11: 
That way we can also remove a bunch of checks like 
intel_crtc_is_bigjoiner_slave.

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

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

total: 1 errors, 1 warnings, 1 checks, 275 lines checked
9c057ae8d3d2 drm/i915/mst: Add bigjoiner handling to MST modeset sequence
780db11dbe03 drm/i915: Allow bigjoiner for MST




[PATCH v2 17/17] drm/i915: Allow bigjoiner for MST

2024-04-04 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]

Reviewed-by: Manasi Navare 
Reviewed-by: Arun R Murthy 
Signed-off-by: Vidya Srinivas 
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 v2 15/17] drm/i915: Handle joined pipes inside hsw_crtc_enable()

2024-04-04 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 
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 a7512e8e2630..b694fa6d9918 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 7bd7b059ac7d..e74f6d2aa2ff 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 v2 14/17] drm/i915: Handle joined pipes inside hsw_crtc_disable()

2024-04-04 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

Tested-by: Vidya Srinivas 
Reviewed-by: Arun R Murthy 
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 9f5ff11d74b8..7bd7b059ac7d 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)
@@ -6832,21 +6831,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)
@@ -6886,19 +6895,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 

[PATCH v2 16/17] drm/i915/mst: Add bigjoiner handling to MST modeset sequence

2024-04-04 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.

Reviewed-by: Arun R Murthy 
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 v2 13/17] drm/i915: Utilize intel_crtc_joined_pipe_mask() more

2024-04-04 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

Tested-by: Vidya Srinivas 
Reviewed-by: Arun R Murthy 
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 0846d005fa16..a7512e8e2630 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 v2 12/17] drm/i915: Extract intel_ddi_post_disable_hdmi_or_sst()

2024-04-04 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

Tested-by: Vidya Srinivas 
Reviewed-by: Arun R Murthy 
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 9bfe0fd3cffc..0846d005fa16 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 v2 08/17] drm/i915: Extract intel_dp_joiner_needs_dsc()

2024-04-04 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.

Tested-by: Vidya Srinivas 
Reviewed-by: Uma Shankar 
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 4553c0c41bc6..4f15529212a1 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1310,11 +1310,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)
@@ -2405,6 +2401,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,
@@ -2419,8 +2425,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 &&
@@ -2431,12 +2436,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 8d1c3ca28159..9f6be562fa08 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -120,6 +120,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 6497542e3e65..da731dc503aa 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 v2 11/17] drm/i915: Introduce intel_crtc_joined_pipe_mask()

2024-04-04 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

Tested-by: Vidya Srinivas 
Reviewed-by: Arun R Murthy 
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 909c0102c865..9bfe0fd3cffc 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 449dd8667685..9f5ff11d74b8 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 423074d6947a..898b11663377 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -416,6 +416,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 v2 10/17] drm/i915: Pass connector to intel_dp_need_bigjoiner()

2024-04-04 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.

Tested-by: Vidya Srinivas 
Reviewed-by: Uma Shankar 
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 4f15529212a1..66568bb1a0b0 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1202,10 +1202,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;
@@ -1249,7 +1249,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;
}
@@ -2419,7 +2420,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;
@@ -2432,7 +2433,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 9f6be562fa08..106ecfde36d9 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -151,6 +151,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 aac66c2f65a1..de364ed77c08 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 v2 09/17] drm/i915/mst: Check intel_dp_joiner_needs_dsc()

2024-04-04 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!

Tested-by: Vidya Srinivas 
Reviewed-by: Uma Shankar 
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 da731dc503aa..aac66c2f65a1 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 v2 07/17] drm/i915: s/intel_dp_can_bigjoiner()/intel_dp_has_bigjoiner()/

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

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

Tested-by: Vidya Srinivas 
Reviewed-by: Vandita Kulkarni 
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 4552005caae2..4553c0c41bc6 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -433,7 +433,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;
@@ -1207,7 +1207,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 9f880d7865d1..8d1c3ca28159 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -120,7 +120,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 v2 06/17] drm/i915: Fix intel_modeset_pipe_config_late() for bigjoiner

2024-04-04 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.

Tested-by: Vidya Srinivas 
Reviewed-by: Vandita Kulkarni 
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 0086a7422e86..449dd8667685 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4752,8 +4752,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 =
@@ -6295,27 +6293,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;
 
@@ -6411,16 +6419,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 v2 05/17] drm/i915/vrr: Disable VRR when using bigjoiner

2024-04-04 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.

Tested-by: Vidya Srinivas 
Reviewed-by: Vandita Kulkarni 
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 856378f8b90e..894ee97b3e1b 100644
--- a/drivers/gpu/drm/i915/display/intel_vrr.c
+++ b/drivers/gpu/drm/i915/display/intel_vrr.c
@@ -119,6 +119,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 v2 04/17] drm/i915: Disable live M/N updates when using bigjoiner

2024-04-04 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.

Tested-by: Vidya Srinivas 
Reviewed-by: Arun R Murthy 
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 8b67cd62f188..4552005caae2 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2752,7 +2752,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 v2 03/17] drm/i915: Disable port sync when bigjoiner is used

2024-04-04 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.

v2: Add a FIXME (Vandite)

Tested-by: Vidya Srinivas 
Reviewed-by: Vandita Kulkarni 
Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c 
b/drivers/gpu/drm/i915/display/intel_ddi.c
index 0654e989f45f..909c0102c865 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -4244,7 +4244,12 @@ static bool m_n_equal(const struct intel_link_m_n *m_n_1,
 static bool crtcs_port_sync_compatible(const struct intel_crtc_state 
*crtc_state1,
   const struct intel_crtc_state 
*crtc_state2)
 {
+   /*
+* FIXME the modeset sequence is currently wrong and
+* can't deal with bigjoiner + port sync at the same time.
+*/
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



[PATCH v2 02/17] drm/i915/psr: Disable PSR when bigjoiner is used

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

Bigjoiner seem to be causing all kinds of grief to the PSR
code currently. I don't believe there is any hardware issue
but the code simply not handling this correctly. For now
just disable PSR when bigjoiner is needed.

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

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c 
b/drivers/gpu/drm/i915/display/intel_psr.c
index eef62983e9db..a3ff916b53f9 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1584,6 +1584,17 @@ void intel_psr_compute_config(struct intel_dp *intel_dp,
return;
}
 
+   /*
+* FIXME figure out what is wrong with PSR+bigjoiner and
+* fix it. Presumably something related to the fact that
+* PSR is a transcoder level feature.
+*/
+   if (crtc_state->bigjoiner_pipes) {
+   drm_dbg_kms(_priv->drm,
+   "PSR disabled due to bigjoiner\n");
+   return;
+   }
+
if (CAN_PANEL_REPLAY(intel_dp))
crtc_state->has_panel_replay = true;
else
-- 
2.43.2



[PATCH v2 01/17] drm/i915: Update pipes in reverse order for bigjoiner

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

With bigjoiner the master crtc is the one that will send out the
uapi event/etc. We want that to happen after all the slaves are
done, so let's try to do the commits in reverse order so that
the master comes last.

Even worse, the modeset helper will simply complete the commit
on the slave pipe immediately as it consider the crtc to be inactive
(it can't see our crtc_state->hw.active/etc.).

With regular sync updates this generally doesn't matter all that
much as the slave pipe should typically finish its work during the
same frame as the master pipe. However in case the slave pipe's commit
slips into the next frame we end up in a bit of trouble. This is most
visible with either async flips (currently disabled with bigjoiner
exactly for this reason), and DSB gamma updates. With DSB the problem
happens because the DSB itself will wait until the next start vblank
before starting to execute. So if the master pipe already finished its
commit and the DSB on the slave pipe is still waiting for the next
vblank we will assume the DSB as gotten stuck and terminate it.

Reversing the commit order should ameliarate this for the most part
as the master pipe is guaranteed to start its commit after the slave
pipe started. The one thing that can still screw us over is the fact
that we aren't necessarily going to commit the pipes in the reverse
order as the actual order is dictated by the DDB overlap avoidance.
But that can only happen while other pipes are being enabled/disabled,
and so in the normal steady state we should be safe.

The full fix will involve making the commit machinery aware of the
slave pipes and not finish their commits prematurely. But that
will involve a bit more work than this. And this commit order
reversal will still be beneficial to avoid userspace getting an
-EBUSY from the following page flip if the second pipe's commit
does stretch into the next frame.

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

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index a481c9218138..0086a7422e86 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -6956,8 +6956,12 @@ static void skl_commit_modeset_enables(struct 
intel_atomic_state *state)
intel_dbuf_mbus_pre_ddb_update(state);
 
while (update_pipes) {
-   for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state,
-   new_crtc_state, i) {
+   /*
+* Commit in reverse order to make bigjoiner master
+* send the uapi events after slaves are done.
+*/
+   for_each_oldnew_intel_crtc_in_state_reverse(state, crtc, 
old_crtc_state,
+   new_crtc_state, i) {
enum pipe pipe = crtc->pipe;
 
if ((update_pipes & BIT(pipe)) == 0)
@@ -7036,7 +7040,11 @@ static void skl_commit_modeset_enables(struct 
intel_atomic_state *state)
intel_pre_update_crtc(state, crtc);
}
 
-   for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) {
+   /*
+* Commit in reverse order to make bigjoiner master
+* send the uapi events after slaves are done.
+*/
+   for_each_new_intel_crtc_in_state_reverse(state, crtc, new_crtc_state, 
i) {
enum pipe pipe = crtc->pipe;
 
if ((update_pipes & BIT(pipe)) == 0)
diff --git a/drivers/gpu/drm/i915/display/intel_display.h 
b/drivers/gpu/drm/i915/display/intel_display.h
index 986ec77490de..423074d6947a 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -344,6 +344,14 @@ enum phy_fia {
 (__i)++) \
for_each_if(crtc)
 
+#define for_each_new_intel_crtc_in_state_reverse(__state, crtc, 
new_crtc_state, __i) \
+   for ((__i) = (__state)->base.dev->mode_config.num_crtc - 1; \
+(__i) >= 0  && \
+((crtc) = to_intel_crtc((__state)->base.crtcs[__i].ptr), \
+ (new_crtc_state) = 
to_intel_crtc_state((__state)->base.crtcs[__i].new_state), 1); \
+(__i)--) \
+   for_each_if(crtc)
+
 #define for_each_oldnew_intel_plane_in_state(__state, plane, old_plane_state, 
new_plane_state, __i) \
for ((__i) = 0; \
 (__i) < (__state)->base.dev->mode_config.num_total_plane && \
-- 
2.43.2



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

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

New revision of the bigjoiner modeset sequence redesign.

Changes in v2:
- Reject PSR+bigjoiner combo
- Commit pipes in reverse order to avoid issues with
  slave pipe commits being completed prematurely.
  Should fix the gamma/DSB problems of v1.
- Address review comments
- Part of v1 was merged already separately

Pushed the whole thing here:
https://github.com/vsyrjala/linux.git bigjoiner_mst_etc_2

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

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

Ville Syrjälä (15):
  drm/i915: Update pipes in reverse order for bigjoiner
  drm/i915/psr: Disable PSR when bigjoiner is used
  drm/i915: Disable port sync when bigjoiner is used
  drm/i915: Disable live M/N updates when using bigjoiner
  drm/i915/vrr: Disable VRR when using bigjoiner
  drm/i915: Fix intel_modeset_pipe_config_late() for bigjoiner
  drm/i915: s/intel_dp_can_bigjoiner()/intel_dp_has_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: 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

 drivers/gpu/drm/i915/display/intel_ddi.c |  83 +++--
 drivers/gpu/drm/i915/display/intel_display.c | 319 +++
 drivers/gpu/drm/i915/display/intel_display.h |  15 +
 drivers/gpu/drm/i915/display/intel_dp.c  |  46 +--
 drivers/gpu/drm/i915/display/intel_dp.h  |   4 +-
 drivers/gpu/drm/i915/display/intel_dp_mst.c  |  80 +++--
 drivers/gpu/drm/i915/display/intel_psr.c |  11 +
 drivers/gpu/drm/i915/display/intel_vrr.c |   7 +
 8 files changed, 353 insertions(+), 212 deletions(-)

-- 
2.43.2



Re: v6.8 stable backport request for drm/i915

2024-04-04 Thread Rodrigo Vivi
On Thu, Apr 04, 2024 at 04:53:07PM +0300, Imre Deak wrote:
> On Thu, Apr 04, 2024 at 04:29:04PM +0300, Imre Deak wrote:
> > Stable team, please backport the following upstream commit to 6.8:
> > 
> > commit 7a51a2aa2384 ("drm/i915/dp: Fix DSC state HW readout for SST 
> > connectors")
> 
> Just noticed that the above commit is not yet upstream, still only
> queued in drm-intel-next. I presumed patches will be cherry-picked from
> drm-intel-next to drm-intel-fixes based on the Fixes: tag, so I only
> pushed the above patch to drm-intel-next; maybe the cherry picking
> doesn't (always) happen automatically.

This patch was cherry-picked this week and sent with the drm-intel-fixes
pull request targeting v6.9-rc3

Since it has the proper 'Fixes:' tag, it will likely get propagated to
the stable branches 'automagically' in some near future.

Later if it doesn't, then we can send the backported patch to the
stable mailing list for inclusion.

> 
> > Thanks,
> > Imre


✓ Fi.CI.BAT: success for drm/client: Use after free and debug improvements

2024-04-04 Thread Patchwork
== Series Details ==

Series: drm/client: Use after free and debug improvements
URL   : https://patchwork.freedesktop.org/series/132050/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14528 -> Patchwork_132050v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (39 -> 36)
--

  Missing(3): fi-blb-e6850 fi-snb-2520m fi-kbl-8809g 

Known issues


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

### IGT changes ###

 Issues hit 

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

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

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

  * igt@gem_render_tiled_blits@basic:
- bat-arls-2: NOTRUN -> [SKIP][4] ([i915#10197] / [i915#10211] / 
[i915#4079])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132050v1/bat-arls-2/igt@gem_render_tiled_bl...@basic.html

  * igt@gem_tiled_pread_basic:
- bat-arls-2: NOTRUN -> [SKIP][5] ([i915#10206] / [i915#4079])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132050v1/bat-arls-2/igt@gem_tiled_pread_basic.html

  * igt@i915_pm_rps@basic-api:
- bat-arls-2: NOTRUN -> [SKIP][6] ([i915#10209])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132050v1/bat-arls-2/igt@i915_pm_...@basic-api.html

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-arls-2: NOTRUN -> [SKIP][7] ([i915#10200]) +9 other tests skip
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132050v1/bat-arls-2/igt@kms_addfb_ba...@addfb25-y-tiled-small-legacy.html

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

  * igt@kms_dsc@dsc-basic:
- bat-arls-2: NOTRUN -> [SKIP][9] ([i915#9886])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132050v1/bat-arls-2/igt@kms_...@dsc-basic.html

  * igt@kms_force_connector_basic@force-load-detect:
- bat-arls-2: NOTRUN -> [SKIP][10] ([i915#10207])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132050v1/bat-arls-2/igt@kms_force_connector_ba...@force-load-detect.html

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

  * igt@kms_setmode@basic-clone-single-crtc:
- bat-arls-2: NOTRUN -> [SKIP][12] ([i915#10208] / [i915#8809])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132050v1/bat-arls-2/igt@kms_setm...@basic-clone-single-crtc.html

  * igt@prime_vgem@basic-fence-mmap:
- bat-arls-2: NOTRUN -> [SKIP][13] ([i915#10196] / [i915#3708] / 
[i915#4077]) +1 other test skip
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132050v1/bat-arls-2/igt@prime_v...@basic-fence-mmap.html

  * igt@prime_vgem@basic-fence-read:
- bat-arls-2: NOTRUN -> [SKIP][14] ([i915#10212] / [i915#3708])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132050v1/bat-arls-2/igt@prime_v...@basic-fence-read.html

  * igt@prime_vgem@basic-read:
- bat-arls-2: NOTRUN -> [SKIP][15] ([i915#10214] / [i915#3708])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132050v1/bat-arls-2/igt@prime_v...@basic-read.html

  * igt@prime_vgem@basic-write:
- bat-arls-2: NOTRUN -> [SKIP][16] ([i915#10216] / [i915#3708])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132050v1/bat-arls-2/igt@prime_v...@basic-write.html

  
 Possible fixes 

  * igt@gem_close_race@basic-threads:
- bat-arls-2: [ABORT][17] -> [PASS][18]
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14528/bat-arls-2/igt@gem_close_r...@basic-threads.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132050v1/bat-arls-2/igt@gem_close_r...@basic-threads.html

  * igt@i915_selftest@live@late_gt_pm:
- bat-dg2-8:  [ABORT][19] ([i915#10366]) -> [PASS][20]
   [19]: 

✗ Fi.CI.SPARSE: warning for drm/client: Use after free and debug improvements

2024-04-04 Thread Patchwork
== Series Details ==

Series: drm/client: Use after free and debug improvements
URL   : https://patchwork.freedesktop.org/series/132050/
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 drm/client: Use after free and debug improvements

2024-04-04 Thread Patchwork
== Series Details ==

Series: drm/client: Use after free and debug improvements
URL   : https://patchwork.freedesktop.org/series/132050/
State : warning

== Summary ==

Error: dim checkpatch failed
8d2ac6e9d5da drm/client: Fully protect modes[] with dev->mode_config.mutex
014b518172bd drm/client: 
s/drm_connector_has_preferred_mode/drm_connector_preferred_mode/
28c42d9c02c8 drm/client: Use drm_mode_destroy()
8dbddec1606f drm/client: Add a FIXME around crtc->mode usage
674fada5c421 drm/client: Nuke outdated fastboot comment
d0eaf419e0b7 drm/client: Constify modes
1a58deeca6d5 drm/client: Use array notation for function arguments
4448f55578cd drm/client: Extract drm_connector_first_mode()
035fff826184 drm/client: Switch to per-device debugs
-:35: WARNING:LONG_LINE: line length of 106 exceeds 100 columns
#35: FILE: drivers/gpu/drm/drm_client_modeset.c:255:
+   connector->display_info.non_desktop ? "non desktop" 
: str_yes_no(enabled[i]));

-:99: WARNING:LONG_LINE: line length of 104 exceeds 100 columns
#99: FILE: drivers/gpu/drm/drm_client_modeset.c:438:
+   drm_client_get_tile_offsets(dev, connectors, 
connector_count, modes, offsets, i,

-:113: WARNING:LONG_LINE: line length of 111 exceeds 100 columns
#113: FILE: drivers/gpu/drm/drm_client_modeset.c:448:
+   connector->base.id, connector->tile_group ? 
connector->tile_group->id : 0);

total: 0 errors, 3 warnings, 0 checks, 283 lines checked
5c5d8ca215a3 drm/client: Use [CONNECTOR:%d:%s] formatting
e0e87e44b782 drm/client: Streamline mode selection debugs
f233b082ffaf drm/probe-helper: Switch to per-device debugs




[PATCH 10/12] drm/client: Use [CONNECTOR:%d:%s] formatting

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

Switch to the canonical [CONNECTOR:%d:%s] etc. format for
printing out kms objects.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/drm_client_modeset.c | 65 +++-
 1 file changed, 35 insertions(+), 30 deletions(-)

diff --git a/drivers/gpu/drm/drm_client_modeset.c 
b/drivers/gpu/drm/drm_client_modeset.c
index 1751162b7d5c..415d1799337b 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -251,8 +251,10 @@ static void drm_client_connectors_enabled(struct 
drm_device *dev,
for (i = 0; i < connector_count; i++) {
connector = connectors[i];
enabled[i] = drm_connector_enabled(connector, true);
-   drm_dbg_kms(dev, "connector %d enabled? %s\n", 
connector->base.id,
-   connector->display_info.non_desktop ? "non desktop" 
: str_yes_no(enabled[i]));
+   drm_dbg_kms(dev, "[CONNECTOR:%d:%s] enabled? %s\n",
+   connector->base.id, connector->name,
+   connector->display_info.non_desktop ?
+   "non desktop" : str_yes_no(enabled[i]));
 
any_enabled |= enabled[i];
}
@@ -368,8 +370,8 @@ static int drm_client_get_tile_offsets(struct drm_device 
*dev,
continue;
 
if (!modes[i] && (h_idx || v_idx)) {
-   drm_dbg_kms(dev, "no modes for connector tiled %d %d\n",
-   i, connector->base.id);
+   drm_dbg_kms(dev, "no modes for tiled 
[CONNECTOR:%d:%s]\n",
+   connector->base.id, connector->name);
continue;
}
if (connector->tile_h_loc < h_idx)
@@ -438,14 +440,15 @@ static bool drm_client_target_preferred(struct drm_device 
*dev,
drm_client_get_tile_offsets(dev, connectors, 
connector_count, modes, offsets, i,
connector->tile_h_loc, 
connector->tile_v_loc);
}
-   drm_dbg_kms(dev, "looking for cmdline mode on connector %d\n",
-   connector->base.id);
+   drm_dbg_kms(dev, "looking for cmdline mode on 
[CONNECTOR:%d:%s]\n",
+   connector->base.id, connector->name);
 
/* got for command line mode first */
modes[i] = drm_connector_pick_cmdline_mode(connector);
if (!modes[i]) {
-   drm_dbg_kms(dev, "looking for preferred mode on 
connector %d %d\n",
-   connector->base.id, connector->tile_group ? 
connector->tile_group->id : 0);
+   drm_dbg_kms(dev, "looking for preferred mode on 
[CONNECTOR:%d:%s] (tile group: %d)\n",
+   connector->base.id, connector->name,
+   connector->tile_group ? 
connector->tile_group->id : 0);
modes[i] = drm_connector_preferred_mode(connector, 
width, height);
}
/* No preferred modes, pick one off the list */
@@ -465,8 +468,8 @@ static bool drm_client_target_preferred(struct drm_device 
*dev,
(connector->tile_h_loc == 0 &&
 connector->tile_v_loc == 0 &&
 !drm_connector_get_tiled_mode(connector))) {
-   drm_dbg_kms(dev, "Falling back to non tiled 
mode on Connector %d\n",
-   connector->base.id);
+   drm_dbg_kms(dev, "Falling back to non tiled 
mode on [CONNECTOR:%d:%s]\n",
+   connector->base.id, 
connector->name);
modes[i] = 
drm_connector_fallback_non_tiled_mode(connector);
} else {
modes[i] = 
drm_connector_get_tiled_mode(connector);
@@ -634,15 +637,15 @@ static bool drm_client_firmware_config(struct 
drm_client_dev *client,
num_connectors_detected++;
 
if (!enabled[i]) {
-   drm_dbg_kms(dev, "connector %s not enabled, skipping\n",
-   connector->name);
+   drm_dbg_kms(dev, "[CONNECTOR:%d:%s] not enabled, 
skipping\n",
+   connector->base.id, connector->name);
conn_configured |= BIT(i);
continue;
}
 
if (connector->force == DRM_FORCE_OFF) {
-   drm_dbg_kms(dev, "connector %s is disabled by user, 
skipping\n",
-   connector->name);
+   drm_dbg_kms(dev, "[CONNECTOR:%d:%s] is disabled by 
user, skipping\n",
+   

[PATCH 12/12] drm/probe-helper: Switch to per-device debugs

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

Switch to per-device debugs so that we know which
device we're dealing with.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/drm_probe_helper.c | 35 ++
 1 file changed, 16 insertions(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/drm_probe_helper.c 
b/drivers/gpu/drm/drm_probe_helper.c
index 968a3ee66b1e..0860f7367511 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -567,8 +567,8 @@ int drm_helper_probe_single_connector_modes(struct 
drm_connector *connector,
 
drm_modeset_acquire_init(, 0);
 
-   DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id,
-   connector->name);
+   drm_dbg_kms(dev, "[CONNECTOR:%d:%s]\n",
+   connector->base.id, connector->name);
 
 retry:
ret = drm_modeset_lock(>mode_config.connection_mutex, );
@@ -611,11 +611,10 @@ int drm_helper_probe_single_connector_modes(struct 
drm_connector *connector,
 * check here, and if anything changed start the hotplug code.
 */
if (old_status != connector->status) {
-   DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to 
%s\n",
- connector->base.id,
- connector->name,
- drm_get_connector_status_name(old_status),
- drm_get_connector_status_name(connector->status));
+   drm_dbg_kms(dev, "[CONNECTOR:%d:%s] status updated from %s to 
%s\n",
+   connector->base.id, connector->name,
+   drm_get_connector_status_name(old_status),
+   drm_get_connector_status_name(connector->status));
 
/*
 * The hotplug event code might call into the fb
@@ -638,8 +637,8 @@ int drm_helper_probe_single_connector_modes(struct 
drm_connector *connector,
drm_kms_helper_poll_enable(dev);
 
if (connector->status == connector_status_disconnected) {
-   DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
-   connector->base.id, connector->name);
+   drm_dbg_kms(dev, "[CONNECTOR:%d:%s] disconnected\n",
+   connector->base.id, connector->name);
drm_connector_update_edid_property(connector, NULL);
drm_mode_prune_invalid(dev, >modes, false);
goto exit;
@@ -697,8 +696,8 @@ int drm_helper_probe_single_connector_modes(struct 
drm_connector *connector,
 
drm_mode_sort(>modes);
 
-   DRM_DEBUG_KMS("[CONNECTOR:%d:%s] probed modes :\n", connector->base.id,
-   connector->name);
+   drm_dbg_kms(dev, "[CONNECTOR:%d:%s] probed modes :\n",
+   connector->base.id, connector->name);
list_for_each_entry(mode, >modes, head) {
drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V);
drm_mode_debug_printmodeline(mode);
@@ -834,14 +833,12 @@ static void output_poll_execute(struct work_struct *work)
old = drm_get_connector_status_name(old_status);
new = drm_get_connector_status_name(connector->status);
 
-   DRM_DEBUG_KMS("[CONNECTOR:%d:%s] "
- "status updated from %s to %s\n",
- connector->base.id,
- connector->name,
- old, new);
-   DRM_DEBUG_KMS("[CONNECTOR:%d:%s] epoch counter %llu -> 
%llu\n",
- connector->base.id, connector->name,
- old_epoch_counter, 
connector->epoch_counter);
+   drm_dbg_kms(dev, "[CONNECTOR:%d:%s] status updated from 
%s to %s\n",
+   connector->base.id, connector->name,
+   old, new);
+   drm_dbg_kms(dev, "[CONNECTOR:%d:%s] epoch counter %llu 
-> %llu\n",
+   connector->base.id, connector->name,
+   old_epoch_counter, 
connector->epoch_counter);
 
changed = true;
}
-- 
2.43.2



[PATCH 11/12] drm/client: Streamline mode selection debugs

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

Get rid of all the redundant debugs and just wait until the end
to print which mode (and of which type) we picked.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/drm_client_modeset.c | 65 +---
 1 file changed, 31 insertions(+), 34 deletions(-)

diff --git a/drivers/gpu/drm/drm_client_modeset.c 
b/drivers/gpu/drm/drm_client_modeset.c
index 415d1799337b..ad88c11037d8 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -408,6 +408,8 @@ static bool drm_client_target_preferred(struct drm_device 
*dev,
 
 retry:
for (i = 0; i < connector_count; i++) {
+   const char *mode_type;
+
connector = connectors[i];
 
if (conn_configured & BIT_ULL(i))
@@ -440,20 +442,20 @@ static bool drm_client_target_preferred(struct drm_device 
*dev,
drm_client_get_tile_offsets(dev, connectors, 
connector_count, modes, offsets, i,
connector->tile_h_loc, 
connector->tile_v_loc);
}
-   drm_dbg_kms(dev, "looking for cmdline mode on 
[CONNECTOR:%d:%s]\n",
-   connector->base.id, connector->name);
 
-   /* got for command line mode first */
+   mode_type = "cmdline";
modes[i] = drm_connector_pick_cmdline_mode(connector);
+
if (!modes[i]) {
-   drm_dbg_kms(dev, "looking for preferred mode on 
[CONNECTOR:%d:%s] (tile group: %d)\n",
-   connector->base.id, connector->name,
-   connector->tile_group ? 
connector->tile_group->id : 0);
+   mode_type = "preferred";
modes[i] = drm_connector_preferred_mode(connector, 
width, height);
}
-   /* No preferred modes, pick one off the list */
-   if (!modes[i])
+
+   if (!modes[i]) {
+   mode_type = "first";
modes[i] = drm_connector_first_mode(connector);
+   }
+
/*
 * In case of tiled mode if all tiles not present fallback to
 * first available non tiled mode.
@@ -468,16 +470,20 @@ static bool drm_client_target_preferred(struct drm_device 
*dev,
(connector->tile_h_loc == 0 &&
 connector->tile_v_loc == 0 &&
 !drm_connector_get_tiled_mode(connector))) {
-   drm_dbg_kms(dev, "Falling back to non tiled 
mode on [CONNECTOR:%d:%s]\n",
-   connector->base.id, 
connector->name);
+   mode_type = "non tiled";
modes[i] = 
drm_connector_fallback_non_tiled_mode(connector);
} else {
+   mode_type = "tiled";
modes[i] = 
drm_connector_get_tiled_mode(connector);
}
}
 
-   drm_dbg_kms(dev, "found mode %s\n",
-   modes[i] ? modes[i]->name : "none");
+   if (!modes[i])
+   mode_type = "no";
+
+   drm_dbg_kms(dev, "[CONNECTOR:%d:%s] found %s mode: %s\n",
+   connector->base.id, connector->name,
+   mode_type, modes[i] ? modes[i]->name : "none");
conn_configured |= BIT_ULL(i);
}
 
@@ -624,6 +630,7 @@ static bool drm_client_firmware_config(struct 
drm_client_dev *client,
struct drm_connector *connector;
struct drm_encoder *encoder;
struct drm_crtc *new_crtc;
+   const char *mode_type;
 
connector = connectors[i];
 
@@ -673,29 +680,22 @@ static bool drm_client_firmware_config(struct 
drm_client_dev *client,
 */
for (j = 0; j < count; j++) {
if (crtcs[j] == new_crtc) {
-   drm_dbg_kms(dev, "fallback: cloned 
configuration\n");
+   drm_dbg_kms(dev, "[CONNECTOR:%d:%s] fallback: 
cloned configuration\n",
+   connector->base.id, 
connector->name);
goto bail;
}
}
 
-   drm_dbg_kms(dev, "looking for cmdline mode on 
[CONNECTOR:%d:%s]\n",
-   connector->base.id, connector->name);
-
-   /* go for command line mode first */
+   mode_type = "cmdline";
modes[i] = drm_connector_pick_cmdline_mode(connector);
 
-   /* try for preferred next */
if (!modes[i]) {
-   drm_dbg_kms(dev, "looking for preferred mode on 
[CONNECTOR:%d:%s] (tiled? 

[PATCH 08/12] drm/client: Extract drm_connector_first_mode()

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

Use a consistent method for picking the first mode from the
connnector's mode list.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/drm_client_modeset.c | 17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/drm_client_modeset.c 
b/drivers/gpu/drm/drm_client_modeset.c
index 08fc896885dd..1fba6cd8d761 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -159,6 +159,13 @@ drm_connector_preferred_mode(struct drm_connector 
*connector, int width, int hei
return NULL;
 }
 
+static const struct drm_display_mode *
+drm_connector_first_mode(struct drm_connector *connector)
+{
+   return list_first_entry_or_null(>modes,
+   struct drm_display_mode, head);
+}
+
 static const struct drm_display_mode *
 drm_connector_pick_cmdline_mode(struct drm_connector *connector)
 {
@@ -439,10 +446,8 @@ static bool drm_client_target_preferred(struct 
drm_connector *connectors[],
modes[i] = drm_connector_preferred_mode(connector, 
width, height);
}
/* No preferred modes, pick one off the list */
-   if (!modes[i] && !list_empty(>modes)) {
-   list_for_each_entry(modes[i], >modes, head)
-   break;
-   }
+   if (!modes[i])
+   modes[i] = drm_connector_first_mode(connector);
/*
 * In case of tiled mode if all tiles not present fallback to
 * first available non tiled mode.
@@ -684,9 +689,7 @@ static bool drm_client_firmware_config(struct 
drm_client_dev *client,
if (!modes[i] && !list_empty(>modes)) {
DRM_DEBUG_KMS("using first mode listed on connector 
%s\n",
  connector->name);
-   modes[i] = list_first_entry(>modes,
-   struct drm_display_mode,
-   head);
+   modes[i] = drm_connector_first_mode(connector);
}
 
/* last resort: use current mode */
-- 
2.43.2



[PATCH 07/12] drm/client: Use array notation for function arguments

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

Use the array notation rather that the pointer notation for
function arguments. This makes it clear to the reader that
we are in fact dealing with an array rather than a single
pointer. Functionally the two are equivalent.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/drm_client_modeset.c | 42 ++--
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/drm_client_modeset.c 
b/drivers/gpu/drm/drm_client_modeset.c
index 384a9f8227a0..08fc896885dd 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -232,9 +232,9 @@ static bool drm_connector_enabled(struct drm_connector 
*connector, bool strict)
return enable;
 }
 
-static void drm_client_connectors_enabled(struct drm_connector **connectors,
+static void drm_client_connectors_enabled(struct drm_connector *connectors[],
  unsigned int connector_count,
- bool *enabled)
+ bool enabled[])
 {
bool any_enabled = false;
struct drm_connector *connector;
@@ -257,11 +257,11 @@ static void drm_client_connectors_enabled(struct 
drm_connector **connectors,
 }
 
 static bool drm_client_target_cloned(struct drm_device *dev,
-struct drm_connector **connectors,
+struct drm_connector *connectors[],
 unsigned int connector_count,
-const struct drm_display_mode **modes,
-struct drm_client_offset *offsets,
-bool *enabled, int width, int height)
+const struct drm_display_mode *modes[],
+struct drm_client_offset offsets[],
+bool enabled[], int width, int height)
 {
int count, i, j;
bool can_clone = false;
@@ -342,10 +342,10 @@ static bool drm_client_target_cloned(struct drm_device 
*dev,
return false;
 }
 
-static int drm_client_get_tile_offsets(struct drm_connector **connectors,
+static int drm_client_get_tile_offsets(struct drm_connector *connectors[],
   unsigned int connector_count,
-  const struct drm_display_mode **modes,
-  struct drm_client_offset *offsets,
+  const struct drm_display_mode *modes[],
+  struct drm_client_offset offsets[],
   int idx,
   int h_idx, int v_idx)
 {
@@ -375,11 +375,11 @@ static int drm_client_get_tile_offsets(struct 
drm_connector **connectors,
return 0;
 }
 
-static bool drm_client_target_preferred(struct drm_connector **connectors,
+static bool drm_client_target_preferred(struct drm_connector *connectors[],
unsigned int connector_count,
-   const struct drm_display_mode **modes,
-   struct drm_client_offset *offsets,
-   bool *enabled, int width, int height)
+   const struct drm_display_mode *modes[],
+   struct drm_client_offset offsets[],
+   bool enabled[], int width, int height)
 {
const u64 mask = BIT_ULL(connector_count) - 1;
struct drm_connector *connector;
@@ -491,10 +491,10 @@ static bool connector_has_possible_crtc(struct 
drm_connector *connector,
 }
 
 static int drm_client_pick_crtcs(struct drm_client_dev *client,
-struct drm_connector **connectors,
+struct drm_connector *connectors[],
 unsigned int connector_count,
-struct drm_crtc **best_crtcs,
-const struct drm_display_mode **modes,
+struct drm_crtc *best_crtcs[],
+const struct drm_display_mode *modes[],
 int n, int width, int height)
 {
struct drm_device *dev = client->dev;
@@ -566,12 +566,12 @@ static int drm_client_pick_crtcs(struct drm_client_dev 
*client,
 
 /* Try to read the BIOS display configuration and use it for the initial 
config */
 static bool drm_client_firmware_config(struct drm_client_dev *client,
-  struct drm_connector **connectors,
+  struct drm_connector *connectors[],
   unsigned int connector_count,
-  struct drm_crtc **crtcs,
-

[PATCH 09/12] drm/client: Switch to per-device debugs

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

Use drm_dev_dbg() & co. so that we know which device we're
dealing with.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/drm_client_modeset.c | 117 ++-
 1 file changed, 60 insertions(+), 57 deletions(-)

diff --git a/drivers/gpu/drm/drm_client_modeset.c 
b/drivers/gpu/drm/drm_client_modeset.c
index 1fba6cd8d761..1751162b7d5c 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -239,7 +239,8 @@ static bool drm_connector_enabled(struct drm_connector 
*connector, bool strict)
return enable;
 }
 
-static void drm_client_connectors_enabled(struct drm_connector *connectors[],
+static void drm_client_connectors_enabled(struct drm_device *dev,
+ struct drm_connector *connectors[],
  unsigned int connector_count,
  bool enabled[])
 {
@@ -250,8 +251,8 @@ static void drm_client_connectors_enabled(struct 
drm_connector *connectors[],
for (i = 0; i < connector_count; i++) {
connector = connectors[i];
enabled[i] = drm_connector_enabled(connector, true);
-   DRM_DEBUG_KMS("connector %d enabled? %s\n", connector->base.id,
- connector->display_info.non_desktop ? "non 
desktop" : str_yes_no(enabled[i]));
+   drm_dbg_kms(dev, "connector %d enabled? %s\n", 
connector->base.id,
+   connector->display_info.non_desktop ? "non desktop" 
: str_yes_no(enabled[i]));
 
any_enabled |= enabled[i];
}
@@ -312,7 +313,7 @@ static bool drm_client_target_cloned(struct drm_device *dev,
}
 
if (can_clone) {
-   DRM_DEBUG_KMS("can clone using command line\n");
+   drm_dbg_kms(dev, "can clone using command line\n");
return true;
}
 
@@ -341,15 +342,16 @@ static bool drm_client_target_cloned(struct drm_device 
*dev,
drm_mode_destroy(dev, dmt_mode);
 
if (can_clone) {
-   DRM_DEBUG_KMS("can clone using 1024x768\n");
+   drm_dbg_kms(dev, "can clone using 1024x768\n");
return true;
}
 fail:
-   DRM_INFO("kms: can't enable cloning when we probably wanted to.\n");
+   drm_info(dev, "kms: can't enable cloning when we probably wanted 
to.\n");
return false;
 }
 
-static int drm_client_get_tile_offsets(struct drm_connector *connectors[],
+static int drm_client_get_tile_offsets(struct drm_device *dev,
+  struct drm_connector *connectors[],
   unsigned int connector_count,
   const struct drm_display_mode *modes[],
   struct drm_client_offset offsets[],
@@ -366,8 +368,8 @@ static int drm_client_get_tile_offsets(struct drm_connector 
*connectors[],
continue;
 
if (!modes[i] && (h_idx || v_idx)) {
-   DRM_DEBUG_KMS("no modes for connector tiled %d %d\n", i,
- connector->base.id);
+   drm_dbg_kms(dev, "no modes for connector tiled %d %d\n",
+   i, connector->base.id);
continue;
}
if (connector->tile_h_loc < h_idx)
@@ -378,11 +380,12 @@ static int drm_client_get_tile_offsets(struct 
drm_connector *connectors[],
}
offsets[idx].x = hoffset;
offsets[idx].y = voffset;
-   DRM_DEBUG_KMS("returned %d %d for %d %d\n", hoffset, voffset, h_idx, 
v_idx);
+   drm_dbg_kms(dev, "returned %d %d for %d %d\n", hoffset, voffset, h_idx, 
v_idx);
return 0;
 }
 
-static bool drm_client_target_preferred(struct drm_connector *connectors[],
+static bool drm_client_target_preferred(struct drm_device *dev,
+   struct drm_connector *connectors[],
unsigned int connector_count,
const struct drm_display_mode *modes[],
struct drm_client_offset offsets[],
@@ -432,17 +435,17 @@ static bool drm_client_target_preferred(struct 
drm_connector *connectors[],
 * find the tile offsets for this pass - need to find
 * all tiles left and above
 */
-   drm_client_get_tile_offsets(connectors, 
connector_count, modes, offsets, i,
+   drm_client_get_tile_offsets(dev, connectors, 
connector_count, modes, offsets, i,
connector->tile_h_loc, 
connector->tile_v_loc);
}
-   DRM_DEBUG_KMS("looking for cmdline mode on connector %d\n",
- connector->base.id);
+  

[PATCH 06/12] drm/client: Constify modes

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

The modes used by the client code live on the connectors' mode
lists, which are not owned by the client code, and thus it has
no business modifying the modes. Mark the modes const to make
that fact abundantly clear.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/drm_client_modeset.c | 36 +++-
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/drm_client_modeset.c 
b/drivers/gpu/drm/drm_client_modeset.c
index cf1de06f99aa..384a9f8227a0 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -117,10 +117,10 @@ drm_client_find_modeset(struct drm_client_dev *client, 
struct drm_crtc *crtc)
return NULL;
 }
 
-static struct drm_display_mode *
+static const struct drm_display_mode *
 drm_connector_get_tiled_mode(struct drm_connector *connector)
 {
-   struct drm_display_mode *mode;
+   const struct drm_display_mode *mode;
 
list_for_each_entry(mode, >modes, head) {
if (mode->hdisplay == connector->tile_h_size &&
@@ -130,10 +130,10 @@ drm_connector_get_tiled_mode(struct drm_connector 
*connector)
return NULL;
 }
 
-static struct drm_display_mode *
+static const struct drm_display_mode *
 drm_connector_fallback_non_tiled_mode(struct drm_connector *connector)
 {
-   struct drm_display_mode *mode;
+   const struct drm_display_mode *mode;
 
list_for_each_entry(mode, >modes, head) {
if (mode->hdisplay == connector->tile_h_size &&
@@ -144,10 +144,10 @@ drm_connector_fallback_non_tiled_mode(struct 
drm_connector *connector)
return NULL;
 }
 
-static struct drm_display_mode *
+static const struct drm_display_mode *
 drm_connector_preferred_mode(struct drm_connector *connector, int width, int 
height)
 {
-   struct drm_display_mode *mode;
+   const struct drm_display_mode *mode;
 
list_for_each_entry(mode, >modes, head) {
if (mode->hdisplay > width ||
@@ -159,10 +159,11 @@ drm_connector_preferred_mode(struct drm_connector 
*connector, int width, int hei
return NULL;
 }
 
-static struct drm_display_mode *drm_connector_pick_cmdline_mode(struct 
drm_connector *connector)
+static const struct drm_display_mode *
+drm_connector_pick_cmdline_mode(struct drm_connector *connector)
 {
-   struct drm_cmdline_mode *cmdline_mode;
-   struct drm_display_mode *mode;
+   const struct drm_cmdline_mode *cmdline_mode;
+   const struct drm_display_mode *mode;
bool prefer_non_interlace;
 
/*
@@ -258,13 +259,14 @@ static void drm_client_connectors_enabled(struct 
drm_connector **connectors,
 static bool drm_client_target_cloned(struct drm_device *dev,
 struct drm_connector **connectors,
 unsigned int connector_count,
-struct drm_display_mode **modes,
+const struct drm_display_mode **modes,
 struct drm_client_offset *offsets,
 bool *enabled, int width, int height)
 {
int count, i, j;
bool can_clone = false;
-   struct drm_display_mode *dmt_mode, *mode;
+   const struct drm_display_mode *mode;
+   struct drm_display_mode *dmt_mode;
 
/* only contemplate cloning in the single crtc case */
if (dev->mode_config.num_crtc > 1)
@@ -342,7 +344,7 @@ static bool drm_client_target_cloned(struct drm_device *dev,
 
 static int drm_client_get_tile_offsets(struct drm_connector **connectors,
   unsigned int connector_count,
-  struct drm_display_mode **modes,
+  const struct drm_display_mode **modes,
   struct drm_client_offset *offsets,
   int idx,
   int h_idx, int v_idx)
@@ -375,7 +377,7 @@ static int drm_client_get_tile_offsets(struct drm_connector 
**connectors,
 
 static bool drm_client_target_preferred(struct drm_connector **connectors,
unsigned int connector_count,
-   struct drm_display_mode **modes,
+   const struct drm_display_mode **modes,
struct drm_client_offset *offsets,
bool *enabled, int width, int height)
 {
@@ -492,7 +494,7 @@ static int drm_client_pick_crtcs(struct drm_client_dev 
*client,
 struct drm_connector **connectors,
 unsigned int connector_count,
 struct drm_crtc **best_crtcs,
-struct drm_display_mode **modes,
+const struct drm_display_mode 

[PATCH 05/12] drm/client: Nuke outdated fastboot comment

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

Remove the tall tale about fastboot vs. user mode vs.
adjusted mode. crtc->mode == crtc->state->mode, so none
of this makes any sense. I suppose it may have been true
long ago in the past.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/drm_client_modeset.c | 10 --
 1 file changed, 10 deletions(-)

diff --git a/drivers/gpu/drm/drm_client_modeset.c 
b/drivers/gpu/drm/drm_client_modeset.c
index 8ef03608b424..cf1de06f99aa 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -690,16 +690,6 @@ static bool drm_client_firmware_config(struct 
drm_client_dev *client,
/* last resort: use current mode */
if (!modes[i]) {
/*
-* IMPORTANT: We want to use the adjusted mode (i.e.
-* after the panel fitter upscaling) as the initial
-* config, not the input mode, which is what crtc->mode
-* usually contains. But since our current
-* code puts a mode derived from the post-pfit timings
-* into crtc->mode this works out correctly.
-*
-* This is crtc->mode and not crtc->state->mode for the
-* fastboot check to work correctly.
-*
 * FIXME using legacy crtc->mode with atomic drivers
 * is dodgy. Switch to crtc->state->mode, after taking
 * care of the resulting locking/lifetime issues.
-- 
2.43.2



[PATCH 04/12] drm/client: Add a FIXME around crtc->mode usage

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

crtc->mode is legacy junk and shouldn't really be used with
atomic drivers.

Most (all?) atomic drivers do end up still calling
drm_atomic_helper_update_legacy_modeset_state() at some
point, so crtc->mode does still get populated, and this
does work for now. But eventually would be nice to eliminate
all the legacy stuff from atomic drivers.

Switching to crtc->state->mode would require some bigger
changes however, as we currently drop the crtc->mutex
before we're done using the mode. So leave the junk in
for now and just add a FIXME to remind us that this
needs fixing.

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

diff --git a/drivers/gpu/drm/drm_client_modeset.c 
b/drivers/gpu/drm/drm_client_modeset.c
index 2b7d0be04911..8ef03608b424 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -699,6 +699,10 @@ static bool drm_client_firmware_config(struct 
drm_client_dev *client,
 *
 * This is crtc->mode and not crtc->state->mode for the
 * fastboot check to work correctly.
+*
+* FIXME using legacy crtc->mode with atomic drivers
+* is dodgy. Switch to crtc->state->mode, after taking
+* care of the resulting locking/lifetime issues.
 */
DRM_DEBUG_KMS("looking for current mode on connector 
%s\n",
  connector->name);
-- 
2.43.2



[PATCH 03/12] drm/client: Use drm_mode_destroy()

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

Prefer drm_mode_destroy() over bare kfree(), for consistency
and setting a good example.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/drm_client_modeset.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_client_modeset.c 
b/drivers/gpu/drm/drm_client_modeset.c
index 1c3aeb2dfa57..2b7d0be04911 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -329,7 +329,7 @@ static bool drm_client_target_cloned(struct drm_device *dev,
if (!modes[i])
can_clone = false;
}
-   kfree(dmt_mode);
+   drm_mode_destroy(dev, dmt_mode);
 
if (can_clone) {
DRM_DEBUG_KMS("can clone using 1024x768\n");
@@ -867,7 +867,7 @@ int drm_client_modeset_probe(struct drm_client_dev *client, 
unsigned int width,
break;
}
 
-   kfree(modeset->mode);
+   drm_mode_destroy(dev, modeset->mode);
modeset->mode = drm_mode_duplicate(dev, mode);
drm_connector_get(connector);
modeset->connectors[modeset->num_connectors++] = 
connector;
-- 
2.43.2



[PATCH 02/12] drm/client: s/drm_connector_has_preferred_mode/drm_connector_preferred_mode/

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

Drop the "has" from drm_connector_has_preferred_mode() to better
describe what it does.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/drm_client_modeset.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_client_modeset.c 
b/drivers/gpu/drm/drm_client_modeset.c
index 0683a129b362..1c3aeb2dfa57 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -145,7 +145,7 @@ drm_connector_fallback_non_tiled_mode(struct drm_connector 
*connector)
 }
 
 static struct drm_display_mode *
-drm_connector_has_preferred_mode(struct drm_connector *connector, int width, 
int height)
+drm_connector_preferred_mode(struct drm_connector *connector, int width, int 
height)
 {
struct drm_display_mode *mode;
 
@@ -434,7 +434,7 @@ static bool drm_client_target_preferred(struct 
drm_connector **connectors,
if (!modes[i]) {
DRM_DEBUG_KMS("looking for preferred mode on connector 
%d %d\n",
  connector->base.id, connector->tile_group 
? connector->tile_group->id : 0);
-   modes[i] = drm_connector_has_preferred_mode(connector, 
width, height);
+   modes[i] = drm_connector_preferred_mode(connector, 
width, height);
}
/* No preferred modes, pick one off the list */
if (!modes[i] && !list_empty(>modes)) {
@@ -522,7 +522,7 @@ static int drm_client_pick_crtcs(struct drm_client_dev 
*client,
my_score++;
if (connector->cmdline_mode.specified)
my_score++;
-   if (drm_connector_has_preferred_mode(connector, width, height))
+   if (drm_connector_preferred_mode(connector, width, height))
my_score++;
 
/*
@@ -675,7 +675,7 @@ static bool drm_client_firmware_config(struct 
drm_client_dev *client,
if (!modes[i]) {
DRM_DEBUG_KMS("looking for preferred mode on connector 
%s %d\n",
  connector->name, connector->has_tile);
-   modes[i] = drm_connector_has_preferred_mode(connector, 
width, height);
+   modes[i] = drm_connector_preferred_mode(connector, 
width, height);
}
 
/* No preferred mode marked by the EDID? Are there any modes? */
-- 
2.43.2



[PATCH 01/12] drm/client: Fully protect modes[] with dev->mode_config.mutex

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

The modes[] array contains pointers to modes on the connectors'
mode lists, which are protected by dev->mode_config.mutex.
Thus we need to extend modes[] the same protection or by the
time we use it the elements may already be pointing to
freed/reused memory.

Cc: sta...@vger.kernel.org
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10583
Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/drm_client_modeset.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_client_modeset.c 
b/drivers/gpu/drm/drm_client_modeset.c
index 871e4e2129d6..0683a129b362 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -777,6 +777,7 @@ int drm_client_modeset_probe(struct drm_client_dev *client, 
unsigned int width,
unsigned int total_modes_count = 0;
struct drm_client_offset *offsets;
unsigned int connector_count = 0;
+   /* points to modes protected by mode_config.mutex */
struct drm_display_mode **modes;
struct drm_crtc **crtcs;
int i, ret = 0;
@@ -845,7 +846,6 @@ int drm_client_modeset_probe(struct drm_client_dev *client, 
unsigned int width,
drm_client_pick_crtcs(client, connectors, connector_count,
  crtcs, modes, 0, width, height);
}
-   mutex_unlock(>mode_config.mutex);
 
drm_client_modeset_release(client);
 
@@ -875,6 +875,7 @@ int drm_client_modeset_probe(struct drm_client_dev *client, 
unsigned int width,
modeset->y = offset->y;
}
}
+   mutex_unlock(>mode_config.mutex);
 
mutex_unlock(>modeset_mutex);
 out:
-- 
2.43.2



[PATCH 00/12] drm/client: Use after free and debug improvements

2024-04-04 Thread Ville Syrjala
From: Ville Syrjälä 

Various improvements to the drm/client code:
- Fix a use after free (fairly routinely hit by i915 CI)
- Debug print improvements
- Cleanups/etc.

Ville Syrjälä (12):
  drm/client: Fully protect modes[] with dev->mode_config.mutex
  drm/client:
s/drm_connector_has_preferred_mode/drm_connector_preferred_mode/
  drm/client: Use drm_mode_destroy()
  drm/client: Add a FIXME around crtc->mode usage
  drm/client: Nuke outdated fastboot comment
  drm/client: Constify modes
  drm/client: Use array notation for function arguments
  drm/client: Extract drm_connector_first_mode()
  drm/client: Switch to per-device debugs
  drm/client: Use [CONNECTOR:%d:%s] formatting
  drm/client: Streamline mode selection debugs
  drm/probe-helper: Switch to per-device debugs

 drivers/gpu/drm/drm_client_modeset.c | 237 ++-
 drivers/gpu/drm/drm_probe_helper.c   |  35 ++--
 2 files changed, 137 insertions(+), 135 deletions(-)

-- 
2.43.2



[PULL] drm-intel-fixes

2024-04-04 Thread Rodrigo Vivi
Hi Dave and Sima,

Here goes drm-intel-fixes-2024-04-04:

Display fixes:
- A few DisplayPort related fixes (Imre, Arun, Ankit, Ville)
- eDP PSR fixes (Jouni)

Core/GT fixes:
- Remove some VM space restrictions on older platforms (Andi)
- Disable automatic load CCS load balancing (Andi)

Thanks,
Rodrigo.

The following changes since commit 39cd87c4eb2b893354f3b850f916353f2658ae6f:

  Linux 6.9-rc2 (2024-03-31 14:32:39 -0700)

are available in the Git repository at:

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

for you to fetch changes up to 99f855082f228cdcecd6ab768d3b8b505e0eb028:

  drm/i915/mst: Reject FEC+MST on ICL (2024-04-03 14:26:11 -0400)


Display fixes:
- A few DisplayPort related fixes (Imre, Arun, Ankit, Ville)
- eDP PSR fixes (Jouni)

Core/GT fixes:
- Remove some VM space restrictions on older platforms (Andi)
- Disable automatic load CCS load balancing (Andi)


Andi Shyti (4):
  drm/i915/gt: Limit the reserved VM space to only the platforms that need 
it
  drm/i915/gt: Disable HW load balancing for CCS
  drm/i915/gt: Do not generate the command streamer for all the CCS
  drm/i915/gt: Enable only one CCS for compute workload

Ankit Nautiyal (1):
  drm/i915/dp: Fix the computation for compressed_bpp for DISPLAY < 13

Arun R Murthy (1):
  drm/i915/dp: Remove support for UHBR13.5

Imre Deak (1):
  drm/i915/dp: Fix DSC state HW readout for SST connectors

Jouni Högander (3):
  drm/i915/psr: Calculate PIPE_SRCSZ_ERLY_TPT value
  drm/i915/psr: Move writing early transport pipe src
  drm/i915/psr: Fix intel_psr2_sel_fetch_et_alignment usage

Ville Syrjälä (2):
  drm/i915/mst: Limit MST+DSC to TGL+
  drm/i915/mst: Reject FEC+MST on ICL

 drivers/gpu/drm/i915/Makefile  |  1 +
 drivers/gpu/drm/i915/display/intel_display.c   |  9 ---
 .../gpu/drm/i915/display/intel_display_device.h|  1 +
 drivers/gpu/drm/i915/display/intel_display_types.h |  2 +
 drivers/gpu/drm/i915/display/intel_dp.c| 11 +--
 drivers/gpu/drm/i915/display/intel_dp_mst.c|  2 +-
 drivers/gpu/drm/i915/display/intel_psr.c   | 78 --
 drivers/gpu/drm/i915/gt/gen8_ppgtt.c   |  3 +
 drivers/gpu/drm/i915/gt/intel_engine_cs.c  | 17 +
 drivers/gpu/drm/i915/gt/intel_gt.c |  6 ++
 drivers/gpu/drm/i915/gt/intel_gt.h |  9 +--
 drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.c| 39 +++
 drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.h| 13 
 drivers/gpu/drm/i915/gt/intel_gt_regs.h|  6 ++
 drivers/gpu/drm/i915/gt/intel_workarounds.c| 30 -
 15 files changed, 185 insertions(+), 42 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.c
 create mode 100644 drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.h


[linux-next:master] BUILD REGRESSION 2b3d5988ae2cb5cd945ddbc653f0a71706231fdd

2024-04-04 Thread kernel test robot
tree/branch: 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
branch HEAD: 2b3d5988ae2cb5cd945ddbc653f0a71706231fdd  Add linux-next specific 
files for 20240404

Error/Warning reports:

https://lore.kernel.org/oe-kbuild-all/202404041707.4bl4ifti-...@intel.com
https://lore.kernel.org/oe-kbuild-all/202404041832.tmsatkyb-...@intel.com
https://lore.kernel.org/oe-kbuild-all/202404042206.mjaqc32x-...@intel.com
https://lore.kernel.org/oe-kbuild-all/202404042327.jrpt81kp-...@intel.com

Error/Warning: (recently discovered and may have been fixed)

ERROR: modpost: "__aeabi_d2ulz" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] 
undefined!
ERROR: modpost: "__aeabi_l2d" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
drivers/input/serio/parkbd.c:168:10: error: '__section__' attribute only 
applies to functions, global variables, Objective-C methods, and Objective-C 
properties
drivers/input/serio/parkbd.c:168:10: error: 'section' attribute only applies to 
functions, global variables, Objective-C methods, and Objective-C properties
drivers/input/serio/parkbd.c:168:10: error: non-extern declaration of 
'__pcpu_unique__alloc_tag_cntr' follows extern declaration
drivers/input/serio/ps2-gpio.c:408:10: error: '__section__' attribute only 
applies to functions, global variables, Objective-C methods, and Objective-C 
properties
drivers/input/serio/ps2-gpio.c:408:10: error: 'section' attribute only applies 
to functions, global variables, Objective-C methods, and Objective-C properties
drivers/input/serio/ps2-gpio.c:408:10: error: non-extern declaration of 
'__pcpu_unique__alloc_tag_cntr' follows extern declaration
drivers/input/serio/ps2mult.c:130:10: error: '__section__' attribute only 
applies to functions, global variables, Objective-C methods, and Objective-C 
properties
drivers/input/serio/ps2mult.c:130:10: error: 'section' attribute only applies 
to functions, global variables, Objective-C methods, and Objective-C properties
drivers/input/serio/ps2mult.c:130:10: error: non-extern declaration of 
'__pcpu_unique__alloc_tag_cntr' follows extern declaration
drivers/input/serio/serio_raw.c:95:11: error: '__section__' attribute only 
applies to functions, global variables, Objective-C methods, and Objective-C 
properties
drivers/input/serio/serio_raw.c:95:11: error: 'section' attribute only applies 
to functions, global variables, Objective-C methods, and Objective-C properties
drivers/input/serio/serio_raw.c:95:11: error: non-extern declaration of 
'__pcpu_unique__alloc_tag_cntr' follows extern declaration
include/linux/mempool.h:105:9: error: '__section__' attribute only applies to 
functions, global variables, Objective-C methods, and Objective-C properties
include/linux/mempool.h:105:9: error: 'section' attribute only applies to 
functions, global variables, Objective-C methods, and Objective-C properties
include/linux/mempool.h:105:9: error: non-extern declaration of 
'__pcpu_unique__alloc_tag_cntr' follows extern declaration
include/linux/mempool.h:105:9: error: non-extern declaration of 
'_alloc_tag_cntr' follows extern declaration
include/linux/mempool.h:105:9: error: weak declaration cannot have internal 
linkage
ld.lld: error: undefined symbol: i2c_root_adapter
powerpc64-linux-ld: warning: orphan section `.bss..Lubsan_data249' from 
`kernel/ptrace.o' being placed in section `.bss..Lubsan_data249'

Unverified Error/Warning (likely false positive, please contact us if 
interested):

include/linux/mm_types.h:1175:17: error: '__section__' attribute only applies 
to functions, global variables, Objective-C methods, and Objective-C properties
include/linux/mm_types.h:1175:17: error: 'section' attribute only applies to 
functions, global variables, Objective-C methods, and Objective-C properties
include/linux/mm_types.h:1175:17: error: non-extern declaration of 
'__pcpu_unique__alloc_tag_cntr' follows extern declaration
include/linux/mm_types.h:1175:17: error: non-extern declaration of 
'_alloc_tag_cntr' follows extern declaration
include/linux/mm_types.h:1175:17: error: weak declaration cannot have internal 
linkage
{standard input}:722: Warning: overflow in branch to .L153; converted into 
longer instruction sequence
{standard input}:733: Warning: overflow in branch to .L155; converted into 
longer instruction sequence

Error/Warning ids grouped by kconfigs:

gcc_recent_errors
|-- alpha-allnoconfig
|   |-- 
mm-mempool.c:warning:Function-parameter-or-struct-member-gfp_mask-not-described-in-mempool_create_node
|   `-- 
mm-mempool.c:warning:Function-parameter-or-struct-member-node_id-not-described-in-mempool_create_node
|-- alpha-allyesconfig
|   |-- 
drivers-gpu-drm-imx-ipuv3-imx-ldb.c:error:_sel-directive-output-may-be-truncated-writing-bytes-into-a-region-of-size-between-and
|   |-- 
drivers-gpu-drm-nouveau-nouveau_backlight.c:error:d-directive-output-may-be-truncated-writing-between-and-bytes-into-a-region-of-size
|   |-- 
mm-mempool.c:warning:Function-parameter-or-st

✗ Fi.CI.BAT: failure for drm/i915: limit eDP MSO pipe only for display version 20 and below (rev3)

2024-04-04 Thread Patchwork
== Series Details ==

Series: drm/i915: limit eDP MSO pipe only for display version 20 and below 
(rev3)
URL   : https://patchwork.freedesktop.org/series/129123/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14527 -> Patchwork_129123v3


Summary
---

  **FAILURE**

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

Participating hosts (38 -> 37)
--

  Missing(1): fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_selftest@live@dmabuf:
- bat-mtlp-6: [PASS][1] -> [DMESG-FAIL][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14527/bat-mtlp-6/igt@i915_selftest@l...@dmabuf.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129123v3/bat-mtlp-6/igt@i915_selftest@l...@dmabuf.html

  * igt@kms_flip@basic-flip-vs-modeset@a-dp1:
- fi-kbl-7567u:   [PASS][3] -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14527/fi-kbl-7567u/igt@kms_flip@basic-flip-vs-mode...@a-dp1.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129123v3/fi-kbl-7567u/igt@kms_flip@basic-flip-vs-mode...@a-dp1.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@i915_selftest@live@hangcheck:
- bat-rpls-3: [PASS][5] -> [DMESG-WARN][6] ([i915#5591])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14527/bat-rpls-3/igt@i915_selftest@l...@hangcheck.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129123v3/bat-rpls-3/igt@i915_selftest@l...@hangcheck.html

  * igt@i915_selftest@live@hugepages:
- bat-dg2-8:  [PASS][7] -> [ABORT][8] ([i915#10366])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14527/bat-dg2-8/igt@i915_selftest@l...@hugepages.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129123v3/bat-dg2-8/igt@i915_selftest@l...@hugepages.html

  
 Possible fixes 

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

  * igt@i915_selftest@live@gt_contexts:
- bat-dg2-11: [ABORT][13] ([i915#10366]) -> [PASS][14]
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14527/bat-dg2-11/igt@i915_selftest@live@gt_contexts.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_129123v3/bat-dg2-11/igt@i915_selftest@live@gt_contexts.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#10436]: https://gitlab.freedesktop.org/drm/intel/issues/10436
  [i915#5591]: https://gitlab.freedesktop.org/drm/intel/issues/5591


Build changes
-

  * Linux: CI_DRM_14527 -> Patchwork_129123v3

  CI-20190529: 20190529
  CI_DRM_14527: f1408ebd4c6b508ff23139fcbc7275fa227b197b @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7798: 5e3263748a636ebc91ecfafbd339870c77e3eed6 @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_129123v3: f1408ebd4c6b508ff23139fcbc7275fa227b197b @ 
git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

0ca27ba735df drm/i915: limit eDP MSO pipe only for display version 20 and below

== Logs ==

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


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

2024-04-04 Thread Nautiyal, Ankit K



On 3/19/2024 3:16 PM, Maxime Ripard wrote:

On Mon, Mar 18, 2024 at 04:37:58PM +0200, Jani Nikula wrote:

On Mon, 11 Mar 2024, Mitul Golani  wrote:

  An Adaptive-Sync-capable DP protocol converter indicates its
support by setting the related bit in the DPCD register. This
is valid for DP and edp as well.

Computes AS SDP values based on the display configuration,
ensuring proper handling of Variable Refresh Rate (VRR)
in the context of Adaptive Sync.

[snip]


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

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

Ack

Maxime


Thanks for the patch, ack and reviews, pushed to drm-intel-next.

Regards,

Ankit



[PULL] drm-xe-fixes

2024-04-04 Thread Lucas De Marchi

Hi Dave and Sima,

Please pull the drm-xe-fixes for this week targeting v6.9-rc3.

This is a little late in the week as I was waiting a critical fix to be
applied to get our CI back. This is mainly due to some stress tests
creating hundreds of exec queues and that not playing nice with the
workqueue changes introduced in v6.9. That shouldn't be the normal use
case but was causing CI to abort further tests.  Other changes include
fixes around rebinding and TLB invalidation.

thanks
Lucas De Marchi

drm-xe-fixes-2024-04-04:
- Stop using system_unbound_wq for preempt fences,
  as this can cause starvation when reaching more
  than max_active defined by workqueue
- Fix saving unordered rebinding fences by attaching
  them as kernel feces to the vm's resv
- Fix TLB invalidation fences completing out of order
- Move rebind TLB invalidation to the ring ops to reduce
  the latency
The following changes since commit 39cd87c4eb2b893354f3b850f916353f2658ae6f:

  Linux 6.9-rc2 (2024-03-31 14:32:39 -0700)

are available in the Git repository at:

  https://gitlab.freedesktop.org/drm/xe/kernel.git tags/drm-xe-fixes-2024-04-04

for you to fetch changes up to 77a011012d7d8b98368a763bf74317c6d5ce00f1:

  drm/xe: Use ordered wq for preempt fence waiting (2024-04-04 08:32:34 -0500)


- Stop using system_unbound_wq for preempt fences,
  as this can cause starvation when reaching more
  than max_active defined by workqueue
- Fix saving unordered rebinding fences by attaching
  them as kernel feces to the vm's resv
- Fix TLB invalidation fences completing out of order
- Move rebind TLB invalidation to the ring ops to reduce
  the latency


Matthew Brost (1):
  drm/xe: Use ordered wq for preempt fence waiting

Thomas Hellström (4):
  drm/xe: Use ring ops TLB invalidation for rebinds
  drm/xe: Rework rebinding
  drm/xe: Make TLB invalidation fences unordered
  drm/xe: Move vma rebinding to the drm_exec locking loop

 drivers/gpu/drm/xe/xe_device.c  |  11 ++-
 drivers/gpu/drm/xe/xe_device_types.h|   3 +
 drivers/gpu/drm/xe/xe_exec.c|  79 ++--
 drivers/gpu/drm/xe/xe_exec_queue_types.h|   5 ++
 drivers/gpu/drm/xe/xe_gt_pagefault.c|   3 +-
 drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c |   1 -
 drivers/gpu/drm/xe/xe_gt_types.h|   7 --
 drivers/gpu/drm/xe/xe_preempt_fence.c   |   2 +-
 drivers/gpu/drm/xe/xe_pt.c  |  25 +--
 drivers/gpu/drm/xe/xe_ring_ops.c|  11 +--
 drivers/gpu/drm/xe/xe_sched_job.c   |  10 +++
 drivers/gpu/drm/xe/xe_sched_job_types.h |   2 +
 drivers/gpu/drm/xe/xe_vm.c  | 110 +---
 drivers/gpu/drm/xe/xe_vm.h  |   8 +-
 drivers/gpu/drm/xe/xe_vm_types.h|   8 +-
 15 files changed, 140 insertions(+), 145 deletions(-)


Re: v6.8 stable backport request for drm/i915

2024-04-04 Thread Imre Deak
On Thu, Apr 04, 2024 at 04:29:04PM +0300, Imre Deak wrote:
> Stable team, please backport the following upstream commit to 6.8:
> 
> commit 7a51a2aa2384 ("drm/i915/dp: Fix DSC state HW readout for SST 
> connectors")

Just noticed that the above commit is not yet upstream, still only
queued in drm-intel-next. I presumed patches will be cherry-picked from
drm-intel-next to drm-intel-fixes based on the Fixes: tag, so I only
pushed the above patch to drm-intel-next; maybe the cherry picking
doesn't (always) happen automatically.

> Thanks,
> Imre


[PATCH v5] drm/i915: limit eDP MSO pipe only for display version 20 and below

2024-04-04 Thread Luca Coelho
The pipes that can be used for eDP MSO are limited to pipe A (and
sometimes also pipe B) only for display version 20 and below.

Modify the function that returns the pipe mask for eDP MSO so that
these limitations only apply to version 20 and below, enabling all
pipes otherwise.

Bspec: 68923
Cc: Jani Nikula 
Cc: James Ausmus 
Cc: Ville Syrjälä 
Signed-off-by: Luca Coelho 
---

In v5:
   * fixed Ville's name's wrong charset, which prevented patchwork
 from picking this up.

In v4:
   * actually go back to unrestricting only for > 20.  I sent the
 wrong patch version in v3.

In v3:
   * go back to unrestricing only for > 20, since the change for
 versions 14 to 20 should be tested separately;
   * simplify the if blocks [Ville].

In v2:
   * allow pipes A and B from ver 14 to 20 [Gustavo]

 drivers/gpu/drm/i915/display/intel_ddi.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c 
b/drivers/gpu/drm/i915/display/intel_ddi.c
index a3d3d4942eb1..5d2863c43296 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -2336,10 +2336,15 @@ static void intel_ddi_power_up_lanes(struct 
intel_encoder *encoder,
}
 }
 
-/* Splitter enable for eDP MSO is limited to certain pipes. */
+/*
+ * Splitter enable for eDP MSO is limited to certain pipes, on certain
+ * platforms.
+ */
 static u8 intel_ddi_splitter_pipe_mask(struct drm_i915_private *i915)
 {
-   if (IS_ALDERLAKE_P(i915))
+   if (DISPLAY_VER(i915) > 20)
+   return ~0;
+   else if (IS_ALDERLAKE_P(i915))
return BIT(PIPE_A) | BIT(PIPE_B);
else
return BIT(PIPE_A);
-- 
2.39.2



v6.8 stable backport request for drm/i915

2024-04-04 Thread Imre Deak
Stable team, please backport the following upstream commit to 6.8:

commit 7a51a2aa2384 ("drm/i915/dp: Fix DSC state HW readout for SST connectors")

Thanks,
Imre


Re: [PATCH 7/7] drm/i915/dp: Limit brightness level to 20

2024-04-04 Thread Jani Nikula
On Thu, 04 Apr 2024, Suraj Kandpal  wrote:
> Limit minimum brightness to 20 when using aux based brightness
> control to avoid letting the screen going completely blank.

Why "20"? What does it mean? Why don't we have this in the VBT like for
PWM backlight?

>
> Signed-off-by: Suraj Kandpal 
> ---
>  drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c 
> b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> index 20dd5a6a0f3f..b54ea7e46954 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -211,6 +211,9 @@ intel_dp_aux_hdr_set_aux_backlight(const struct 
> drm_connector_state *conn_state,
>   struct intel_dp *intel_dp = enc_to_intel_dp(connector->encoder);
>   u8 buf[4] = {};
>  
> + if (level < 20)
> + level = 20;
> +
>   buf[0] = level & 0xFF;
>   buf[1] = (level & 0xFF00) >> 8;

-- 
Jani Nikula, Intel


✓ Fi.CI.BAT: success for drm/i915/display: DMC wakelock implementation (rev4)

2024-04-04 Thread Patchwork
== Series Details ==

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

== Summary ==

CI Bug Log - changes from CI_DRM_14523 -> Patchwork_131124v4


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (36 -> 37)
--

  Additional (5): fi-glk-j4005 fi-cfl-8109u bat-dg2-11 bat-arls-2 bat-arls-3 
  Missing(4): bat-dg1-7 bat-kbl-2 bat-jsl-1 fi-snb-2520m 

Known issues


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

### IGT changes ###

 Issues hit 

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

  * igt@gem_huc_copy@huc-copy:
- fi-cfl-8109u:   NOTRUN -> [SKIP][3] ([i915#2190])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v4/fi-cfl-8109u/igt@gem_huc_c...@huc-copy.html
- fi-glk-j4005:   NOTRUN -> [SKIP][4] ([i915#2190])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v4/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_131124v4/fi-glk-j4005/igt@gem_lmem_swapp...@basic.html

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

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

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

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

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

  * igt@gem_render_tiled_blits@basic:
- bat-arls-2: NOTRUN -> [SKIP][15] ([i915#10197] / [i915#10211] / 
[i915#4079])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v4/bat-arls-2/igt@gem_render_tiled_bl...@basic.html
- bat-arls-3: NOTRUN -> [SKIP][16] ([i915#10197] / [i915#10211] / 
[i915#4079])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v4/bat-arls-3/igt@gem_render_tiled_bl...@basic.html

  * igt@gem_tiled_blits@basic:
- bat-arls-3: NOTRUN -> [SKIP][17] ([i915#10196] / [i915#4077]) +2 
other tests skip
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v4/bat-arls-3/igt@gem_tiled_bl...@basic.html

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

  * igt@gem_tiled_pread_basic:
- bat-dg2-11: NOTRUN -> [SKIP][19] ([i915#4079]) +1 other test skip
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v4/bat-dg2-11/igt@gem_tiled_pread_basic.html
- bat-arls-3: NOTRUN -> [SKIP][20] ([i915#10206] / [i915#4079])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131124v4/bat-arls-3/igt@gem_tiled_pread_basic.html
- bat-arls-2: NOTRUN -> [SKIP][21] ([i915#10206] / 

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

2024-04-04 Thread Patchwork
== Series Details ==

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

== Summary ==

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




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

2024-04-04 Thread Patchwork
== Series Details ==

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

== Summary ==

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

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

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




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

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

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

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



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

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

Reviewed-by: Uma Shankar 
Signed-off-by: Luca Coelho 
---
 drivers/gpu/drm/i915/display/intel_display_params.c | 5 +
 drivers/gpu/drm/i915/display/intel_display_params.h | 1 +
 drivers/gpu/drm/i915/display/intel_dmc_wl.c | 6 --
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_params.c 
b/drivers/gpu/drm/i915/display/intel_display_params.c
index 11e03cfb774d..f40b223cc8a1 100644
--- a/drivers/gpu/drm/i915/display/intel_display_params.c
+++ b/drivers/gpu/drm/i915/display/intel_display_params.c
@@ -116,6 +116,11 @@ intel_display_param_named_unsafe(enable_psr2_sel_fetch, 
bool, 0400,
"(0=disabled, 1=enabled) "
"Default: 1");
 
+intel_display_param_named_unsafe(enable_dmc_wl, bool, 0400,
+   "Enable DMC wakelock "
+   "(0=disabled, 1=enabled) "
+   "Default: 0");
+
 __maybe_unused
 static void _param_print_bool(struct drm_printer *p, const char *driver_name,
  const char *name, bool val)
diff --git a/drivers/gpu/drm/i915/display/intel_display_params.h 
b/drivers/gpu/drm/i915/display/intel_display_params.h
index 6206cc51df04..bf8dbbdb20a1 100644
--- a/drivers/gpu/drm/i915/display/intel_display_params.h
+++ b/drivers/gpu/drm/i915/display/intel_display_params.h
@@ -46,6 +46,7 @@ struct drm_i915_private;
param(int, enable_psr, -1, 0600) \
param(bool, psr_safest_params, false, 0400) \
param(bool, enable_psr2_sel_fetch, true, 0400) \
+   param(bool, enable_dmc_wl, false, 0400) \
 
 #define MEMBER(T, member, ...) T member;
 struct intel_display_params {
diff --git a/drivers/gpu/drm/i915/display/intel_dmc_wl.c 
b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
index 065652fc475c..6f05e377b8b6 100644
--- a/drivers/gpu/drm/i915/display/intel_dmc_wl.c
+++ b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
@@ -114,7 +114,8 @@ static bool intel_dmc_wl_check_range(u32 address)
 static bool __intel_dmc_wl_supported(struct drm_i915_private *i915)
 {
if (DISPLAY_VER(i915) < 20 ||
-   !intel_dmc_has_payload(i915))
+   !intel_dmc_has_payload(i915) ||
+   !i915->display.params.enable_dmc_wl)
return false;
 
return true;
@@ -125,7 +126,8 @@ void intel_dmc_wl_init(struct drm_i915_private *i915)
struct intel_dmc_wl *wl = >display.wl;
 
/* don't call __intel_dmc_wl_supported(), DMC is not loaded yet */
-   if (DISPLAY_VER(i915) < 20)
+   if (DISPLAY_VER(i915) < 20 ||
+   !i915->display.params.enable_dmc_wl)
return;
 
INIT_DELAYED_WORK(>work, intel_dmc_wl_work);
-- 
2.39.2



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

2024-04-04 Thread Luca Coelho
Only allow running DMC wakelock code if the display version is 20 or
greater.  Also check if DMC is loaded before enabling.

Signed-off-by: Luca Coelho 
---
 .../drm/i915/display/intel_display_driver.c   |  1 +
 drivers/gpu/drm/i915/display/intel_dmc_wl.c   | 26 +++
 2 files changed, 27 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c 
b/drivers/gpu/drm/i915/display/intel_display_driver.c
index 87dd07e0d138..e4015557af6a 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -198,6 +198,7 @@ void intel_display_driver_early_probe(struct 
drm_i915_private *i915)
intel_dpll_init_clock_hook(i915);
intel_init_display_hooks(i915);
intel_fdi_init_hook(i915);
+   intel_dmc_wl_init(i915);
 }
 
 /* part #1: call before irq install */
diff --git a/drivers/gpu/drm/i915/display/intel_dmc_wl.c 
b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
index 3d7cf47321c2..065652fc475c 100644
--- a/drivers/gpu/drm/i915/display/intel_dmc_wl.c
+++ b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
@@ -6,6 +6,7 @@
 #include 
 
 #include "intel_de.h"
+#include "intel_dmc.h"
 #include "intel_dmc_regs.h"
 #include "intel_dmc_wl.h"
 
@@ -110,10 +111,23 @@ static bool intel_dmc_wl_check_range(u32 address)
return wl_needed;
 }
 
+static bool __intel_dmc_wl_supported(struct drm_i915_private *i915)
+{
+   if (DISPLAY_VER(i915) < 20 ||
+   !intel_dmc_has_payload(i915))
+   return false;
+
+   return true;
+}
+
 void intel_dmc_wl_init(struct drm_i915_private *i915)
 {
struct intel_dmc_wl *wl = >display.wl;
 
+   /* don't call __intel_dmc_wl_supported(), DMC is not loaded yet */
+   if (DISPLAY_VER(i915) < 20)
+   return;
+
INIT_DELAYED_WORK(>work, intel_dmc_wl_work);
spin_lock_init(>lock);
refcount_set(>refcount, 0);
@@ -124,6 +138,9 @@ void intel_dmc_wl_enable(struct drm_i915_private *i915)
struct intel_dmc_wl *wl = >display.wl;
unsigned long flags;
 
+   if (!__intel_dmc_wl_supported(i915))
+   return;
+
spin_lock_irqsave(>lock, flags);
 
if (wl->enabled)
@@ -148,6 +165,9 @@ void intel_dmc_wl_disable(struct drm_i915_private *i915)
struct intel_dmc_wl *wl = >display.wl;
unsigned long flags;
 
+   if (!__intel_dmc_wl_supported(i915))
+   return;
+
flush_delayed_work(>work);
 
spin_lock_irqsave(>lock, flags);
@@ -171,6 +191,9 @@ void intel_dmc_wl_get(struct drm_i915_private *i915, 
i915_reg_t reg)
struct intel_dmc_wl *wl = >display.wl;
unsigned long flags;
 
+   if (!__intel_dmc_wl_supported(i915))
+   return;
+
if (!intel_dmc_wl_check_range(reg.reg))
return;
 
@@ -215,6 +238,9 @@ void intel_dmc_wl_put(struct drm_i915_private *i915, 
i915_reg_t reg)
struct intel_dmc_wl *wl = >display.wl;
unsigned long flags;
 
+   if (!__intel_dmc_wl_supported(i915))
+   return;
+
if (!intel_dmc_wl_check_range(reg.reg))
return;
 
-- 
2.39.2



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

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

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

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

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

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

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

2024-04-04 Thread Luca Coelho
Hi,

This is the sixth version of my series, the fourth as a proper
patchset.

These are the changes:

In v4:
   * removed the call to init from the first patch (gets added later);
   * added a flag to check if the wakelock is taken in DMC, so we
 don't try to take it again if get() is called while the work is
 queued;
   * changed the copyright year to 2024;
   * added __intel_dmc_wl_supported() to make checks easier;
   * check if supported also on init;
   * check if DMC is loaded before enabling;
   * removed a couple of stray debugging messages.

In v3:
   * Fixed some checkpatch issues.

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

Please review.

Cheers,
Luca.


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

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

-- 
2.39.2



✓ Fi.CI.BAT: success for series starting with [rebase,1/3] drm: Add drm_vblank_work_flush_all().

2024-04-04 Thread Patchwork
== Series Details ==

Series: series starting with [rebase,1/3] drm: Add drm_vblank_work_flush_all().
URL   : https://patchwork.freedesktop.org/series/132028/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14523 -> Patchwork_132028v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (36 -> 36)
--

  Additional (4): fi-glk-j4005 bat-dg2-11 fi-cfl-8109u bat-arls-3 
  Missing(4): bat-kbl-2 bat-dg1-7 bat-adlm-1 fi-snb-2520m 

Known issues


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

### IGT changes ###

 Issues hit 

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

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

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

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

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

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

  * igt@gem_render_tiled_blits@basic:
- bat-arls-3: NOTRUN -> [SKIP][9] ([i915#10197] / [i915#10211] / 
[i915#4079])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132028v1/bat-arls-3/igt@gem_render_tiled_bl...@basic.html

  * igt@gem_tiled_blits@basic:
- bat-arls-3: NOTRUN -> [SKIP][10] ([i915#10196] / [i915#4077]) +2 
other tests skip
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132028v1/bat-arls-3/igt@gem_tiled_bl...@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_132028v1/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_132028v1/bat-dg2-11/igt@gem_tiled_pread_basic.html
- bat-arls-3: NOTRUN -> [SKIP][13] ([i915#10206] / [i915#4079])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132028v1/bat-arls-3/igt@gem_tiled_pread_basic.html

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

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

  * igt@kms_addfb_basic@addfb25-x-tiled-legacy:
- bat-arls-3: NOTRUN -> [SKIP][17] ([i915#10200]) +9 other tests 
skip
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_132028v1/bat-arls-3/igt@kms_addfb_ba...@addfb25-x-tiled-legacy.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_132028v1/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]: 

✗ Fi.CI.SPARSE: warning for series starting with [rebase,1/3] drm: Add drm_vblank_work_flush_all().

2024-04-04 Thread Patchwork
== Series Details ==

Series: series starting with [rebase,1/3] drm: Add drm_vblank_work_flush_all().
URL   : https://patchwork.freedesktop.org/series/132028/
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 

✗ Fi.CI.CHECKPATCH: warning for series starting with [rebase,1/3] drm: Add drm_vblank_work_flush_all().

2024-04-04 Thread Patchwork
== Series Details ==

Series: series starting with [rebase,1/3] drm: Add drm_vblank_work_flush_all().
URL   : https://patchwork.freedesktop.org/series/132028/
State : warning

== Summary ==

Error: dim checkpatch failed
5903cab7008f drm: Add drm_vblank_work_flush_all().
-:33: WARNING:WAITQUEUE_ACTIVE: waitqueue_active without comment
#33: FILE: drivers/gpu/drm/drm_vblank_work.c:249:
+   waitqueue_active(>work_wait_queue),

total: 0 errors, 1 warnings, 0 checks, 41 lines checked
d7c98e761ba1 drm/i915: Use vblank worker to unpin old legacy cursor fb safely
19d0ddeb5bb8 drm/i915: Use the same vblank worker for atomic unpin
-:107: WARNING:LONG_LINE: line length of 105 exceeds 100 columns
#107: FILE: drivers/gpu/drm/i915/display/intel_crtc.c:641:
+
drm_crtc_accurate_vblank_count(>base) + 1,

-:110: WARNING:LONG_LINE_COMMENT: line length of 110 exceeds 100 columns
#110: FILE: drivers/gpu/drm/i915/display/intel_crtc.c:644:
+   /* Remove plane from atomic state, cleanup/free 
is done from vblank worker. */

total: 0 errors, 2 warnings, 0 checks, 98 lines checked




[PULL] drm-misc-fixes

2024-04-04 Thread Thomas Zimmermann
Hi Dave, Sima,

here's the drm-misc-fixes PR for this week.

Best regards
Thomas

drm-misc-fixes-2024-04-04:
Short summary of fixes pull:

display:
- fix typos in kerneldoc

nouveau:
- uvmm: fix remap address calculation
- minor cleanups

panfrost:
- fix power-transition timeouts

prime:
- unbreak dma-buf export for virt-gpu
The following changes since commit aba2a144c0bf1ecdcbc520525712fb661392e509:

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

are available in the Git repository at:

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

for you to fetch changes up to fddf09273807bf6e51537823aaae896e05f147f9:

  drm/display: fix typo (2024-04-01 22:35:16 +0300)


Short summary of fixes pull:

display:
- fix typos in kerneldoc

nouveau:
- uvmm: fix remap address calculation
- minor cleanups

panfrost:
- fix power-transition timeouts

prime:
- unbreak dma-buf export for virt-gpu


Christian Hewitt (1):
  drm/panfrost: fix power transition timeout warnings

Colin Ian King (1):
  drm/nouveau/gr/gf100: Remove second semicolon

Dave Airlie (1):
  nouveau/uvmm: fix addr/range calcs for remap operations

Oleksandr Natalenko (1):
  drm/display: fix typo

Rob Clark (1):
  drm/prime: Unbreak virtgpu dma-buf export

 drivers/gpu/drm/display/drm_dp_dual_mode_helper.c | 4 ++--
 drivers/gpu/drm/drm_prime.c   | 7 ++-
 drivers/gpu/drm/nouveau/nouveau_uvmm.c| 6 +++---
 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c| 2 +-
 drivers/gpu/drm/panfrost/panfrost_gpu.c   | 6 +++---
 5 files changed, 15 insertions(+), 10 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)


[rebase 3/3] drm/i915: Use the same vblank worker for atomic unpin

2024-04-04 Thread Maarten Lankhorst
In case of legacy cursor update, the cursor VMA needs to be unpinned
only after vblank. This exceeds the lifetime of the whole atomic commit.

Any trick I attempted to keep the atomic commit alive didn't work, as
drm_atomic_helper_setup_commit() force throttles on any old commit that
wasn't cleaned up.

The only option remaining is to remove the plane from the atomic commit,
and use the same path as the legacy cursor update to clean the state
after vblank.

Changes since previous version:
- Call the memset for plane state immediately when scheduling vblank,
  this prevents a use-after-free in cursor cleanup.

Signed-off-by: Maarten Lankhorst 
---
 .../gpu/drm/i915/display/intel_atomic_plane.c | 13 +++-
 .../gpu/drm/i915/display/intel_atomic_plane.h |  2 ++
 drivers/gpu/drm/i915/display/intel_crtc.c | 31 +++
 drivers/gpu/drm/i915/display/intel_cursor.c   |  2 +-
 drivers/gpu/drm/i915/display/intel_cursor.h   |  3 ++
 5 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c 
b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
index 76d77d5a0409..ab01c2d15afd 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
@@ -42,6 +42,7 @@
 #include "i915_reg.h"
 #include "intel_atomic_plane.h"
 #include "intel_cdclk.h"
+#include "intel_cursor.h"
 #include "intel_display_rps.h"
 #include "intel_display_trace.h"
 #include "intel_display_types.h"
@@ -1163,7 +1164,6 @@ intel_cleanup_plane_fb(struct drm_plane *plane,
 
intel_display_rps_mark_interactive(dev_priv, state, false);
 
-   /* Should only be called after a successful intel_prepare_plane_fb()! */
intel_plane_unpin_fb(old_plane_state);
 }
 
@@ -1176,3 +1176,14 @@ void intel_plane_helper_add(struct intel_plane *plane)
 {
drm_plane_helper_add(>base, _plane_helper_funcs);
 }
+
+void intel_plane_init_cursor_vblank_work(struct intel_plane_state 
*old_plane_state,
+struct intel_plane_state 
*new_plane_state)
+{
+   if (!old_plane_state->ggtt_vma ||
+   old_plane_state->ggtt_vma == new_plane_state->ggtt_vma)
+   return;
+
+   drm_vblank_work_init(_plane_state->unpin_work, 
old_plane_state->uapi.crtc,
+intel_cursor_unpin_work);
+}
diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.h 
b/drivers/gpu/drm/i915/display/intel_atomic_plane.h
index 191dad0efc8e..5a897cf6fa02 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic_plane.h
+++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.h
@@ -66,5 +66,7 @@ int intel_plane_check_src_coordinates(struct 
intel_plane_state *plane_state);
 void intel_plane_set_invisible(struct intel_crtc_state *crtc_state,
   struct intel_plane_state *plane_state);
 void intel_plane_helper_add(struct intel_plane *plane);
+void intel_plane_init_cursor_vblank_work(struct intel_plane_state 
*old_plane_state,
+struct intel_plane_state 
*new_plane_state);
 
 #endif /* __INTEL_ATOMIC_PLANE_H__ */
diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c 
b/drivers/gpu/drm/i915/display/intel_crtc.c
index 22b80004574f..558e9b7404b5 100644
--- a/drivers/gpu/drm/i915/display/intel_crtc.c
+++ b/drivers/gpu/drm/i915/display/intel_crtc.c
@@ -500,6 +500,19 @@ void intel_pipe_update_start(struct intel_atomic_state 
*state,
if (intel_crtc_needs_vblank_work(new_crtc_state))
intel_crtc_vblank_work_init(new_crtc_state);
 
+   if (state->base.legacy_cursor_update) {
+   struct intel_plane *plane;
+   struct intel_plane_state *old_plane_state, *new_plane_state;
+   int i;
+
+   for_each_oldnew_intel_plane_in_state(state, plane, 
old_plane_state,
+new_plane_state, i) {
+   if (old_plane_state->uapi.crtc == >base)
+   
intel_plane_init_cursor_vblank_work(old_plane_state,
+   
new_plane_state);
+   }
+   }
+
intel_vblank_evade_init(old_crtc_state, new_crtc_state, );
 
if (drm_WARN_ON(_priv->drm, drm_crtc_vblank_get(>base)))
@@ -618,6 +631,24 @@ void intel_pipe_update_end(struct intel_atomic_state 
*state,
new_crtc_state->uapi.event = NULL;
}
 
+   if (state->base.legacy_cursor_update) {
+   struct intel_plane *plane;
+   struct intel_plane_state *old_plane_state;
+   int i;
+
+   for_each_old_intel_plane_in_state(state, plane, 
old_plane_state, i) {
+   if (old_plane_state->uapi.crtc == >base &&
+   old_plane_state->unpin_work.vblank) {
+   
drm_vblank_work_schedule(_plane_state->unpin_work,
+  

[rebase 2/3] drm/i915: Use vblank worker to unpin old legacy cursor fb safely

2024-04-04 Thread Maarten Lankhorst
From: Ville Syrjälä 

The cursor hardware only does sync updates, and thus the hardware
will be scanning out from the old fb until the next start of vblank.
So in order to make the legacy cursor fastpath actually safe we
should not unpin the old fb until we're sure the hardware has
ceased accessing it. The simplest approach is to just use a vblank
work here to do the delayed unpin.

Not 100% sure it's a good idea to put this onto the same high
priority vblank worker as eg. our timing critical gamma updates.
But let's keep it simple for now, and it we later discover that
this is causing problems we can think about adding a lower
priority worker for such things.

This patch is slightly reworked by Maarten

Cc: Maarten Lankhorst 
Signed-off-by: Ville Syrjälä 
Signed-off-by: Maarten Lankhorst 
---
 drivers/gpu/drm/i915/display/intel_cursor.c   | 26 +--
 drivers/gpu/drm/i915/display/intel_display.c  |  3 +++
 .../drm/i915/display/intel_display_types.h|  3 +++
 3 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c 
b/drivers/gpu/drm/i915/display/intel_cursor.c
index 89c26db0730e..f2d18695c21d 100644
--- a/drivers/gpu/drm/i915/display/intel_cursor.c
+++ b/drivers/gpu/drm/i915/display/intel_cursor.c
@@ -674,6 +674,17 @@ static bool intel_cursor_format_mod_supported(struct 
drm_plane *_plane,
return format == DRM_FORMAT_ARGB;
 }
 
+static void intel_cursor_unpin_work(struct kthread_work *base)
+{
+   struct drm_vblank_work *work = to_drm_vblank_work(base);
+   struct intel_plane_state *plane_state =
+   container_of(work, typeof(*plane_state), unpin_work);
+   struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
+
+   intel_plane_unpin_fb(plane_state);
+   intel_plane_destroy_state(>base, _state->uapi);
+}
+
 static int
 intel_legacy_cursor_update(struct drm_plane *_plane,
   struct drm_crtc *_crtc,
@@ -817,14 +828,25 @@ intel_legacy_cursor_update(struct drm_plane *_plane,
 
intel_psr_unlock(crtc_state);
 
-   intel_plane_unpin_fb(old_plane_state);
+   if (old_plane_state->ggtt_vma != new_plane_state->ggtt_vma) {
+   drm_vblank_work_init(_plane_state->unpin_work, >base,
+intel_cursor_unpin_work);
+
+   drm_vblank_work_schedule(_plane_state->unpin_work,
+
drm_crtc_accurate_vblank_count(>base) + 1,
+false);
+
+   old_plane_state = NULL;
+   } else {
+   intel_plane_unpin_fb(old_plane_state);
+   }
 
 out_free:
if (new_crtc_state)
intel_crtc_destroy_state(>base, _crtc_state->uapi);
if (ret)
intel_plane_destroy_state(>base, _plane_state->uapi);
-   else
+   else if (old_plane_state)
intel_plane_destroy_state(>base, _plane_state->uapi);
return ret;
 
diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index ad04b94c52ee..be65bf9fbd48 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -65,6 +65,7 @@
 #include "intel_crt.h"
 #include "intel_crtc.h"
 #include "intel_crtc_state_dump.h"
+#include "intel_cursor.h"
 #include "intel_ddi.h"
 #include "intel_de.h"
 #include "intel_display_driver.h"
@@ -6854,6 +6855,8 @@ static void intel_commit_modeset_disables(struct 
intel_atomic_state *state)
continue;
 
intel_crtc_disable_planes(state, crtc);
+
+   drm_vblank_work_flush_all(>base);
}
 
/* Only disable port sync and MST slaves */
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h 
b/drivers/gpu/drm/i915/display/intel_display_types.h
index 0f4bd5710796..563637f20abf 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -730,6 +730,9 @@ struct intel_plane_state {
struct intel_fb_view view;
u32 phys_dma_addr; /* for cursor_needs_physical */
 
+   /* for legacy cursor fb unpin */
+   struct drm_vblank_work unpin_work;
+
/* Plane pxp decryption state */
bool decrypt;
 
-- 
2.43.0



[rebase 1/3] drm: Add drm_vblank_work_flush_all().

2024-04-04 Thread Maarten Lankhorst
From: Maarten Lankhorst 

In some cases we want to flush all vblank work, right before vblank_off
for example. Add a simple function to make this possible.

Signed-off-by: Maarten Lankhorst 
---
 drivers/gpu/drm/drm_vblank_work.c | 22 ++
 include/drm/drm_vblank_work.h |  2 ++
 2 files changed, 24 insertions(+)

diff --git a/drivers/gpu/drm/drm_vblank_work.c 
b/drivers/gpu/drm/drm_vblank_work.c
index 43cd5c0f4f6f..ff86f2b2e052 100644
--- a/drivers/gpu/drm/drm_vblank_work.c
+++ b/drivers/gpu/drm/drm_vblank_work.c
@@ -232,6 +232,28 @@ void drm_vblank_work_flush(struct drm_vblank_work *work)
 }
 EXPORT_SYMBOL(drm_vblank_work_flush);
 
+/**
+ * drm_vblank_work_flush_all - flush all currently pending vblank work on crtc.
+ * @crtc: crtc for which vblank work to flush
+ *
+ * Wait until all currently queued vblank work on @crtc
+ * has finished executing once.
+ */
+void drm_vblank_work_flush_all(struct drm_crtc *crtc)
+{
+   struct drm_device *dev = crtc->dev;
+   struct drm_vblank_crtc *vblank = >vblank[drm_crtc_index(crtc)];
+
+   spin_lock_irq(>event_lock);
+   wait_event_lock_irq(vblank->work_wait_queue,
+   waitqueue_active(>work_wait_queue),
+   dev->event_lock);
+   spin_unlock_irq(>event_lock);
+
+   kthread_flush_worker(vblank->worker);
+}
+EXPORT_SYMBOL(drm_vblank_work_flush_all);
+
 /**
  * drm_vblank_work_init - initialize a vblank work item
  * @work: vblank work item
diff --git a/include/drm/drm_vblank_work.h b/include/drm/drm_vblank_work.h
index eb41d0810c4f..e04d436b7297 100644
--- a/include/drm/drm_vblank_work.h
+++ b/include/drm/drm_vblank_work.h
@@ -17,6 +17,7 @@ struct drm_crtc;
  * drm_vblank_work_init()
  * drm_vblank_work_cancel_sync()
  * drm_vblank_work_flush()
+ * drm_vblank_work_flush_all()
  */
 struct drm_vblank_work {
/**
@@ -67,5 +68,6 @@ void drm_vblank_work_init(struct drm_vblank_work *work, 
struct drm_crtc *crtc,
  void (*func)(struct kthread_work *work));
 bool drm_vblank_work_cancel_sync(struct drm_vblank_work *work);
 void drm_vblank_work_flush(struct drm_vblank_work *work);
+void drm_vblank_work_flush_all(struct drm_crtc *crtc);
 
 #endif /* !_DRM_VBLANK_WORK_H_ */
-- 
2.43.0



RE: [PATCH 7/7] drm/i915/dp: Limit brightness level to 20

2024-04-04 Thread Kandpal, Suraj



> -Original Message-
> From: Jani Nikula 
> Sent: Thursday, April 4, 2024 2:34 PM
> To: Kandpal, Suraj ; intel-gfx@lists.freedesktop.org
> Cc: Borah, Chaitanya Kumar ; Shankar,
> Uma ; Nautiyal, Ankit K
> ; Murthy, Arun R ;
> Syrjala, Ville ; Kumar, Naveen1
> ; sebastian.w...@redhat.com; Kandpal, Suraj
> 
> Subject: Re: [PATCH 7/7] drm/i915/dp: Limit brightness level to 20
> 
> On Thu, 04 Apr 2024, Suraj Kandpal  wrote:
> > Limit minimum brightness to 20 when using aux based brightness control
> > to avoid letting the screen going completely blank.
> 
> Why "20"? What does it mean? Why don't we have this in the VBT like for
> PWM backlight?

That makes sense. I used 20nits as that's where I felt the minimum amount of 
brightness looked okay.
But yes I could use the minimum brightness that we save in intel_panel 
->backlight structure

Regards,
Suraj Kandpal
> 
> >
> > Signed-off-by: Suraj Kandpal 
> > ---
> >  drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> > b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> > index 20dd5a6a0f3f..b54ea7e46954 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> > @@ -211,6 +211,9 @@ intel_dp_aux_hdr_set_aux_backlight(const struct
> drm_connector_state *conn_state,
> > struct intel_dp *intel_dp = enc_to_intel_dp(connector->encoder);
> > u8 buf[4] = {};
> >
> > +   if (level < 20)
> > +   level = 20;
> > +
> > buf[0] = level & 0xFF;
> > buf[1] = (level & 0xFF00) >> 8;
> 
> --
> Jani Nikula, Intel


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

2024-04-04 Thread Luca Coelho
On Thu, 2024-03-21 at 08:22 +, Shankar, Uma wrote:
> 
> > -Original Message-
> > From: Coelho, Luciano 
> > Sent: Monday, March 18, 2024 7:08 PM
> > To: intel-gfx@lists.freedesktop.org
> > Cc: intel...@lists.freedesktop.org; Shankar, Uma ;
> > ville.syrj...@linux.intel.com; Nikula, Jani 
> > Subject: [PATCH v3 4/4] drm/i915/display: tie DMC wakelock to DC5/6 state
> > transitions
> > 
> > We only need DMC wakelocks when we allow DC5 and DC6 states.  Add the calls
> > to enable and disable DMC wakelock accordingly.
> 
> > Signed-off-by: Luca Coelho 
> > ---
> >  drivers/gpu/drm/i915/display/intel_display_power_well.c | 7 +++
> >  drivers/gpu/drm/i915/display/intel_dmc.c| 4 
> >  2 files changed, 11 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_power_well.c
> > b/drivers/gpu/drm/i915/display/intel_display_power_well.c
> > index 217f82f1da84..367464f5c5cd 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_power_well.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display_power_well.c
> > @@ -17,6 +17,7 @@
> >  #include "intel_dkl_phy.h"
> >  #include "intel_dkl_phy_regs.h"
> >  #include "intel_dmc.h"
> > +#include "intel_dmc_wl.h"
> >  #include "intel_dp_aux_regs.h"
> >  #include "intel_dpio_phy.h"
> >  #include "intel_dpll.h"
> > @@ -821,6 +822,8 @@ void gen9_enable_dc5(struct drm_i915_private
> > *dev_priv)
> > intel_de_rmw(dev_priv, GEN8_CHICKEN_DCPR_1,
> >  0, SKL_SELECT_ALTERNATE_DC_EXIT);
> > 
> > +   intel_dmc_wl_enable(dev_priv);
> 
> We can have platform checks here and call only when its supported.
> No strong objection but doing it here seems better than calling for all
> and then checking for platform inside.

I prefer not to check for wakelock specifics outside the wakelock code
itself.  So if we need to change it, we change it in a single place. 
The compiler will probably inline some of these checks anyway, if it
deems the function call to be too inefficient.

Is it okay for you?

--
Cheers,
Luca.


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

2024-04-04 Thread Luca Coelho
On Thu, 2024-03-21 at 08:08 +, Shankar, Uma wrote:
> 
> > -Original Message-
> > From: Coelho, Luciano 
> > Sent: Monday, March 18, 2024 7:08 PM
> > To: intel-gfx@lists.freedesktop.org
> > Cc: intel...@lists.freedesktop.org; Shankar, Uma ;
> > ville.syrj...@linux.intel.com; Nikula, Jani 
> > Subject: [PATCH v3 3/4] drm/i915/display: add module parameter to enable DMC
> > wakelock
> > 
> > This feature should be disabled by default until properly tested and 
> > mature.  Add
> > a module parameter to enable the feature for testing, while keeping it 
> > disabled by
> > default for now.
> > 
> > Signed-off-by: Luca Coelho 
> > ---
> >  drivers/gpu/drm/i915/display/intel_display_params.c |  5 +
> > drivers/gpu/drm/i915/display/intel_display_params.h |  1 +
> >  drivers/gpu/drm/i915/display/intel_dmc_wl.c | 12 
> >  3 files changed, 14 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_params.c
> > b/drivers/gpu/drm/i915/display/intel_display_params.c
> > index 11e03cfb774d..f40b223cc8a1 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_params.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display_params.c
> > @@ -116,6 +116,11 @@
> > intel_display_param_named_unsafe(enable_psr2_sel_fetch, bool, 0400,
> > "(0=disabled, 1=enabled) "
> > "Default: 1");
> > 
> > +intel_display_param_named_unsafe(enable_dmc_wl, bool, 0400,
> > +   "Enable DMC wakelock "
> > +   "(0=disabled, 1=enabled) "
> > +   "Default: 0");
> > +
> >  __maybe_unused
> >  static void _param_print_bool(struct drm_printer *p, const char 
> > *driver_name,
> >   const char *name, bool val)
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_params.h
> > b/drivers/gpu/drm/i915/display/intel_display_params.h
> > index 6206cc51df04..bf8dbbdb20a1 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_params.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_params.h
> > @@ -46,6 +46,7 @@ struct drm_i915_private;
> > param(int, enable_psr, -1, 0600) \
> > param(bool, psr_safest_params, false, 0400) \
> > param(bool, enable_psr2_sel_fetch, true, 0400) \
> > +   param(bool, enable_dmc_wl, false, 0400) \
> > 
> >  #define MEMBER(T, member, ...) T member;  struct intel_display_params { 
> > diff --
> > git a/drivers/gpu/drm/i915/display/intel_dmc_wl.c
> > b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
> > index 7c991e22c616..84d054bcb2c1 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dmc_wl.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
> > @@ -120,7 +120,8 @@ void intel_dmc_wl_enable(struct drm_i915_private
> > *i915)
> > struct intel_dmc_wl *wl = >display.wl;
> > unsigned long flags;
> > 
> > -   if (DISPLAY_VER(i915) < 20)
> > +   if (!i915->display.params.enable_dmc_wl ||
> > +   DISPLAY_VER(i915) < 20)
> 
> Extend this check to init as well. Else it looks ok to protect under a module 
> parameter.
> Reviewed-by: Uma Shankar 

Done.  I now added the module param check to the supported() helper
function, so it will be checked everywhere.

Thanks for the r-b.

--
Cheers,
Luca.


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

2024-04-04 Thread Luca Coelho
On Thu, 2024-03-21 at 08:02 +, Shankar, Uma wrote:
> 
> > -Original Message-
> > From: Coelho, Luciano 
> > Sent: Monday, March 18, 2024 7:08 PM
> > To: intel-gfx@lists.freedesktop.org
> > Cc: intel...@lists.freedesktop.org; Shankar, Uma ;
> > ville.syrj...@linux.intel.com; Nikula, Jani 
> > Subject: [PATCH v3 2/4] drm/i915/display: don't allow DMC wakelock on older
> > hardware
> > 
> > Only allow running DMC wakelock code if the display version is 20 or 
> > greater.
> 
> One for previous one, don't do intel_dmc_wl_init unconditionally but protect 
> it with
> Platform check.

Good point.  I have removed the call to intel_dmc_wl_init() completely
from the previous patch, like with intel_dmc_wl_enable(), so the call
to init will be in this patch and protected by the platform version as
well.


> > Signed-off-by: Luca Coelho 
> > ---
> >  drivers/gpu/drm/i915/display/intel_dmc_wl.c | 12 
> >  1 file changed, 12 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_dmc_wl.c
> > b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
> > index 5c3d8204ae7e..7c991e22c616 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dmc_wl.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dmc_wl.c
> > @@ -120,6 +120,9 @@ void intel_dmc_wl_enable(struct drm_i915_private
> > *i915)
> > struct intel_dmc_wl *wl = >display.wl;
> > unsigned long flags;
> > 
> > +   if (DISPLAY_VER(i915) < 20)
> > +   return;
> > +
> > spin_lock_irqsave(>lock, flags);
> > 
> > if (wl->enabled)
> > @@ -143,6 +146,9 @@ void intel_dmc_wl_disable(struct drm_i915_private
> > *i915)
> > struct intel_dmc_wl *wl = >display.wl;
> > unsigned long flags;
> > 
> > +   if (DISPLAY_VER(i915) < 20)
> > +   return;
> 
> There can be case where DMC is not loaded, address that as well.
> We should not do wakelock in that case.

Right.  I have added a helper function, intel_dmc_wl_supported(), to
keep all this checks in one place.


> > flush_delayed_work(>work);
> > 
> > spin_lock_irqsave(>lock, flags);
> > @@ -171,6 +177,9 @@ void intel_dmc_wl_get(struct drm_i915_private *i915,
> > i915_reg_t reg)
> > struct intel_dmc_wl *wl = >display.wl;
> > unsigned long flags;
> > 
> > +   if (DISPLAY_VER(i915) < 20)
> > +   return;
> > +
> > if (!intel_dmc_wl_check_range(reg.reg))
> > return;
> > 
> > @@ -203,6 +212,9 @@ void intel_dmc_wl_put(struct drm_i915_private *i915,
> > i915_reg_t reg)
> > struct intel_dmc_wl *wl = >display.wl;
> > unsigned long flags;
> > 
> > +   if (DISPLAY_VER(i915) < 20)
> > +   return;
> > +
> > if (!intel_dmc_wl_check_range(reg.reg))
> > return;
> > 
> > --
> > 2.39.2
> 

--
Cheers,
Luca.


Re: [PATCH 5/7] drm/i915/dp: Enable AUX based backlight for HDR

2024-04-04 Thread Jani Nikula
On Thu, 04 Apr 2024, Suraj Kandpal  wrote:
> As of now whenerver HDR is switched on we use the PWM to change the
> backlight as opposed to AUX based backlight changes in terms of nits.
> This patch writes to the appropriate DPCD registers to enable aux
> based backlight using values in nits.
>
> --v2
> -Fix max_cll and max_fall assignment [Jani]
> -Fix the size sent in drm_dpcd_write [Jani]
>
> --v3
> -Content Luminance needs to be sent only for pre-ICL after that
> it is directly picked up from hdr metadata [Ville]
>
> --v4
> -Add checks for HDR TCON cap bits [Ville]
> -Check eotf of hdr_output_data and sets bits base of that value.
>
> --v5
> -Fix capability check bits.
> -Check colorspace before setting BT2020
>
> --v6
> -Use intel_dp_has_gamut_dip to check if we have capability
> to send sdp [Ville]
> -Seprate filling of all hdr tcon related bits into it's
> own function.
> -Check eotf data to make sure we are in HDR mode [Sebastian]
>
> Signed-off-by: Suraj Kandpal 
> ---
>  .../drm/i915/display/intel_dp_aux_backlight.c | 105 --
>  1 file changed, 94 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c 
> b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> index 2d50a4734823..7af876e2d210 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -40,11 +40,6 @@
>  #include "intel_dp.h"
>  #include "intel_dp_aux_backlight.h"
>  
> -/* TODO:
> - * Implement HDR, right now we just implement the bare minimum to bring us 
> back into SDR mode so we
> - * can make people's backlights work in the mean time
> - */
> -
>  /*
>   * DP AUX registers for Intel's proprietary HDR backlight interface. We 
> define
>   * them here since we'll likely be the only driver to ever use these.
> @@ -127,9 +122,6 @@ intel_dp_aux_supports_hdr_backlight(struct 
> intel_connector *connector)
>   if (ret != sizeof(tcon_cap))
>   return false;
>  
> - if (!(tcon_cap[1] & INTEL_EDP_HDR_TCON_BRIGHTNESS_NITS_CAP))
> - return false;
> -
>   drm_dbg_kms(>drm, "[CONNECTOR:%d:%s] Detected %s HDR backlight 
> interface version %d\n",
>   connector->base.base.id, connector->base.name,
>   is_intel_tcon_cap(tcon_cap) ? "Intel" : "unsupported", 
> tcon_cap[0]);
> @@ -137,6 +129,9 @@ intel_dp_aux_supports_hdr_backlight(struct 
> intel_connector *connector)
>   if (!is_intel_tcon_cap(tcon_cap))
>   return false;
>  
> + if (!(tcon_cap[1] & INTEL_EDP_HDR_TCON_BRIGHTNESS_NITS_CAP))
> + return false;
> +
>   /*
>* If we don't have HDR static metadata there is no way to
>* runtime detect used range for nits based control. For now
> @@ -225,13 +220,27 @@ intel_dp_aux_hdr_set_aux_backlight(const struct 
> drm_connector_state *conn_state,
>   connector->base.base.id, connector->base.name);
>  }
>  
> +static bool
> +intel_dp_aux_in_hdr_mode(const struct drm_connector_state *conn_state)

The naming of this file and the symbols in this file isn't all that
great to begin with, but at least all the current intel_dp_aux_*
functions have "backlight" somewhere in them, to indicate this is about
"aux backlight".

"intel_dp_aux_in_hdr_mode" literally says *aux* is in hdr mode, which is
misleading and surprising to someone who doesn't know what it's
about. And we have enough things that are misleading and surprising! ;)

Please let's try to be more specific. (But also, let more review come in
before just rolling another version with renames.)

BR,
Jani.



> +{
> + struct hdr_output_metadata *hdr_metadata;
> +
> + if (!conn_state->hdr_output_metadata)
> + return false;
> +
> + hdr_metadata = conn_state->hdr_output_metadata->data;
> +
> + return hdr_metadata->hdmi_metadata_type1.eotf != 
> HDMI_EOTF_TRADITIONAL_GAMMA_SDR;
> +}
> +
>  static void
>  intel_dp_aux_hdr_set_backlight(const struct drm_connector_state *conn_state, 
> u32 level)
>  {
>   struct intel_connector *connector = 
> to_intel_connector(conn_state->connector);
>   struct intel_panel *panel = >panel;
>  
> - if (panel->backlight.edp.intel.sdr_uses_aux) {
> + if (intel_dp_aux_in_hdr_mode(conn_state) ||
> + panel->backlight.edp.intel.sdr_uses_aux) {
>   intel_dp_aux_hdr_set_aux_backlight(conn_state, level);
>   } else {
>   const u32 pwm_level = intel_backlight_level_to_pwm(connector, 
> level);
> @@ -240,6 +249,70 @@ intel_dp_aux_hdr_set_backlight(const struct 
> drm_connector_state *conn_state, u32
>   }
>  }
>  
> +static void
> +intel_dp_aux_write_content_luminance(struct intel_connector *connector,
> +  struct hdr_output_metadata *hdr_metadata)
> +{
> + struct intel_dp *intel_dp = enc_to_intel_dp(connector->encoder);
> + struct drm_i915_private *i915 = to_i915(connector->base.dev);
> + 

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

2024-04-04 Thread Patchwork
== Series Details ==

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

== Summary ==

CI Bug Log - changes from CI_DRM_14520 -> Patchwork_131700v4


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (39 -> 36)
--

  Additional (1): fi-blb-e6850 
  Missing(4): bat-dg2-11 fi-cfl-8109u fi-snb-2520m fi-kbl-8809g 

Possible new issues
---

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

### IGT changes ###

 Suppressed 

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

  * igt@i915_selftest@live@gtt:
- {bat-arls-4}:   [PASS][1] -> [DMESG-WARN][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14520/bat-arls-4/igt@i915_selftest@l...@gtt.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v4/bat-arls-4/igt@i915_selftest@l...@gtt.html

  
Known issues


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

### IGT changes ###

 Issues hit 

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

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

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

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

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

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

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

  * igt@kms_pipe_crc_basic@hang-read-crc:
- bat-adlm-1: NOTRUN -> [SKIP][12] ([i915#9875] / [i915#9900]) +6 
other tests skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v4/bat-adlm-1/igt@kms_pipe_crc_ba...@hang-read-crc.html

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

  * igt@kms_psr@psr-sprite-plane-onoff:
- bat-adlm-1: NOTRUN -> [SKIP][14] ([i915#1072] / [i915#9673] / 
[i915#9732]) +3 other tests skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v4/bat-adlm-1/igt@kms_...@psr-sprite-plane-onoff.html

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

  * igt@prime_vgem@basic-fence-flip:
- bat-adlm-1: NOTRUN -> [SKIP][16] ([i915#3708] / [i915#9900])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v4/bat-adlm-1/igt@prime_v...@basic-fence-flip.html

  * igt@prime_vgem@basic-write:
- bat-adlm-1: NOTRUN -> [SKIP][17] ([i915#3708]) +2 other tests skip
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131700v4/bat-adlm-1/igt@prime_v...@basic-write.html

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

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