Re: [PATCH 0/4] drm/i915/dmc: DMC event stuff

2023-12-12 Thread Imre Deak
On Mon, Dec 11, 2023 at 11:37:46PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> Fix the weird flip_done/etc. issues plaguing ADL+ by disabling all dodgy
> DMC events that we definitely don't need. Also improve the debugs to
> make it easier to see what we're doing.

This (at least a rather similar issue) was debugged already on DG2
thanks for going through that and fixing the rest. Since both Windows
and Linux disables now these events, it should be in bspec as well (or
better imo, to release the firmware binaries without these events being
enabled in the first place):
Reviewed-by: Imre Deak 

> 
> Ville Syrjälä (4):
>   drm/i915/dmc: Don't enable any pipe DMC events
>   drm/i915/dmc: Also disable the flip queue event on TGL main DMC
>   drm/i915/dmc: Also disable HRR event on TGL main DMC
>   drm/i915/dmc: Print out the DMC mmio register list at fw load time
> 
>  drivers/gpu/drm/i915/display/intel_dmc.c  | 147 --
>  drivers/gpu/drm/i915/display/intel_dmc_regs.h |   1 +
>  2 files changed, 69 insertions(+), 79 deletions(-)
> 
> -- 
> 2.41.0
> 


Re: ✗ Fi.CI.IGT: failure for drm/i915/dmc: DMC event stuff

2023-12-12 Thread Ville Syrjälä
On Wed, Dec 13, 2023 at 09:35:54AM +0200, Imre Deak wrote:
> On Tue, Dec 12, 2023 at 12:06:48AM +, Patchwork wrote:
> > == Series Details ==
> > 
> > Series: drm/i915/dmc: DMC event stuff
> > URL   : https://patchwork.freedesktop.org/series/127648/
> > State : failure
> > 
> > == Summary ==
> > 
> > CI Bug Log - changes from CI_DRM_14008_full -> Patchwork_127648v1_full
> > 
> > 
> > Summary
> > ---
> > 
> >   **FAILURE**
> > 
> >   Serious unknown changes coming with Patchwork_127648v1_full absolutely 
> > need to be
> >   verified manually.
> >   
> >   If you think the reported changes have nothing to do with the changes
> >   introduced in Patchwork_127648v1_full, please notify your bug team 
> > (i915-ci-in...@lists.freedesktop.org) to allow them
> >   to document this new failure mode, which will reduce false positives in 
> > CI.
> > 
> >   External URL: 
> > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127648v1/index.html
> > 
> > Participating hosts (7 -> 9)
> > --
> > 
> >   Additional (2): shard-snb-0 shard-glk-0 
> > 
> > Possible new issues
> > ---
> > 
> >   Here are the unknown changes that may have been introduced in 
> > Patchwork_127648v1_full:
> > 
> > ### IGT changes ###
> > 
> >  Possible regressions 
> > 
> >   * igt@gem_exec_balancer@bonded-sync:
> > - shard-rkl:  NOTRUN -> [ABORT][1] +1 other test abort
> >[1]: 
> > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127648v1/shard-rkl-3/igt@gem_exec_balan...@bonded-sync.html
> > 
> >   * igt@gem_exec_balancer@invalid-bonds:
> > - shard-rkl:  [PASS][2] -> [ABORT][3]
> >[2]: 
> > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-rkl-2/igt@gem_exec_balan...@invalid-bonds.html
> >[3]: 
> > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127648v1/shard-rkl-3/igt@gem_exec_balan...@invalid-bonds.html
> > 
> >   * igt@gem_exec_balancer@parallel-balancer:
> > - shard-dg2:  NOTRUN -> [ABORT][4]
> >[4]: 
> > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127648v1/shard-dg2-3/igt@gem_exec_balan...@parallel-balancer.html
> > 
> >   * igt@i915_pm_rc6_residency@rc6-fence@gt0:
> > - shard-glk:  NOTRUN -> [INCOMPLETE][5]
> >[5]: 
> > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127648v1/shard-glk5/igt@i915_pm_rc6_residency@rc6-fe...@gt0.html
> > 
> >   * igt@perf_pmu@busy-check-all@rcs0:
> > - shard-tglu: NOTRUN -> [INCOMPLETE][6]
> >[6]: 
> > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127648v1/shard-tglu-4/igt@perf_pmu@busy-check-...@rcs0.html
> > 
> >   * igt@perf_pmu@busy-idle-check-all:
> > - shard-snb:  NOTRUN -> [INCOMPLETE][7] +2 other tests 
> > incomplete
> >[7]: 
> > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127648v1/shard-snb2/igt@perf_...@busy-idle-check-all.html
> 
> All the above look to be unrelated, for the same root cause (except for
> SNB which doesn't have logs, but not a DMC platform):

Seems to a regression introduced in -rc5.

> 
> <4>[   67.140485] WARNING: CPU: 1 PID: 1010 at kernel/events/core.c:1950 
> __do_sys_perf_event_open+0xef0/0x1060
> <4>[   67.140498] Modules linked in: vgem drm_shmem_helper fuse 
> snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio 
> i915 x86_pkg_temp_thermal coretemp mei_pxp mei_hdcp wmi_bmof kvm_intel btusb 
> btrtl btintel btbcm kvm bluetooth irqbypass crct10dif_pclmul ecdh_generic 
> crc32_pclmul ghash_clmulni_intel ecc r8169 realtek snd_hda_intel 
> snd_intel_dspcfg snd_hda_codec snd_hwdep prime_numbers i2c_algo_bit ttm 
> snd_hda_core video drm_display_helper pinctrl_geminilake mei_me snd_pcm 
> drm_buddy i2c_i801 mei wmi i2c_smbus
> <4>[   67.140631] CPU: 1 PID: 1010 Comm: i915_pm_rc6_res Not tainted 
> 6.7.0-rc5-Patchwork_127648v1-gd630426f84b0+ #1
> <4>[   67.140637] Hardware name: Intel Corporation NUC7CJYH/NUC7JYB, BIOS 
> JYGLKCPX.86A.0057.2020.1020.1637 10/20/2020
> <4>[   67.140642] RIP: 0010:__do_sys_perf_event_open+0xef0/0x1060
> <4>[   67.140649] Code: 00 48 8b 85 28 02 00 00 83 ce ff 48 8d b8 a8 00 00 00 
> e8 d3 46 ab 00 4c 8b 4c 24 18 4c 8b 44 24 28 83 e8 01 0f 84 09 f9 ff ff <0f> 
> 0b e9 02 f9 ff ff 49 8b 44 24 10 48 8d 68 f0 49 39 ec 74 3d 4c
> <4>[   67.140654] RSP: 0018:c900012fbe38 EFLAGS: 00010297
> <4>[   67.140661] RAX:  RBX:  RCX: 
> 
> <4>[   67.140665] RDX: 8000 RSI: 823fd5bc RDI: 
> 8241d135
> <4>[   67.140669] RBP: 888100c00b98 R08: 888277c38a60 R09: 
> 888277c38aa0
> <4>[   67.140673] R10: 0001 R11: 0001 R12: 
> 
> <4>[   67.140677] R13: 0001 R14: 0002 R15: 
> 888100c00b98
> <4>[   67.140681] FS:  7f5e05d02c40() GS:888277c8() 
> knlGS:
> <4>[   67.140685] CS:  0010 DS:  ES:  CR0: 

Re: ✗ Fi.CI.IGT: failure for drm/i915/dmc: DMC event stuff

2023-12-12 Thread Imre Deak
On Tue, Dec 12, 2023 at 12:06:48AM +, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915/dmc: DMC event stuff
> URL   : https://patchwork.freedesktop.org/series/127648/
> State : failure
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_14008_full -> Patchwork_127648v1_full
> 
> 
> Summary
> ---
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with Patchwork_127648v1_full absolutely need 
> to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_127648v1_full, please notify your bug team 
> (i915-ci-in...@lists.freedesktop.org) to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   External URL: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127648v1/index.html
> 
> Participating hosts (7 -> 9)
> --
> 
>   Additional (2): shard-snb-0 shard-glk-0 
> 
> Possible new issues
> ---
> 
>   Here are the unknown changes that may have been introduced in 
> Patchwork_127648v1_full:
> 
> ### IGT changes ###
> 
>  Possible regressions 
> 
>   * igt@gem_exec_balancer@bonded-sync:
> - shard-rkl:  NOTRUN -> [ABORT][1] +1 other test abort
>[1]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127648v1/shard-rkl-3/igt@gem_exec_balan...@bonded-sync.html
> 
>   * igt@gem_exec_balancer@invalid-bonds:
> - shard-rkl:  [PASS][2] -> [ABORT][3]
>[2]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-rkl-2/igt@gem_exec_balan...@invalid-bonds.html
>[3]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127648v1/shard-rkl-3/igt@gem_exec_balan...@invalid-bonds.html
> 
>   * igt@gem_exec_balancer@parallel-balancer:
> - shard-dg2:  NOTRUN -> [ABORT][4]
>[4]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127648v1/shard-dg2-3/igt@gem_exec_balan...@parallel-balancer.html
> 
>   * igt@i915_pm_rc6_residency@rc6-fence@gt0:
> - shard-glk:  NOTRUN -> [INCOMPLETE][5]
>[5]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127648v1/shard-glk5/igt@i915_pm_rc6_residency@rc6-fe...@gt0.html
> 
>   * igt@perf_pmu@busy-check-all@rcs0:
> - shard-tglu: NOTRUN -> [INCOMPLETE][6]
>[6]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127648v1/shard-tglu-4/igt@perf_pmu@busy-check-...@rcs0.html
> 
>   * igt@perf_pmu@busy-idle-check-all:
> - shard-snb:  NOTRUN -> [INCOMPLETE][7] +2 other tests incomplete
>[7]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127648v1/shard-snb2/igt@perf_...@busy-idle-check-all.html

All the above look to be unrelated, for the same root cause (except for
SNB which doesn't have logs, but not a DMC platform):

<4>[   67.140485] WARNING: CPU: 1 PID: 1010 at kernel/events/core.c:1950 
__do_sys_perf_event_open+0xef0/0x1060
<4>[   67.140498] Modules linked in: vgem drm_shmem_helper fuse 
snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio 
i915 x86_pkg_temp_thermal coretemp mei_pxp mei_hdcp wmi_bmof kvm_intel btusb 
btrtl btintel btbcm kvm bluetooth irqbypass crct10dif_pclmul ecdh_generic 
crc32_pclmul ghash_clmulni_intel ecc r8169 realtek snd_hda_intel 
snd_intel_dspcfg snd_hda_codec snd_hwdep prime_numbers i2c_algo_bit ttm 
snd_hda_core video drm_display_helper pinctrl_geminilake mei_me snd_pcm 
drm_buddy i2c_i801 mei wmi i2c_smbus
<4>[   67.140631] CPU: 1 PID: 1010 Comm: i915_pm_rc6_res Not tainted 
6.7.0-rc5-Patchwork_127648v1-gd630426f84b0+ #1
<4>[   67.140637] Hardware name: Intel Corporation NUC7CJYH/NUC7JYB, BIOS 
JYGLKCPX.86A.0057.2020.1020.1637 10/20/2020
<4>[   67.140642] RIP: 0010:__do_sys_perf_event_open+0xef0/0x1060
<4>[   67.140649] Code: 00 48 8b 85 28 02 00 00 83 ce ff 48 8d b8 a8 00 00 00 
e8 d3 46 ab 00 4c 8b 4c 24 18 4c 8b 44 24 28 83 e8 01 0f 84 09 f9 ff ff <0f> 0b 
e9 02 f9 ff ff 49 8b 44 24 10 48 8d 68 f0 49 39 ec 74 3d 4c
<4>[   67.140654] RSP: 0018:c900012fbe38 EFLAGS: 00010297
<4>[   67.140661] RAX:  RBX:  RCX: 

<4>[   67.140665] RDX: 8000 RSI: 823fd5bc RDI: 
8241d135
<4>[   67.140669] RBP: 888100c00b98 R08: 888277c38a60 R09: 
888277c38aa0
<4>[   67.140673] R10: 0001 R11: 0001 R12: 

<4>[   67.140677] R13: 0001 R14: 0002 R15: 
888100c00b98
<4>[   67.140681] FS:  7f5e05d02c40() GS:888277c8() 
knlGS:
<4>[   67.140685] CS:  0010 DS:  ES:  CR0: 80050033
<4>[   67.140689] CR2: 55c1b87cf548 CR3: 000114384000 CR4: 
00350ef0
<4>[   67.140693] Call Trace:
<4>[   67.140696]  
<4>[   67.140701]  ? __warn+0x7f/0x170
<4>[   67.140709]  ? __do_sys_perf_event_open+0xef0/0x1060
<4>[   67.140717]  ? report_bug+0x1f8/0x200
<4>[   67.140729]  ? handle_bug+0x3c/0x70

RE: [PATCH v2] drm/i915/display: Wait for PHY readiness not needed for disabling sequence

2023-12-12 Thread Kahola, Mika


> -Original Message-
> From: Deak, Imre 
> Sent: Wednesday, December 13, 2023 9:14 AM
> To: Kahola, Mika 
> Cc: intel-gfx@lists.freedesktop.org
> Subject: Re: [PATCH v2] drm/i915/display: Wait for PHY readiness not needed 
> for disabling sequence
> 
> On Tue, Dec 12, 2023 at 01:51:30PM +0200, Mika Kahola wrote:
> > When going through the disconnection flow we don't need to wait for
> > PHY readiness and hence we can skip the wait part. For disabling the
> > function returns false as an indicator that the power is not enabled.
> > After all, we are not even using the return value when Type-C is 
> > disconnecting.
> >
> > v2: Cleanup for increased readibility (Imre)
> >
> > BSpec: 65380
> >
> > For VLK-53734
> >
> > Signed-off-by: Mika Kahola 
> 
> For next time: it would've been better to separate to refactor + fix patches. 
> The change looks ok:

That's true that this really contains two parts, the refactoring and a small 
fix.

Thanks for the review!

-Mika-

> Reviewed-by: Imre Deak 
> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_tc.c | 25
> > -
> >  1 file changed, 16 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_tc.c
> > b/drivers/gpu/drm/i915/display/intel_tc.c
> > index f64d348a969e..dcf05e00e505 100644
> > --- a/drivers/gpu/drm/i915/display/intel_tc.c
> > +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> > @@ -1030,18 +1030,25 @@ static bool
> > xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool enabl
> >
> > __xelpdp_tc_phy_enable_tcss_power(tc, enable);
> >
> > -   if ((!tc_phy_wait_for_ready(tc) ||
> > -!xelpdp_tc_phy_wait_for_tcss_power(tc, enable)) &&
> > -   !drm_WARN_ON(>drm, tc->mode == TC_PORT_LEGACY)) {
> > -   if (enable) {
> > -   __xelpdp_tc_phy_enable_tcss_power(tc, false);
> > -   xelpdp_tc_phy_wait_for_tcss_power(tc, false);
> > -   }
> > +   if (enable && !tc_phy_wait_for_ready(tc))
> > +   goto out_disable;
> >
> > -   return false;
> > -   }
> > +   if (!xelpdp_tc_phy_wait_for_tcss_power(tc, enable))
> > +   goto out_disable;
> >
> > return true;
> > +
> > +out_disable:
> > +   if (drm_WARN_ON(>drm, tc->mode == TC_PORT_LEGACY))
> > +   return false;
> > +
> > +   if (!enable)
> > +   return false;
> > +
> > +   __xelpdp_tc_phy_enable_tcss_power(tc, false);
> > +   xelpdp_tc_phy_wait_for_tcss_power(tc, false);
> > +
> > +   return false;
> >  }
> >
> >  static void xelpdp_tc_phy_take_ownership(struct intel_tc_port *tc,
> > bool take)
> > --
> > 2.34.1
> >


Re: [PATCH v2] drm/i915/display: Wait for PHY readiness not needed for disabling sequence

2023-12-12 Thread Imre Deak
On Tue, Dec 12, 2023 at 01:51:30PM +0200, Mika Kahola wrote:
> When going through the disconnection flow we don't need to wait for PHY
> readiness and hence we can skip the wait part. For disabling the function
> returns false as an indicator that the power is not enabled. After all,
> we are not even using the return value when Type-C is disconnecting.
> 
> v2: Cleanup for increased readibility (Imre)
> 
> BSpec: 65380
> 
> For VLK-53734
> 
> Signed-off-by: Mika Kahola 

For next time: it would've been better to separate to refactor + fix
patches. The change looks ok:
Reviewed-by: Imre Deak 

> ---
>  drivers/gpu/drm/i915/display/intel_tc.c | 25 -
>  1 file changed, 16 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_tc.c 
> b/drivers/gpu/drm/i915/display/intel_tc.c
> index f64d348a969e..dcf05e00e505 100644
> --- a/drivers/gpu/drm/i915/display/intel_tc.c
> +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> @@ -1030,18 +1030,25 @@ static bool xelpdp_tc_phy_enable_tcss_power(struct 
> intel_tc_port *tc, bool enabl
>  
>   __xelpdp_tc_phy_enable_tcss_power(tc, enable);
>  
> - if ((!tc_phy_wait_for_ready(tc) ||
> -  !xelpdp_tc_phy_wait_for_tcss_power(tc, enable)) &&
> - !drm_WARN_ON(>drm, tc->mode == TC_PORT_LEGACY)) {
> - if (enable) {
> - __xelpdp_tc_phy_enable_tcss_power(tc, false);
> - xelpdp_tc_phy_wait_for_tcss_power(tc, false);
> - }
> + if (enable && !tc_phy_wait_for_ready(tc))
> + goto out_disable;
>  
> - return false;
> - }
> + if (!xelpdp_tc_phy_wait_for_tcss_power(tc, enable))
> + goto out_disable;
>  
>   return true;
> +
> +out_disable:
> + if (drm_WARN_ON(>drm, tc->mode == TC_PORT_LEGACY))
> + return false;
> +
> + if (!enable)
> + return false;
> +
> + __xelpdp_tc_phy_enable_tcss_power(tc, false);
> + xelpdp_tc_phy_wait_for_tcss_power(tc, false);
> +
> + return false;
>  }
>  
>  static void xelpdp_tc_phy_take_ownership(struct intel_tc_port *tc, bool take)
> -- 
> 2.34.1
> 


RE: ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/edid: replace __attribute__((packed)) with __packed (rev2)

2023-12-12 Thread Musial, Ewelina
+ @Illipilli, TejasreeX

-Original Message-
From: I915-ci-infra  On Behalf Of 
Jani Nikula
Sent: Tuesday, December 12, 2023 5:57 PM
To: i915-ci-in...@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/edid: 
replace __attribute__((packed)) with __packed (rev2)

On Tue, 12 Dec 2023, Patchwork  wrote:
> == Series Details ==
>
> Series: series starting with [1/2] drm/edid: replace __attribute__((packed)) 
> with __packed (rev2)
> URL   : https://patchwork.freedesktop.org/series/127680/
> State : failure
>
> == Summary ==
>
> CI Bug Log - changes from CI_DRM_14010 -> Patchwork_127680v2 
> 
>
> Summary
> ---
>
>   **FAILURE**
>
>   Serious unknown changes coming with Patchwork_127680v2 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_127680v2, 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_127680v2/index.html
>
> Participating hosts (31 -> 34)
> --
>
>   Additional (4): bat-dg2-8 bat-kbl-2 bat-dg2-9 fi-pnv-d510 
>   Missing(1): fi-snb-2520m 
>
> Possible new issues
> ---
>
>   Here are the unknown changes that may have been introduced in 
> Patchwork_127680v2:
>
> ### IGT changes ###
>
>  Possible regressions 
>
>   * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
> - bat-adlp-11:[PASS][1] -> [SKIP][2] +5 other tests skip
>[1]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html
>[2]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-1
> 1/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html
>
>   * igt@kms_pipe_crc_basic@read-crc:
> - bat-adlp-11:NOTRUN -> [SKIP][3] +8 other tests skip
>[3]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-1
> 1/igt@kms_pipe_crc_ba...@read-crc.html

Unrelated, please re-report.

BR,
Jani.

>
>   
>  Warnings 
>
>   * igt@kms_dsc@dsc-basic:
> - bat-adlp-11:[SKIP][4] ([i915#3555] / [i915#3840]) -> [SKIP][5]
>[4]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_...@dsc-basic.html
>[5]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-1
> 1/igt@kms_...@dsc-basic.html
>
>   
> Known issues
> 
>
>   Here are the changes found in Patchwork_127680v2 that come from known 
> issues:
>
> ### IGT changes ###
>
>  Issues hit 
>
>   * igt@fbdev@info:
> - bat-adlp-11:[PASS][6] -> [SKIP][7] ([i915#1849] / [i915#2582])
>[6]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@info.html
>[7]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-11/igt@fb...@info.html
> - bat-kbl-2:  NOTRUN -> [SKIP][8] ([fdo#109271] / [i915#1849])
>[8]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-kbl-2/
> igt@fb...@info.html
>
>   * igt@fbdev@nullptr:
> - bat-adlp-11:[PASS][9] -> [SKIP][10] ([i915#2582]) +3 other 
> tests skip
>[9]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@nullptr.html
>[10]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-1
> 1/igt@fb...@nullptr.html
>
>   * igt@gem_exec_suspend@basic-s0@lmem0:
> - bat-dg2-8:  NOTRUN -> [INCOMPLETE][11] ([i915#9275])
>[11]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-dg2-8/
> igt@gem_exec_suspend@basic...@lmem0.html
>
>   * igt@gem_lmem_swapping@basic:
> - fi-pnv-d510:NOTRUN -> [SKIP][12] ([fdo#109271]) +28 other tests 
> skip
>[12]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/fi-pnv-d51
> 0/igt@gem_lmem_swapp...@basic.html
>
>   * igt@gem_lmem_swapping@parallel-random-engines:
> - bat-kbl-2:  NOTRUN -> [SKIP][13] ([fdo#109271]) +36 other tests 
> skip
>[13]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-kbl-2/
> igt@gem_lmem_swapp...@parallel-random-engines.html
>
>   * igt@gem_lmem_swapping@verify-random:
> - bat-adlp-11:NOTRUN -> [SKIP][14] ([i915#4613]) +3 other tests 
> skip
>[14]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-1
> 1/igt@gem_lmem_swapp...@verify-random.html
>
>   * igt@gem_mmap@basic:
> - bat-dg2-9:  NOTRUN -> [SKIP][15] ([i915#4083])
>[15]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-dg2-9/igt@gem_m...@basic.html
> - bat-dg2-8:  NOTRUN -> [SKIP][16] ([i915#4083])
>[16]: 
> 

Re: [Intel-gfx] [PATCH] drm/i915: Add Wa_14019877138

2023-12-12 Thread Kalvala, Haridhar



On 12/11/2023 9:26 PM, Matt Roper wrote:

On Mon, Dec 11, 2023 at 05:08:48PM +0530, Kalvala, Haridhar wrote:

On 12/6/2023 1:54 AM, Matt Roper wrote:

On Tue, Dec 05, 2023 at 02:41:05PM +0530, Haridhar Kalvala wrote:

Enable Force Dispatch Ends Collection for DG2.

BSpec: 46001

Signed-off-by: Haridhar Kalvala 
---
   drivers/gpu/drm/i915/gt/intel_gt_regs.h | 3 +++
   drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++
   2 files changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h 
b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
index 9de41703fae5..85ba62639807 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
@@ -469,6 +469,9 @@
   #define XEHP_PSS_MODE2   MCR_REG(0x703c)
   #define   SCOREBOARD_STALL_FLUSH_CONTROL REG_BIT(5)
+#defineXEHP_PSS_CHICKENMCR_REG(0x7044)
+#define  FD_END_COLLECTREG_BIT(5)

Looks like the whitespace between '#define' and the names isn't correct
here.

Aside from that,

Reviewed-by: Matt Roper 
Hi Matt,

Thank you. I verified with checkpatch and it did not shown any warning. I
will check again.

Checkpatch won't care since this isn't related to kernel coding style,
just to consistency within the header.  You should make these
definitions use the same whitespace format as all the other ones in the file.


Matt


Hi Matt,

Done.

Thanks & regards,
Haridhar Kalvala


Thanks & regards,

Haridhar Kalvala


+
   #define GEN7_SC_INSTDONE _MMIO(0x7100)
   #define GEN12_SC_INSTDONE_EXTRA  _MMIO(0x7104)
   #define GEN12_SC_INSTDONE_EXTRA2 _MMIO(0x7108)
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c 
b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index 4cbf9e512645..3eacbc50caf8 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -777,6 +777,9 @@ static void dg2_ctx_workarounds_init(struct intel_engine_cs 
*engine,
/* Wa_18019271663:dg2 */
wa_masked_en(wal, CACHE_MODE_1, MSAA_OPTIMIZATION_REDUC_DISABLE);
+
+   /* Wa_14019877138:dg2 */
+   wa_mcr_masked_en(wal, XEHP_PSS_CHICKEN, FD_END_COLLECT);
   }
   static void xelpg_ctx_gt_tuning_init(struct intel_engine_cs *engine,
--
2.25.1


--
Regards,
Haridhar Kalvala


--
Regards,
Haridhar Kalvala



[PATCH] drm/i915: Add Wa_14019877138

2023-12-12 Thread Haridhar Kalvala
Enable Force Dispatch Ends Collection for DG2.

BSpec: 46001

Signed-off-by: Haridhar Kalvala 
Reviewed-by: Matt Roper 
---
 drivers/gpu/drm/i915/gt/intel_gt_regs.h | 3 +++
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h 
b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
index 9de41703fae5..50962cfd1353 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
@@ -469,6 +469,9 @@
 #define XEHP_PSS_MODE2 MCR_REG(0x703c)
 #define   SCOREBOARD_STALL_FLUSH_CONTROL   REG_BIT(5)
 
+#define XEHP_PSS_CHICKEN   MCR_REG(0x7044)
+#define   FD_END_COLLECT   REG_BIT(5)
+
 #define GEN7_SC_INSTDONE   _MMIO(0x7100)
 #define GEN12_SC_INSTDONE_EXTRA_MMIO(0x7104)
 #define GEN12_SC_INSTDONE_EXTRA2   _MMIO(0x7108)
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c 
b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index 4cbf9e512645..3eacbc50caf8 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -777,6 +777,9 @@ static void dg2_ctx_workarounds_init(struct intel_engine_cs 
*engine,
 
/* Wa_18019271663:dg2 */
wa_masked_en(wal, CACHE_MODE_1, MSAA_OPTIMIZATION_REDUC_DISABLE);
+
+   /* Wa_14019877138:dg2 */
+   wa_mcr_masked_en(wal, XEHP_PSS_CHICKEN, FD_END_COLLECT);
 }
 
 static void xelpg_ctx_gt_tuning_init(struct intel_engine_cs *engine,
-- 
2.25.1



✗ Fi.CI.BAT: failure for drm/i915: (stolen) memory region related fixes (rev2)

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/i915: (stolen) memory region related fixes (rev2)
URL   : https://patchwork.freedesktop.org/series/127721/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14010 -> Patchwork_127721v2


Summary
---

  **FAILURE**

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

Participating hosts (31 -> 33)
--

  Additional (4): bat-kbl-2 bat-dg2-9 bat-mtlp-8 fi-pnv-d510 
  Missing(2): bat-adlp-11 fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_module_load@load:
- bat-mtlp-8: NOTRUN -> [INCOMPLETE][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v2/bat-mtlp-8/igt@i915_module_l...@load.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@fbdev@info:
- bat-kbl-2:  NOTRUN -> [SKIP][2] ([fdo#109271] / [i915#1849])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v2/bat-kbl-2/igt@fb...@info.html

  * igt@gem_exec_suspend@basic-s0@smem:
- bat-dg2-9:  NOTRUN -> [INCOMPLETE][3] ([i915#9275])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v2/bat-dg2-9/igt@gem_exec_suspend@basic...@smem.html

  * igt@gem_lmem_swapping@basic:
- fi-pnv-d510:NOTRUN -> [SKIP][4] ([fdo#109271]) +28 other tests 
skip
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v2/fi-pnv-d510/igt@gem_lmem_swapp...@basic.html

  * igt@gem_lmem_swapping@parallel-random-engines:
- bat-kbl-2:  NOTRUN -> [SKIP][5] ([fdo#109271]) +36 other tests 
skip
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v2/bat-kbl-2/igt@gem_lmem_swapp...@parallel-random-engines.html

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

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

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

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

  * igt@i915_selftest@live@gt_lrc:
- bat-dg1-7:  [PASS][10] -> [ABORT][11] ([i915#9413])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-dg1-7/igt@i915_selftest@live@gt_lrc.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v2/bat-dg1-7/igt@i915_selftest@live@gt_lrc.html

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

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

  * igt@kms_addfb_basic@framebuffer-vs-set-tiling:
- bat-dg2-9:  NOTRUN -> [SKIP][14] ([i915#4212]) +6 other tests skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v2/bat-dg2-9/igt@kms_addfb_ba...@framebuffer-vs-set-tiling.html

  * igt@kms_addfb_basic@tile-pitch-mismatch:
- bat-dg2-9:  NOTRUN -> [SKIP][15] ([i915#4212] / [i915#5608])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v2/bat-dg2-9/igt@kms_addfb_ba...@tile-pitch-mismatch.html

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

  * igt@kms_force_connector_basic@force-load-detect:
- bat-dg2-9:  NOTRUN -> [SKIP][17] 

[PATCH] drm/i915/uapi: fix typos/spellos and punctuation

2023-12-12 Thread Randy Dunlap
Use "its" for possessive form instead of "it's".
Hyphenate multi-word adjectives.
Correct some spelling.
End one line of code with ';' instead of ','. The before and after
  object files are identical.

Signed-off-by: Randy Dunlap 
Cc: Jani Nikula 
Cc: Joonas Lahtinen 
Cc: Rodrigo Vivi 
Cc: Tvrtko Ursulin 
Cc: intel-gfx@lists.freedesktop.org
---
 include/uapi/drm/i915_drm.h |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff -- a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -693,7 +693,7 @@ typedef struct drm_i915_irq_wait {
 #define I915_PARAM_HAS_EXEC_FENCE   44
 
 /* Query whether DRM_I915_GEM_EXECBUFFER2 supports the ability to capture
- * user specified bufffers for post-mortem debugging of GPU hangs. See
+ * user-specified buffers for post-mortem debugging of GPU hangs. See
  * EXEC_OBJECT_CAPTURE.
  */
 #define I915_PARAM_HAS_EXEC_CAPTURE 45
@@ -1606,7 +1606,7 @@ struct drm_i915_gem_busy {
 * is accurate.
 *
 * The returned dword is split into two fields to indicate both
-* the engine classess on which the object is being read, and the
+* the engine classes on which the object is being read, and the
 * engine class on which it is currently being written (if any).
 *
 * The low word (bits 0:15) indicate if the object is being written
@@ -1815,7 +1815,7 @@ struct drm_i915_gem_madvise {
__u32 handle;
 
/* Advice: either the buffer will be needed again in the near future,
-* or wont be and could be discarded under memory pressure.
+* or won't be and could be discarded under memory pressure.
 */
__u32 madv;
 
@@ -3246,7 +3246,7 @@ struct drm_i915_query_topology_info {
  * // enough to hold our array of engines. The kernel will fill out the
  * // item.length for us, which is the number of bytes we need.
  * //
- * // Alternatively a large buffer can be allocated straight away enabling
+ * // Alternatively a large buffer can be allocated straightaway enabling
  * // querying in one pass, in which case item.length should contain the
  * // length of the provided buffer.
  * err = ioctl(fd, DRM_IOCTL_I915_QUERY, );
@@ -3256,7 +3256,7 @@ struct drm_i915_query_topology_info {
  * // Now that we allocated the required number of bytes, we call the ioctl
  * // again, this time with the data_ptr pointing to our newly allocated
  * // blob, which the kernel can then populate with info on all engines.
- * item.data_ptr = (uintptr_t),
+ * item.data_ptr = (uintptr_t)
  *
  * err = ioctl(fd, DRM_IOCTL_I915_QUERY, );
  * if (err) ...
@@ -3286,7 +3286,7 @@ struct drm_i915_query_topology_info {
 /**
  * struct drm_i915_engine_info
  *
- * Describes one engine and it's capabilities as known to the driver.
+ * Describes one engine and its capabilities as known to the driver.
  */
 struct drm_i915_engine_info {
/** @engine: Engine class and instance. */


✗ Fi.CI.SPARSE: warning for drm/i915: (stolen) memory region related fixes (rev2)

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/i915: (stolen) memory region related fixes (rev2)
URL   : https://patchwork.freedesktop.org/series/127721/
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: (stolen) memory region related fixes (rev2)

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/i915: (stolen) memory region related fixes (rev2)
URL   : https://patchwork.freedesktop.org/series/127721/
State : warning

== Summary ==

Error: dim checkpatch failed
43431d68ff99 drm/i915: Use struct resource for memory region IO as well
-:385: WARNING:LONG_LINE: line length of 105 exceeds 100 columns
#385: FILE: drivers/gpu/drm/i915/intel_region_ttm.c:227:
+   if (WARN_ON(overflows_type(resource_size(>io) >> 
PAGE_SHIFT, place.lpfn))) {

total: 0 errors, 1 warnings, 0 checks, 281 lines checked
4740f0098482 drm/i915: Print memory region info during probe
f5fd743f6ee4 drm/i915: Remove ad-hoc lmem/stolen debugs
b9de2397f4ee drm/i915: Bypass LMEMBAR/GTTMMADR for MTL stolen memory access
2f5eb71f0cc5 drm/i915: Disable the "binder"
ad5d174a7ad5 drm/i915: Rename the DSM/GSM registers
8943d3a47536 drm/i915: Fix PTE decode during initial plane readout
c0c84c45e7e3 drm/i915: Fix region start during initial plane readout
0e72f7c4959c drm/i915: Fix MTL initial plane readout
73e35d41526a drm/i915: s/phys_base/dma_addr/
0f775764deae drm/i915: Split the smem and lmem plane readout apart
a3e805b3a298 drm/i915: Simplify intel_initial_plane_config() calling convention




✗ Fi.CI.BAT: failure for drm/i915: (stolen) memory region related fixes

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/i915: (stolen) memory region related fixes
URL   : https://patchwork.freedesktop.org/series/127721/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14010 -> Patchwork_127721v1


Summary
---

  **FAILURE**

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

Participating hosts (31 -> 33)
--

  Additional (4): bat-dg2-8 bat-dg2-9 bat-mtlp-8 fi-pnv-d510 
  Missing(2): bat-adlp-11 fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_module_load@load:
- bat-mtlp-8: NOTRUN -> [INCOMPLETE][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v1/bat-mtlp-8/igt@i915_module_l...@load.html

  * igt@i915_selftest@live@gem_contexts:
- bat-atsm-1: [PASS][2] -> [INCOMPLETE][3]
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-atsm-1/igt@i915_selftest@live@gem_contexts.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v1/bat-atsm-1/igt@i915_selftest@live@gem_contexts.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_exec_suspend@basic-s0@smem:
- bat-dg2-9:  NOTRUN -> [INCOMPLETE][4] ([i915#9275])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v1/bat-dg2-9/igt@gem_exec_suspend@basic...@smem.html

  * igt@gem_lmem_swapping@basic:
- fi-pnv-d510:NOTRUN -> [SKIP][5] ([fdo#109271]) +28 other tests 
skip
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v1/fi-pnv-d510/igt@gem_lmem_swapp...@basic.html

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

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

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

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

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

  * igt@i915_suspend@basic-s3-without-i915:
- bat-dg2-8:  NOTRUN -> [SKIP][14] ([i915#6645])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v1/bat-dg2-8/igt@i915_susp...@basic-s3-without-i915.html

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

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

  * 

✗ Fi.CI.SPARSE: warning for drm/i915: (stolen) memory region related fixes

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/i915: (stolen) memory region related fixes
URL   : https://patchwork.freedesktop.org/series/127721/
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: (stolen) memory region related fixes

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/i915: (stolen) memory region related fixes
URL   : https://patchwork.freedesktop.org/series/127721/
State : warning

== Summary ==

Error: dim checkpatch failed
57aa292bab73 drm/i915: Use struct resource for memory region IO as well
-:385: WARNING:LONG_LINE: line length of 105 exceeds 100 columns
#385: FILE: drivers/gpu/drm/i915/intel_region_ttm.c:227:
+   if (WARN_ON(overflows_type(resource_size(>io) >> 
PAGE_SHIFT, place.lpfn))) {

total: 0 errors, 1 warnings, 0 checks, 281 lines checked
6f1daec92bb9 drm/i915: Print memory region info during probe
5bbcb4180a39 drm/i915: Remove ad-hoc lmem/stolen debugs
3cac577dc645 drm/i915: Bypass LMEMBAR/GTTMMADR for MTL stolen memory access
ddb1a05b1d8d drm/i915: Disable the "binder"
4ee33d48194e drm/i915: Rename the DSM/GSM registers
b34d6c789845 drm/i915: Fix PTE decode during initial plane readout
225e329229bd drm/i915: Fix region start during initial plane readout
24bf9674cb6f drm/i915: Fix MTL initial plane readout
30b9f4a02a3b drm/i915: s/phys_base/dma_addr/
8e6abaa24f65 drm/i915: Split the smem and lmem plane readout apart
5da25c7a5304 drm/i915: Simplify intel_initial_plane_config() calling convention




Re: [PATCH 01/12] drm/i915: Use struct resource for memory region IO as well

2023-12-12 Thread Ville Syrjälä
On Wed, Dec 13, 2023 at 02:42:26AM +0200, Ville Syrjala wrote:
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev_fb.c 
> b/drivers/gpu/drm/i915/display/intel_fbdev_fb.c
> index 717c3a3237c4..1ac05d90b2e8 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev_fb.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev_fb.c
> @@ -78,7 +78,7 @@ int intel_fbdev_fb_fill_info(struct drm_i915_private *i915, 
> struct fb_info *info
>  
>   /* Use fbdev's framebuffer from lmem for discrete */
>   info->fix.smem_start =
> - (unsigned long)(mem->io_start +
> + (unsigned long)(mem->io.start +
>   i915_gem_object_get_dma_address(obj, 
> 0));

Hmm. That looks wrong for MTL actually since dma address is relative
to the start of LMEMBAR but stolen io.start will be LMEMBAR+8MiB (or
just DSMBASE which points to the same place, with the w/a in place).
So we need to subtract mem->region.start from this to get the correct
value.

-- 
Ville Syrjälä
Intel


[PATCH 12/12] drm/i915: Simplify intel_initial_plane_config() calling convention

2023-12-12 Thread Ville Syrjala
From: Ville Syrjälä 

There's no reason the caller of intel_initial_plane_config() should
have to loop over the CRTCs. Pull the loop into the function to
make life simpler for the caller.

Signed-off-by: Ville Syrjälä 
---
 .../drm/i915/display/intel_display_driver.c   |  7 +---
 .../drm/i915/display/intel_plane_initial.c| 40 +++
 .../drm/i915/display/intel_plane_initial.h|  4 +-
 3 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c 
b/drivers/gpu/drm/i915/display/intel_display_driver.c
index 62f7b10484be..2fe0f4ad359c 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -285,7 +285,6 @@ int intel_display_driver_probe_nogem(struct 
drm_i915_private *i915)
 {
struct drm_device *dev = >drm;
enum pipe pipe;
-   struct intel_crtc *crtc;
int ret;
 
if (!HAS_DISPLAY(i915))
@@ -335,11 +334,7 @@ int intel_display_driver_probe_nogem(struct 
drm_i915_private *i915)
intel_acpi_assign_connector_fwnodes(i915);
drm_modeset_unlock_all(dev);
 
-   for_each_intel_crtc(dev, crtc) {
-   if (!to_intel_crtc_state(crtc->base.state)->uapi.active)
-   continue;
-   intel_crtc_initial_plane_config(crtc);
-   }
+   intel_initial_plane_config(i915);
 
/*
 * Make sure hardware watermarks really match the state we read out.
diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c 
b/drivers/gpu/drm/i915/display/intel_plane_initial.c
index 78bff6181ceb..b7e12b60d68b 100644
--- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
+++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c
@@ -357,25 +357,31 @@ static void plane_config_fini(struct 
intel_initial_plane_config *plane_config)
i915_vma_put(plane_config->vma);
 }
 
-void intel_crtc_initial_plane_config(struct intel_crtc *crtc)
+void intel_initial_plane_config(struct drm_i915_private *i915)
 {
-   struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
-   struct intel_initial_plane_config plane_config = {};
+   struct intel_crtc *crtc;
 
-   /*
-* Note that reserving the BIOS fb up front prevents us
-* from stuffing other stolen allocations like the ring
-* on top.  This prevents some ugliness at boot time, and
-* can even allow for smooth boot transitions if the BIOS
-* fb is large enough for the active pipe configuration.
-*/
-   dev_priv->display.funcs.display->get_initial_plane_config(crtc, 
_config);
+   for_each_intel_crtc(>drm, crtc) {
+   struct intel_initial_plane_config plane_config = {};
 
-   /*
-* If the fb is shared between multiple heads, we'll
-* just get the first one.
-*/
-   intel_find_initial_plane_obj(crtc, _config);
+   if (!to_intel_crtc_state(crtc->base.state)->uapi.active)
+   continue;
 
-   plane_config_fini(_config);
+   /*
+* Note that reserving the BIOS fb up front prevents us
+* from stuffing other stolen allocations like the ring
+* on top.  This prevents some ugliness at boot time, and
+* can even allow for smooth boot transitions if the BIOS
+* fb is large enough for the active pipe configuration.
+*/
+   i915->display.funcs.display->get_initial_plane_config(crtc, 
_config);
+
+   /*
+* If the fb is shared between multiple heads, we'll
+* just get the first one.
+*/
+   intel_find_initial_plane_obj(crtc, _config);
+
+   plane_config_fini(_config);
+   }
 }
diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.h 
b/drivers/gpu/drm/i915/display/intel_plane_initial.h
index c7e35ab3182b..64ab95239cd4 100644
--- a/drivers/gpu/drm/i915/display/intel_plane_initial.h
+++ b/drivers/gpu/drm/i915/display/intel_plane_initial.h
@@ -6,8 +6,8 @@
 #ifndef __INTEL_PLANE_INITIAL_H__
 #define __INTEL_PLANE_INITIAL_H__
 
-struct intel_crtc;
+struct drm_i915_private;
 
-void intel_crtc_initial_plane_config(struct intel_crtc *crtc);
+void intel_initial_plane_config(struct drm_i915_private *i915);
 
 #endif
-- 
2.41.0



[PATCH 11/12] drm/i915: Split the smem and lmem plane readout apart

2023-12-12 Thread Ville Syrjala
From: Ville Syrjälä 

Declutter initial_plane_vma() a bit by pulling the lmem and smem
readout paths into their own functions.

TODO: the smem path should still be fixed to get and validate
  the dma address from the pte as well

Signed-off-by: Ville Syrjälä 
---
 .../drm/i915/display/intel_display_types.h|   2 +
 .../drm/i915/display/intel_plane_initial.c| 145 +++---
 2 files changed, 95 insertions(+), 52 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h 
b/drivers/gpu/drm/i915/display/intel_display_types.h
index 341d80c2b9de..d2b0cc754667 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -782,6 +782,8 @@ struct intel_plane_state {
 
 struct intel_initial_plane_config {
struct intel_framebuffer *fb;
+   struct intel_memory_region *mem;
+   resource_size_t phys_base;
struct i915_vma *vma;
unsigned int tiling;
int size;
diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c 
b/drivers/gpu/drm/i915/display/intel_plane_initial.c
index 48b74319f45c..78bff6181ceb 100644
--- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
+++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c
@@ -44,6 +44,93 @@ intel_reuse_initial_plane_obj(struct drm_i915_private *i915,
return false;
 }
 
+static bool
+initial_plane_phys_lmem(struct drm_i915_private *i915,
+   struct intel_initial_plane_config *plane_config)
+{
+   gen8_pte_t __iomem *gte = to_gt(i915)->ggtt->gsm;
+   struct intel_memory_region *mem;
+   dma_addr_t dma_addr;
+   gen8_pte_t pte;
+   u32 base;
+
+   base = round_down(plane_config->base, I915_GTT_MIN_ALIGNMENT);
+
+   gte += base / I915_GTT_PAGE_SIZE;
+
+   pte = ioread64(gte);
+   if (!(pte & GEN12_GGTT_PTE_LM)) {
+   drm_err(>drm,
+   "Initial plane programming missing PTE_LM bit\n");
+   return false;
+   }
+
+   dma_addr = pte & GEN12_GGTT_PTE_ADDR_MASK;
+
+   if (IS_DGFX(i915))
+   mem = i915->mm.regions[INTEL_REGION_LMEM_0];
+   else
+   mem = i915->mm.stolen_region;
+   if (!mem) {
+   drm_dbg_kms(>drm,
+   "Initial plane memory region not initialized\n");
+   return false;
+   }
+
+   /*
+* On lmem we don't currently expect this to
+* ever be placed in the stolen portion.
+*/
+   if (dma_addr < mem->region.start || dma_addr > mem->region.end) {
+   drm_err(>drm,
+   "Initial plane programming using invalid range, 
dma_addr=%pa (%s [%pa-%pa])\n",
+   _addr, mem->region.name, >region.start, 
>region.end);
+   return false;
+   }
+
+   drm_dbg(>drm,
+   "Using dma_addr=%pa, based on initial plane programming\n",
+   _addr);
+
+   plane_config->phys_base = dma_addr - mem->region.start;
+   plane_config->mem = mem;
+
+   return true;
+}
+
+static bool
+initial_plane_phys_smem(struct drm_i915_private *i915,
+   struct intel_initial_plane_config *plane_config)
+{
+   struct intel_memory_region *mem;
+   u32 base;
+
+   base = round_down(plane_config->base, I915_GTT_MIN_ALIGNMENT);
+
+   mem = i915->mm.stolen_region;
+   if (!mem) {
+   drm_dbg_kms(>drm,
+   "Initial plane memory region not initialized\n");
+   return false;
+   }
+
+   /* FIXME get and validate the dma_addr from the PTE */
+   plane_config->phys_base = base;
+   plane_config->mem = mem;
+
+   return true;
+}
+
+static bool
+initial_plane_phys(struct drm_i915_private *i915,
+  struct intel_initial_plane_config *plane_config)
+{
+   if (IS_DGFX(i915) || HAS_LMEMBAR_SMEM_STOLEN(i915))
+   return initial_plane_phys_lmem(i915, plane_config);
+   else
+   return initial_plane_phys_smem(i915, plane_config);
+}
+
 static struct i915_vma *
 initial_plane_vma(struct drm_i915_private *i915,
  struct intel_initial_plane_config *plane_config)
@@ -58,59 +145,13 @@ initial_plane_vma(struct drm_i915_private *i915,
if (plane_config->size == 0)
return NULL;
 
+   if (!initial_plane_phys(i915, plane_config))
+   return NULL;
+
+   phys_base = plane_config->phys_base;
+   mem = plane_config->mem;
+
base = round_down(plane_config->base, I915_GTT_MIN_ALIGNMENT);
-   if (IS_DGFX(i915) || HAS_LMEMBAR_SMEM_STOLEN(i915)) {
-   gen8_pte_t __iomem *gte = to_gt(i915)->ggtt->gsm;
-   dma_addr_t dma_addr;
-   gen8_pte_t pte;
-
-   gte += base / I915_GTT_PAGE_SIZE;
-
-   pte = ioread64(gte);
-   if (!(pte & GEN12_GGTT_PTE_LM)) {
-   

[PATCH 10/12] drm/i915: s/phys_base/dma_addr/

2023-12-12 Thread Ville Syrjala
From: Ville Syrjälä 

The address we read from the PTE is a dma address, not a physical
address. Rename the variable to say so.

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

diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c 
b/drivers/gpu/drm/i915/display/intel_plane_initial.c
index c72d4cacf631..48b74319f45c 100644
--- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
+++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c
@@ -61,6 +61,7 @@ initial_plane_vma(struct drm_i915_private *i915,
base = round_down(plane_config->base, I915_GTT_MIN_ALIGNMENT);
if (IS_DGFX(i915) || HAS_LMEMBAR_SMEM_STOLEN(i915)) {
gen8_pte_t __iomem *gte = to_gt(i915)->ggtt->gsm;
+   dma_addr_t dma_addr;
gen8_pte_t pte;
 
gte += base / I915_GTT_PAGE_SIZE;
@@ -72,7 +73,7 @@ initial_plane_vma(struct drm_i915_private *i915,
return NULL;
}
 
-   phys_base = pte & GEN12_GGTT_PTE_ADDR_MASK;
+   dma_addr = pte & GEN12_GGTT_PTE_ADDR_MASK;
 
if (IS_DGFX(i915))
mem = i915->mm.regions[INTEL_REGION_LMEM_0];
@@ -88,18 +89,18 @@ initial_plane_vma(struct drm_i915_private *i915,
 * On lmem we don't currently expect this to
 * ever be placed in the stolen portion.
 */
-   if (phys_base < mem->region.start || phys_base > 
mem->region.end) {
+   if (dma_addr < mem->region.start || dma_addr > mem->region.end) 
{
drm_err(>drm,
-   "Initial plane programming using invalid range, 
phys_base=%pa (%s [%pa-%pa])\n",
-   _base, mem->region.name, 
>region.start, >region.end);
+   "Initial plane programming using invalid range, 
dma_addr=%pa (%s [%pa-%pa])\n",
+   _addr, mem->region.name, 
>region.start, >region.end);
return NULL;
}
 
drm_dbg(>drm,
-   "Using phys_base=%pa, based on initial plane 
programming\n",
-   _base);
+   "Using dma_addr=%pa, based on initial plane 
programming\n",
+   _addr);
 
-   phys_base -= mem->region.start;
+   phys_base = dma_addr - mem->region.start;
} else {
phys_base = base;
mem = i915->mm.stolen_region;
-- 
2.41.0



[PATCH 09/12] drm/i915: Fix MTL initial plane readout

2023-12-12 Thread Ville Syrjala
From: Ville Syrjälä 

MTL stolen memory looks more like local memory, so use the
(now fixed) lmem path when doing the initial plane readout.

Signed-off-by: Ville Syrjälä 
---
 .../drm/i915/display/intel_plane_initial.c| 25 +--
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c 
b/drivers/gpu/drm/i915/display/intel_plane_initial.c
index db594ccf0323..c72d4cacf631 100644
--- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
+++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c
@@ -59,7 +59,7 @@ initial_plane_vma(struct drm_i915_private *i915,
return NULL;
 
base = round_down(plane_config->base, I915_GTT_MIN_ALIGNMENT);
-   if (IS_DGFX(i915)) {
+   if (IS_DGFX(i915) || HAS_LMEMBAR_SMEM_STOLEN(i915)) {
gen8_pte_t __iomem *gte = to_gt(i915)->ggtt->gsm;
gen8_pte_t pte;
 
@@ -73,11 +73,20 @@ initial_plane_vma(struct drm_i915_private *i915,
}
 
phys_base = pte & GEN12_GGTT_PTE_ADDR_MASK;
-   mem = i915->mm.regions[INTEL_REGION_LMEM_0];
+
+   if (IS_DGFX(i915))
+   mem = i915->mm.regions[INTEL_REGION_LMEM_0];
+   else
+   mem = i915->mm.stolen_region;
+   if (!mem) {
+   drm_dbg_kms(>drm,
+   "Initial plane memory region not 
initialized\n");
+   return NULL;
+   }
 
/*
-* We don't currently expect this to ever be placed in the
-* stolen portion.
+* On lmem we don't currently expect this to
+* ever be placed in the stolen portion.
 */
if (phys_base < mem->region.start || phys_base > 
mem->region.end) {
drm_err(>drm,
@@ -94,11 +103,13 @@ initial_plane_vma(struct drm_i915_private *i915,
} else {
phys_base = base;
mem = i915->mm.stolen_region;
+   if (!mem) {
+   drm_dbg_kms(>drm,
+   "Initial plane memory region not 
initialized\n");
+   return NULL;
+   }
}
 
-   if (!mem)
-   return NULL;
-
size = round_up(plane_config->base + plane_config->size,
mem->min_page_size);
size -= base;
-- 
2.41.0



[PATCH 08/12] drm/i915: Fix region start during initial plane readout

2023-12-12 Thread Ville Syrjala
From: Ville Syrjälä 

On MTL the stolen region starts at offset 8MiB from the start of
LMEMBAR. The dma addresses are thus also offset by 8MiB. However the
mm_node/etc. is zero based, and i915_pages_create_for_stolen() will
add the appropriate region.start into the sg dma address. So when
we do the readout we need to convert the dma address read from
the PTE to be zero based as well.

Note that currently we don't take this path on MTL, but we should
and thus this needs to be fixed. For lmem this works correctly
already as the lmem region.start==0.

While at it let's also make sure the address points to somewhere within
the memory region. We don't need to check the size as
i915_gem_object_create_region_at() should later fail if the object size
exceeds the region size.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_plane_initial.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c 
b/drivers/gpu/drm/i915/display/intel_plane_initial.c
index ffc92b18fcf5..db594ccf0323 100644
--- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
+++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c
@@ -79,16 +79,18 @@ initial_plane_vma(struct drm_i915_private *i915,
 * We don't currently expect this to ever be placed in the
 * stolen portion.
 */
-   if (phys_base >= resource_size(>region)) {
+   if (phys_base < mem->region.start || phys_base > 
mem->region.end) {
drm_err(>drm,
-   "Initial plane programming using invalid range, 
phys_base=%pa\n",
-   _base);
+   "Initial plane programming using invalid range, 
phys_base=%pa (%s [%pa-%pa])\n",
+   _base, mem->region.name, 
>region.start, >region.end);
return NULL;
}
 
drm_dbg(>drm,
"Using phys_base=%pa, based on initial plane 
programming\n",
_base);
+
+   phys_base -= mem->region.start;
} else {
phys_base = base;
mem = i915->mm.stolen_region;
-- 
2.41.0



[PATCH 07/12] drm/i915: Fix PTE decode during initial plane readout

2023-12-12 Thread Ville Syrjala
From: Ville Syrjälä 

When multiple pipes are enabled by the BIOS we try to read out each
in turn. But we do the readout for the second only after the inherited
vma for the first has been rebound into its original place (and thus
the PTEs have been rewritten). Unlike the BIOS we set some high caching
bits in the PTE on MTL which confuses the readout for the second plane.
Filter out the non-address bits from the PTE value appropriately to
fix this.

I suppose it might also be possible that the BIOS would already set
some caching bits as well, in which case we'd run into this same
issue already for the first plane.

TODO:
- should abstract the PTE decoding to avoid details leaking all over
- should probably do the readout for all the planes before
  we touch anything (including the PTEs) so that we truly read
  out the BIOS state

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

diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c 
b/drivers/gpu/drm/i915/display/intel_plane_initial.c
index a55c09cbd0e4..ffc92b18fcf5 100644
--- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
+++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c
@@ -72,7 +72,7 @@ initial_plane_vma(struct drm_i915_private *i915,
return NULL;
}
 
-   phys_base = pte & I915_GTT_PAGE_MASK;
+   phys_base = pte & GEN12_GGTT_PTE_ADDR_MASK;
mem = i915->mm.regions[INTEL_REGION_LMEM_0];
 
/*
-- 
2.41.0



[PATCH 06/12] drm/i915: Rename the DSM/GSM registers

2023-12-12 Thread Ville Syrjala
From: Ville Syrjälä 

0x108100 and 0x1080c0 have been around since snb. Rename the
defines appropriately.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c  | 4 ++--
 drivers/gpu/drm/i915/gt/intel_ggtt.c| 2 +-
 drivers/gpu/drm/i915/gt/intel_region_lmem.c | 2 +-
 drivers/gpu/drm/i915/i915_reg.h | 7 ---
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c 
b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index 252fe5cd6ede..6185a5f73a48 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -935,7 +935,7 @@ i915_gem_stolen_lmem_setup(struct drm_i915_private *i915, 
u16 type,
GEM_BUG_ON((dsm_base + dsm_size) > lmem_size);
} else {
/* Use DSM base address instead for stolen memory */
-   dsm_base = intel_uncore_read64(uncore, GEN12_DSMBASE) & 
GEN12_BDSM_MASK;
+   dsm_base = intel_uncore_read64(uncore, GEN6_DSMBASE) & 
GEN11_BDSM_MASK;
if (WARN_ON(lmem_size < dsm_base))
return ERR_PTR(-ENODEV);
dsm_size = ALIGN_DOWN(lmem_size - dsm_base, SZ_1M);
@@ -948,7 +948,7 @@ i915_gem_stolen_lmem_setup(struct drm_i915_private *i915, 
u16 type,
 * Normally this would not work but on MTL the system firmware
 * should have relaxed the access permissions sufficiently.
 */
-   io_start = intel_uncore_read64(uncore, GEN12_DSMBASE) & 
GEN12_BDSM_MASK;
+   io_start = intel_uncore_read64(uncore, GEN6_DSMBASE) & 
GEN11_BDSM_MASK;
io_size = dsm_size;
} else if (pci_resource_len(pdev, GEN12_LMEM_BAR) < lmem_size) {
io_start = 0;
diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c 
b/drivers/gpu/drm/i915/gt/intel_ggtt.c
index ab71d74ec426..05c5525e7e2d 100644
--- a/drivers/gpu/drm/i915/gt/intel_ggtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c
@@ -1167,7 +1167,7 @@ static int ggtt_probe_common(struct i915_ggtt *ggtt, u64 
size)
 * should have relaxed the access permissions sufficiently.
 */
if (IS_METEORLAKE(i915))
-   phys_addr = intel_uncore_read64(uncore, GEN12_GSMBASE) & 
GEN12_BDSM_MASK;
+   phys_addr = intel_uncore_read64(uncore, GEN6_GSMBASE) & 
GEN11_BDSM_MASK;
else
phys_addr = pci_resource_start(pdev, GEN4_GTTMMADR_BAR) + 
gen6_gttadr_offset(i915);
 
diff --git a/drivers/gpu/drm/i915/gt/intel_region_lmem.c 
b/drivers/gpu/drm/i915/gt/intel_region_lmem.c
index af357089da6e..51bb27e10a4f 100644
--- a/drivers/gpu/drm/i915/gt/intel_region_lmem.c
+++ b/drivers/gpu/drm/i915/gt/intel_region_lmem.c
@@ -240,7 +240,7 @@ static struct intel_memory_region *setup_lmem(struct 
intel_gt *gt)
lmem_size -= tile_stolen;
} else {
/* Stolen starts from GSMBASE without CCS */
-   lmem_size = intel_uncore_read64(>uncore, GEN12_GSMBASE);
+   lmem_size = intel_uncore_read64(>uncore, GEN6_GSMBASE);
}
 
i915_resize_lmem_bar(i915, lmem_size);
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 27dc903f0553..b54d62952a53 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -6314,9 +6314,10 @@ enum skl_power_gate {
 #define   GMS_MASK REG_GENMASK(15, 8)
 #define   GGMS_MASKREG_GENMASK(7, 6)
 
-#define GEN12_GSMBASE  _MMIO(0x108100)
-#define GEN12_DSMBASE  _MMIO(0x1080C0)
-#define   GEN12_BDSM_MASK  REG_GENMASK64(63, 20)
+#define GEN6_GSMBASE   _MMIO(0x108100)
+#define GEN6_DSMBASE   _MMIO(0x1080C0)
+#define   GEN6_BDSM_MASK   REG_GENMASK64(31, 20)
+#define   GEN11_BDSM_MASK  REG_GENMASK64(63, 20)
 
 #define XEHP_CLOCK_GATE_DIS_MMIO(0x101014)
 #define   SGSI_SIDECLK_DIS REG_BIT(17)
-- 
2.41.0



[PATCH 05/12] drm/i915: Disable the "binder"

2023-12-12 Thread Ville Syrjala
From: Ville Syrjälä 

Now that the GGTT PTE updates go straight to GSMBASE (bypassing
GTTMMADR) there should be no more risk of system hangs? So the
"binder" (ie. update the PTEs via MI_UPDATE_GTT) is no longer
necessary, disable it.

TODO: MI_UPDATE_GTT might be interesting as an optimization
though, so perhaps someone should look into always using it
(assuming the GPU is alive and well)?

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

diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c 
b/drivers/gpu/drm/i915/gt/intel_gtt.c
index 86f73fe558ca..5bc7a4fb7485 100644
--- a/drivers/gpu/drm/i915/gt/intel_gtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gtt.c
@@ -24,7 +24,7 @@
 bool i915_ggtt_require_binder(struct drm_i915_private *i915)
 {
/* Wa_13010847436 & Wa_14019519902 */
-   return MEDIA_VER_FULL(i915) == IP_VER(13, 0);
+   return false && MEDIA_VER_FULL(i915) == IP_VER(13, 0);
 }
 
 static bool intel_ggtt_update_needs_vtd_wa(struct drm_i915_private *i915)
-- 
2.41.0



[PATCH 04/12] drm/i915: Bypass LMEMBAR/GTTMMADR for MTL stolen memory access

2023-12-12 Thread Ville Syrjala
From: Ville Syrjälä 

On MTL accessing stolen memory via the BARs is somehow borked,
and it can hang the machine. As a workaround let's bypass the
BARs and just go straight to DSMBASE/GSMBASE instead.

Note that on every other platform this itself would hang the
machine, but on MTL the system firmware is expected to relax
the access permission guarding stolen memory to enable this
workaround, and thus direct CPU accesses should be fine.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 11 ++-
 drivers/gpu/drm/i915/gt/intel_ggtt.c   | 13 -
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c 
b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index ee237043c302..252fe5cd6ede 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -941,7 +941,16 @@ i915_gem_stolen_lmem_setup(struct drm_i915_private *i915, 
u16 type,
dsm_size = ALIGN_DOWN(lmem_size - dsm_base, SZ_1M);
}
 
-   if (pci_resource_len(pdev, GEN12_LMEM_BAR) < lmem_size) {
+   if (IS_METEORLAKE(i915)) {
+   /*
+* Workaround: access via BAR can hang MTL, go directly to DSM.
+*
+* Normally this would not work but on MTL the system firmware
+* should have relaxed the access permissions sufficiently.
+*/
+   io_start = intel_uncore_read64(uncore, GEN12_DSMBASE) & 
GEN12_BDSM_MASK;
+   io_size = dsm_size;
+   } else if (pci_resource_len(pdev, GEN12_LMEM_BAR) < lmem_size) {
io_start = 0;
io_size = 0;
} else {
diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c 
b/drivers/gpu/drm/i915/gt/intel_ggtt.c
index 21a7e3191c18..ab71d74ec426 100644
--- a/drivers/gpu/drm/i915/gt/intel_ggtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c
@@ -24,6 +24,7 @@
 #include "intel_ring.h"
 #include "i915_drv.h"
 #include "i915_pci.h"
+#include "i915_reg.h"
 #include "i915_request.h"
 #include "i915_scatterlist.h"
 #include "i915_utils.h"
@@ -1152,13 +1153,23 @@ static unsigned int gen6_gttadr_offset(struct 
drm_i915_private *i915)
 static int ggtt_probe_common(struct i915_ggtt *ggtt, u64 size)
 {
struct drm_i915_private *i915 = ggtt->vm.i915;
+   struct intel_uncore *uncore = ggtt->vm.gt->uncore;
struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
phys_addr_t phys_addr;
u32 pte_flags;
int ret;
 
GEM_WARN_ON(pci_resource_len(pdev, GEN4_GTTMMADR_BAR) != 
gen6_gttmmadr_size(i915));
-   phys_addr = pci_resource_start(pdev, GEN4_GTTMMADR_BAR) + 
gen6_gttadr_offset(i915);
+   /*
+* Workaround: access via BAR can hang MTL, go directly to GSM.
+*
+* Normally this would not work but on MTL the system firmware
+* should have relaxed the access permissions sufficiently.
+*/
+   if (IS_METEORLAKE(i915))
+   phys_addr = intel_uncore_read64(uncore, GEN12_GSMBASE) & 
GEN12_BDSM_MASK;
+   else
+   phys_addr = pci_resource_start(pdev, GEN4_GTTMMADR_BAR) + 
gen6_gttadr_offset(i915);
 
if (needs_wc_ggtt_mapping(i915))
ggtt->gsm = ioremap_wc(phys_addr, size);
-- 
2.41.0



[PATCH 03/12] drm/i915: Remove ad-hoc lmem/stolen debugs

2023-12-12 Thread Ville Syrjala
From: Ville Syrjälä 

Now that intel_memory_regions_hw_probe() prints out each and every
memory region there's no reason to have ad-hoc debugs to do similar
things elsewhere.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c  | 4 
 drivers/gpu/drm/i915/gt/intel_region_lmem.c | 3 ---
 2 files changed, 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c 
b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index d2440c793f84..ee237043c302 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -828,7 +828,6 @@ static const struct intel_memory_region_ops 
i915_region_stolen_smem_ops = {
 
 static int init_stolen_lmem(struct intel_memory_region *mem)
 {
-   struct drm_i915_private *i915 = mem->i915;
int err;
 
if (GEM_WARN_ON(resource_size(>region) == 0))
@@ -844,9 +843,6 @@ static int init_stolen_lmem(struct intel_memory_region *mem)
!io_mapping_init_wc(>iomap, mem->io.start, 
resource_size(>io)))
goto err_cleanup;
 
-   drm_dbg(>drm, "Stolen Local DSM: %pR\n", >region);
-   drm_dbg(>drm, "Stolen Local memory IO: %pR\n", >io);
-
return 0;
 
 err_cleanup:
diff --git a/drivers/gpu/drm/i915/gt/intel_region_lmem.c 
b/drivers/gpu/drm/i915/gt/intel_region_lmem.c
index 6f96a6b70601..af357089da6e 100644
--- a/drivers/gpu/drm/i915/gt/intel_region_lmem.c
+++ b/drivers/gpu/drm/i915/gt/intel_region_lmem.c
@@ -273,9 +273,6 @@ static struct intel_memory_region *setup_lmem(struct 
intel_gt *gt)
if (err)
goto err_region_put;
 
-   drm_dbg(>drm, "Local memory: %pR\n", >region);
-   drm_dbg(>drm, "Local memory IO: %pR\n", >io);
-
if (io_size < lmem_size)
drm_info(>drm, "Using a reduced BAR size of %lluMiB. 
Consider enabling 'Resizable BAR' or similar, if available in the BIOS.\n",
 (u64)io_size >> 20);
-- 
2.41.0



[PATCH 02/12] drm/i915: Print memory region info during probe

2023-12-12 Thread Ville Syrjala
From: Ville Syrjälä 

Dump the details about every memory region into dmesg at probe time.
Avoids having to dig those out from random places when debugging stuff.

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

diff --git a/drivers/gpu/drm/i915/intel_memory_region.c 
b/drivers/gpu/drm/i915/intel_memory_region.c
index b2708f8cac2a..52d998e5c21a 100644
--- a/drivers/gpu/drm/i915/intel_memory_region.c
+++ b/drivers/gpu/drm/i915/intel_memory_region.c
@@ -372,6 +372,24 @@ int intel_memory_regions_hw_probe(struct drm_i915_private 
*i915)
i915->mm.regions[i] = mem;
}
 
+   for (i = 0; i < ARRAY_SIZE(i915->mm.regions); i++) {
+   struct intel_memory_region *mem = i915->mm.regions[i];
+   u64 region_size, io_size;
+
+   if (!mem)
+   continue;
+
+   region_size = resource_size(>region) >> 20;
+   io_size = resource_size(>io) >> 20;
+
+   if (resource_size(>io))
+   drm_dbg(>drm, "Memory region(%d): %s: %llu MiB 
%pR, io: %llu MiB %pR\n",
+   mem->id, mem->name, region_size, >region, 
io_size, >io);
+   else
+   drm_dbg(>drm, "Memory region(%d): %s: %llu MiB 
%pR, io: n/a\n",
+   mem->id, mem->name, region_size, >region);
+   }
+
return 0;
 
 out_cleanup:
-- 
2.41.0



[PATCH 01/12] drm/i915: Use struct resource for memory region IO as well

2023-12-12 Thread Ville Syrjala
From: Ville Syrjälä 

mem->region is a struct resource, but mem->io_start and
mem->io_size are not for whatever reason. Let's unify this
and convert the io stuff into a struct resource as well.
Should make life a little less annoying when you don't have
juggle between two different approaches all the time.

Mostly done using cocci (with manual tweaks at all the
places where we mutate io_size by hand):
@@
struct intel_memory_region *M;
expression START, SIZE;
@@
- M->io_start = START;
- M->io_size = SIZE;
+ M->io = DEFINE_RES_MEM(START, SIZE);

@@
struct intel_memory_region *M;
@@
- M->io_start
+ M->io.start

@@
struct intel_memory_region M;
@@
- M.io_start
+ M.io.start

@@
expression M;
@@
- M->io_size
+ resource_size(>io)

@@
expression M;
@@
- M.io_size
+ resource_size()

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_fbdev_fb.c  |  2 +-
 drivers/gpu/drm/i915/gem/i915_gem_region.c |  2 +-
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 17 +
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c|  8 
 .../gpu/drm/i915/gem/selftests/i915_gem_mman.c | 18 +-
 drivers/gpu/drm/i915/gt/intel_region_lmem.c| 11 +++
 drivers/gpu/drm/i915/gt/selftest_tlb.c |  4 ++--
 drivers/gpu/drm/i915/i915_gpu_error.c  |  2 +-
 drivers/gpu/drm/i915/i915_query.c  |  2 +-
 drivers/gpu/drm/i915/intel_memory_region.c | 15 +++
 drivers/gpu/drm/i915/intel_memory_region.h |  3 +--
 drivers/gpu/drm/i915/intel_region_ttm.c|  8 
 .../drm/i915/selftests/intel_memory_region.c   |  4 ++--
 13 files changed, 45 insertions(+), 51 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_fbdev_fb.c 
b/drivers/gpu/drm/i915/display/intel_fbdev_fb.c
index 717c3a3237c4..1ac05d90b2e8 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev_fb.c
@@ -78,7 +78,7 @@ int intel_fbdev_fb_fill_info(struct drm_i915_private *i915, 
struct fb_info *info
 
/* Use fbdev's framebuffer from lmem for discrete */
info->fix.smem_start =
-   (unsigned long)(mem->io_start +
+   (unsigned long)(mem->io.start +
i915_gem_object_get_dma_address(obj, 
0));
info->fix.smem_len = obj->base.size;
} else {
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_region.c 
b/drivers/gpu/drm/i915/gem/i915_gem_region.c
index a4fb577eceb4..b09b74a2448b 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_region.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_region.c
@@ -129,7 +129,7 @@ i915_gem_object_create_region_at(struct intel_memory_region 
*mem,
return ERR_PTR(-EINVAL);
 
if (!(flags & I915_BO_ALLOC_GPU_ONLY) &&
-   offset + size > mem->io_size &&
+   offset + size > resource_size(>io) &&
!i915_ggtt_has_aperture(to_gt(mem->i915)->ggtt))
return ERR_PTR(-ENOSPC);
 
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c 
b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index 8c88075eeab2..d2440c793f84 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -541,7 +541,9 @@ static int i915_gem_init_stolen(struct intel_memory_region 
*mem)
 
/* Exclude the reserved region from driver use */
mem->region.end = i915->dsm.reserved.start - 1;
-   mem->io_size = min(mem->io_size, resource_size(>region));
+   mem->io = DEFINE_RES_MEM(mem->io.start,
+min(resource_size(>io),
+resource_size(>region)));
 
i915->dsm.usable_size = resource_size(>region);
 
@@ -752,7 +754,7 @@ static int _i915_gem_object_stolen_init(struct 
intel_memory_region *mem,
 * With discrete devices, where we lack a mappable aperture there is no
 * possible way to ever access this memory on the CPU side.
 */
-   if (mem->type == INTEL_MEMORY_STOLEN_LOCAL && !mem->io_size &&
+   if (mem->type == INTEL_MEMORY_STOLEN_LOCAL && !resource_size(>io) 
&&
!(flags & I915_BO_ALLOC_GPU_ONLY))
return -ENOSPC;
 
@@ -838,13 +840,12 @@ static int init_stolen_lmem(struct intel_memory_region 
*mem)
return 0;
}
 
-   if (mem->io_size &&
-   !io_mapping_init_wc(>iomap, mem->io_start, mem->io_size))
+   if (resource_size(>io) &&
+   !io_mapping_init_wc(>iomap, mem->io.start, 
resource_size(>io)))
goto err_cleanup;
 
-   drm_dbg(>drm, "Stolen Local memory IO start: %pa\n",
-   >io_start);
-   drm_dbg(>drm, "Stolen Local DSM base: %pa\n", >region.start);
+   drm_dbg(>drm, "Stolen Local DSM: %pR\n", >region);
+   drm_dbg(>drm, "Stolen Local memory IO: %pR\n", >io);
 
return 0;
 
@@ -855,7 +856,7 @@ static int init_stolen_lmem(struct intel_memory_region *mem)
 
 static int 

[PATCH 00/12] drm/i915: (stolen) memory region related fixes

2023-12-12 Thread Ville Syrjala
From: Ville Syrjälä 

Attempt to fix the mess around stolen memory, especially on MTL
with it's special (and apparenly broken) not-actually-lmem stolen.

The series is made up of roughtly three parts:
1. General refactoring/debug improvement for mem regions
2. Deal with the broken BAR stuff on MTL
3. Fix initial display plane readout for MTL

Ville Syrjälä (12):
  drm/i915: Use struct resource for memory region IO as well
  drm/i915: Print memory region info during probe
  drm/i915: Remove ad-hoc lmem/stolen debugs
  drm/i915: Bypass LMEMBAR/GTTMMADR for MTL stolen memory access
  drm/i915: Disable the "binder"
  drm/i915: Rename the DSM/GSM registers
  drm/i915: Fix PTE decode during initial plane readout
  drm/i915: Fix region start during initial plane readout
  drm/i915: Fix MTL initial plane readout
  drm/i915: s/phys_base/dma_addr/
  drm/i915: Split the smem and lmem plane readout apart
  drm/i915: Simplify intel_initial_plane_config() calling convention

 .../drm/i915/display/intel_display_driver.c   |   7 +-
 .../drm/i915/display/intel_display_types.h|   2 +
 drivers/gpu/drm/i915/display/intel_fbdev_fb.c |   2 +-
 .../drm/i915/display/intel_plane_initial.c| 169 --
 .../drm/i915/display/intel_plane_initial.h|   4 +-
 drivers/gpu/drm/i915/gem/i915_gem_region.c|   2 +-
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c|  30 ++--
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c   |   8 +-
 .../drm/i915/gem/selftests/i915_gem_mman.c|  18 +-
 drivers/gpu/drm/i915/gt/intel_ggtt.c  |  13 +-
 drivers/gpu/drm/i915/gt/intel_gtt.c   |   2 +-
 drivers/gpu/drm/i915/gt/intel_region_lmem.c   |  14 +-
 drivers/gpu/drm/i915/gt/selftest_tlb.c|   4 +-
 drivers/gpu/drm/i915/i915_gpu_error.c |   2 +-
 drivers/gpu/drm/i915/i915_query.c |   2 +-
 drivers/gpu/drm/i915/i915_reg.h   |   7 +-
 drivers/gpu/drm/i915/intel_memory_region.c|  33 +++-
 drivers/gpu/drm/i915/intel_memory_region.h|   3 +-
 drivers/gpu/drm/i915/intel_region_ttm.c   |   8 +-
 .../drm/i915/selftests/intel_memory_region.c  |   4 +-
 20 files changed, 209 insertions(+), 125 deletions(-)

-- 
2.41.0



✗ Fi.CI.BAT: failure for drm/i915/gem: Atomically invalidate userptr on mmu-notifier (rev10)

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/i915/gem: Atomically invalidate userptr on mmu-notifier (rev10)
URL   : https://patchwork.freedesktop.org/series/126998/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14010 -> Patchwork_126998v10


Summary
---

  **FAILURE**

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

Participating hosts (31 -> 32)
--

  Additional (4): bat-kbl-2 bat-dg2-9 bat-mtlp-8 fi-pnv-d510 
  Missing(3): bat-adlp-11 bat-adlp-6 fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_selftest@live@gem_contexts:
- bat-atsm-1: [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-atsm-1/igt@i915_selftest@live@gem_contexts.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126998v10/bat-atsm-1/igt@i915_selftest@live@gem_contexts.html

  
Known issues


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

### IGT changes ###

 Issues hit 

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

  * igt@fbdev@info:
- bat-kbl-2:  NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#1849])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126998v10/bat-kbl-2/igt@fb...@info.html

  * igt@gem_lmem_swapping@basic:
- fi-pnv-d510:NOTRUN -> [SKIP][5] ([fdo#109271]) +28 other tests 
skip
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126998v10/fi-pnv-d510/igt@gem_lmem_swapp...@basic.html

  * igt@gem_lmem_swapping@parallel-random-engines:
- bat-kbl-2:  NOTRUN -> [SKIP][6] ([fdo#109271]) +36 other tests 
skip
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126998v10/bat-kbl-2/igt@gem_lmem_swapp...@parallel-random-engines.html

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

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

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

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

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

  * igt@i915_suspend@basic-s3-without-i915:
- bat-mtlp-8: NOTRUN -> [SKIP][16] ([i915#6645])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126998v10/bat-mtlp-8/igt@i915_susp...@basic-s3-without-i915.html

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

✗ Fi.CI.SPARSE: warning for drm/i915/gem: Atomically invalidate userptr on mmu-notifier (rev10)

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/i915/gem: Atomically invalidate userptr on mmu-notifier (rev10)
URL   : https://patchwork.freedesktop.org/series/126998/
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/gem: Atomically invalidate userptr on mmu-notifier (rev10)

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/i915/gem: Atomically invalidate userptr on mmu-notifier (rev10)
URL   : https://patchwork.freedesktop.org/series/126998/
State : warning

== Summary ==

Error: dim checkpatch failed
e63dc2e81ead drm/i915/gem: Atomically invalidate userptr on mmu-notifier
-:117: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does 
MAINTAINERS need updating?
#117: 
deleted file mode 100644

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




✗ Fi.CI.BAT: failure for Resolve suspend-resume racing with GuC destroy-context-worker (rev10)

2023-12-12 Thread Patchwork
== Series Details ==

Series: Resolve suspend-resume racing with GuC destroy-context-worker (rev10)
URL   : https://patchwork.freedesktop.org/series/121916/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14010 -> Patchwork_121916v10


Summary
---

  **FAILURE**

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

Participating hosts (31 -> 32)
--

  Additional (3): bat-kbl-2 bat-dg2-9 bat-mtlp-8 
  Missing(2): bat-adlp-11 fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_selftest@live@requests:
- bat-dg2-11: [PASS][1] -> [TIMEOUT][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-dg2-11/igt@i915_selftest@l...@requests.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_121916v10/bat-dg2-11/igt@i915_selftest@l...@requests.html

  * igt@i915_suspend@basic-s2idle-without-i915:
- bat-dg2-11: [PASS][3] -> [WARN][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-dg2-11/igt@i915_susp...@basic-s2idle-without-i915.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_121916v10/bat-dg2-11/igt@i915_susp...@basic-s2idle-without-i915.html

  
Known issues


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

### IGT changes ###

 Issues hit 

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

  * igt@fbdev@info:
- bat-kbl-2:  NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#1849])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_121916v10/bat-kbl-2/igt@fb...@info.html

  * igt@gem_lmem_swapping@parallel-random-engines:
- bat-kbl-2:  NOTRUN -> [SKIP][7] ([fdo#109271]) +36 other tests 
skip
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_121916v10/bat-kbl-2/igt@gem_lmem_swapp...@parallel-random-engines.html

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

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

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

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

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

  * igt@i915_suspend@basic-s3-without-i915:
- bat-mtlp-8: NOTRUN -> [SKIP][17] ([i915#6645])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_121916v10/bat-mtlp-8/igt@i915_susp...@basic-s3-without-i915.html

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

✗ Fi.CI.SPARSE: warning for Resolve suspend-resume racing with GuC destroy-context-worker (rev10)

2023-12-12 Thread Patchwork
== Series Details ==

Series: Resolve suspend-resume racing with GuC destroy-context-worker (rev10)
URL   : https://patchwork.freedesktop.org/series/121916/
State : warning

== Summary ==

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




✗ Fi.CI.BAT: failure for ALSA: hda/hdmi: align force-connect quirks with upstream

2023-12-12 Thread Patchwork
== Series Details ==

Series: ALSA: hda/hdmi: align force-connect quirks with upstream
URL   : https://patchwork.freedesktop.org/series/127706/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14010 -> Patchwork_127706v1


Summary
---

  **FAILURE**

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

Participating hosts (31 -> 34)
--

  Additional (4): bat-kbl-2 bat-dg2-9 bat-mtlp-8 fi-pnv-d510 
  Missing(1): fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- bat-adlp-11:[PASS][1] -> [SKIP][2] +5 other tests skip
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127706v1/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html

  * igt@kms_pipe_crc_basic@read-crc:
- bat-adlp-11:NOTRUN -> [SKIP][3] +8 other tests skip
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127706v1/bat-adlp-11/igt@kms_pipe_crc_ba...@read-crc.html

  
 Warnings 

  * igt@kms_dsc@dsc-basic:
- bat-adlp-11:[SKIP][4] ([i915#3555] / [i915#3840]) -> [SKIP][5]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_...@dsc-basic.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127706v1/bat-adlp-11/igt@kms_...@dsc-basic.html

  
Known issues


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

### CI changes ###

 Issues hit 

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

  

### IGT changes ###

 Issues hit 

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

  * igt@fbdev@info:
- bat-adlp-11:[PASS][9] -> [SKIP][10] ([i915#1849] / [i915#2582])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@info.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127706v1/bat-adlp-11/igt@fb...@info.html
- bat-kbl-2:  NOTRUN -> [SKIP][11] ([fdo#109271] / [i915#1849])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127706v1/bat-kbl-2/igt@fb...@info.html

  * igt@fbdev@nullptr:
- bat-adlp-11:[PASS][12] -> [SKIP][13] ([i915#2582]) +3 other tests 
skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@nullptr.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127706v1/bat-adlp-11/igt@fb...@nullptr.html

  * igt@gem_lmem_swapping@basic:
- fi-pnv-d510:NOTRUN -> [SKIP][14] ([fdo#109271]) +28 other tests 
skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127706v1/fi-pnv-d510/igt@gem_lmem_swapp...@basic.html

  * igt@gem_lmem_swapping@parallel-random-engines:
- bat-kbl-2:  NOTRUN -> [SKIP][15] ([fdo#109271]) +36 other tests 
skip
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127706v1/bat-kbl-2/igt@gem_lmem_swapp...@parallel-random-engines.html

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

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

  * igt@gem_mmap_gtt@basic:
- bat-dg2-9:  NOTRUN -> [SKIP][20] ([i915#4077]) +2 other tests skip
   [20]: 

[PATCH 6/6] ALSA: hda/hdmi: add force-connect quirk for NUC5CPYB

2023-12-12 Thread Kai Vehmanen
Add one more older NUC model that requires quirk to force all pins to be
connected. The display codec pins are not registered properly without
the force-connect quirk. The codec will report only one pin as having
external connectivity, but i915 finds all three connectors on the
system, so the two drivers are not in sync.

Issue found with DRM igt-gpu-tools test kms_hdmi_inject@inject-audio.

Link: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/3
Cc: Ville Syrjälä 
Cc: Jani Saarinen 
Signed-off-by: Kai Vehmanen 
Cc: 
Link: 
https://lore.kernel.org/r/20231208132127.2438067-2-kai.vehma...@linux.intel.com
Signed-off-by: Takashi Iwai 
(cherry picked from commit 3b1ff57e24a7bcd2e2a8426dd2013a80d1fa96eb)
---
 sound/pci/hda/patch_hdmi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 512ca3c9953c..78cee53fee02 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1996,6 +1996,7 @@ static const struct snd_pci_quirk force_connect_list[] = {
SND_PCI_QUIRK(0x1043, 0x86ae, "ASUS", 1),  /* Z170 PRO */
SND_PCI_QUIRK(0x1043, 0x86c7, "ASUS", 1),  /* Z170M PLUS */
SND_PCI_QUIRK(0x1462, 0xec94, "MS-7C94", 1),
+   SND_PCI_QUIRK(0x8086, 0x2060, "Intel NUC5CPYB", 1),
SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", 1),
{}
 };
-- 
2.43.0



[PATCH 5/6] ALSA: hda/hdmi: add force-connect quirks for ASUSTeK Z170 variants

2023-12-12 Thread Kai Vehmanen
On ASUSTeK Z170M PLUS and Z170 PRO GAMING systems, the display codec
pins are not registered properly without the force-connect quirk. The
codec will report only one pin as having external connectivity, but i915
finds all three connectors on the system, so the two drivers are not
in sync.

Issue found with DRM igt-gpu-tools test kms_hdmi_inject@inject-audio.

Link: https://gitlab.freedesktop.org/drm/intel/-/issues/9801
Cc: Ville Syrjälä 
Cc: Jani Saarinen 
Signed-off-by: Kai Vehmanen 
Cc: 
Link: 
https://lore.kernel.org/r/20231208132127.2438067-3-kai.vehma...@linux.intel.com
Signed-off-by: Takashi Iwai 
(cherry picked from commit 924f5ca2975b2993ee81a7ecc3c809943a70f334)
---
 sound/pci/hda/patch_hdmi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 1cde2a69bdb4..512ca3c9953c 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1993,6 +1993,8 @@ static const struct snd_pci_quirk force_connect_list[] = {
SND_PCI_QUIRK(0x103c, 0x871a, "HP", 1),
SND_PCI_QUIRK(0x103c, 0x8711, "HP", 1),
SND_PCI_QUIRK(0x103c, 0x8715, "HP", 1),
+   SND_PCI_QUIRK(0x1043, 0x86ae, "ASUS", 1),  /* Z170 PRO */
+   SND_PCI_QUIRK(0x1043, 0x86c7, "ASUS", 1),  /* Z170M PLUS */
SND_PCI_QUIRK(0x1462, 0xec94, "MS-7C94", 1),
SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", 1),
{}
-- 
2.43.0



[PATCH 1/6] Revert "ALSA: hda/hdmi: add force-connect quirk for ASUSTeK Z170M Pro"

2023-12-12 Thread Kai Vehmanen
This reverts commit 6b2bcf964cad023bd9695a5cd842390578a7d1c9.

Signed-off-by: Kai Vehmanen 
---
 sound/pci/hda/patch_hdmi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 8bf91fe25c65..3d7f8f510ec7 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1995,7 +1995,6 @@ static const struct snd_pci_quirk force_connect_list[] = {
SND_PCI_QUIRK(0x103c, 0x8715, "HP", 1),
SND_PCI_QUIRK(0x1043, 0x8694, "ASUS", 1),  /* SKL/KBL + PRIME B560M-A */
SND_PCI_QUIRK(0x1043, 0x86ae, "ASUS", 1),  /* SKL + Z170 PRO */
-   SND_PCI_QUIRK(0x1043, 0x86c7, "ASUS", 1),  /* KBL + Z170M PRO */
SND_PCI_QUIRK(0x1462, 0xec94, "MS-7C94", 1),
SND_PCI_QUIRK(0x8086, 0x2060, "Intel NUC5CPYB", 1),
SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", 1),
-- 
2.43.0



[PATCH 4/6] Revert "ALSA: hda/hdmi: add connect-all quirk for NUC5CPYB"

2023-12-12 Thread Kai Vehmanen
This reverts commit 684f8de2b9715c0a60bcf8b42ee4743624bd4b05.

Signed-off-by: Kai Vehmanen 
---
 sound/pci/hda/patch_hdmi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index b152c941414f..1cde2a69bdb4 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1994,7 +1994,6 @@ static const struct snd_pci_quirk force_connect_list[] = {
SND_PCI_QUIRK(0x103c, 0x8711, "HP", 1),
SND_PCI_QUIRK(0x103c, 0x8715, "HP", 1),
SND_PCI_QUIRK(0x1462, 0xec94, "MS-7C94", 1),
-   SND_PCI_QUIRK(0x8086, 0x2060, "Intel NUC5CPYB", 1),
SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", 1),
{}
 };
-- 
2.43.0



[PATCH 2/6] Revert "ALSA: hda/hdmi: add connect-all quirk for ASUSTeK Z170 Pro"

2023-12-12 Thread Kai Vehmanen
This reverts commit e83118f4e6ac13d5b1becb65e525c0e0265bbd61.

Signed-off-by: Kai Vehmanen 
---
 sound/pci/hda/patch_hdmi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 3d7f8f510ec7..5232c46a32a7 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1994,7 +1994,6 @@ static const struct snd_pci_quirk force_connect_list[] = {
SND_PCI_QUIRK(0x103c, 0x8711, "HP", 1),
SND_PCI_QUIRK(0x103c, 0x8715, "HP", 1),
SND_PCI_QUIRK(0x1043, 0x8694, "ASUS", 1),  /* SKL/KBL + PRIME B560M-A */
-   SND_PCI_QUIRK(0x1043, 0x86ae, "ASUS", 1),  /* SKL + Z170 PRO */
SND_PCI_QUIRK(0x1462, 0xec94, "MS-7C94", 1),
SND_PCI_QUIRK(0x8086, 0x2060, "Intel NUC5CPYB", 1),
SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", 1),
-- 
2.43.0



[PATCH 3/6] Revert "ALSA: hda/hdmi: add connect-all quirk for ASUSTeK Prime B560M-A"

2023-12-12 Thread Kai Vehmanen
This reverts commit 6fb89f11e23453b081ec4695e5e66ccb4deb2fd0.

Signed-off-by: Kai Vehmanen 
---
 sound/pci/hda/patch_hdmi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 5232c46a32a7..b152c941414f 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1993,7 +1993,6 @@ static const struct snd_pci_quirk force_connect_list[] = {
SND_PCI_QUIRK(0x103c, 0x871a, "HP", 1),
SND_PCI_QUIRK(0x103c, 0x8711, "HP", 1),
SND_PCI_QUIRK(0x103c, 0x8715, "HP", 1),
-   SND_PCI_QUIRK(0x1043, 0x8694, "ASUS", 1),  /* SKL/KBL + PRIME B560M-A */
SND_PCI_QUIRK(0x1462, 0xec94, "MS-7C94", 1),
SND_PCI_QUIRK(0x8086, 0x2060, "Intel NUC5CPYB", 1),
SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", 1),
-- 
2.43.0



[PATCH 0/6] ALSA: hda/hdmi: align force-connect quirks with upstream

2023-12-12 Thread Kai Vehmanen
The recent work on display audio force-connect quirks got merged 
upstream, but in a slightly modified form. This series replaces the patches
in drm-intel/topic/core-for-CI with clean versions of patches merged
to sound upstream.

There is one functional difference, the upstream version dropped
one SSID (1043:8694). This was reported as an affected configuration,
but when cross-checking the series for upstream submission, no
such system was found. So CI results should be equivalent with this 
series.

Kai Vehmanen (6):
  Revert "ALSA: hda/hdmi: add force-connect quirk for ASUSTeK Z170M Pro"
  Revert "ALSA: hda/hdmi: add connect-all quirk for ASUSTeK Z170 Pro"
  Revert "ALSA: hda/hdmi: add connect-all quirk for ASUSTeK Prime
B560M-A"
  Revert "ALSA: hda/hdmi: add connect-all quirk for NUC5CPYB"
  ALSA: hda/hdmi: add force-connect quirks for ASUSTeK Z170 variants
  ALSA: hda/hdmi: add force-connect quirk for NUC5CPYB

 sound/pci/hda/patch_hdmi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

-- 
2.43.0



✗ Fi.CI.BAT: failure for Resolve suspend-resume racing with GuC destroy-context-worker (rev9)

2023-12-12 Thread Patchwork
== Series Details ==

Series: Resolve suspend-resume racing with GuC destroy-context-worker (rev9)
URL   : https://patchwork.freedesktop.org/series/121916/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14010 -> Patchwork_121916v9


Summary
---

  **FAILURE**

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

Participating hosts (31 -> 34)
--

  Additional (5): bat-kbl-2 bat-dg2-8 bat-dg2-9 fi-pnv-d510 bat-mtlp-8 
  Missing(2): fi-tgl-1115g4 fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- bat-adlp-11:[PASS][1] -> [SKIP][2] +5 other tests skip
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_121916v9/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html

  * igt@kms_pipe_crc_basic@read-crc:
- bat-adlp-11:NOTRUN -> [SKIP][3] +8 other tests skip
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_121916v9/bat-adlp-11/igt@kms_pipe_crc_ba...@read-crc.html

  
 Warnings 

  * igt@kms_dsc@dsc-basic:
- bat-adlp-11:[SKIP][4] ([i915#3555] / [i915#3840]) -> [SKIP][5]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_...@dsc-basic.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_121916v9/bat-adlp-11/igt@kms_...@dsc-basic.html

  
Known issues


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

### CI changes ###

 Issues hit 

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

  

### IGT changes ###

 Issues hit 

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

  * igt@fbdev@info:
- bat-adlp-11:[PASS][9] -> [SKIP][10] ([i915#1849] / [i915#2582])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@info.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_121916v9/bat-adlp-11/igt@fb...@info.html
- bat-kbl-2:  NOTRUN -> [SKIP][11] ([fdo#109271] / [i915#1849])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_121916v9/bat-kbl-2/igt@fb...@info.html

  * igt@fbdev@nullptr:
- bat-adlp-11:[PASS][12] -> [SKIP][13] ([i915#2582]) +3 other tests 
skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@nullptr.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_121916v9/bat-adlp-11/igt@fb...@nullptr.html

  * igt@gem_exec_suspend@basic-s0@smem:
- bat-dg2-8:  NOTRUN -> [INCOMPLETE][14] ([i915#9275])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_121916v9/bat-dg2-8/igt@gem_exec_suspend@basic...@smem.html

  * igt@gem_lmem_swapping@basic:
- fi-pnv-d510:NOTRUN -> [SKIP][15] ([fdo#109271]) +28 other tests 
skip
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_121916v9/fi-pnv-d510/igt@gem_lmem_swapp...@basic.html

  * igt@gem_lmem_swapping@parallel-random-engines:
- bat-kbl-2:  NOTRUN -> [SKIP][16] ([fdo#109271]) +36 other tests 
skip
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_121916v9/bat-kbl-2/igt@gem_lmem_swapp...@parallel-random-engines.html

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

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

✗ Fi.CI.SPARSE: warning for Resolve suspend-resume racing with GuC destroy-context-worker (rev9)

2023-12-12 Thread Patchwork
== Series Details ==

Series: Resolve suspend-resume racing with GuC destroy-context-worker (rev9)
URL   : https://patchwork.freedesktop.org/series/121916/
State : warning

== Summary ==

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




✗ Fi.CI.BAT: failure for drm/i915/gem: Atomically invalidate userptr on mmu-notifier (rev9)

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/i915/gem: Atomically invalidate userptr on mmu-notifier (rev9)
URL   : https://patchwork.freedesktop.org/series/126998/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14010 -> Patchwork_126998v9


Summary
---

  **FAILURE**

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

Participating hosts (31 -> 33)
--

  Additional (3): bat-kbl-2 bat-dg2-9 fi-pnv-d510 
  Missing(1): fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- bat-adlp-11:[PASS][1] -> [SKIP][2] +5 other tests skip
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126998v9/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html

  * igt@kms_pipe_crc_basic@read-crc:
- bat-adlp-11:NOTRUN -> [SKIP][3] +8 other tests skip
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126998v9/bat-adlp-11/igt@kms_pipe_crc_ba...@read-crc.html

  
 Warnings 

  * igt@kms_dsc@dsc-basic:
- bat-adlp-11:[SKIP][4] ([i915#3555] / [i915#3840]) -> [SKIP][5]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_...@dsc-basic.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126998v9/bat-adlp-11/igt@kms_...@dsc-basic.html

  
Known issues


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

### CI changes ###

 Issues hit 

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

  

### IGT changes ###

 Issues hit 

  * igt@fbdev@info:
- bat-adlp-11:[PASS][8] -> [SKIP][9] ([i915#1849] / [i915#2582])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@info.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126998v9/bat-adlp-11/igt@fb...@info.html
- bat-kbl-2:  NOTRUN -> [SKIP][10] ([fdo#109271] / [i915#1849])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126998v9/bat-kbl-2/igt@fb...@info.html

  * igt@fbdev@nullptr:
- bat-adlp-11:[PASS][11] -> [SKIP][12] ([i915#2582]) +3 other tests 
skip
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@nullptr.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126998v9/bat-adlp-11/igt@fb...@nullptr.html

  * igt@gem_lmem_swapping@basic:
- fi-pnv-d510:NOTRUN -> [SKIP][13] ([fdo#109271]) +28 other tests 
skip
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126998v9/fi-pnv-d510/igt@gem_lmem_swapp...@basic.html

  * igt@gem_lmem_swapping@parallel-random-engines:
- bat-kbl-2:  NOTRUN -> [SKIP][14] ([fdo#109271]) +36 other tests 
skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126998v9/bat-kbl-2/igt@gem_lmem_swapp...@parallel-random-engines.html

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

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

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

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

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

✗ Fi.CI.SPARSE: warning for drm/i915/gem: Atomically invalidate userptr on mmu-notifier (rev9)

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/i915/gem: Atomically invalidate userptr on mmu-notifier (rev9)
URL   : https://patchwork.freedesktop.org/series/126998/
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/gem: Atomically invalidate userptr on mmu-notifier (rev9)

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/i915/gem: Atomically invalidate userptr on mmu-notifier (rev9)
URL   : https://patchwork.freedesktop.org/series/126998/
State : warning

== Summary ==

Error: dim checkpatch failed
9609d66f15e9 drm/i915/gem: Atomically invalidate userptr on mmu-notifier
-:117: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does 
MAINTAINERS need updating?
#117: 
deleted file mode 100644

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




[PATCH v8 2/2] drm/i915/guc: Close deregister-context race against CT-loss

2023-12-12 Thread Alan Previn
If we are at the end of suspend or very early in resume
its possible an async fence signal (via rcu_call) is triggered
to free_engines which could lead us to the execution of
the context destruction worker (after a prior worker flush).

Thus, when suspending, insert rcu_barriers at the start
of i915_gem_suspend (part of driver's suspend prepare) and
again in i915_gem_suspend_late so that all such cases have
completed and context destruction list isn't missing anything.

In destroyed_worker_func, close the race against CT-loss
by checking that CT is enabled before calling into
deregister_destroyed_contexts.

Based on testing, guc_lrc_desc_unpin may still race and fail
as we traverse the GuC's context-destroy list because the
CT could be disabled right before calling GuC's CT send function.

We've witnessed this race condition once every ~6000-8000
suspend-resume cycles while ensuring workloads that render
something onscreen is continuously started just before
we suspend (and the workload is small enough to complete
and trigger the queued engine/context free-up either very
late in suspend or very early in resume).

In such a case, we need to unroll the entire process because
guc-lrc-unpin takes a gt wakeref which only gets released in
the G2H IRQ reply that never comes through in this corner
case. Without the unroll, the taken wakeref is leaked and will
cascade into a kernel hang later at the tail end of suspend in
this function:

   intel_wakeref_wait_for_idle(>wakeref)
   (called by) - intel_gt_pm_wait_for_idle
   (called by) - wait_for_suspend

Thus, do an unroll in guc_lrc_desc_unpin and deregister_destroyed_-
contexts if guc_lrc_desc_unpin fails due to CT send falure.
When unrolling, keep the context in the GuC's destroy-list so
it can get picked up on the next destroy worker invocation
(if suspend aborted) or get fully purged as part of a GuC
sanitization (end of suspend) or a reset flow.

Signed-off-by: Alan Previn 
Signed-off-by: Anshuman Gupta 
Tested-by: Mousumi Jana 
Acked-by: Daniele Ceraolo Spurio 
---
 drivers/gpu/drm/i915/gem/i915_gem_pm.c| 10 +++
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 73 +--
 2 files changed, 78 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pm.c 
b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
index 0d812f4d787d..3b27218aabe2 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_pm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
@@ -28,6 +28,13 @@ void i915_gem_suspend(struct drm_i915_private *i915)
GEM_TRACE("%s\n", dev_name(i915->drm.dev));
 
intel_wakeref_auto(>runtime_pm.userfault_wakeref, 0);
+   /*
+* On rare occasions, we've observed the fence completion triggers
+* free_engines asynchronously via rcu_call. Ensure those are done.
+* This path is only called on suspend, so it's an acceptable cost.
+*/
+   rcu_barrier();
+
flush_workqueue(i915->wq);
 
/*
@@ -160,6 +167,9 @@ void i915_gem_suspend_late(struct drm_i915_private *i915)
 * machine in an unusable condition.
 */
 
+   /* Like i915_gem_suspend, flush tasks staged from fence triggers */
+   rcu_barrier();
+
for_each_gt(gt, i915, i)
intel_gt_suspend_late(gt);
 
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index 9c64ae0766cc..cae637fc3ead 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -236,6 +236,13 @@ set_context_destroyed(struct intel_context *ce)
ce->guc_state.sched_state |= SCHED_STATE_DESTROYED;
 }
 
+static inline void
+clr_context_destroyed(struct intel_context *ce)
+{
+   lockdep_assert_held(>guc_state.lock);
+   ce->guc_state.sched_state &= ~SCHED_STATE_DESTROYED;
+}
+
 static inline bool context_pending_disable(struct intel_context *ce)
 {
return ce->guc_state.sched_state & SCHED_STATE_PENDING_DISABLE;
@@ -613,6 +620,8 @@ static int guc_submission_send_busy_loop(struct intel_guc 
*guc,
 u32 g2h_len_dw,
 bool loop)
 {
+   int ret;
+
/*
 * We always loop when a send requires a reply (i.e. g2h_len_dw > 0),
 * so we don't handle the case where we don't get a reply because we
@@ -623,7 +632,11 @@ static int guc_submission_send_busy_loop(struct intel_guc 
*guc,
if (g2h_len_dw)
atomic_inc(>outstanding_submission_g2h);
 
-   return intel_guc_send_busy_loop(guc, action, len, g2h_len_dw, loop);
+   ret = intel_guc_send_busy_loop(guc, action, len, g2h_len_dw, loop);
+   if (ret)
+   atomic_dec(>outstanding_submission_g2h);
+
+   return ret;
 }
 
 int intel_guc_wait_for_pending_msg(struct intel_guc *guc,
@@ -3288,12 +3301,13 @@ static void guc_context_close(struct intel_context *ce)

[PATCH v8 1/2] drm/i915/guc: Flush context destruction worker at suspend

2023-12-12 Thread Alan Previn
When suspending, flush the context-guc-id
deregistration worker at the final stages of
intel_gt_suspend_late when we finally call gt_sanitize
that eventually leads down to __uc_sanitize so that
the deregistration worker doesn't fire off later as
we reset the GuC microcontroller.

Signed-off-by: Alan Previn 
Reviewed-by: Rodrigo Vivi 
Tested-by: Mousumi Jana 
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 5 +
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h | 2 ++
 drivers/gpu/drm/i915/gt/uc/intel_uc.c | 2 ++
 3 files changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index a259f1118c5a..9c64ae0766cc 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -1613,6 +1613,11 @@ static void guc_flush_submissions(struct intel_guc *guc)
spin_unlock_irqrestore(_engine->lock, flags);
 }
 
+void intel_guc_submission_flush_work(struct intel_guc *guc)
+{
+   flush_work(>submission_state.destroyed_worker);
+}
+
 static void guc_flush_destroyed_contexts(struct intel_guc *guc);
 
 void intel_guc_submission_reset_prepare(struct intel_guc *guc)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h
index c57b29cdb1a6..b6df75622d3b 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h
@@ -38,6 +38,8 @@ int intel_guc_wait_for_pending_msg(struct intel_guc *guc,
   bool interruptible,
   long timeout);
 
+void intel_guc_submission_flush_work(struct intel_guc *guc);
+
 static inline bool intel_guc_submission_is_supported(struct intel_guc *guc)
 {
return guc->submission_supported;
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c 
b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
index 3872d309ed31..b8b09b1bee3e 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
@@ -690,6 +690,8 @@ void intel_uc_suspend(struct intel_uc *uc)
return;
}
 
+   intel_guc_submission_flush_work(guc);
+
with_intel_runtime_pm(_to_gt(uc)->i915->runtime_pm, wakeref) {
err = intel_guc_suspend(guc);
if (err)
-- 
2.39.0



[PATCH v8 0/2] Resolve suspend-resume racing with GuC destroy-context-worker

2023-12-12 Thread Alan Previn
This series is the result of debugging issues root caused to
races between the GuC's destroyed_worker_func being triggered
vs repeating suspend-resume cycles with concurrent delayed
fence signals for engine-freeing.

The reproduction steps require that an app is launched right
before the start of the suspend cycle where it creates a
new gem context and submits a tiny workload that would
complete in the middle of the suspend cycle. However this
app uses dma-buffer sharing or dma-fence with non-GPU
objects or signals that eventually triggers a FENCE_FREE
via__i915_sw_fence_notify that connects to engines_notify ->
free_engines_rcu -> intel_context_put ->
kref_put(>ref..) that queues the worker after the GuCs
CTB has been disabled (i.e. after i915-gem's suspend-late).

This sequence is a corner-case and required repeating this
app->suspend->resume cycle ~1500 times across 4 identical
systems to see it once. That said, based on above callstack,
it is clear that merely flushing the context destruction worker,
which is obviously missing and needed, isn't sufficient.

Because of that, this series adds additional patches besides
the obvious (Patch #1) flushing of the worker during the
suspend flows. It also includes (Patch #2) closing a race
between sending the context-deregistration H2G vs the CTB
getting disabled in the midst of it (by detecing the failure
and unrolling the guc-lrc-unpin flow) and adding an additional
rcu_barrier in the gem-suspend flow to purge outstanding
rcu defered tasks that may include context destruction.

This patch was tested and confirmed to be reliably working
after running ~1500 suspend resume cycles on 4 concurrent
machines.

Changes from prior revs:
   v7: - Rebase on latest drm-tip.
   v6: - Dont hold the spinlock while calling deregister_context
 which can take a longer time. (Rodrigo)
   - Fix / improve of comments. (Rodrigo)
   - Release the ce->guc_state.lock before calling
 deregister_context and retake it if we fail. (John/Daniele).
   v5: - Remove Patch #3 which doesnt solve this exact bug
 but can be a separate patch(Tvrtko).
   v4: - In Patch #2, change the position of the calls into
 rcu_barrier based on latest testing data. (Alan/Anshuman).
   - In Patch #3, fix the timeout value selection for the
 final gt-pm idle-wait that was incorrectly using a 'ns'
 #define as a milisec timeout.
   v3: - In Patch #3, when deregister_context fails, instead
 of calling intel_gt_pm_put(that might sleep), call
 __intel_wakeref_put (without ASYNC flag) (Rodrigo/Anshuman).
   - In wait_for_suspend add an rcu_barrier before we
 proceed to wait for idle. (Anshuman)
   v2: - Patch #2 Restructure code in guc_lrc_desc_unpin so
 it's more readible to differentiate (1)direct guc-id
 cleanup ..vs (2) sending the H2G ctx-destroy action ..
 vs (3) the unrolling steps if the H2G fails.
   - Patch #2 Add a check to close the race sooner by checking
 for intel_guc_is_ready from destroyed_worker_func.
   - Patch #2 When guc_submission_send_busy_loop gets a
 failure from intel_guc_send_busy_loop, we need to undo
 i.e. decrement the outstanding_submission_g2h.
   - Patch #3 In wait_for_suspend, fix checking of return from
 intel_gt_pm_wait_timeout_for_idle to now use -ETIMEDOUT
 and add documentation for intel_wakeref_wait_for_idle.
 (Rodrigo).

Alan Previn (2):
  drm/i915/guc: Flush context destruction worker at suspend
  drm/i915/guc: Close deregister-context race against CT-loss

 drivers/gpu/drm/i915/gem/i915_gem_pm.c| 10 +++
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 78 +--
 .../gpu/drm/i915/gt/uc/intel_guc_submission.h |  2 +
 drivers/gpu/drm/i915/gt/uc/intel_uc.c |  2 +
 4 files changed, 87 insertions(+), 5 deletions(-)


base-commit: b4182ec1538e8cebf630083ec4296bed0061d594
-- 
2.39.0



Re: ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/edid: replace __attribute__((packed)) with __packed (rev2)

2023-12-12 Thread Jani Nikula
On Tue, 12 Dec 2023, Patchwork  wrote:
> == Series Details ==
>
> Series: series starting with [1/2] drm/edid: replace __attribute__((packed)) 
> with __packed (rev2)
> URL   : https://patchwork.freedesktop.org/series/127680/
> State : failure
>
> == Summary ==
>
> CI Bug Log - changes from CI_DRM_14010 -> Patchwork_127680v2
> 
>
> Summary
> ---
>
>   **FAILURE**
>
>   Serious unknown changes coming with Patchwork_127680v2 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_127680v2, 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_127680v2/index.html
>
> Participating hosts (31 -> 34)
> --
>
>   Additional (4): bat-dg2-8 bat-kbl-2 bat-dg2-9 fi-pnv-d510 
>   Missing(1): fi-snb-2520m 
>
> Possible new issues
> ---
>
>   Here are the unknown changes that may have been introduced in 
> Patchwork_127680v2:
>
> ### IGT changes ###
>
>  Possible regressions 
>
>   * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
> - bat-adlp-11:[PASS][1] -> [SKIP][2] +5 other tests skip
>[1]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html
>[2]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html
>
>   * igt@kms_pipe_crc_basic@read-crc:
> - bat-adlp-11:NOTRUN -> [SKIP][3] +8 other tests skip
>[3]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-11/igt@kms_pipe_crc_ba...@read-crc.html

Unrelated, please re-report.

BR,
Jani.

>
>   
>  Warnings 
>
>   * igt@kms_dsc@dsc-basic:
> - bat-adlp-11:[SKIP][4] ([i915#3555] / [i915#3840]) -> [SKIP][5]
>[4]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_...@dsc-basic.html
>[5]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-11/igt@kms_...@dsc-basic.html
>
>   
> Known issues
> 
>
>   Here are the changes found in Patchwork_127680v2 that come from known 
> issues:
>
> ### IGT changes ###
>
>  Issues hit 
>
>   * igt@fbdev@info:
> - bat-adlp-11:[PASS][6] -> [SKIP][7] ([i915#1849] / [i915#2582])
>[6]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@info.html
>[7]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-11/igt@fb...@info.html
> - bat-kbl-2:  NOTRUN -> [SKIP][8] ([fdo#109271] / [i915#1849])
>[8]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-kbl-2/igt@fb...@info.html
>
>   * igt@fbdev@nullptr:
> - bat-adlp-11:[PASS][9] -> [SKIP][10] ([i915#2582]) +3 other 
> tests skip
>[9]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@nullptr.html
>[10]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-11/igt@fb...@nullptr.html
>
>   * igt@gem_exec_suspend@basic-s0@lmem0:
> - bat-dg2-8:  NOTRUN -> [INCOMPLETE][11] ([i915#9275])
>[11]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-dg2-8/igt@gem_exec_suspend@basic...@lmem0.html
>
>   * igt@gem_lmem_swapping@basic:
> - fi-pnv-d510:NOTRUN -> [SKIP][12] ([fdo#109271]) +28 other tests 
> skip
>[12]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/fi-pnv-d510/igt@gem_lmem_swapp...@basic.html
>
>   * igt@gem_lmem_swapping@parallel-random-engines:
> - bat-kbl-2:  NOTRUN -> [SKIP][13] ([fdo#109271]) +36 other tests 
> skip
>[13]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-kbl-2/igt@gem_lmem_swapp...@parallel-random-engines.html
>
>   * igt@gem_lmem_swapping@verify-random:
> - bat-adlp-11:NOTRUN -> [SKIP][14] ([i915#4613]) +3 other tests 
> skip
>[14]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-11/igt@gem_lmem_swapp...@verify-random.html
>
>   * igt@gem_mmap@basic:
> - bat-dg2-9:  NOTRUN -> [SKIP][15] ([i915#4083])
>[15]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-dg2-9/igt@gem_m...@basic.html
> - bat-dg2-8:  NOTRUN -> [SKIP][16] ([i915#4083])
>[16]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-dg2-8/igt@gem_m...@basic.html
>
>   * igt@gem_mmap_gtt@basic:
> - bat-dg2-9:  NOTRUN -> [SKIP][17] ([i915#4077]) +2 other tests 
> skip
>[17]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-dg2-9/igt@gem_mmap_...@basic.html
> - bat-dg2-8:  NOTRUN -> [SKIP][18] ([i915#4077]) +2 other tests 
> skip

✗ Fi.CI.BAT: failure for series starting with [1/2] drm/edid: replace __attribute__((packed)) with __packed (rev2)

2023-12-12 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/edid: replace __attribute__((packed)) 
with __packed (rev2)
URL   : https://patchwork.freedesktop.org/series/127680/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14010 -> Patchwork_127680v2


Summary
---

  **FAILURE**

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

Participating hosts (31 -> 34)
--

  Additional (4): bat-dg2-8 bat-kbl-2 bat-dg2-9 fi-pnv-d510 
  Missing(1): fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- bat-adlp-11:[PASS][1] -> [SKIP][2] +5 other tests skip
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html

  * igt@kms_pipe_crc_basic@read-crc:
- bat-adlp-11:NOTRUN -> [SKIP][3] +8 other tests skip
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-11/igt@kms_pipe_crc_ba...@read-crc.html

  
 Warnings 

  * igt@kms_dsc@dsc-basic:
- bat-adlp-11:[SKIP][4] ([i915#3555] / [i915#3840]) -> [SKIP][5]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_...@dsc-basic.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-11/igt@kms_...@dsc-basic.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@fbdev@info:
- bat-adlp-11:[PASS][6] -> [SKIP][7] ([i915#1849] / [i915#2582])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@info.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-11/igt@fb...@info.html
- bat-kbl-2:  NOTRUN -> [SKIP][8] ([fdo#109271] / [i915#1849])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-kbl-2/igt@fb...@info.html

  * igt@fbdev@nullptr:
- bat-adlp-11:[PASS][9] -> [SKIP][10] ([i915#2582]) +3 other tests 
skip
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@nullptr.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-adlp-11/igt@fb...@nullptr.html

  * igt@gem_exec_suspend@basic-s0@lmem0:
- bat-dg2-8:  NOTRUN -> [INCOMPLETE][11] ([i915#9275])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-dg2-8/igt@gem_exec_suspend@basic...@lmem0.html

  * igt@gem_lmem_swapping@basic:
- fi-pnv-d510:NOTRUN -> [SKIP][12] ([fdo#109271]) +28 other tests 
skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/fi-pnv-d510/igt@gem_lmem_swapp...@basic.html

  * igt@gem_lmem_swapping@parallel-random-engines:
- bat-kbl-2:  NOTRUN -> [SKIP][13] ([fdo#109271]) +36 other tests 
skip
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v2/bat-kbl-2/igt@gem_lmem_swapp...@parallel-random-engines.html

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

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

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

  * igt@gem_render_tiled_blits@basic:
- bat-dg2-9:  NOTRUN -> [SKIP][19] ([i915#4079]) +1 other test skip
   [19]: 

✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/edid: replace __attribute__((packed)) with __packed (rev2)

2023-12-12 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/edid: replace __attribute__((packed)) 
with __packed (rev2)
URL   : https://patchwork.freedesktop.org/series/127680/
State : warning

== Summary ==

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




✗ Fi.CI.BAT: failure for drm/edid: prefer forward declarations over includes in drm_edid.h

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/edid: prefer forward declarations over includes in drm_edid.h
URL   : https://patchwork.freedesktop.org/series/127695/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14010 -> Patchwork_127695v1


Summary
---

  **FAILURE**

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

Participating hosts (31 -> 34)
--

  Additional (4): bat-kbl-2 bat-dg2-9 bat-mtlp-8 fi-pnv-d510 
  Missing(1): fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- bat-adlp-11:[PASS][1] -> [SKIP][2] +5 other tests skip
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127695v1/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html

  * igt@kms_pipe_crc_basic@read-crc:
- bat-adlp-11:NOTRUN -> [SKIP][3] +8 other tests skip
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127695v1/bat-adlp-11/igt@kms_pipe_crc_ba...@read-crc.html

  
 Warnings 

  * igt@kms_dsc@dsc-basic:
- bat-adlp-11:[SKIP][4] ([i915#3555] / [i915#3840]) -> [SKIP][5]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_...@dsc-basic.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127695v1/bat-adlp-11/igt@kms_...@dsc-basic.html

  
Known issues


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

### IGT changes ###

 Issues hit 

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

  * igt@fbdev@info:
- bat-adlp-11:[PASS][7] -> [SKIP][8] ([i915#1849] / [i915#2582])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@info.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127695v1/bat-adlp-11/igt@fb...@info.html
- bat-kbl-2:  NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#1849])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127695v1/bat-kbl-2/igt@fb...@info.html

  * igt@fbdev@nullptr:
- bat-adlp-11:[PASS][10] -> [SKIP][11] ([i915#2582]) +3 other tests 
skip
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@nullptr.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127695v1/bat-adlp-11/igt@fb...@nullptr.html

  * igt@gem_lmem_swapping@basic:
- fi-pnv-d510:NOTRUN -> [SKIP][12] ([fdo#109271]) +28 other tests 
skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127695v1/fi-pnv-d510/igt@gem_lmem_swapp...@basic.html

  * igt@gem_lmem_swapping@parallel-random-engines:
- bat-kbl-2:  NOTRUN -> [SKIP][13] ([fdo#109271]) +36 other tests 
skip
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127695v1/bat-kbl-2/igt@gem_lmem_swapp...@parallel-random-engines.html

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

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

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

  * igt@gem_render_tiled_blits@basic:
- 

Re: [PATCH v8 1/6] pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()

2023-12-12 Thread Mark Brown
On Tue, Dec 12, 2023 at 07:22:18AM -0800, Guenter Roeck wrote:
> On 12/12/23 03:41, Uwe Kleine-König wrote:

> > Several affected maintainers already acked, so I guess it's fine to take
> > this via the pwm tree. An Ack from the remaining maintainers would be
> > very welcome, an alternative would be to split the patch.

> > Missing Acks so far:

> >   - Jean Delvare / Guenter Roeck for drivers/hwmon/pwm-fan.c
> >   - Javier Martinez Canillas for drivers/gpu/drm/solomon/ssd130x.c
> >   - Liam Girdwood / Mark Brown for drivers/regulator/pwm-regulator.c
> >   - Helge Deller for drivers/video/fbdev/ssd1307fb.c

> Personally I find the change unnecessary and pointless, which is why I
> didn't ack it. Even if function names were deemed important enough, keeping
> pwm_apply_state() for the time being and just adding pwm_apply_might_sleep()
> as duplicate would have done it, all the changes could have gone in long
> ago, and per-subsystem cleanup could have been orthogonal.

> I refrained from commenting because it might be considered bike shedding,
> but I don't want to ack something I deem unnecessary and pointless without
> comment. But then don't want to keep arguing either, so

I haven't been reading this series because I couldn't tell why I was
copied on it, it's only chance that made me open Guenter's mail here...

Acked-by: Mark Brown 


signature.asc
Description: PGP signature


Re: [PATCH v8 1/6] pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()

2023-12-12 Thread Guenter Roeck

On 12/12/23 03:41, Uwe Kleine-König wrote:

On Tue, Dec 12, 2023 at 08:34:00AM +, Sean Young wrote:

In order to introduce a pwm api which can be used from atomic context,
we will need two functions for applying pwm changes:

int pwm_apply_might_sleep(struct pwm *, struct pwm_state *);
int pwm_apply_atomic(struct pwm *, struct pwm_state *);

This commit just deals with renaming pwm_apply_state(), a following
commit will introduce the pwm_apply_atomic() function.

Acked-by: Dmitry Torokhov  # for input
Acked-by: Hans de Goede 
Acked-by: Jani Nikula 
Acked-by: Lee Jones 
Signed-off-by: Sean Young 


Acked-by: Uwe Kleine-König 

Several affected maintainers already acked, so I guess it's fine to take
this via the pwm tree. An Ack from the remaining maintainers would be
very welcome, an alternative would be to split the patch.

Missing Acks so far:

  - Jean Delvare / Guenter Roeck for drivers/hwmon/pwm-fan.c
  - Javier Martinez Canillas for drivers/gpu/drm/solomon/ssd130x.c
  - Liam Girdwood / Mark Brown for drivers/regulator/pwm-regulator.c
  - Helge Deller for drivers/video/fbdev/ssd1307fb.c

Best regards
Uwe




Personally I find the change unnecessary and pointless, which is why I
didn't ack it. Even if function names were deemed important enough, keeping
pwm_apply_state() for the time being and just adding pwm_apply_might_sleep()
as duplicate would have done it, all the changes could have gone in long
ago, and per-subsystem cleanup could have been orthogonal.

I refrained from commenting because it might be considered bike shedding,
but I don't want to ack something I deem unnecessary and pointless without
comment. But then don't want to keep arguing either, so

Acked-by: Guenter Roeck 

Guenter



✗ Fi.CI.SPARSE: warning for drm/edid: prefer forward declarations over includes in drm_edid.h

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/edid: prefer forward declarations over includes in drm_edid.h
URL   : https://patchwork.freedesktop.org/series/127695/
State : warning

== Summary ==

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




[PATCH] drm/edid: prefer forward declarations over includes in drm_edid.h

2023-12-12 Thread Jani Nikula
There's no need to include either linux/hdmi.h or drm/drm_mode.h. They
can be removed by using forward declarations.

While at it, group the forward declarations together, and remove the
unnecessary ones.

Signed-off-by: Jani Nikula 
---
 include/drm/drm_edid.h | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index 518d1b8106c7..37c2702ee9ef 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -24,11 +24,14 @@
 #define __DRM_EDID_H__
 
 #include 
-#include 
-#include 
 
+enum hdmi_quantization_range;
+struct drm_connector;
 struct drm_device;
+struct drm_display_mode;
 struct drm_edid;
+struct hdmi_avi_infoframe;
+struct hdmi_vendor_infoframe;
 struct i2c_adapter;
 
 #define EDID_LENGTH 128
@@ -319,11 +322,6 @@ struct cea_sad {
u8 byte2; /* meaning depends on format */
 };
 
-struct drm_encoder;
-struct drm_connector;
-struct drm_connector_state;
-struct drm_display_mode;
-
 int drm_edid_to_sad(const struct edid *edid, struct cea_sad **sads);
 int drm_edid_to_speaker_allocation(const struct edid *edid, u8 **sadb);
 int drm_av_sync_delay(struct drm_connector *connector,
-- 
2.39.2



Re: [RFC] drm/i915: Allow dmabuf mmap forwarding

2023-12-12 Thread Christian König

Hi Tvrtko,

Thanks for pointing this mail out once more, I've totally missed it.

Am 12.12.23 um 11:37 schrieb Tvrtko Ursulin:


On 25/09/2023 14:16, Tvrtko Ursulin wrote:

From: Tvrtko Ursulin 

Allow mmap forwarding for imported buffers in order to allow minigbm 
mmap

to work on aperture-less platforms such as Meteorlake.

So far i915 did not allow mmap on imported buffers but from minigbm
perspective that worked because of the DRM_IOCTL_I915_GEM_MMAP_GTT fall-
back would then be attempted, and would be successful.

This stops working on Meteorlake since there is no aperture.

Allow i915 to mmap imported buffers using forwarding via dma_buf_mmap(),
which allows the primary minigbm path of 
DRM_IOCTL_I915_GEM_MMAP_OFFSET /

I915_MMAP_OFFSET_WB to work.

Signed-off-by: Tvrtko Ursulin 
Cc: Daniel Vetter 
Cc: Christian König 
Cc: Matthew Auld 
Cc: Nirmoy Das 
---
1)
It is unclear to me if any real userspace depends on this, but there are
certainly compliance suites which fail.


Well that is actually intentional, but see below.



2)
It is also a bit unclear to me if dma_buf_mmap() is exactly intended for
this kind of use. It seems that it is, but I also found some old mailing
list discussions suggesting there might be some unresolved questions
around VMA revocation.


I actually solved those a few years back by introducing the 
vma_set_file() function which standardized the dance necessary for the 
dma_buf_mmap() function.




1 + 2 = RFC for now.

Daniel and Christian were involved in 2) in the past so comments would
be appreciated.


Any comments on this one? I don't have all the historical knowledge of 
when this was maybe attempted before and what problems were hit, or 
something. So would there be downsides or it is fine to forward it.


It works technically inside the kernel and Thomas Zimmerman suggested a 
patch set which made it possible to use for all DRM drivers.


But IIRC this patch set was rejected with the rational that while doing 
an mmap() on an imported DMA-buf works when userspace actually does this 
then there is a bug in userspace. The UMD doesn't seems to be aware of 
the fact that the buffer is imported and so for example needs to call 
dma_buf_begin_cpu_access() and dma_buf_end_cpu_access().


UMDs can trivially work around this by doing the mmap() on the DMA-buf 
file descriptor instead (potentially after re-exporting it), but the 
kernel really shouldn't help hide userspace bugs.


Regards,
Christian.



Regards,

Tvrtko



Test-with: 20230925131539.32743-1-tvrtko.ursu...@linux.intel.com

---
  drivers/gpu/drm/i915/gem/i915_gem_mman.c  | 78 +++
  .../gpu/drm/i915/gem/i915_gem_object_types.h  |  1 +
  2 files changed, 65 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c 
b/drivers/gpu/drm/i915/gem/i915_gem_mman.c

index aa4d842d4c5a..78c84c0a8b08 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -5,6 +5,7 @@
   */
    #include 
+#include 
  #include 
  #include 
  #include 
@@ -664,6 +665,7 @@ insert_mmo(struct drm_i915_gem_object *obj, 
struct i915_mmap_offset *mmo)

  static struct i915_mmap_offset *
  mmap_offset_attach(struct drm_i915_gem_object *obj,
 enum i915_mmap_type mmap_type,
+   bool forward_mmap,
 struct drm_file *file)
  {
  struct drm_i915_private *i915 = to_i915(obj->base.dev);
@@ -682,6 +684,7 @@ mmap_offset_attach(struct drm_i915_gem_object *obj,
    mmo->obj = obj;
  mmo->mmap_type = mmap_type;
+    mmo->forward_mmap = forward_mmap;
  drm_vma_node_reset(>vma_node);
    err = drm_vma_offset_add(obj->base.dev->vma_offset_manager,
@@ -714,12 +717,25 @@ mmap_offset_attach(struct drm_i915_gem_object 
*obj,

  return ERR_PTR(err);
  }
  +static bool
+should_forward_mmap(struct drm_i915_gem_object *obj,
+    enum i915_mmap_type mmap_type)
+{
+    if (!obj->base.import_attach)
+    return false;
+
+    return mmap_type == I915_MMAP_TYPE_WB ||
+   mmap_type == I915_MMAP_TYPE_WC ||
+   mmap_type == I915_MMAP_TYPE_UC;
+}
+
  static int
  __assign_mmap_offset(struct drm_i915_gem_object *obj,
   enum i915_mmap_type mmap_type,
   u64 *offset, struct drm_file *file)
  {
  struct i915_mmap_offset *mmo;
+    bool should_forward;
    if (i915_gem_object_never_mmap(obj))
  return -ENODEV;
@@ -735,12 +751,15 @@ __assign_mmap_offset(struct drm_i915_gem_object 
*obj,

  if (mmap_type == I915_MMAP_TYPE_FIXED)
  return -ENODEV;
  +    should_forward = should_forward_mmap(obj, mmap_type);
+
  if (mmap_type != I915_MMAP_TYPE_GTT &&
  !i915_gem_object_has_struct_page(obj) &&
-    !i915_gem_object_has_iomem(obj))
+    !i915_gem_object_has_iomem(obj) &&
+    !should_forward)
  return -ENODEV;
  -    mmo = mmap_offset_attach(obj, mmap_type, file);
+    mmo = mmap_offset_attach(obj, mmap_type, should_forward, file);
  

✗ Fi.CI.BAT: failure for series starting with [1/2] drm/edid: replace __attribute__((packed)) with __packed

2023-12-12 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/edid: replace __attribute__((packed)) 
with __packed
URL   : https://patchwork.freedesktop.org/series/127680/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14010 -> Patchwork_127680v1


Summary
---

  **FAILURE**

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

Participating hosts (31 -> 34)
--

  Additional (5): bat-kbl-2 fi-bsw-n3050 bat-dg2-8 bat-dg2-9 fi-pnv-d510 
  Missing(2): bat-jsl-1 fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- bat-adlp-11:[PASS][1] -> [SKIP][2] +5 other tests skip
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v1/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html

  * igt@kms_pipe_crc_basic@read-crc:
- bat-adlp-11:NOTRUN -> [SKIP][3] +8 other tests skip
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v1/bat-adlp-11/igt@kms_pipe_crc_ba...@read-crc.html

  
 Warnings 

  * igt@kms_dsc@dsc-basic:
- bat-adlp-11:[SKIP][4] ([i915#3555] / [i915#3840]) -> [SKIP][5]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_...@dsc-basic.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v1/bat-adlp-11/igt@kms_...@dsc-basic.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@fbdev@info:
- bat-adlp-11:[PASS][6] -> [SKIP][7] ([i915#1849] / [i915#2582])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@info.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v1/bat-adlp-11/igt@fb...@info.html
- bat-kbl-2:  NOTRUN -> [SKIP][8] ([fdo#109271] / [i915#1849])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v1/bat-kbl-2/igt@fb...@info.html

  * igt@fbdev@nullptr:
- bat-adlp-11:[PASS][9] -> [SKIP][10] ([i915#2582]) +3 other tests 
skip
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@nullptr.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v1/bat-adlp-11/igt@fb...@nullptr.html

  * igt@gem_lmem_swapping@basic:
- fi-pnv-d510:NOTRUN -> [SKIP][11] ([fdo#109271]) +28 other tests 
skip
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v1/fi-pnv-d510/igt@gem_lmem_swapp...@basic.html

  * igt@gem_lmem_swapping@parallel-random-engines:
- bat-kbl-2:  NOTRUN -> [SKIP][12] ([fdo#109271]) +36 other tests 
skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v1/bat-kbl-2/igt@gem_lmem_swapp...@parallel-random-engines.html

  * igt@gem_lmem_swapping@random-engines:
- fi-bsw-n3050:   NOTRUN -> [SKIP][13] ([fdo#109271]) +15 other tests 
skip
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127680v1/fi-bsw-n3050/igt@gem_lmem_swapp...@random-engines.html

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

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

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

  * igt@gem_render_tiled_blits@basic:
- bat-dg2-9:  NOTRUN -> [SKIP][19] ([i915#4079]) +1 other test skip
   [19]: 

✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/edid: replace __attribute__((packed)) with __packed

2023-12-12 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/edid: replace __attribute__((packed)) 
with __packed
URL   : https://patchwork.freedesktop.org/series/127680/
State : warning

== Summary ==

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




[PATCH 2/2] drm/ioc32: replace __attribute__((packed)) with __packed

2023-12-12 Thread Jani Nikula
__packed is preferred over __attribute__((packed)).

Signed-off-by: Jani Nikula 
---
 drivers/gpu/drm/drm_ioc32.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
index 129e2b91dbfe..e6b5b06de148 100644
--- a/drivers/gpu/drm/drm_ioc32.c
+++ b/drivers/gpu/drm/drm_ioc32.c
@@ -229,7 +229,7 @@ typedef struct drm_update_draw32 {
unsigned int num;
/* 64-bit version has a 32-bit pad here */
u64 data;   /**< Pointer */
-} __attribute__((packed)) drm_update_draw32_t;
+} __packed drm_update_draw32_t;
 
 static int compat_drm_update_draw(struct file *file, unsigned int cmd,
  unsigned long arg)
@@ -296,7 +296,7 @@ typedef struct drm_mode_fb_cmd232 {
u32 pitches[4];
u32 offsets[4];
u64 modifier[4];
-} __attribute__((packed)) drm_mode_fb_cmd232_t;
+} __packed drm_mode_fb_cmd232_t;
 
 static int compat_drm_mode_addfb2(struct file *file, unsigned int cmd,
  unsigned long arg)
-- 
2.39.2



[PATCH 1/2] drm/edid: replace __attribute__((packed)) with __packed

2023-12-12 Thread Jani Nikula
__packed is preferred over __attribute__((packed)).

Signed-off-by: Jani Nikula 
---
 include/drm/drm_edid.h | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index 518d1b8106c7..54cc6f04a708 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -46,7 +46,7 @@ struct est_timings {
u8 t1;
u8 t2;
u8 mfg_rsvd;
-} __attribute__((packed));
+} __packed;
 
 /* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */
 #define EDID_TIMING_ASPECT_SHIFT 6
@@ -59,7 +59,7 @@ struct est_timings {
 struct std_timing {
u8 hsize; /* need to multiply by 8 then add 248 */
u8 vfreq_aspect;
-} __attribute__((packed));
+} __packed;
 
 #define DRM_EDID_PT_HSYNC_POSITIVE (1 << 1)
 #define DRM_EDID_PT_VSYNC_POSITIVE (1 << 2)
@@ -85,12 +85,12 @@ struct detailed_pixel_timing {
u8 hborder;
u8 vborder;
u8 misc;
-} __attribute__((packed));
+} __packed;
 
 /* If it's not pixel timing, it'll be one of the below */
 struct detailed_data_string {
u8 str[13];
-} __attribute__((packed));
+} __packed;
 
 #define DRM_EDID_RANGE_OFFSET_MIN_VFREQ (1 << 0) /* 1.4 */
 #define DRM_EDID_RANGE_OFFSET_MAX_VFREQ (1 << 1) /* 1.4 */
@@ -120,7 +120,7 @@ struct detailed_data_monitor_range {
__le16 m;
u8 k;
u8 j; /* need to divide by 2 */
-   } __attribute__((packed)) gtf2;
+   } __packed gtf2;
struct {
u8 version;
u8 data1; /* high 6 bits: extra clock resolution */
@@ -129,27 +129,27 @@ struct detailed_data_monitor_range {
u8 flags; /* preferred aspect and blanking support */
u8 supported_scalings;
u8 preferred_refresh;
-   } __attribute__((packed)) cvt;
-   } __attribute__((packed)) formula;
-} __attribute__((packed));
+   } __packed cvt;
+   } __packed formula;
+} __packed;
 
 struct detailed_data_wpindex {
u8 white_yx_lo; /* Lower 2 bits each */
u8 white_x_hi;
u8 white_y_hi;
u8 gamma; /* need to divide by 100 then add 1 */
-} __attribute__((packed));
+} __packed;
 
 struct detailed_data_color_point {
u8 windex1;
u8 wpindex1[3];
u8 windex2;
u8 wpindex2[3];
-} __attribute__((packed));
+} __packed;
 
 struct cvt_timing {
u8 code[3];
-} __attribute__((packed));
+} __packed;
 
 struct detailed_non_pixel {
u8 pad1;
@@ -163,8 +163,8 @@ struct detailed_non_pixel {
struct detailed_data_wpindex color;
struct std_timing timings[6];
struct cvt_timing cvt[4];
-   } __attribute__((packed)) data;
-} __attribute__((packed));
+   } __packed data;
+} __packed;
 
 #define EDID_DETAIL_EST_TIMINGS 0xf7
 #define EDID_DETAIL_CVT_3BYTE 0xf8
@@ -181,8 +181,8 @@ struct detailed_timing {
union {
struct detailed_pixel_timing pixel_data;
struct detailed_non_pixel other_data;
-   } __attribute__((packed)) data;
-} __attribute__((packed));
+   } __packed data;
+} __packed;
 
 #define DRM_EDID_INPUT_SERRATION_VSYNC (1 << 0)
 #define DRM_EDID_INPUT_SYNC_ON_GREEN   (1 << 1)
@@ -307,7 +307,7 @@ struct edid {
u8 extensions;
/* Checksum */
u8 checksum;
-} __attribute__((packed));
+} __packed;
 
 #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8))
 
-- 
2.39.2



✗ Fi.CI.BAT: failure for drm/i915/display: Wait for PHY readiness not needed for disabling sequence (rev2)

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/i915/display: Wait for PHY readiness not needed for disabling 
sequence (rev2)
URL   : https://patchwork.freedesktop.org/series/127674/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14010 -> Patchwork_127674v2


Summary
---

  **FAILURE**

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

Participating hosts (31 -> 34)
--

  Additional (4): bat-dg2-9 fi-bsw-n3050 bat-mtlp-8 fi-pnv-d510 
  Missing(1): fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- bat-adlp-11:[PASS][1] -> [SKIP][2] +5 other tests skip
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127674v2/bat-adlp-11/igt@kms_cursor_leg...@basic-flip-after-cursor-atomic.html

  * igt@kms_pipe_crc_basic@read-crc:
- bat-adlp-11:NOTRUN -> [SKIP][3] +8 other tests skip
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127674v2/bat-adlp-11/igt@kms_pipe_crc_ba...@read-crc.html

  
 Warnings 

  * igt@kms_dsc@dsc-basic:
- bat-adlp-11:[SKIP][4] ([i915#3555] / [i915#3840]) -> [SKIP][5]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@kms_...@dsc-basic.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127674v2/bat-adlp-11/igt@kms_...@dsc-basic.html

  
Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- fi-bsw-n3050:   NOTRUN -> [FAIL][6] ([i915#8293])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127674v2/fi-bsw-n3050/boot.html

  

### IGT changes ###

 Issues hit 

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

  * igt@fbdev@info:
- bat-adlp-11:[PASS][8] -> [SKIP][9] ([i915#1849] / [i915#2582])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@info.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127674v2/bat-adlp-11/igt@fb...@info.html

  * igt@fbdev@nullptr:
- bat-adlp-11:[PASS][10] -> [SKIP][11] ([i915#2582]) +3 other tests 
skip
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14010/bat-adlp-11/igt@fb...@nullptr.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127674v2/bat-adlp-11/igt@fb...@nullptr.html

  * igt@gem_lmem_swapping@basic:
- fi-pnv-d510:NOTRUN -> [SKIP][12] ([fdo#109271]) +28 other tests 
skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127674v2/fi-pnv-d510/igt@gem_lmem_swapp...@basic.html

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

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

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

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

[PATCH v2] drm/i915/display: Wait for PHY readiness not needed for disabling sequence

2023-12-12 Thread Mika Kahola
When going through the disconnection flow we don't need to wait for PHY
readiness and hence we can skip the wait part. For disabling the function
returns false as an indicator that the power is not enabled. After all,
we are not even using the return value when Type-C is disconnecting.

v2: Cleanup for increased readibility (Imre)

BSpec: 65380

For VLK-53734

Signed-off-by: Mika Kahola 
---
 drivers/gpu/drm/i915/display/intel_tc.c | 25 -
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_tc.c 
b/drivers/gpu/drm/i915/display/intel_tc.c
index f64d348a969e..dcf05e00e505 100644
--- a/drivers/gpu/drm/i915/display/intel_tc.c
+++ b/drivers/gpu/drm/i915/display/intel_tc.c
@@ -1030,18 +1030,25 @@ static bool xelpdp_tc_phy_enable_tcss_power(struct 
intel_tc_port *tc, bool enabl
 
__xelpdp_tc_phy_enable_tcss_power(tc, enable);
 
-   if ((!tc_phy_wait_for_ready(tc) ||
-!xelpdp_tc_phy_wait_for_tcss_power(tc, enable)) &&
-   !drm_WARN_ON(>drm, tc->mode == TC_PORT_LEGACY)) {
-   if (enable) {
-   __xelpdp_tc_phy_enable_tcss_power(tc, false);
-   xelpdp_tc_phy_wait_for_tcss_power(tc, false);
-   }
+   if (enable && !tc_phy_wait_for_ready(tc))
+   goto out_disable;
 
-   return false;
-   }
+   if (!xelpdp_tc_phy_wait_for_tcss_power(tc, enable))
+   goto out_disable;
 
return true;
+
+out_disable:
+   if (drm_WARN_ON(>drm, tc->mode == TC_PORT_LEGACY))
+   return false;
+
+   if (!enable)
+   return false;
+
+   __xelpdp_tc_phy_enable_tcss_power(tc, false);
+   xelpdp_tc_phy_wait_for_tcss_power(tc, false);
+
+   return false;
 }
 
 static void xelpdp_tc_phy_take_ownership(struct intel_tc_port *tc, bool take)
-- 
2.34.1



Re: [PATCH v8 1/6] pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()

2023-12-12 Thread Uwe Kleine-König
On Tue, Dec 12, 2023 at 08:34:00AM +, Sean Young wrote:
> In order to introduce a pwm api which can be used from atomic context,
> we will need two functions for applying pwm changes:
> 
>   int pwm_apply_might_sleep(struct pwm *, struct pwm_state *);
>   int pwm_apply_atomic(struct pwm *, struct pwm_state *);
> 
> This commit just deals with renaming pwm_apply_state(), a following
> commit will introduce the pwm_apply_atomic() function.
> 
> Acked-by: Dmitry Torokhov  # for input
> Acked-by: Hans de Goede 
> Acked-by: Jani Nikula 
> Acked-by: Lee Jones 
> Signed-off-by: Sean Young 

Acked-by: Uwe Kleine-König 

Several affected maintainers already acked, so I guess it's fine to take
this via the pwm tree. An Ack from the remaining maintainers would be
very welcome, an alternative would be to split the patch.

Missing Acks so far:

 - Jean Delvare / Guenter Roeck for drivers/hwmon/pwm-fan.c
 - Javier Martinez Canillas for drivers/gpu/drm/solomon/ssd130x.c
 - Liam Girdwood / Mark Brown for drivers/regulator/pwm-regulator.c
 - Helge Deller for drivers/video/fbdev/ssd1307fb.c

Best regards
Uwe

-- 
Pengutronix e.K.   | Uwe Kleine-König|
Industrial Linux Solutions | https://www.pengutronix.de/ |


signature.asc
Description: PGP signature


✓ Fi.CI.IGT: success for drm/i915/display: Get bigjoiner config before dsc config during readout (rev3)

2023-12-12 Thread Patchwork
== Series Details ==

Series: drm/i915/display: Get bigjoiner config before dsc config during readout 
(rev3)
URL   : https://patchwork.freedesktop.org/series/126742/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14008_full -> Patchwork_126742v3_full


Summary
---

  **WARNING**

  Minor unknown changes coming with Patchwork_126742v3_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_126742v3_full, please notify your bug team 
(i915-ci-in...@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (7 -> 8)
--

  Additional (1): shard-glk-0 

Possible new issues
---

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

### IGT changes ###

 Warnings 

  * igt@gem_exec_balancer@bonded-sync:
- shard-dg2:  [SKIP][1] ([i915#4771]) -> [ABORT][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-dg2-5/igt@gem_exec_balan...@bonded-sync.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126742v3/shard-dg2-3/igt@gem_exec_balan...@bonded-sync.html

  * igt@i915_pm_rc6_residency@rc6-fence@gt0:
- shard-rkl:  [ABORT][3] ([i915#9855]) -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-rkl-5/igt@i915_pm_rc6_residency@rc6-fe...@gt0.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126742v3/shard-rkl-4/igt@i915_pm_rc6_residency@rc6-fe...@gt0.html

  
Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- shard-glk:  ([PASS][5], [PASS][6], [PASS][7], [PASS][8], 
[PASS][9], [PASS][10], [PASS][11], [PASS][12], [PASS][13], [PASS][14], 
[PASS][15], [PASS][16], [PASS][17], [PASS][18], [PASS][19], [PASS][20], 
[PASS][21], [PASS][22], [PASS][23], [PASS][24], [PASS][25], [PASS][26], 
[PASS][27], [PASS][28], [PASS][29]) -> ([PASS][30], [PASS][31], [PASS][32], 
[PASS][33], [PASS][34], [PASS][35], [PASS][36], [PASS][37], [PASS][38], 
[PASS][39], [PASS][40], [FAIL][41], [PASS][42], [PASS][43], [PASS][44], 
[PASS][45], [PASS][46], [PASS][47], [PASS][48], [PASS][49], [PASS][50], 
[PASS][51], [PASS][52], [PASS][53]) ([i915#8293])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk1/boot.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk2/boot.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk2/boot.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk2/boot.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk3/boot.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk3/boot.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk3/boot.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk3/boot.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk4/boot.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk4/boot.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk4/boot.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk4/boot.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk5/boot.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk5/boot.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk7/boot.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk7/boot.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk8/boot.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk8/boot.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk8/boot.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk8/boot.html
   [25]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk8/boot.html
   [26]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk9/boot.html
   [27]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk9/boot.html
   [28]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk9/boot.html
   [29]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14008/shard-glk9/boot.html
   [30]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126742v3/shard-glk9/boot.html
   [31]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126742v3/shard-glk9/boot.html
   [32]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126742v3/shard-glk9/boot.html
   [33]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_126742v3/shard-glk8/boot.html
   [34]: 

Re: [RFC] drm/i915: Allow dmabuf mmap forwarding

2023-12-12 Thread Tvrtko Ursulin



On 25/09/2023 14:16, Tvrtko Ursulin wrote:

From: Tvrtko Ursulin 

Allow mmap forwarding for imported buffers in order to allow minigbm mmap
to work on aperture-less platforms such as Meteorlake.

So far i915 did not allow mmap on imported buffers but from minigbm
perspective that worked because of the DRM_IOCTL_I915_GEM_MMAP_GTT fall-
back would then be attempted, and would be successful.

This stops working on Meteorlake since there is no aperture.

Allow i915 to mmap imported buffers using forwarding via dma_buf_mmap(),
which allows the primary minigbm path of DRM_IOCTL_I915_GEM_MMAP_OFFSET /
I915_MMAP_OFFSET_WB to work.

Signed-off-by: Tvrtko Ursulin 
Cc: Daniel Vetter 
Cc: Christian König 
Cc: Matthew Auld 
Cc: Nirmoy Das 
---
1)
It is unclear to me if any real userspace depends on this, but there are
certainly compliance suites which fail.

2)
It is also a bit unclear to me if dma_buf_mmap() is exactly intended for
this kind of use. It seems that it is, but I also found some old mailing
list discussions suggesting there might be some unresolved questions
around VMA revocation.

1 + 2 = RFC for now.

Daniel and Christian were involved in 2) in the past so comments would
be appreciated.


Any comments on this one? I don't have all the historical knowledge of 
when this was maybe attempted before and what problems were hit, or 
something. So would there be downsides or it is fine to forward it.


Regards,

Tvrtko



Test-with: 20230925131539.32743-1-tvrtko.ursu...@linux.intel.com

---
  drivers/gpu/drm/i915/gem/i915_gem_mman.c  | 78 +++
  .../gpu/drm/i915/gem/i915_gem_object_types.h  |  1 +
  2 files changed, 65 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c 
b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index aa4d842d4c5a..78c84c0a8b08 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -5,6 +5,7 @@
   */
  
  #include 

+#include 
  #include 
  #include 
  #include 
@@ -664,6 +665,7 @@ insert_mmo(struct drm_i915_gem_object *obj, struct 
i915_mmap_offset *mmo)
  static struct i915_mmap_offset *
  mmap_offset_attach(struct drm_i915_gem_object *obj,
   enum i915_mmap_type mmap_type,
+  bool forward_mmap,
   struct drm_file *file)
  {
struct drm_i915_private *i915 = to_i915(obj->base.dev);
@@ -682,6 +684,7 @@ mmap_offset_attach(struct drm_i915_gem_object *obj,
  
  	mmo->obj = obj;

mmo->mmap_type = mmap_type;
+   mmo->forward_mmap = forward_mmap;
drm_vma_node_reset(>vma_node);
  
  	err = drm_vma_offset_add(obj->base.dev->vma_offset_manager,

@@ -714,12 +717,25 @@ mmap_offset_attach(struct drm_i915_gem_object *obj,
return ERR_PTR(err);
  }
  
+static bool

+should_forward_mmap(struct drm_i915_gem_object *obj,
+   enum i915_mmap_type mmap_type)
+{
+   if (!obj->base.import_attach)
+   return false;
+
+   return mmap_type == I915_MMAP_TYPE_WB ||
+  mmap_type == I915_MMAP_TYPE_WC ||
+  mmap_type == I915_MMAP_TYPE_UC;
+}
+
  static int
  __assign_mmap_offset(struct drm_i915_gem_object *obj,
 enum i915_mmap_type mmap_type,
 u64 *offset, struct drm_file *file)
  {
struct i915_mmap_offset *mmo;
+   bool should_forward;
  
  	if (i915_gem_object_never_mmap(obj))

return -ENODEV;
@@ -735,12 +751,15 @@ __assign_mmap_offset(struct drm_i915_gem_object *obj,
if (mmap_type == I915_MMAP_TYPE_FIXED)
return -ENODEV;
  
+	should_forward = should_forward_mmap(obj, mmap_type);

+
if (mmap_type != I915_MMAP_TYPE_GTT &&
!i915_gem_object_has_struct_page(obj) &&
-   !i915_gem_object_has_iomem(obj))
+   !i915_gem_object_has_iomem(obj) &&
+   !should_forward)
return -ENODEV;
  
-	mmo = mmap_offset_attach(obj, mmap_type, file);

+   mmo = mmap_offset_attach(obj, mmap_type, should_forward, file);
if (IS_ERR(mmo))
return PTR_ERR(mmo);
  
@@ -936,6 +955,32 @@ static struct file *mmap_singleton(struct drm_i915_private *i915)

return file;
  }
  
+static void

+__vma_mmap_pgprot(struct vm_area_struct *vma, enum i915_mmap_type mmap_type)
+{
+   const pgprot_t pgprot =vm_get_page_prot(vma->vm_flags);
+
+   switch (mmap_type) {
+   case I915_MMAP_TYPE_WC:
+   vma->vm_page_prot = pgprot_writecombine(pgprot);
+   break;
+   case I915_MMAP_TYPE_FIXED:
+   GEM_WARN_ON(1);
+   fallthrough;
+   case I915_MMAP_TYPE_WB:
+   vma->vm_page_prot = pgprot;
+   break;
+   case I915_MMAP_TYPE_UC:
+   vma->vm_page_prot = pgprot_noncached(pgprot);
+   break;
+   case I915_MMAP_TYPE_GTT:
+   vma->vm_page_prot = pgprot_writecombine(pgprot);
+   break;
+   }
+
+   

RE: [PATCH] drm/i915/display: Wait for PHY readiness not needed for disabling sequence

2023-12-12 Thread Kahola, Mika
> -Original Message-
> From: Deak, Imre 
> Sent: Tuesday, December 12, 2023 12:08 PM
> To: Kahola, Mika 
> Cc: intel-gfx@lists.freedesktop.org
> Subject: Re: [PATCH] drm/i915/display: Wait for PHY readiness not needed for 
> disabling sequence
> 
> On Tue, Dec 12, 2023 at 11:55:20AM +0200, Mika Kahola wrote:
> > When going through the disconnection flow we don't need to wait for
> > PHY readiness and hence we can skip the wait part. For disabling the
> > function returns false as an indicator that the power is not enabled.
> > After all, we are not even using the return value when Type-C is 
> > disconnecting.
> >
> > BSpec: 65380
> >
> > Signed-off-by: Mika Kahola 
> > ---
> >  drivers/gpu/drm/i915/display/intel_tc.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_tc.c
> > b/drivers/gpu/drm/i915/display/intel_tc.c
> > index f64d348a969e..79ec17fa3edd 100644
> > --- a/drivers/gpu/drm/i915/display/intel_tc.c
> > +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> > @@ -1030,6 +1030,9 @@ static bool
> > xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool enabl
> >
> > __xelpdp_tc_phy_enable_tcss_power(tc, enable);
> >
> > +   if (!enable)
> > +   return false;
> 
> Waiting for xelpdp_tc_phy_wait_for_tcss_power(tc, false); is also needed in 
> the above case.

Ok. I would still keep this disabling part separate as if I combine this with 
existing if() the code looks a bit busy for me. 

Thanks!
Mika

> 
> > +
> > if ((!tc_phy_wait_for_ready(tc) ||
> >  !xelpdp_tc_phy_wait_for_tcss_power(tc, enable)) &&
> > !drm_WARN_ON(>drm, tc->mode == TC_PORT_LEGACY)) {
> > --
> > 2.34.1
> >


Re: [PATCH] drm/i915/display: Wait for PHY readiness not needed for disabling sequence

2023-12-12 Thread Imre Deak
On Tue, Dec 12, 2023 at 11:55:20AM +0200, Mika Kahola wrote:
> When going through the disconnection flow we don't need to wait for PHY
> readiness and hence we can skip the wait part. For disabling the function
> returns false as an indicator that the power is not enabled. After all,
> we are not even using the return value when Type-C is disconnecting.
> 
> BSpec: 65380
> 
> Signed-off-by: Mika Kahola 
> ---
>  drivers/gpu/drm/i915/display/intel_tc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_tc.c 
> b/drivers/gpu/drm/i915/display/intel_tc.c
> index f64d348a969e..79ec17fa3edd 100644
> --- a/drivers/gpu/drm/i915/display/intel_tc.c
> +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> @@ -1030,6 +1030,9 @@ static bool xelpdp_tc_phy_enable_tcss_power(struct 
> intel_tc_port *tc, bool enabl
>  
>   __xelpdp_tc_phy_enable_tcss_power(tc, enable);
>  
> + if (!enable)
> + return false;

Waiting for xelpdp_tc_phy_wait_for_tcss_power(tc, false); is also needed
in the above case.

> +
>   if ((!tc_phy_wait_for_ready(tc) ||
>!xelpdp_tc_phy_wait_for_tcss_power(tc, enable)) &&
>   !drm_WARN_ON(>drm, tc->mode == TC_PORT_LEGACY)) {
> -- 
> 2.34.1
> 


[PATCH] drm/i915/display: Wait for PHY readiness not needed for disabling sequence

2023-12-12 Thread Mika Kahola
When going through the disconnection flow we don't need to wait for PHY
readiness and hence we can skip the wait part. For disabling the function
returns false as an indicator that the power is not enabled. After all,
we are not even using the return value when Type-C is disconnecting.

BSpec: 65380

Signed-off-by: Mika Kahola 
---
 drivers/gpu/drm/i915/display/intel_tc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_tc.c 
b/drivers/gpu/drm/i915/display/intel_tc.c
index f64d348a969e..79ec17fa3edd 100644
--- a/drivers/gpu/drm/i915/display/intel_tc.c
+++ b/drivers/gpu/drm/i915/display/intel_tc.c
@@ -1030,6 +1030,9 @@ static bool xelpdp_tc_phy_enable_tcss_power(struct 
intel_tc_port *tc, bool enabl
 
__xelpdp_tc_phy_enable_tcss_power(tc, enable);
 
+   if (!enable)
+   return false;
+
if ((!tc_phy_wait_for_ready(tc) ||
 !xelpdp_tc_phy_wait_for_tcss_power(tc, enable)) &&
!drm_WARN_ON(>drm, tc->mode == TC_PORT_LEGACY)) {
-- 
2.34.1



RE: [Intel-gfx] [v2 1/2] drm/i915/display: Add support for darskscreen detection

2023-12-12 Thread Jani Nikula
On Tue, 12 Dec 2023, "Murthy, Arun R"  wrote:
>> -Original Message-
>> From: Intel-gfx  On Behalf Of Nemesa
>> Garg
>> Sent: Friday, October 27, 2023 3:24 PM
>> To: intel-gfx@lists.freedesktop.org
>> Subject: [Intel-gfx] [v2 1/2] drm/i915/display: Add support for darskscreen
>> detection
>> 
>> Darkscreen detection checks if all the pixels of the frame are less then or 
>> equal
>> to the comparision value. The comparision value is set to 256 i.e black. So 
>> upon
>> getting black pixels from the pipe, the dark screen detect bit is set and an 
>> error
>> message will be printed.
>> 
>> v2: Addressed review comments (Jani)
>> 
>> Signed-off-by: Nemesa Garg 
>> ---
>>  drivers/gpu/drm/i915/Makefile |  1 +
>>  .../gpu/drm/i915/display/intel_darkscreen.c   | 87 +++
>>  .../gpu/drm/i915/display/intel_darkscreen.h   | 26 ++
>>  .../drm/i915/display/intel_display_types.h|  2 +
>>  drivers/gpu/drm/i915/i915_reg.h   |  8 ++
>>  5 files changed, 124 insertions(+)
>>  create mode 100644 drivers/gpu/drm/i915/display/intel_darkscreen.c
>>  create mode 100644 drivers/gpu/drm/i915/display/intel_darkscreen.h
>> 
>> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
>> index 88b2bb005014..538d5a42f9e3 100644
>> --- a/drivers/gpu/drm/i915/Makefile
>> +++ b/drivers/gpu/drm/i915/Makefile
>> @@ -254,6 +254,7 @@ i915-y += \
>>  display/intel_crtc.o \
>>  display/intel_crtc_state_dump.o \
>>  display/intel_cursor.o \
>> +display/intel_darkscreen.o \
>>  display/intel_display.o \
>>  display/intel_display_driver.o \
>>  display/intel_display_irq.o \
>> diff --git a/drivers/gpu/drm/i915/display/intel_darkscreen.c
>> b/drivers/gpu/drm/i915/display/intel_darkscreen.c
>> new file mode 100644
>> index ..0be719c76c4e
>> --- /dev/null
>> +++ b/drivers/gpu/drm/i915/display/intel_darkscreen.c
>> @@ -0,0 +1,87 @@
>> +// SPDX-License-Identifier: MIT
>> +/*
>> + * Copyright © 2023 Intel Corporation
>> + *
>> + */
>> +
>> +#include "i915_reg.h"
>> +#include "intel_de.h"
>> +#include "intel_display_types.h"
>> +
>> +#define COLOR_DEPTH_6BPC 6
>> +#define COLOR_DEPTH_8BPC 8
>> +#define COLOR_DEPTH_10BPC 10
>> +#define COLOR_DEPTH_12BPC 12
>> +
>> +#define COMPARE_VALUE_6_BPC 4
>> +#define COMPARE_VALUE_8_BPC 16
>> +#define COMPARE_VALUE_10_BPC 64
>> +#define COMPARE_VALUE_12_BPC 256
>> +
>> +#define COMPARE_VALUE_CALCULATION_FACTOR 12
>> +
>> +/*
>> + * Checks the color format and compute the comapre value based on bpc.
>> + */
> Can we have this in proper kernel doc format?

IMO it's not necessary for rather simple internal functions like this.

But please use the imperative mood ("check", not "checks") and fix the
typos though.

>
>> +void intel_dark_screen_enable(struct intel_crtc_state *crtc_state) {
>> +enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
>> +struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
>> +struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
>> +u32 comparevalue;
>> +
>> +if (!crtc->dark_screen.enable)
>> +return;
>> +
>> +if (crtc_state->output_format != INTEL_OUTPUT_FORMAT_RGB)
>> +return;
> Better to have an error print saying not supported.
>
> Thanks and Regards,
> Arun R Murthy
> ---
>> +
>> +switch (crtc_state->pipe_bpp / 3) {
>> +case COLOR_DEPTH_6BPC:
>> +comparevalue = COMPARE_VALUE_6_BPC;
>> +break;
>> +case COLOR_DEPTH_8BPC:
>> +comparevalue = COMPARE_VALUE_8_BPC;
>> +break;
>> +case COLOR_DEPTH_10BPC:
>> +comparevalue = COMPARE_VALUE_10_BPC;
>> +break;
>> +case COLOR_DEPTH_12BPC:
>> +comparevalue = COMPARE_VALUE_12_BPC;
>> +break;
>> +default:
>> +drm_dbg(_priv->drm,
>> +"Bpc value is incorrect:%d\n",
>> +crtc_state->pipe_bpp / 3);
>> +return;
>> +}
>> +
>> +comparevalue = comparevalue <<
>> +(COMPARE_VALUE_CALCULATION_FACTOR - crtc_state-
>> >pipe_bpp / 3);
>> +
>> +intel_de_write(dev_priv, DARK_SCREEN(cpu_transcoder),
>> +   DARK_SCREEN_ENABLE | DARK_SCREEN_DETECT |
>> +   DARK_SCREEN_DONE |
>> DARK_SCREEN_COMPARE_VAL(comparevalue));
>> +
>> +intel_de_wait_for_set(dev_priv,
>> +  DARK_SCREEN(crtc->config->cpu_transcoder),
>> DARK_SCREEN_DONE,
>> +1);
>> +
>> +if (intel_de_read(dev_priv, DARK_SCREEN(crtc->config-
>> >cpu_transcoder)) &
>> +  DARK_SCREEN_DETECT) {
>> +drm_err(_priv->drm,
>> +"Dark Screen detected:%c\n",
>> +pipe_name(crtc->pipe));
>> +}
>> +
>> +intel_de_rmw(dev_priv, DARK_SCREEN(crtc->config->cpu_transcoder),
>> 1, DARK_SCREEN_DETECT |
>> + DARK_SCREEN_DONE);
>> +}
>> +
>> +void 

[PATCH v8 1/6] pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()

2023-12-12 Thread Sean Young
In order to introduce a pwm api which can be used from atomic context,
we will need two functions for applying pwm changes:

int pwm_apply_might_sleep(struct pwm *, struct pwm_state *);
int pwm_apply_atomic(struct pwm *, struct pwm_state *);

This commit just deals with renaming pwm_apply_state(), a following
commit will introduce the pwm_apply_atomic() function.

Acked-by: Dmitry Torokhov  # for input
Acked-by: Hans de Goede 
Acked-by: Jani Nikula 
Acked-by: Lee Jones 
Signed-off-by: Sean Young 
---
 Documentation/driver-api/pwm.rst  |  8 +++---
 MAINTAINERS   |  2 +-
 .../gpu/drm/i915/display/intel_backlight.c|  6 ++--
 drivers/gpu/drm/solomon/ssd130x.c |  2 +-
 drivers/hwmon/pwm-fan.c   |  8 +++---
 drivers/input/misc/da7280.c   |  4 +--
 drivers/input/misc/pwm-beeper.c   |  4 +--
 drivers/input/misc/pwm-vibra.c|  8 +++---
 drivers/leds/leds-pwm.c   |  2 +-
 drivers/leds/rgb/leds-pwm-multicolor.c|  4 +--
 drivers/media/rc/pwm-ir-tx.c  |  4 +--
 drivers/platform/x86/lenovo-yogabook.c|  2 +-
 drivers/pwm/core.c| 18 ++--
 drivers/pwm/pwm-twl-led.c |  2 +-
 drivers/pwm/pwm-vt8500.c  |  2 +-
 drivers/pwm/sysfs.c   | 10 +++
 drivers/regulator/pwm-regulator.c |  4 +--
 drivers/video/backlight/lm3630a_bl.c  |  2 +-
 drivers/video/backlight/lp855x_bl.c   |  2 +-
 drivers/video/backlight/pwm_bl.c  | 12 
 drivers/video/fbdev/ssd1307fb.c   |  2 +-
 include/linux/pwm.h   | 28 +--
 22 files changed, 68 insertions(+), 68 deletions(-)

diff --git a/Documentation/driver-api/pwm.rst b/Documentation/driver-api/pwm.rst
index bb264490a87a1..f1d8197c8c430 100644
--- a/Documentation/driver-api/pwm.rst
+++ b/Documentation/driver-api/pwm.rst
@@ -41,7 +41,7 @@ the getter, devm_pwm_get() and devm_fwnode_pwm_get(), also 
exist.
 
 After being requested, a PWM has to be configured using::
 
-   int pwm_apply_state(struct pwm_device *pwm, struct pwm_state *state);
+   int pwm_apply_might_sleep(struct pwm_device *pwm, struct pwm_state 
*state);
 
 This API controls both the PWM period/duty_cycle config and the
 enable/disable state.
@@ -57,13 +57,13 @@ If supported by the driver, the signal can be optimized, 
for example to improve
 EMI by phase shifting the individual channels of a chip.
 
 The pwm_config(), pwm_enable() and pwm_disable() functions are just wrappers
-around pwm_apply_state() and should not be used if the user wants to change
+around pwm_apply_might_sleep() and should not be used if the user wants to 
change
 several parameter at once. For example, if you see pwm_config() and
 pwm_{enable,disable}() calls in the same function, this probably means you
-should switch to pwm_apply_state().
+should switch to pwm_apply_might_sleep().
 
 The PWM user API also allows one to query the PWM state that was passed to the
-last invocation of pwm_apply_state() using pwm_get_state(). Note this is
+last invocation of pwm_apply_might_sleep() using pwm_get_state(). Note this is
 different to what the driver has actually implemented if the request cannot be
 satisfied exactly with the hardware in use. There is currently no way for
 consumers to get the actually implemented settings.
diff --git a/MAINTAINERS b/MAINTAINERS
index 97f51d5ec1cfd..c584805952209 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17576,7 +17576,7 @@ F:  drivers/video/backlight/pwm_bl.c
 F: include/dt-bindings/pwm/
 F: include/linux/pwm.h
 F: include/linux/pwm_backlight.h
-K: pwm_(config|apply_state|ops)
+K: pwm_(config|apply_might_sleep|ops)
 
 PXA GPIO DRIVER
 M: Robert Jarzmik 
diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c 
b/drivers/gpu/drm/i915/display/intel_backlight.c
index 2e8f17c045222..ff9b9918b0a13 100644
--- a/drivers/gpu/drm/i915/display/intel_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_backlight.c
@@ -274,7 +274,7 @@ static void ext_pwm_set_backlight(const struct 
drm_connector_state *conn_state,
struct intel_panel *panel = 
_intel_connector(conn_state->connector)->panel;
 
pwm_set_relative_duty_cycle(>backlight.pwm_state, level, 100);
-   pwm_apply_state(panel->backlight.pwm, >backlight.pwm_state);
+   pwm_apply_might_sleep(panel->backlight.pwm, 
>backlight.pwm_state);
 }
 
 static void
@@ -427,7 +427,7 @@ static void ext_pwm_disable_backlight(const struct 
drm_connector_state *old_conn
intel_backlight_set_pwm_level(old_conn_state, level);
 
panel->backlight.pwm_state.enabled = false;
-   pwm_apply_state(panel->backlight.pwm, >backlight.pwm_state);
+   pwm_apply_might_sleep(panel->backlight.pwm, 
>backlight.pwm_state);
 }
 
 void 

Re: [Intel-gfx] [drm-intel:drm-intel-gt-next] [drm/i915] [confidence: ] 9bb66c179f: assertion_failure

2023-12-12 Thread Oliver Sang
hi, Jani,

On Fri, Dec 08, 2023 at 11:59:43AM +0200, Jani Nikula wrote:
> On Thu, 07 Dec 2023, kernel test robot  wrote:
> > Hello,
> >
> > kernel test robot noticed "assertion_failure" on:
> >
> > commit: 9bb66c179f50e61df20ba13c9b34ca17d00b05fb ("drm/i915: Reserve some 
> > kernel space per vm")
> > git://anongit.freedesktop.org/drm-intel drm-intel-gt-next
> >
> > in testcase: igt
> 
> So the kernel test robot runs igt. I've seen a handful of reports over
> the years, but not a whole lot. If you run it even semi-regularly, I
> would have expected more. What's the deal here?

our team merges lots of linux kernel repo/tree in so-called hourly kernels,
tests these hourly kernels by 80+ tools (including igt) on various platforms,
if any failure found comparing to some good bases, we will trigger auto-bisect
to try to catpure fbc (first bad commit) and report. this is the reason you
see this report.

we cannot gurantee coverage since resource constraints, possible failures
in different stage such like merging, building, auto-bisect, and so on. this
means we could fail to capture some issues.

> 
> There's clearly overlap with what our CI is doing. Maybe better
> coordination would be useful? Especially wrt reporting. I'm not sure if
> anyone's going to track these mails.
> 
> Cc: Ewelina

for this case we just capture a assertion_failure upon
branch: drm-intel/drm-intel-gt-next
on a Commet Lake (with 16G memory). not sure if this is valuable to you,
say, for some legacy platform regression check?

we want to seek advices from you:
(1) if this is still useful, do you want us to limit the receivers of this kind
of report?
(2) or would you suggest there is no need for us to test below repo at all?
git://anongit.freedesktop.org/drm-intel

> 
> > version: igt-x86_64-0f075441-1_20230520
> 
> That's six months old and more than 1k commits behind. The results are
> going to be useless, I'm afraid.

got it. if you still want us to keep the test upon the repo, we would upgrade
igt to latest version.

> 
> 
> BR,
> Jani.
> 
>