✗ Fi.CI.BAT: failure for drm/i915/hdcp: Fail Repeater authentication if Type1 device not present (rev3)

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

Series: drm/i915/hdcp: Fail Repeater authentication if Type1 device not present 
(rev3)
URL   : https://patchwork.freedesktop.org/series/127414/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14024 -> Patchwork_127414v3


Summary
---

  **FAILURE**

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

Participating hosts (38 -> 17)
--

  ERROR: It appears as if the changes made in Patchwork_127414v3 prevented too 
many machines from booting.

  Missing(21): fi-apl-guc fi-snb-2520m bat-adlp-6 bat-rpls-3 fi-pnv-d510 
fi-blb-e6850 bat-rpls-2 fi-ilk-650 bat-adln-1 fi-ivb-3770 bat-jsl-3 bat-rplp-1 
fi-bsw-nick fi-kbl-7567u bat-dg1-7 bat-adlp-9 fi-cfl-8700k fi-glk-j4005 
bat-jsl-1 bat-mtlp-6 fi-cfl-8109u 


Changes
---

  No changes found


Build changes
-

  * Linux: CI_DRM_14024 -> Patchwork_127414v3

  CI-20190529: 20190529
  CI_DRM_14024: 525c53d6256c9c65884a28385351097e8aba6057 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7643: ced22f8bf4263ff395dc852c86b682e62a7a1c1b @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_127414v3: 525c53d6256c9c65884a28385351097e8aba6057 @ 
git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

15d0f2ecc770 drm/i915/hdcp: Fail Repeater authentication if Type1 device not 
present

== Logs ==

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


[PATCH] drm/i915/hdcp: Fail Repeater authentication if Type1 device not present

2023-12-14 Thread Suraj Kandpal
Fail repeater authentication step in case RX_INFO indicates
HDCP1.x or HDCP2.0/2.1 device is present downstream in repeater
topology and content type set by userspace is Type1.

--v2
-Fix build error.

--v3
-remove mst encoder check as branch device also act as repeater

Signed-off-by: Suraj Kandpal 
Reviewed-by: Ankit Nautiyal 
---
 drivers/gpu/drm/i915/display/intel_hdcp.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c 
b/drivers/gpu/drm/i915/display/intel_hdcp.c
index 39b3f7c0c77c..c264e443ffac 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -1633,6 +1633,12 @@ int hdcp2_authenticate_repeater_topology(struct 
intel_connector *connector)
!HDCP_2_2_HDCP1_DEVICE_CONNECTED(rx_info[1]) &&
!HDCP_2_2_HDCP_2_0_REP_CONNECTED(rx_info[1]);
 
+   if (!dig_port->hdcp_mst_type1_capable && hdcp->content_type) {
+   drm_dbg_kms(>drm,
+   "HDCP1.x or 2.0 Legacy Device Downstream\n");
+   return -EINVAL;
+   }
+
/* Converting and Storing the seq_num_v to local variable as DWORD */
seq_num_v =
drm_hdcp_be24_to_cpu((const u8 *)msgs.recvid_list.seq_num_v);
-- 
2.25.1



✗ Fi.CI.IGT: failure for drm/display/dp: Update the name of bit#4 of DPCD TEST_REQUEST

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

Series: drm/display/dp: Update the name of bit#4 of DPCD TEST_REQUEST
URL   : https://patchwork.freedesktop.org/series/127844/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14022_full -> Patchwork_127844v1_full


Summary
---

  **FAILURE**

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

  Additional (2): shard-snb-0 shard-glk-0 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@gem_exec_balancer@individual:
- shard-glk:  NOTRUN -> [INCOMPLETE][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127844v1/shard-glk4/igt@gem_exec_balan...@individual.html

  
 Warnings 

  * igt@gem_ctx_freq@sysfs@gt0:
- shard-dg1:  [INCOMPLETE][2] ([i915#9855]) -> [INCOMPLETE][3]
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-dg1-16/igt@gem_ctx_freq@sy...@gt0.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127844v1/shard-dg1-12/igt@gem_ctx_freq@sy...@gt0.html

  * igt@i915_pm_rps@engine-order:
- shard-snb:  [INCOMPLETE][4] ([i915#9847]) -> [INCOMPLETE][5] +1 
other test incomplete
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-snb5/igt@i915_pm_...@engine-order.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127844v1/shard-snb1/igt@i915_pm_...@engine-order.html
- shard-dg2:  [INCOMPLETE][6] ([i915#9847]) -> [INCOMPLETE][7]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-dg2-6/igt@i915_pm_...@engine-order.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127844v1/shard-dg2-5/igt@i915_pm_...@engine-order.html

  
Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- shard-glk:  ([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], [PASS][41], 
[PASS][42], [PASS][43], [PASS][44], [PASS][45], [PASS][46], [PASS][47], 
[PASS][48], [FAIL][49], [PASS][50], [PASS][51], [PASS][52], [PASS][53], 
[PASS][54], [PASS][55], [PASS][56], [PASS][57]) ([i915#8293])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk1/boot.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk1/boot.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk2/boot.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk2/boot.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk2/boot.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk2/boot.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk3/boot.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk3/boot.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk3/boot.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk3/boot.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk4/boot.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk4/boot.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk4/boot.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk5/boot.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk5/boot.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk6/boot.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk6/boot.html
   [25]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk6/boot.html
   [26]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk7/boot.html
   [27]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk8/boot.html
   [28]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk8/boot.html
   [29]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk8/boot.html
   [30]: 

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

2023-12-14 Thread Ville Syrjälä
On Thu, Dec 14, 2023 at 12:06:58PM +0100, Andrzej Hajda wrote:
> 
> 
> On 13.12.2023 17:13, Andrzej Hajda wrote:
> > On 13.12.2023 02:37, Patchwork wrote:
> >> *Patch Details*
> >> *Series:*    drm/i915: (stolen) memory region related fixes
> >> *URL:*    https://patchwork.freedesktop.org/series/127721/ 
> >> 
> >> *State:*    failure
> >> *Details:* 
> >> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v1/index.html 
> >> 
> >>
> >>
> >>   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:
> >>
> >>   o bat-mtlp-8: NOTRUN -> INCOMPLETE
> >> 
> >> 
> > 
> > 
> > This is due to overlapping initial fb's vma with GuC reserved area on 
> > MTL, see ggtt_reserve_guc_top.
> > 
> > My dirty quick_fix proposed:
> > @@ -143,6 +143,9 @@ initial_plane_vma(struct drm_i915_private *i915,
> >      if (IS_ERR(vma))
> >      goto err_obj;
> > 
> > +   if (base + size > GUC_GGTT_TOP)
> > +   base = min(base, GUC_GGTT_TOP) - size;
> > +
> >      pinctl = PIN_GLOBAL | PIN_OFFSET_FIXED | base;
> >      if (HAS_GMCH(i915))
> >      pinctl |= PIN_MAPPABLE;
> 
> 
> Copy/Paste Ville response for this proposition from another thread:
> 
> On 13.12.2023 17:03, Ville Syrjälä wrote:
>  >
>  > This is not a solution. The correct fix is either:
>  > 1. fix the guc code to not insist on a fixed chunk of the ggtt
>  >and instead allocate it normally like a good boy. It could
>  >still try to allocate as high as possible to ideally
>  >land in the GUC_GGTT_TOP range
> 
> This would be the best solution from initial plane PoV for sure, I am 
> not sure about GuC PoV.

I was going to submit a patch to simply change this to insert(PIN_HIGH)
as that is all that is needed from the GuC FW POV. And whether the
GOP framebuffer or the GuC FW lives there doesn't matter one bit,
both fit the bill of not needing to be accessed by the GuC.

But I suspect this function might be serving a double duty, despite
not saying so anywhere. Basically I think it's perhaps used as
a quick and dirty way to restrict everything below GUC_GGTT_TOP,
presumably because we don't otherwise restrict allocations
below that even if the GuC needs to access them.

So the insert(PIN_HIGH) approach could result in some troubles
iff the GOP framebuffer is preventing the uc_fw to be placed at
GUC_GGTT_TOP and we later free the GOP framebuffer (happens if
we find it unsuitable due to one reason or another). This opens
up a hole above GUC_GGTT_TOP again and something else could
get bound there.

Is my assumption about ggtt_reserve_guc_top() correct? And
if so do we know what are all the things the GuC needs to access
so that we could properly restrict those below GUC_GGTT_TOP
and get rid of this weird way of achieving that same result?

> 
>  >
>  > 2. relocate the display vma to a different part of the ggtt
> 
> I think this point is what I have proposed.
> 
>  >
>  >
>  > 1. should be far simpler by the looks of it, as 2. would involve:
>  > a) pinning the same object into two places in the ggtt simultanously
>  >I don't think we have support for that except for special ggtt views,
>  >and xe doesn't have even that (should we need this trick there as 
> well)
> 
> AFAIU the fb is not yet pinned in terms of kernel structures, so it 
> doesn't seems to be an issue.

Hmm. Yeah, I suppose we don't really care where in the ggtt the thing
is bound as we rewrite the PTEs anyway when we bind the vma. So
whether we bind it into its current place or not doesn't really
matter. Well, assuming we move the thing to a non-overlapping section
of the ggtt. Any overlap with the current positon would clobber the
currently used PTEs and cause display corruption.

If we did try this we'd also have to think 

✓ Fi.CI.BAT: success for drm/display/dp: Update the name of bit#4 of DPCD TEST_REQUEST

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

Series: drm/display/dp: Update the name of bit#4 of DPCD TEST_REQUEST
URL   : https://patchwork.freedesktop.org/series/127844/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14022 -> Patchwork_127844v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (38 -> 36)
--

  Additional (1): fi-pnv-d510 
  Missing(3): bat-rpls-2 fi-snb-2520m fi-bsw-n3050 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_huc_copy@huc-copy:
- fi-kbl-7567u:   NOTRUN -> [SKIP][1] ([fdo#109271] / [i915#2190])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127844v1/fi-kbl-7567u/igt@gem_huc_c...@huc-copy.html

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

  
 Possible fixes 

  * igt@i915_selftest@live@hangcheck:
- {bat-rpls-3}:   [DMESG-WARN][3] -> [PASS][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/bat-rpls-3/igt@i915_selftest@l...@hangcheck.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127844v1/bat-rpls-3/igt@i915_selftest@l...@hangcheck.html

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

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#7359]: https://gitlab.freedesktop.org/drm/intel/issues/7359
  [i915#8981]: https://gitlab.freedesktop.org/drm/intel/issues/8981


Build changes
-

  * Linux: CI_DRM_14022 -> Patchwork_127844v1

  CI-20190529: 20190529
  CI_DRM_14022: 87fdea3fd86a02e2e7855e372c0d3fb32e53e4e6 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7643: ced22f8bf4263ff395dc852c86b682e62a7a1c1b @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_127844v1: 87fdea3fd86a02e2e7855e372c0d3fb32e53e4e6 @ 
git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

a874d9af38d0 drm/display/dp: Update the name of bit#4 of DPCD TEST_REQUEST

== Logs ==

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


✗ Fi.CI.CHECKPATCH: warning for drm/display/dp: Update the name of bit#4 of DPCD TEST_REQUEST

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

Series: drm/display/dp: Update the name of bit#4 of DPCD TEST_REQUEST
URL   : https://patchwork.freedesktop.org/series/127844/
State : warning

== Summary ==

Error: dim checkpatch failed
684264b085bd drm/display/dp: Update the name of bit#4 of DPCD TEST_REQUEST
-:25: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'data == 
DP_TEST_PHY_TEST_CHANNEL_CODING_TYPE'
#25: FILE: drivers/gpu/drm/msm/dp/dp_link.c:667:
+   if (!data || (data == DP_TEST_PHY_TEST_CHANNEL_CODING_TYPE)) {

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




✗ Fi.CI.SPARSE: warning for drm/display/dp: Update the name of bit#4 of DPCD TEST_REQUEST

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

Series: drm/display/dp: Update the name of bit#4 of DPCD TEST_REQUEST
URL   : https://patchwork.freedesktop.org/series/127844/
State : warning

== Summary ==

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




Re: [PATCH] drm/i915: Add Wa_14019877138

2023-12-14 Thread Matt Roper
On Wed, Dec 13, 2023 at 12:16:12PM +0530, Haridhar Kalvala wrote:
> Enable Force Dispatch Ends Collection for DG2.
> 
> BSpec: 46001
> 
> Signed-off-by: Haridhar Kalvala 
> Reviewed-by: Matt Roper 

Applied to drm-intel-gt-next.  Thanks for the patch.


Matt

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

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


[PATCH] drm/display/dp: Update the name of bit#4 of DPCD TEST_REQUEST

2023-12-14 Thread Khaled Almahallawy
DP_TEST_LINK_FAUX_PATTERN is deprecated since DP1.3 Spec.
Update to the latest definition in DP2.1 spec to reflect its true
usage in the code.

Cc: Jani Nikula 
Cc: Rob Clark 
Cc: Abhinav Kumar 
Cc: Sean Paul 
Signed-off-by: Khaled Almahallawy 
---
 drivers/gpu/drm/msm/dp/dp_link.c | 2 +-
 include/drm/display/drm_dp.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_link.c b/drivers/gpu/drm/msm/dp/dp_link.c
index 98427d45e9a7..b7d16c1afb5a 100644
--- a/drivers/gpu/drm/msm/dp/dp_link.c
+++ b/drivers/gpu/drm/msm/dp/dp_link.c
@@ -664,7 +664,7 @@ static int dp_link_parse_request(struct dp_link_private 
*link)
return rlen;
}
 
-   if (!data || (data == DP_TEST_LINK_FAUX_PATTERN)) {
+   if (!data || (data == DP_TEST_PHY_TEST_CHANNEL_CODING_TYPE)) {
drm_dbg_dp(link->drm_dev, "link 0x%x not supported\n", data);
goto end;
}
diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h
index 3731828825bd..3ccbc9eb9289 100644
--- a/include/drm/display/drm_dp.h
+++ b/include/drm/display/drm_dp.h
@@ -807,7 +807,7 @@
 # define DP_TEST_LINK_VIDEO_PATTERN(1 << 1)
 # define DP_TEST_LINK_EDID_READ(1 << 2)
 # define DP_TEST_LINK_PHY_TEST_PATTERN (1 << 3) /* DPCD >= 1.1 */
-# define DP_TEST_LINK_FAUX_PATTERN (1 << 4) /* DPCD >= 1.2 */
+# define DP_TEST_PHY_TEST_CHANNEL_CODING_TYPE  (1 << 4)
 # define DP_TEST_LINK_AUDIO_PATTERN (1 << 5) /* DPCD >= 1.2 */
 # define DP_TEST_LINK_AUDIO_DISABLED_VIDEO  (1 << 6) /* DPCD >= 1.2 */
 
-- 
2.34.1



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

2023-12-14 Thread Sripada, Radhakrishna
HI Ville,

> -Original Message-
> From: Ville Syrjälä 
> Sent: Wednesday, December 13, 2023 6:03 PM
> To: Sripada, Radhakrishna 
> Cc: Joonas Lahtinen ; Das, Nirmoy
> ; intel-gfx@lists.freedesktop.org
> Subject: Re: [PATCH 04/12] drm/i915: Bypass LMEMBAR/GTTMMADR for MTL
> stolen memory access
> 
> On Wed, Dec 13, 2023 at 08:18:15PM +, Sripada, Radhakrishna wrote:
> > Hi Ville,
> >
> > +Nirmoy
> >
> > > -Original Message-
> > > From: Ville Syrjälä 
> > > Sent: Wednesday, December 13, 2023 1:30 AM
> > > To: Joonas Lahtinen 
> > > Cc: intel-gfx@lists.freedesktop.org; Sripada, Radhakrishna
> > > 
> > > Subject: Re: [PATCH 04/12] drm/i915: Bypass LMEMBAR/GTTMMADR for MTL
> > > stolen memory access
> > >
> > > On Wed, Dec 13, 2023 at 11:09:38AM +0200, Joonas Lahtinen wrote:
> > > > Quoting Ville Syrjala (2023-12-13 02:42:29)
> > > > > 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.
> > > >
> > > > Shouldn't this have a proper workaround number assigned?
> > >
> > > I think there are various numbers, half of which I couldn't even
> > > find in any database, and the other half I couldn't access for
> > > whatever reason. So dunno what situation really is apart from
> > > the firmware clearly implemening its part (since I can poke
> > > DSM/GSM directly without killing the machine).
> > >
> > > RK do you know what we should call this?
> > Nirmoy previously used Wa_22018444074 in [1].
> >
> > There were some associated issues Wa_13010847436 and Wa_14019519902
> > which Nirmoy quoted in [2].
> >
> > Wa_22018529850 is derived from Wa_22018444074, is targeting the latest Gop
> > driver change which is installed in bat-mtlp-8 hopefully it should help 
> > debug the
> issue further.
> >
> >
> > Regarding the patch itself,
> > Do we need to carve out the range from e820 the area around DSM if we can
> directly access the range from CPU
> > without the bar?
> 
> IIRC we dropped the early quirks on new platforms under the
> assumption that the BIOS no longer forgets to mark the DSM
> as not-RAM/whatever. I don't think anything should change
> there even when we are allowed direct CPU access.
> 
> But I don't recall if I double checked the e820 listing on
> the MTL I was using. I was able to direct access to both DSM
> and GSM for sure, and the address the GOP handed over to efifb
> also pointed directly to DSM.

Up until adl-p/rpl, the PCI config space had the mirror registers for the 
stolen memory
base and size, since the stolen meory is carved out of the available physical 
ram. Starting MTL
this was removed from pci config space due to the introduction of stolen lmem 
which should not
be cpu addressable aperture.

With the new gop driver allocating the FB memory in dram, should the e820 mark 
the FB area
as reserved for the system use? Do we still preserve the efifb after doing a 
memtest before loading the driver?

Thanks,
Radhakrishna(RK) Sripada 
> 
> >
> >
> > Thanks,
> > Radhakrishna(RK) Sripada
> > 1. https://patchwork.freedesktop.org/series/120683/
> > 2. https://patchwork.freedesktop.org/series/123329/
> >
> > >
> > > >
> > > > Regards, Joonas
> > > >
> > > > >
> > > > > 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;
> 

✓ Fi.CI.IGT: success for drm/i915: Replace kmap_atomic() with kmap_local_page() (rev3)

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

Series: drm/i915: Replace kmap_atomic() with kmap_local_page() (rev3)
URL   : https://patchwork.freedesktop.org/series/115769/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14022_full -> Patchwork_115769v3_full


Summary
---

  **WARNING**

  Minor unknown changes coming with Patchwork_115769v3_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_115769v3_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_115769v3_full:

### IGT changes ###

 Warnings 

  * igt@gem_ctx_freq@sysfs@gt0:
- shard-rkl:  [ABORT][1] ([i915#9847]) -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-rkl-3/igt@gem_ctx_freq@sy...@gt0.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115769v3/shard-rkl-1/igt@gem_ctx_freq@sy...@gt0.html
- shard-dg1:  [INCOMPLETE][3] ([i915#9855]) -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-dg1-16/igt@gem_ctx_freq@sy...@gt0.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115769v3/shard-dg1-17/igt@gem_ctx_freq@sy...@gt0.html

  * igt@i915_pm_rps@engine-order:
- shard-dg2:  [INCOMPLETE][5] ([i915#9847]) -> [INCOMPLETE][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-dg2-6/igt@i915_pm_...@engine-order.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115769v3/shard-dg2-10/igt@i915_pm_...@engine-order.html

  * igt@i915_pm_rps@fence-order:
- shard-snb:  [INCOMPLETE][7] ([i915#9847]) -> [INCOMPLETE][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-snb5/igt@i915_pm_...@fence-order.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115769v3/shard-snb4/igt@i915_pm_...@fence-order.html

  
Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- shard-glk:  ([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], [PASS][41], [PASS][42], 
[FAIL][43], [PASS][44], [PASS][45], [PASS][46], [PASS][47], [PASS][48], 
[PASS][49], [PASS][50], [PASS][51], [PASS][52], [PASS][53], [PASS][54], 
[PASS][55], [PASS][56], [PASS][57], [PASS][58]) ([i915#8293])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk1/boot.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk1/boot.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk2/boot.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk2/boot.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk2/boot.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk2/boot.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk3/boot.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk3/boot.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk3/boot.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk3/boot.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk4/boot.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk4/boot.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk4/boot.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk5/boot.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk5/boot.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk6/boot.html
   [25]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk6/boot.html
   [26]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk6/boot.html
   [27]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk7/boot.html
   [28]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk8/boot.html
   [29]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk8/boot.html
   [30]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/shard-glk8/boot.html
   [31]: 

✓ Fi.CI.BAT: success for drm/i915: Replace kmap_atomic() with kmap_local_page() (rev3)

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

Series: drm/i915: Replace kmap_atomic() with kmap_local_page() (rev3)
URL   : https://patchwork.freedesktop.org/series/115769/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14022 -> Patchwork_115769v3


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (38 -> 36)
--

  Additional (1): fi-pnv-d510 
  Missing(3): bat-mtlp-8 bat-adlp-6 fi-snb-2520m 

Known issues


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

### IGT changes ###

 Issues hit 

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

  
 Possible fixes 

  * igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-hdmi-a-2:
- fi-bsw-n3050:   [DMESG-WARN][2] ([i915#1982]) -> [PASS][3]
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14022/fi-bsw-n3050/igt@kms_pipe_crc_basic@suspend-read-...@pipe-c-hdmi-a-2.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115769v3/fi-bsw-n3050/igt@kms_pipe_crc_basic@suspend-read-...@pipe-c-hdmi-a-2.html

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

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982


Build changes
-

  * Linux: CI_DRM_14022 -> Patchwork_115769v3

  CI-20190529: 20190529
  CI_DRM_14022: 87fdea3fd86a02e2e7855e372c0d3fb32e53e4e6 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7643: ced22f8bf4263ff395dc852c86b682e62a7a1c1b @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_115769v3: 87fdea3fd86a02e2e7855e372c0d3fb32e53e4e6 @ 
git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

e4eca37c6638 drm/i915: Use kmap_local_page() in gem/i915_gem_execbuffer.c
7a38f4fc02a3 drm/i915: Use kmap_local_page() in i915_cmd_parser.c
ea9067eed123 drm/i915: Use memcpy_from_page() in gt/uc/intel_uc_fw.c
6b0c09456114 drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_context.c
7fc1e0e2c0e6 drm/i915: Use kmap_local_page() in 
gem/selftests/i915_gem_coherency.c
b3c77009b5a4 drm/i915: Use kmap_local_page() in gem/selftests/huge_pages.c
c07f4b45abea drm/i915: Use kmap_local_page() in gem/i915_gem_shmem.c
7d26dd6b5142 drm/i915: Use memcpy_[from/to]_page() in gem/i915_gem_pyhs.c
ca94dc81a037 drm/i915: Use kmap_local_page() in gem/i915_gem_object.c

== Logs ==

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


✗ Fi.CI.SPARSE: warning for drm/i915: Replace kmap_atomic() with kmap_local_page() (rev3)

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

Series: drm/i915: Replace kmap_atomic() with kmap_local_page() (rev3)
URL   : https://patchwork.freedesktop.org/series/115769/
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: Replace kmap_atomic() with kmap_local_page() (rev3)

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

Series: drm/i915: Replace kmap_atomic() with kmap_local_page() (rev3)
URL   : https://patchwork.freedesktop.org/series/115769/
State : warning

== Summary ==

Error: dim checkpatch failed
5089a4873acd drm/i915: Use kmap_local_page() in gem/i915_gem_object.c
-:39: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line 
(possible unwrapped commit description?)
#39: 
[1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com

-:63: ERROR:CODE_INDENT: code indent should use tabs where possible
#63: FILE: drivers/gpu/drm/i915/gem/i915_gem_object.c:506:
+^I  + offset_in_page(offset);$

total: 1 errors, 1 warnings, 0 checks, 20 lines checked
7b2fca2701ac drm/i915: Use memcpy_[from/to]_page() in gem/i915_gem_pyhs.c
-:39: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line 
(possible unwrapped commit description?)
#39: 
[1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com

total: 0 errors, 1 warnings, 0 checks, 34 lines checked
9f45f1946609 drm/i915: Use kmap_local_page() in gem/i915_gem_shmem.c
-:24: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line 
(possible unwrapped commit description?)
#24: 
[1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com

total: 0 errors, 1 warnings, 0 checks, 15 lines checked
db5545d1bfac drm/i915: Use kmap_local_page() in gem/selftests/huge_pages.c
-:36: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line 
(possible unwrapped commit description?)
#36: 
[1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com

total: 0 errors, 1 warnings, 0 checks, 22 lines checked
f29591541a73 drm/i915: Use kmap_local_page() in 
gem/selftests/i915_gem_coherency.c
-:37: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line 
(possible unwrapped commit description?)
#37: 
[1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com

total: 0 errors, 1 warnings, 0 checks, 48 lines checked
90cbc7415093 drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_context.c
-:38: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line 
(possible unwrapped commit description?)
#38: 
[1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com

total: 0 errors, 1 warnings, 0 checks, 30 lines checked
69a02c2cd306 drm/i915: Use memcpy_from_page() in gt/uc/intel_uc_fw.c
-:29: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line 
(possible unwrapped commit description?)
#29: 
[1]: 
https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com/T/#u

total: 0 errors, 1 warnings, 0 checks, 17 lines checked
0d4712b4d4a7 drm/i915: Use kmap_local_page() in i915_cmd_parser.c
-:34: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line 
(possible unwrapped commit description?)
#34: 
[1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com

total: 0 errors, 1 warnings, 0 checks, 13 lines checked
3b536da924e3 drm/i915: Use kmap_local_page() in gem/i915_gem_execbuffer.c
-:34: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line 
(possible unwrapped commit description?)
#34: 
[1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com

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




Re: [PATCH 2/7] drm/i915/display: Move colorimetry_support from intel_psr to intel_dp

2023-12-14 Thread Rodrigo Vivi
On Thu, Dec 14, 2023 at 01:48:33PM +0200, Jouni Högander wrote:
> Colorimetry support is not really a PSR specific thing. Move it to intel_dp
> struct and use it also when preparing vsc sdp for non-PSR case.
> 
> Signed-off-by: Jouni Högander 

Reviewed-by: Rodrigo Vivi 

> ---
>  drivers/gpu/drm/i915/display/intel_display_types.h |  3 ++-
>  drivers/gpu/drm/i915/display/intel_dp.c| 10 +++---
>  drivers/gpu/drm/i915/display/intel_psr.c   |  5 +
>  3 files changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h 
> b/drivers/gpu/drm/i915/display/intel_display_types.h
> index a9c9b6edcc25..1d1cc93625e1 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -1703,7 +1703,6 @@ struct intel_psr {
>   unsigned int busy_frontbuffer_bits;
>   bool sink_psr2_support;
>   bool link_standby;
> - bool colorimetry_support;
>   bool psr2_enabled;
>   bool psr2_sel_fetch_enabled;
>   bool psr2_sel_fetch_cff_enabled;
> @@ -1834,6 +1833,8 @@ struct intel_dp {
>  
>   /* When we last wrote the OUI for eDP */
>   unsigned long last_oui_write;
> +
> + bool colorimetry_support;
>  };
>  
>  enum lspcon_vendor {
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 3b2482bf683f..08c48a58aa4d 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2622,7 +2622,8 @@ static void intel_dp_compute_vsc_sdp(struct intel_dp 
> *intel_dp,
>   if (crtc_state->has_psr)
>   return;
>  
> - if (!intel_dp_needs_vsc_sdp(crtc_state, conn_state))
> + if (!intel_dp->colorimetry_support ||
> + !intel_dp_needs_vsc_sdp(crtc_state, conn_state))
>   return;
>  
>   crtc_state->infoframes.enable |= 
> intel_hdmi_infoframe_enable(DP_SDP_VSC);
> @@ -2639,7 +2640,7 @@ void intel_dp_compute_psr_vsc_sdp(struct intel_dp 
> *intel_dp,
>   vsc->sdp_type = DP_SDP_VSC;
>  
>   if (crtc_state->has_psr2) {
> - if (intel_dp->psr.colorimetry_support &&
> + if (intel_dp->colorimetry_support &&
>   intel_dp_needs_vsc_sdp(crtc_state, conn_state)) {
>   /* [PSR2, +Colorimetry] */
>   intel_dp_compute_vsc_colorimetry(crtc_state, conn_state,
> @@ -2654,7 +2655,7 @@ void intel_dp_compute_psr_vsc_sdp(struct intel_dp 
> *intel_dp,
>   vsc->length = 0xe;
>   }
>   } else if (crtc_state->has_panel_replay) {
> - if (intel_dp->psr.colorimetry_support &&
> + if (intel_dp->colorimetry_support &&
>   intel_dp_needs_vsc_sdp(crtc_state, conn_state)) {
>   /* [Panel Replay with colorimetry info] */
>   intel_dp_compute_vsc_colorimetry(crtc_state, conn_state,
> @@ -6527,6 +6528,9 @@ intel_dp_init_connector(struct intel_digital_port 
> *dig_port,
>   "HDCP init failed, skipping.\n");
>   }
>  
> + intel_dp->colorimetry_support =
> + intel_dp_get_colorimetry_status(intel_dp);
> +
>   intel_dp->frl.is_trained = false;
>   intel_dp->frl.trained_rate_gbps = 0;
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c 
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index 9d5dc3fb6f20..d9fffc802335 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -560,11 +560,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp)
>   if (intel_dp->psr_dpcd[0])
>   _psr_init_dpcd(intel_dp);
>  
> - if (intel_dp->psr.sink_psr2_support) {
> - intel_dp->psr.colorimetry_support =
> - intel_dp_get_colorimetry_status(intel_dp);
> + if (intel_dp->psr.sink_psr2_support)
>   intel_dp_get_su_granularity(intel_dp);
> - }
>  }
>  
>  static void hsw_psr_setup_aux(struct intel_dp *intel_dp)
> -- 
> 2.34.1
> 


Re: [PATCH 1/7] drm/i915/display: Remove intel_crtc_state->psr_vsc

2023-12-14 Thread Rodrigo Vivi
On Thu, Dec 14, 2023 at 01:48:32PM +0200, Jouni Högander wrote:
> There is no really need to have separate vsc for psr usage. Use
> intel_crtc_state->infoframes.vsc instead.

I was worried that this would mess with the regular dp path,
but then I noticed that that skips on has_psr, so

Reviewed-by: Rodrigo Vivi 

> 
> Signed-off-by: Jouni Högander 
> ---
>  drivers/gpu/drm/i915/display/intel_display_types.h | 1 -
>  drivers/gpu/drm/i915/display/intel_psr.c   | 4 ++--
>  2 files changed, 2 insertions(+), 3 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..a9c9b6edcc25 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -1220,7 +1220,6 @@ struct intel_crtc_state {
>   bool wm_level_disabled;
>   u32 dc3co_exitline;
>   u16 su_y_granularity;
> - struct drm_dp_vsc_sdp psr_vsc;
>  
>   /*
>* Frequence the dpll for the port should run at. Differs from the
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c 
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index b6e2e70e1290..9d5dc3fb6f20 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1380,7 +1380,7 @@ void intel_psr_compute_config(struct intel_dp *intel_dp,
>  
>   crtc_state->infoframes.enable |= 
> intel_hdmi_infoframe_enable(DP_SDP_VSC);
>   intel_dp_compute_psr_vsc_sdp(intel_dp, crtc_state, conn_state,
> -  _state->psr_vsc);
> +  _state->infoframes.vsc);
>  }
>  
>  void intel_psr_get_config(struct intel_encoder *encoder,
> @@ -1652,7 +1652,7 @@ static void intel_psr_enable_locked(struct intel_dp 
> *intel_dp,
>   drm_dbg_kms(_priv->drm, "Enabling PSR%s\n",
>   intel_dp->psr.psr2_enabled ? "2" : "1");
>  
> - intel_write_dp_vsc_sdp(encoder, crtc_state, _state->psr_vsc);
> + intel_write_dp_vsc_sdp(encoder, crtc_state, 
> _state->infoframes.vsc);
>   intel_snps_phy_update_psr_power_state(dev_priv, phy, true);
>   intel_psr_enable_sink(intel_dp);
>   intel_psr_enable_source(intel_dp, crtc_state);
> -- 
> 2.34.1
> 


✓ Fi.CI.IGT: success for VSC SDP rework

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

Series: VSC SDP rework
URL   : https://patchwork.freedesktop.org/series/127803/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14021_full -> Patchwork_127803v1_full


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (8 -> 8)
--

  No changes in participating hosts

Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- shard-rkl:  ([PASS][1], [PASS][2], [PASS][3], [PASS][4], 
[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], 
[FAIL][30], [PASS][31], [PASS][32], [PASS][33], [PASS][34], [PASS][35], 
[PASS][36], [PASS][37], [PASS][38], [PASS][39], [PASS][40], [PASS][41], 
[PASS][42], [PASS][43], [PASS][44], [PASS][45], [PASS][46], [PASS][47], 
[PASS][48]) ([i915#8293])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-7/boot.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-7/boot.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-7/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-6/boot.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-6/boot.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-6/boot.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-6/boot.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-5/boot.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-5/boot.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-5/boot.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-5/boot.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-4/boot.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-4/boot.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-4/boot.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-4/boot.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-3/boot.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-3/boot.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-3/boot.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-2/boot.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-1/boot.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-1/boot.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-1/boot.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14021/shard-rkl-1/boot.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-7/boot.html
   [25]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-7/boot.html
   [26]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-7/boot.html
   [27]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-7/boot.html
   [28]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-7/boot.html
   [29]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-6/boot.html
   [30]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-6/boot.html
   [31]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-6/boot.html
   [32]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-6/boot.html
   [33]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-5/boot.html
   [34]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-5/boot.html
   [35]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-5/boot.html
   [36]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-5/boot.html
   [37]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-4/boot.html
   [38]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-4/boot.html
   [39]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-4/boot.html
   [40]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-4/boot.html
   [41]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/shard-rkl-4/boot.html
   [42]: 

Re: [PATCH] drm/i915/guc: Change wa registers to MCR type

2023-12-14 Thread Matt Roper
On Thu, Dec 14, 2023 at 07:26:29AM +, Shuicheng Lin wrote:
> some of the wa registers are MCR registers, which has different
> read/write process with normal MMIO registers. As the MCR process
> also work for normal MMIO registers, change all wa registers to
> MCR process for simplicity.
> 
> Signed-off-by: Shuicheng Lin 
> Cc: Matt Roper 
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c 
> b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
> index 63724e17829a..7409d3255cb0 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
> @@ -377,8 +377,12 @@ static int guc_mmio_regset_init(struct temp_regset 
> *regset,
>   CCS_MASK(engine->gt))
>   ret |= GUC_MMIO_REG_ADD(gt, regset, GEN12_RCU_MODE, true);
>  
> + /* some of the wa registers are MCR regiters */
>   for (i = 0, wa = wal->list; i < wal->count; i++, wa++)
> - ret |= GUC_MMIO_REG_ADD(gt, regset, wa->reg, wa->masked_reg);
> + if (GRAPHICS_VER_FULL(engine->i915) >= IP_VER(12, 50))

The condition here doesn't really make sense.  MCR registers have
existed since gen8, so why are we doing this on graphics version 12.50
and higher?

It would be better to just make this conditional on whether the register
is actually an MCR register (and needs special steering) or not.


Matt

> + ret |= GUC_MCR_REG_ADD(gt, regset, wa->mcr_reg, 
> wa->masked_reg);
> + else
> + ret |= GUC_MMIO_REG_ADD(gt, regset, wa->reg, 
> wa->masked_reg);
>  
>   /* Be extra paranoid and include all whitelist registers. */
>   for (i = 0; i < RING_MAX_NONPRIV_SLOTS; i++)
> -- 
> 2.25.1
> 

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


Re: [PATCH v3 0/9] drm/i915: Replace kmap_atomic() with kmap_local_page()

2023-12-14 Thread Zhao Liu
On Thu, Dec 14, 2023 at 02:35:26PM +, Tvrtko Ursulin wrote:
> Date: Thu, 14 Dec 2023 14:35:26 +
> From: Tvrtko Ursulin 
> Subject: Re: [PATCH v3 0/9] drm/i915: Replace kmap_atomic() with
>  kmap_local_page()
> 
> 
> On 14/12/2023 13:45, Tvrtko Ursulin wrote:
> > 
> > Hi Zhao,
> > 
> > On 14/12/2023 13:19, Zhao Liu wrote:
> > > Hi maintainers,
> > > 
> > > Just kindly ping.
> > > May I ask if this refresh version could be merged into the next tree of
> > > the i915?
> > 
> > I certainly spotted your series last week or so but then it slipped my
> > mind to go through it. Should be able to go through it today or
> > tomorrow.
> 
> It all looks good to me. I only needed to queue a re-test in our CI since v3
> failed BAT, but pretty sure it wasn't at fault. Once I am satisfied with the
> results I will merge the series. Thanks for the cleanups and your patience!
> 
> Regards,
> 
> Tvrtko
> 

Thanks for your review!

Regards,
Zhao

> 
> > Regards,
> > 
> > Tvrtko
> > 
> > > 
> > > Thanks,
> > > Zhao
> > > 
> > > On Sun, Dec 03, 2023 at 09:29:38PM +0800, Zhao Liu wrote:
> > > > Date: Sun, 3 Dec 2023 21:29:38 +0800
> > > > From: Zhao Liu 
> > > > Subject: [PATCH v3 0/9] drm/i915: Replace kmap_atomic() with
> > > >   kmap_local_page()
> > > > X-Mailer: git-send-email 2.34.1
> > > > 
> > > > From: Zhao Liu 
> > > > 
> > > > Hi all,
> > > > 
> > > > I refreshed this v3 by rebasing v2 [1] on the commit 968f35f4ab1c
> > > > ("Merge tag 'v6.7-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/
> > > > cifs-2.6").
> > > > 
> > > > Based on the current code, I rechecked the substitutions in v2 and they
> > > > still stand and are valid, so no code change in v3.
> > > > 
> > > > Thanks for all the review! And sorry v2 was missed, I'll pay more
> > > > attention to this v3.
> > > > 
> > > > 
> > > > Purpose of This Patchset
> > > > 
> > > > 
> > > > The purpose of this pacthset is to replace all uses of kmap_atomic() in
> > > > i915 with kmap_local_page() because the use of kmap_atomic() is being
> > > > deprecated in favor of kmap_local_page()[2]. And 92b64bd (mm/highmem:
> > > > add notes about conversions from kmap{,_atomic}()) has declared the
> > > > deprecation of kmap_atomic().
> > > > 
> > > > 
> > > > Motivation for Deprecating kmap_atomic() and Using kmap_local_page()
> > > > 
> > > > 
> > > > The main difference between atomic and local mappings is that local
> > > > mappings doesn't disable page faults or preemption (the preemption is
> > > > disabled for !PREEMPT_RT case, otherwise it only disables migration).
> > > > 
> > > > With kmap_local_page(), we can avoid the often unwanted side effect of
> > > > unnecessary page faults and preemption disables.
> > > > 
> > > > 
> > > > Patch summary
> > > > =
> > > > 
> > > > Patch 1, 4-6 and 8-9 replace kmap_atomic()/kunmap_atomic() with
> > > >  kmap_local_page()/kunmap_local() directly. With these local
> > > >  mappings, the page faults and preemption are allowed.
> > > > 
> > > > Patch 2 and 7 use memcpy_from_page() and memcpy_to_page() to replace
> > > >  kmap_atomic()/kunmap_atomic(). These two variants of memcpy()
> > > >  are based on the local mapping, so page faults and preemption
> > > >  are also allowed in these two interfaces.
> > > > 
> > > > Patch 3 replaces kmap_atomic()/kunmap_atomic() with kmap_local_page()/
> > > >  kunmap_local() and also disable page fault since the
> > > > for special
> > > >  handling (pls see the commit message).
> > > > 
> > > > 
> > > > Reference
> > > > =
> > > > 
> > > > [1]: 
> > > > https://lore.kernel.org/all/20230329073220.3982460-1-zhao1@linux.intel.com/
> > > > [2]:
> > > > https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com
> > > > 
> > > > 
> > > > Thanks and Best Regards,
> > > > Zhao
> > > > 
> > > > ---
> > > > Changlog:
> > > > 
> > > > Changes since v2:
> > > > * Rebased on 968f35f4ab1c ("Merge tag 'v6.7-rc3-smb3-client-fixes' of
> > > >    git://git.samba.org/sfrench/cifs-2.6").
> > > > * Removed changelog (of v2) in commit message.
> > > > * Fixed typo in cover letter (Fabio).
> > > > * Added Reviewed-by tags from Ira and Fabio.
> > > > 
> > > > Changes since v1:
> > > > * Dropped hot plug related description in commit message since it has
> > > >    nothing to do with kmap_local_page().
> > > > * Emphasized the motivation for using kmap_local_page() in commit
> > > >    message.
> > > > * Rebased patch 1 on f47e630 (drm/i915/gem: Typecheck page lookups) to
> > > >    keep the "idx" variable of type pgoff_t here.
> > > > * Used memcpy_from_page() and memcpy_to_page() to replace
> > > >    kmap_local_page() + memcpy() in patch 2.
> > > > 
> > > > ---
> > > > Zhao Liu (9):
> > > >    drm/i915: Use kmap_local_page() in gem/i915_gem_object.c
> > > >    drm/i915: Use memcpy_[from/to]_page() in 

Re: [PATCH v3 0/9] drm/i915: Replace kmap_atomic() with kmap_local_page()

2023-12-14 Thread Tvrtko Ursulin



On 14/12/2023 13:45, Tvrtko Ursulin wrote:


Hi Zhao,

On 14/12/2023 13:19, Zhao Liu wrote:

Hi maintainers,

Just kindly ping.
May I ask if this refresh version could be merged into the next tree of
the i915?


I certainly spotted your series last week or so but then it slipped my 
mind to go through it. Should be able to go through it today or tomorrow.


It all looks good to me. I only needed to queue a re-test in our CI 
since v3 failed BAT, but pretty sure it wasn't at fault. Once I am 
satisfied with the results I will merge the series. Thanks for the 
cleanups and your patience!


Regards,

Tvrtko



Regards,

Tvrtko



Thanks,
Zhao

On Sun, Dec 03, 2023 at 09:29:38PM +0800, Zhao Liu wrote:

Date: Sun, 3 Dec 2023 21:29:38 +0800
From: Zhao Liu 
Subject: [PATCH v3 0/9] drm/i915: Replace kmap_atomic() with
  kmap_local_page()
X-Mailer: git-send-email 2.34.1

From: Zhao Liu 

Hi all,

I refreshed this v3 by rebasing v2 [1] on the commit 968f35f4ab1c
("Merge tag 'v6.7-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/
cifs-2.6").

Based on the current code, I rechecked the substitutions in v2 and they
still stand and are valid, so no code change in v3.

Thanks for all the review! And sorry v2 was missed, I'll pay more
attention to this v3.


Purpose of This Patchset


The purpose of this pacthset is to replace all uses of kmap_atomic() in
i915 with kmap_local_page() because the use of kmap_atomic() is being
deprecated in favor of kmap_local_page()[2]. And 92b64bd (mm/highmem:
add notes about conversions from kmap{,_atomic}()) has declared the
deprecation of kmap_atomic().


Motivation for Deprecating kmap_atomic() and Using kmap_local_page()


The main difference between atomic and local mappings is that local
mappings doesn't disable page faults or preemption (the preemption is
disabled for !PREEMPT_RT case, otherwise it only disables migration).

With kmap_local_page(), we can avoid the often unwanted side effect of
unnecessary page faults and preemption disables.


Patch summary
=

Patch 1, 4-6 and 8-9 replace kmap_atomic()/kunmap_atomic() with
 kmap_local_page()/kunmap_local() directly. With these local
 mappings, the page faults and preemption are allowed.

Patch 2 and 7 use memcpy_from_page() and memcpy_to_page() to replace
 kmap_atomic()/kunmap_atomic(). These two variants of memcpy()
 are based on the local mapping, so page faults and preemption
 are also allowed in these two interfaces.

Patch 3 replaces kmap_atomic()/kunmap_atomic() with kmap_local_page()/
 kunmap_local() and also disable page fault since the for 
special

 handling (pls see the commit message).


Reference
=

[1]: 
https://lore.kernel.org/all/20230329073220.3982460-1-zhao1@linux.intel.com/
[2]: 
https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com



Thanks and Best Regards,
Zhao

---
Changlog:

Changes since v2:
* Rebased on 968f35f4ab1c ("Merge tag 'v6.7-rc3-smb3-client-fixes' of
   git://git.samba.org/sfrench/cifs-2.6").
* Removed changelog (of v2) in commit message.
* Fixed typo in cover letter (Fabio).
* Added Reviewed-by tags from Ira and Fabio.

Changes since v1:
* Dropped hot plug related description in commit message since it has
   nothing to do with kmap_local_page().
* Emphasized the motivation for using kmap_local_page() in commit
   message.
* Rebased patch 1 on f47e630 (drm/i915/gem: Typecheck page lookups) to
   keep the "idx" variable of type pgoff_t here.
* Used memcpy_from_page() and memcpy_to_page() to replace
   kmap_local_page() + memcpy() in patch 2.

---
Zhao Liu (9):
   drm/i915: Use kmap_local_page() in gem/i915_gem_object.c
   drm/i915: Use memcpy_[from/to]_page() in gem/i915_gem_pyhs.c
   drm/i915: Use kmap_local_page() in gem/i915_gem_shmem.c
   drm/i915: Use kmap_local_page() in gem/selftests/huge_pages.c
   drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_coherency.c
   drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_context.c
   drm/i915: Use memcpy_from_page() in gt/uc/intel_uc_fw.c
   drm/i915: Use kmap_local_page() in i915_cmd_parser.c
   drm/i915: Use kmap_local_page() in gem/i915_gem_execbuffer.c

  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c   | 10 +-
  drivers/gpu/drm/i915/gem/i915_gem_object.c   |  8 +++-
  drivers/gpu/drm/i915/gem/i915_gem_phys.c | 10 ++
  drivers/gpu/drm/i915/gem/i915_gem_shmem.c    |  6 --
  drivers/gpu/drm/i915/gem/selftests/huge_pages.c  |  6 +++---
  .../gpu/drm/i915/gem/selftests/i915_gem_coherency.c  | 12 
  .../gpu/drm/i915/gem/selftests/i915_gem_context.c    |  8 
  drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c |  5 +
  drivers/gpu/drm/i915/i915_cmd_parser.c   |  4 ++--
  9 files changed, 28 insertions(+), 41 deletions(-)

--
2.34.1



✓ Fi.CI.BAT: success for VSC SDP rework

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

Series: VSC SDP rework
URL   : https://patchwork.freedesktop.org/series/127803/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14021 -> Patchwork_127803v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (38 -> 37)
--

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

Known issues


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

### CI changes ###

 Possible fixes 

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

  

### IGT changes ###

 Issues hit 

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

  * igt@gem_huc_copy@huc-copy:
- bat-jsl-1:  NOTRUN -> [SKIP][4] ([i915#2190])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/bat-jsl-1/igt@gem_huc_c...@huc-copy.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_127803v1/fi-pnv-d510/igt@gem_lmem_swapp...@basic.html

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

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

  * igt@kms_dsc@dsc-basic:
- bat-jsl-1:  NOTRUN -> [SKIP][8] ([i915#3555]) +1 other test skip
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/bat-jsl-1/igt@kms_...@dsc-basic.html

  * igt@kms_force_connector_basic@force-load-detect:
- bat-jsl-1:  NOTRUN -> [SKIP][9] ([fdo#109285])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/bat-jsl-1/igt@kms_force_connector_ba...@force-load-detect.html

  * igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-dg2-11: NOTRUN -> [SKIP][10] ([i915#9197]) +3 other tests skip
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127803v1/bat-dg2-11/igt@kms_pipe_crc_ba...@nonblocking-crc-frame-sequence.html

  
 Possible fixes 

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

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

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
  [i915#8293]: https://gitlab.freedesktop.org/drm/intel/issues/8293
  [i915#9197]: https://gitlab.freedesktop.org/drm/intel/issues/9197
  [i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318


Build changes
-

  * Linux: CI_DRM_14021 -> Patchwork_127803v1

  CI-20190529: 20190529
  CI_DRM_14021: 3358bace1b70e41bca852449df50287d5de0d446 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7640: 420d2b8d0d28af1708c41fff551576ec6e8d900a @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_127803v1: 3358bace1b70e41bca852449df50287d5de0d446 @ 
git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

0d1b9369de11 drm/i915/display: Take care of VSC select field in video dip ctl 
register
fd782b4fd248 drm/i915/display: Read PSR configuration before VSC SDP
87065525a092 drm/i915/display: Ignore only psr specific part of vsc sdp
10e66f44f852 drm/i915/display: Fix vsc_sdp computation
1ca2703381c0 drm/i915/display: Unify VSC SPD preparation
724a59251c87 drm/i915/display: Move colorimetry_support from intel_psr to 
intel_dp
b41000e4b4fd drm/i915/display: Remove 

✗ Fi.CI.SPARSE: warning for VSC SDP rework

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

Series: VSC SDP rework
URL   : https://patchwork.freedesktop.org/series/127803/
State : warning

== Summary ==

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

✗ Fi.CI.CHECKPATCH: warning for VSC SDP rework

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

Series: VSC SDP rework
URL   : https://patchwork.freedesktop.org/series/127803/
State : warning

== Summary ==

Error: dim checkpatch failed
44b69011f471 drm/i915/display: Remove intel_crtc_state->psr_vsc
80b416493849 drm/i915/display: Move colorimetry_support from intel_psr to 
intel_dp
a2f6d5640cfe drm/i915/display: Unify VSC SPD preparation
-:28: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#28: FILE: drivers/gpu/drm/i915/display/intel_dp.c:2622:
+   if ((!intel_dp->colorimetry_support ||
+   !intel_dp_needs_vsc_sdp(crtc_state, conn_state)) &&

total: 0 errors, 0 warnings, 1 checks, 104 lines checked
e278729c0558 drm/i915/display: Fix vsc_sdp computation
cef9d3489020 drm/i915/display: Ignore only psr specific part of vsc sdp
316d0040edf7 drm/i915/display: Read PSR configuration before VSC SDP
a17da34870d9 drm/i915/display: Take care of VSC select field in video dip ctl 
register




Re: [PATCH v3 0/9] drm/i915: Replace kmap_atomic() with kmap_local_page()

2023-12-14 Thread Tvrtko Ursulin



Hi Zhao,

On 14/12/2023 13:19, Zhao Liu wrote:

Hi maintainers,

Just kindly ping.
May I ask if this refresh version could be merged into the next tree of
the i915?


I certainly spotted your series last week or so but then it slipped my 
mind to go through it. Should be able to go through it today or tomorrow.


Regards,

Tvrtko



Thanks,
Zhao

On Sun, Dec 03, 2023 at 09:29:38PM +0800, Zhao Liu wrote:

Date: Sun, 3 Dec 2023 21:29:38 +0800
From: Zhao Liu 
Subject: [PATCH v3 0/9] drm/i915: Replace kmap_atomic() with
  kmap_local_page()
X-Mailer: git-send-email 2.34.1

From: Zhao Liu 

Hi all,

I refreshed this v3 by rebasing v2 [1] on the commit 968f35f4ab1c
("Merge tag 'v6.7-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/
cifs-2.6").

Based on the current code, I rechecked the substitutions in v2 and they
still stand and are valid, so no code change in v3.

Thanks for all the review! And sorry v2 was missed, I'll pay more
attention to this v3.


Purpose of This Patchset


The purpose of this pacthset is to replace all uses of kmap_atomic() in
i915 with kmap_local_page() because the use of kmap_atomic() is being
deprecated in favor of kmap_local_page()[2]. And 92b64bd (mm/highmem:
add notes about conversions from kmap{,_atomic}()) has declared the
deprecation of kmap_atomic().


Motivation for Deprecating kmap_atomic() and Using kmap_local_page()


The main difference between atomic and local mappings is that local
mappings doesn't disable page faults or preemption (the preemption is
disabled for !PREEMPT_RT case, otherwise it only disables migration).

With kmap_local_page(), we can avoid the often unwanted side effect of
unnecessary page faults and preemption disables.


Patch summary
=

Patch 1, 4-6 and 8-9 replace kmap_atomic()/kunmap_atomic() with
 kmap_local_page()/kunmap_local() directly. With these local
 mappings, the page faults and preemption are allowed.

Patch 2 and 7 use memcpy_from_page() and memcpy_to_page() to replace
 kmap_atomic()/kunmap_atomic(). These two variants of memcpy()
 are based on the local mapping, so page faults and preemption
 are also allowed in these two interfaces.

Patch 3 replaces kmap_atomic()/kunmap_atomic() with kmap_local_page()/
 kunmap_local() and also disable page fault since the for special
 handling (pls see the commit message).


Reference
=

[1]: 
https://lore.kernel.org/all/20230329073220.3982460-1-zhao1@linux.intel.com/
[2]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com


Thanks and Best Regards,
Zhao

---
Changlog:

Changes since v2:
* Rebased on 968f35f4ab1c ("Merge tag 'v6.7-rc3-smb3-client-fixes' of
   git://git.samba.org/sfrench/cifs-2.6").
* Removed changelog (of v2) in commit message.
* Fixed typo in cover letter (Fabio).
* Added Reviewed-by tags from Ira and Fabio.

Changes since v1:
* Dropped hot plug related description in commit message since it has
   nothing to do with kmap_local_page().
* Emphasized the motivation for using kmap_local_page() in commit
   message.
* Rebased patch 1 on f47e630 (drm/i915/gem: Typecheck page lookups) to
   keep the "idx" variable of type pgoff_t here.
* Used memcpy_from_page() and memcpy_to_page() to replace
   kmap_local_page() + memcpy() in patch 2.

---
Zhao Liu (9):
   drm/i915: Use kmap_local_page() in gem/i915_gem_object.c
   drm/i915: Use memcpy_[from/to]_page() in gem/i915_gem_pyhs.c
   drm/i915: Use kmap_local_page() in gem/i915_gem_shmem.c
   drm/i915: Use kmap_local_page() in gem/selftests/huge_pages.c
   drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_coherency.c
   drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_context.c
   drm/i915: Use memcpy_from_page() in gt/uc/intel_uc_fw.c
   drm/i915: Use kmap_local_page() in i915_cmd_parser.c
   drm/i915: Use kmap_local_page() in gem/i915_gem_execbuffer.c

  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c   | 10 +-
  drivers/gpu/drm/i915/gem/i915_gem_object.c   |  8 +++-
  drivers/gpu/drm/i915/gem/i915_gem_phys.c | 10 ++
  drivers/gpu/drm/i915/gem/i915_gem_shmem.c|  6 --
  drivers/gpu/drm/i915/gem/selftests/huge_pages.c  |  6 +++---
  .../gpu/drm/i915/gem/selftests/i915_gem_coherency.c  | 12 
  .../gpu/drm/i915/gem/selftests/i915_gem_context.c|  8 
  drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c |  5 +
  drivers/gpu/drm/i915/i915_cmd_parser.c   |  4 ++--
  9 files changed, 28 insertions(+), 41 deletions(-)

--
2.34.1



✗ Fi.CI.BUILD: failure for drm/xe: Add wait for completion after gt force reset

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

Series: drm/xe: Add wait for completion after gt force reset
URL   : https://patchwork.freedesktop.org/series/127796/
State : failure

== Summary ==

Error: patch 
https://patchwork.freedesktop.org/api/1.0/series/127796/revisions/1/mbox/ not 
applied
Applying: drm/xe: Add wait for completion after gt force reset
error: sha1 information is lacking or useless (drivers/gpu/drm/xe/xe_gt.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 drm/xe: Add wait for completion after gt force reset
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Build failed, no error log produced




Re: [PATCH v3 0/9] drm/i915: Replace kmap_atomic() with kmap_local_page()

2023-12-14 Thread Zhao Liu
Hi maintainers,

Just kindly ping.
May I ask if this refresh version could be merged into the next tree of
the i915?

Thanks,
Zhao

On Sun, Dec 03, 2023 at 09:29:38PM +0800, Zhao Liu wrote:
> Date: Sun, 3 Dec 2023 21:29:38 +0800
> From: Zhao Liu 
> Subject: [PATCH v3 0/9] drm/i915: Replace kmap_atomic() with
>  kmap_local_page()
> X-Mailer: git-send-email 2.34.1
> 
> From: Zhao Liu 
> 
> Hi all,
> 
> I refreshed this v3 by rebasing v2 [1] on the commit 968f35f4ab1c
> ("Merge tag 'v6.7-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/
> cifs-2.6").
> 
> Based on the current code, I rechecked the substitutions in v2 and they
> still stand and are valid, so no code change in v3.
> 
> Thanks for all the review! And sorry v2 was missed, I'll pay more
> attention to this v3.
> 
> 
> Purpose of This Patchset
> 
> 
> The purpose of this pacthset is to replace all uses of kmap_atomic() in
> i915 with kmap_local_page() because the use of kmap_atomic() is being
> deprecated in favor of kmap_local_page()[2]. And 92b64bd (mm/highmem:
> add notes about conversions from kmap{,_atomic}()) has declared the
> deprecation of kmap_atomic().
> 
> 
> Motivation for Deprecating kmap_atomic() and Using kmap_local_page()
> 
> 
> The main difference between atomic and local mappings is that local
> mappings doesn't disable page faults or preemption (the preemption is
> disabled for !PREEMPT_RT case, otherwise it only disables migration).
> 
> With kmap_local_page(), we can avoid the often unwanted side effect of
> unnecessary page faults and preemption disables.
> 
> 
> Patch summary
> =
> 
> Patch 1, 4-6 and 8-9 replace kmap_atomic()/kunmap_atomic() with
> kmap_local_page()/kunmap_local() directly. With these local
> mappings, the page faults and preemption are allowed.
> 
> Patch 2 and 7 use memcpy_from_page() and memcpy_to_page() to replace
> kmap_atomic()/kunmap_atomic(). These two variants of memcpy()
> are based on the local mapping, so page faults and preemption
> are also allowed in these two interfaces.
> 
> Patch 3 replaces kmap_atomic()/kunmap_atomic() with kmap_local_page()/
> kunmap_local() and also disable page fault since the for special
> handling (pls see the commit message).
> 
> 
> Reference
> =
> 
> [1]: 
> https://lore.kernel.org/all/20230329073220.3982460-1-zhao1@linux.intel.com/
> [2]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com
> 
> 
> Thanks and Best Regards,
> Zhao
> 
> ---
> Changlog:
> 
> Changes since v2:
> * Rebased on 968f35f4ab1c ("Merge tag 'v6.7-rc3-smb3-client-fixes' of
>   git://git.samba.org/sfrench/cifs-2.6").
> * Removed changelog (of v2) in commit message.
> * Fixed typo in cover letter (Fabio).
> * Added Reviewed-by tags from Ira and Fabio.
> 
> Changes since v1:
> * Dropped hot plug related description in commit message since it has
>   nothing to do with kmap_local_page().
> * Emphasized the motivation for using kmap_local_page() in commit
>   message.
> * Rebased patch 1 on f47e630 (drm/i915/gem: Typecheck page lookups) to
>   keep the "idx" variable of type pgoff_t here.
> * Used memcpy_from_page() and memcpy_to_page() to replace
>   kmap_local_page() + memcpy() in patch 2.
> 
> ---
> Zhao Liu (9):
>   drm/i915: Use kmap_local_page() in gem/i915_gem_object.c
>   drm/i915: Use memcpy_[from/to]_page() in gem/i915_gem_pyhs.c
>   drm/i915: Use kmap_local_page() in gem/i915_gem_shmem.c
>   drm/i915: Use kmap_local_page() in gem/selftests/huge_pages.c
>   drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_coherency.c
>   drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_context.c
>   drm/i915: Use memcpy_from_page() in gt/uc/intel_uc_fw.c
>   drm/i915: Use kmap_local_page() in i915_cmd_parser.c
>   drm/i915: Use kmap_local_page() in gem/i915_gem_execbuffer.c
> 
>  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c   | 10 +-
>  drivers/gpu/drm/i915/gem/i915_gem_object.c   |  8 +++-
>  drivers/gpu/drm/i915/gem/i915_gem_phys.c | 10 ++
>  drivers/gpu/drm/i915/gem/i915_gem_shmem.c|  6 --
>  drivers/gpu/drm/i915/gem/selftests/huge_pages.c  |  6 +++---
>  .../gpu/drm/i915/gem/selftests/i915_gem_coherency.c  | 12 
>  .../gpu/drm/i915/gem/selftests/i915_gem_context.c|  8 
>  drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c |  5 +
>  drivers/gpu/drm/i915/i915_cmd_parser.c   |  4 ++--
>  9 files changed, 28 insertions(+), 41 deletions(-)
> 
> -- 
> 2.34.1
> 


Re: [PATCH] drm/xe: Add wait for completion after gt force reset

2023-12-14 Thread Jani Nikula
On Thu, 14 Dec 2023, Karthik Poosa  wrote:
> Wait for gt reset to complete before returning from force_reset
> sysfs call. Without this igt test freq_reset_multiple fails
> sporadically in case xe_guc_pc is not started.

Please send xe changes to intel-xe mailing list.

Thanks,
Jani.

>
> Testcase: igt@xe_guc_pc@freq_reset_multiple
> Signed-off-by: Karthik Poosa 
> ---
>  drivers/gpu/drm/xe/xe_gt.c |  3 +++
>  drivers/gpu/drm/xe/xe_gt_debugfs.c | 10 ++
>  drivers/gpu/drm/xe/xe_gt_types.h   |  3 +++
>  3 files changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> index dfd9cf01a5d5..eb7552b6dfa5 100644
> --- a/drivers/gpu/drm/xe/xe_gt.c
> +++ b/drivers/gpu/drm/xe/xe_gt.c
> @@ -65,6 +65,7 @@ struct xe_gt *xe_gt_alloc(struct xe_tile *tile)
>  
>   gt->tile = tile;
>   gt->ordered_wq = alloc_ordered_workqueue("gt-ordered-wq", 0);
> + init_completion(>reset_done);
>  
>   return gt;
>  }
> @@ -647,6 +648,8 @@ static int gt_reset(struct xe_gt *gt)
>   xe_device_mem_access_put(gt_to_xe(gt));
>   XE_WARN_ON(err);
>  
> + complete(>reset_done);
> +
>   xe_gt_info(gt, "reset done\n");
>  
>   return 0;
> diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c 
> b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> index c4b67cf09f8f..49b30937a28b 100644
> --- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> @@ -23,6 +23,8 @@
>  #include "xe_uc_debugfs.h"
>  #include "xe_wa.h"
>  
> +#define XE_GT_RESET_TIMEOUT_MS   (msecs_to_jiffies(5*1000))
> +
>  static struct xe_gt *node_to_gt(struct drm_info_node *node)
>  {
>   return node->info_ent->data;
> @@ -58,9 +60,17 @@ static int hw_engines(struct seq_file *m, void *data)
>  static int force_reset(struct seq_file *m, void *data)
>  {
>   struct xe_gt *gt = node_to_gt(m->private);
> + struct xe_device *xe = gt_to_xe(gt);
> + unsigned long timeout;
>  
>   xe_gt_reset_async(gt);
>  
> + timeout = wait_for_completion_timeout(>reset_done, 
> XE_GT_RESET_TIMEOUT_MS);
> + if (timeout == 0) {
> + drm_err(>drm, "gt reset timed out");
> + return -ETIMEDOUT;
> + }
> +
>   return 0;
>  }
>  
> diff --git a/drivers/gpu/drm/xe/xe_gt_types.h 
> b/drivers/gpu/drm/xe/xe_gt_types.h
> index f74684660475..6f2fb9e3cfea 100644
> --- a/drivers/gpu/drm/xe/xe_gt_types.h
> +++ b/drivers/gpu/drm/xe/xe_gt_types.h
> @@ -358,6 +358,9 @@ struct xe_gt {
>   /** @oob: bitmap with active OOB workaroudns */
>   unsigned long *oob;
>   } wa_active;
> +
> + /** @reset_done : Completion of GT reset */
> + struct completion reset_done;
>  };
>  
>  #endif

-- 
Jani Nikula, Intel


[PATCH 6/7] drm/i915/display: Read PSR configuration before VSC SDP

2023-12-14 Thread Jouni Högander
VSC SDP sending is taken care by PSR HW and it's not enabled in
VIDEO_DIP_CTL when PSR is enabled. Readback of VSC SDP is depending on
VSC_SDP being set in intel_crtc_state->infoframes.enabled. In case of PSR
setting this flag is taken care by PSR code -> read back PSR configuration
before reading VSC SDP otherwise we get pipeconfig mismatch error.

Signed-off-by: Jouni Högander 
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c 
b/drivers/gpu/drm/i915/display/intel_ddi.c
index 12a29363e5df..2746655bcb26 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -3941,11 +3941,11 @@ static void intel_ddi_get_config(struct intel_encoder 
*encoder,
if (DISPLAY_VER(dev_priv) >= 8)
bdw_get_trans_port_sync_config(pipe_config);
 
+   intel_psr_get_config(encoder, pipe_config);
+
intel_read_dp_sdp(encoder, pipe_config, 
HDMI_PACKET_TYPE_GAMUT_METADATA);
intel_read_dp_sdp(encoder, pipe_config, DP_SDP_VSC);
 
-   intel_psr_get_config(encoder, pipe_config);
-
intel_audio_codec_get_config(encoder, pipe_config);
 }
 
-- 
2.34.1



[PATCH 7/7] drm/i915/display: Take care of VSC select field in video dip ctl register

2023-12-14 Thread Jouni Högander
We need to configure VSC Select field in video dip ctl if we want to have
e.g. colorimetry date in our VSC SDP.

Signed-off-by: Jouni Högander 
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c 
b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 39e4f5f7c817..eedef8121ff7 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -523,10 +523,12 @@ void hsw_write_infoframe(struct intel_encoder *encoder,
   0);
 
/* Wa_14013475917 */
-   if (IS_DISPLAY_VER(dev_priv, 13, 14) && crtc_state->has_psr && type == 
DP_SDP_VSC)
-   return;
+   if (!(IS_DISPLAY_VER(dev_priv, 13, 14) && crtc_state->has_psr && type 
== DP_SDP_VSC))
+   val |= hsw_infoframe_enable(type);
+
+   if (type == DP_SDP_VSC)
+   val |= VSC_DIP_HW_DATA_SW_HEA;
 
-   val |= hsw_infoframe_enable(type);
intel_de_write(dev_priv, ctl_reg, val);
intel_de_posting_read(dev_priv, ctl_reg);
 }
-- 
2.34.1



[PATCH 5/7] drm/i915/display: Ignore only psr specific part of vsc sdp

2023-12-14 Thread Jouni Högander
Pipe config check is currently ignoring vsc sdp changes completely
if psr is enabled. We want to ignore only PSR part of it as there
might be changes in colorimetry data. Also read back vsc_sdp when psr is
used.

Signed-off-by: Jouni Högander 
---
 drivers/gpu/drm/i915/display/intel_display.c | 9 ++---
 drivers/gpu/drm/i915/display/intel_dp.c  | 4 
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index f1e58163277d..0faf84d3680a 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4764,7 +4764,11 @@ static bool
 intel_compare_dp_vsc_sdp(const struct drm_dp_vsc_sdp *a,
 const struct drm_dp_vsc_sdp *b)
 {
-   return memcmp(a, b, sizeof(*a)) == 0;
+   return a->pixelformat == b->pixelformat &&
+   a->colorimetry == b->colorimetry &&
+   a->bpc == b->bpc &&
+   a->dynamic_range == b->dynamic_range &&
+   a->content_type == b->content_type;
 }
 
 static bool
@@ -5045,8 +5049,7 @@ intel_pipe_config_compare(const struct intel_crtc_state 
*current_config,
 } while (0)
 
 #define PIPE_CONF_CHECK_DP_VSC_SDP(name) do { \
-   if (!current_config->has_psr && !pipe_config->has_psr && \
-   !intel_compare_dp_vsc_sdp(_config->infoframes.name, \
+   if (!intel_compare_dp_vsc_sdp(_config->infoframes.name, \
  _config->infoframes.name)) { \
pipe_config_dp_vsc_sdp_mismatch(dev_priv, fastset, 
__stringify(name), \

_config->infoframes.name, \
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index 635790ec2fb7..b7e9b6eb6f66 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -4425,10 +4425,6 @@ static void intel_read_dp_vsc_sdp(struct intel_encoder 
*encoder,
struct dp_sdp sdp = {};
int ret;
 
-   /* When PSR is enabled, VSC SDP is handled by PSR routine */
-   if (crtc_state->has_psr)
-   return;
-
if ((crtc_state->infoframes.enable &
 intel_hdmi_infoframe_enable(type)) == 0)
return;
-- 
2.34.1



[PATCH 2/7] drm/i915/display: Move colorimetry_support from intel_psr to intel_dp

2023-12-14 Thread Jouni Högander
Colorimetry support is not really a PSR specific thing. Move it to intel_dp
struct and use it also when preparing vsc sdp for non-PSR case.

Signed-off-by: Jouni Högander 
---
 drivers/gpu/drm/i915/display/intel_display_types.h |  3 ++-
 drivers/gpu/drm/i915/display/intel_dp.c| 10 +++---
 drivers/gpu/drm/i915/display/intel_psr.c   |  5 +
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h 
b/drivers/gpu/drm/i915/display/intel_display_types.h
index a9c9b6edcc25..1d1cc93625e1 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1703,7 +1703,6 @@ struct intel_psr {
unsigned int busy_frontbuffer_bits;
bool sink_psr2_support;
bool link_standby;
-   bool colorimetry_support;
bool psr2_enabled;
bool psr2_sel_fetch_enabled;
bool psr2_sel_fetch_cff_enabled;
@@ -1834,6 +1833,8 @@ struct intel_dp {
 
/* When we last wrote the OUI for eDP */
unsigned long last_oui_write;
+
+   bool colorimetry_support;
 };
 
 enum lspcon_vendor {
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index 3b2482bf683f..08c48a58aa4d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2622,7 +2622,8 @@ static void intel_dp_compute_vsc_sdp(struct intel_dp 
*intel_dp,
if (crtc_state->has_psr)
return;
 
-   if (!intel_dp_needs_vsc_sdp(crtc_state, conn_state))
+   if (!intel_dp->colorimetry_support ||
+   !intel_dp_needs_vsc_sdp(crtc_state, conn_state))
return;
 
crtc_state->infoframes.enable |= 
intel_hdmi_infoframe_enable(DP_SDP_VSC);
@@ -2639,7 +2640,7 @@ void intel_dp_compute_psr_vsc_sdp(struct intel_dp 
*intel_dp,
vsc->sdp_type = DP_SDP_VSC;
 
if (crtc_state->has_psr2) {
-   if (intel_dp->psr.colorimetry_support &&
+   if (intel_dp->colorimetry_support &&
intel_dp_needs_vsc_sdp(crtc_state, conn_state)) {
/* [PSR2, +Colorimetry] */
intel_dp_compute_vsc_colorimetry(crtc_state, conn_state,
@@ -2654,7 +2655,7 @@ void intel_dp_compute_psr_vsc_sdp(struct intel_dp 
*intel_dp,
vsc->length = 0xe;
}
} else if (crtc_state->has_panel_replay) {
-   if (intel_dp->psr.colorimetry_support &&
+   if (intel_dp->colorimetry_support &&
intel_dp_needs_vsc_sdp(crtc_state, conn_state)) {
/* [Panel Replay with colorimetry info] */
intel_dp_compute_vsc_colorimetry(crtc_state, conn_state,
@@ -6527,6 +6528,9 @@ intel_dp_init_connector(struct intel_digital_port 
*dig_port,
"HDCP init failed, skipping.\n");
}
 
+   intel_dp->colorimetry_support =
+   intel_dp_get_colorimetry_status(intel_dp);
+
intel_dp->frl.is_trained = false;
intel_dp->frl.trained_rate_gbps = 0;
 
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c 
b/drivers/gpu/drm/i915/display/intel_psr.c
index 9d5dc3fb6f20..d9fffc802335 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -560,11 +560,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp)
if (intel_dp->psr_dpcd[0])
_psr_init_dpcd(intel_dp);
 
-   if (intel_dp->psr.sink_psr2_support) {
-   intel_dp->psr.colorimetry_support =
-   intel_dp_get_colorimetry_status(intel_dp);
+   if (intel_dp->psr.sink_psr2_support)
intel_dp_get_su_granularity(intel_dp);
-   }
 }
 
 static void hsw_psr_setup_aux(struct intel_dp *intel_dp)
-- 
2.34.1



[PATCH 4/7] drm/i915/display: Fix vsc_sdp computation

2023-12-14 Thread Jouni Högander
Currently colorimetry data is not added for psr1 or non-psr case.
Fix this by adding it as needed.

Signed-off-by: Jouni Högander 
---
 drivers/gpu/drm/i915/display/intel_dp.c | 48 ++---
 1 file changed, 19 insertions(+), 29 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index 3550cebb44f2..635790ec2fb7 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2628,36 +2628,26 @@ static void intel_dp_compute_vsc_sdp(struct intel_dp 
*intel_dp,
crtc_state->infoframes.enable |= 
intel_hdmi_infoframe_enable(DP_SDP_VSC);
vsc->sdp_type = DP_SDP_VSC;
 
-   if (crtc_state->has_psr2) {
-   if (intel_dp->colorimetry_support &&
-   intel_dp_needs_vsc_sdp(crtc_state, conn_state)) {
-   /* [PSR2, +Colorimetry] */
-   intel_dp_compute_vsc_colorimetry(crtc_state, conn_state,
-vsc);
-   } else {
-   /*
-* [PSR2, -Colorimetry]
-* Prepare VSC Header for SU as per eDP 1.4 spec, Table 
6-11
-* 3D stereo + PSR/PSR2 + Y-coordinate.
-*/
-   vsc->revision = 0x4;
-   vsc->length = 0xe;
-   }
+   /* Needs colorimetry */
+   if (intel_dp_needs_vsc_sdp(crtc_state, conn_state)) {
+   intel_dp_compute_vsc_colorimetry(crtc_state, conn_state,
+vsc);
+   } else if (crtc_state->has_psr2) {
+   /*
+* [PSR2, -Colorimetry]
+* Prepare VSC Header for SU as per eDP 1.4 spec, Table 6-11
+* 3D stereo + PSR/PSR2 + Y-coordinate.
+*/
+   vsc->revision = 0x4;
+   vsc->length = 0xe;
} else if (crtc_state->has_panel_replay) {
-   if (intel_dp->colorimetry_support &&
-   intel_dp_needs_vsc_sdp(crtc_state, conn_state)) {
-   /* [Panel Replay with colorimetry info] */
-   intel_dp_compute_vsc_colorimetry(crtc_state, conn_state,
-vsc);
-   } else {
-   /*
-* [Panel Replay without colorimetry info]
-* Prepare VSC Header for SU as per DP 2.0 spec, Table 
2-223
-* VSC SDP supporting 3D stereo + Panel Replay.
-*/
-   vsc->revision = 0x6;
-   vsc->length = 0x10;
-   }
+   /*
+* [Panel Replay without colorimetry info]
+* Prepare VSC Header for SU as per DP 2.0 spec, Table 2-223
+* VSC SDP supporting 3D stereo + Panel Replay.
+*/
+   vsc->revision = 0x6;
+   vsc->length = 0x10;
} else {
/*
 * [PSR1]
-- 
2.34.1



[PATCH 3/7] drm/i915/display: Unify VSC SPD preparation

2023-12-14 Thread Jouni Högander
There is no specific reason to prepare VSC SDP for PSR case somehow
differently. Unify PSR and non-PSR preparation.

Signed-off-by: Jouni Högander 
---
 drivers/gpu/drm/i915/display/intel_dp.c  | 43 
 drivers/gpu/drm/i915/display/intel_dp.h  |  7 
 drivers/gpu/drm/i915/display/intel_psr.c |  6 
 3 files changed, 6 insertions(+), 50 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index 08c48a58aa4d..3550cebb44f2 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2616,28 +2616,17 @@ static void intel_dp_compute_vsc_sdp(struct intel_dp 
*intel_dp,
 struct intel_crtc_state *crtc_state,
 const struct drm_connector_state 
*conn_state)
 {
-   struct drm_dp_vsc_sdp *vsc = _state->infoframes.vsc;
+   struct drm_dp_vsc_sdp *vsc;
 
-   /* When a crtc state has PSR, VSC SDP will be handled by PSR routine */
-   if (crtc_state->has_psr)
+   if ((!intel_dp->colorimetry_support ||
+   !intel_dp_needs_vsc_sdp(crtc_state, conn_state)) &&
+   !crtc_state->has_psr)
return;
 
-   if (!intel_dp->colorimetry_support ||
-   !intel_dp_needs_vsc_sdp(crtc_state, conn_state))
-   return;
+   vsc = _state->infoframes.vsc;
 
crtc_state->infoframes.enable |= 
intel_hdmi_infoframe_enable(DP_SDP_VSC);
vsc->sdp_type = DP_SDP_VSC;
-   intel_dp_compute_vsc_colorimetry(crtc_state, conn_state,
-_state->infoframes.vsc);
-}
-
-void intel_dp_compute_psr_vsc_sdp(struct intel_dp *intel_dp,
- const struct intel_crtc_state *crtc_state,
- const struct drm_connector_state *conn_state,
- struct drm_dp_vsc_sdp *vsc)
-{
-   vsc->sdp_type = DP_SDP_VSC;
 
if (crtc_state->has_psr2) {
if (intel_dp->colorimetry_support &&
@@ -4289,24 +4278,6 @@ static void intel_write_dp_sdp(struct intel_encoder 
*encoder,
dig_port->write_infoframe(encoder, crtc_state, type, , len);
 }
 
-void intel_write_dp_vsc_sdp(struct intel_encoder *encoder,
-   const struct intel_crtc_state *crtc_state,
-   const struct drm_dp_vsc_sdp *vsc)
-{
-   struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
-   struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-   struct dp_sdp sdp = {};
-   ssize_t len;
-
-   len = intel_dp_vsc_sdp_pack(vsc, , sizeof(sdp));
-
-   if (drm_WARN_ON(_priv->drm, len < 0))
-   return;
-
-   dig_port->write_infoframe(encoder, crtc_state, DP_SDP_VSC,
-   , len);
-}
-
 void intel_dp_set_infoframes(struct intel_encoder *encoder,
 bool enable,
 const struct intel_crtc_state *crtc_state,
@@ -4333,9 +4304,7 @@ void intel_dp_set_infoframes(struct intel_encoder 
*encoder,
if (!enable)
return;
 
-   /* When PSR is enabled, VSC SDP is handled by PSR routine */
-   if (!crtc_state->has_psr)
-   intel_write_dp_sdp(encoder, crtc_state, DP_SDP_VSC);
+   intel_write_dp_sdp(encoder, crtc_state, DP_SDP_VSC);
 
intel_write_dp_sdp(encoder, crtc_state, 
HDMI_PACKET_TYPE_GAMUT_METADATA);
 }
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h 
b/drivers/gpu/drm/i915/display/intel_dp.h
index 05db46b111f2..b911706d2e95 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -109,13 +109,6 @@ int intel_dp_max_data_rate(int max_link_rate, int 
max_lanes);
 bool intel_dp_can_bigjoiner(struct intel_dp *intel_dp);
 bool intel_dp_needs_vsc_sdp(const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state);
-void intel_dp_compute_psr_vsc_sdp(struct intel_dp *intel_dp,
- const struct intel_crtc_state *crtc_state,
- const struct drm_connector_state *conn_state,
- struct drm_dp_vsc_sdp *vsc);
-void intel_write_dp_vsc_sdp(struct intel_encoder *encoder,
-   const struct intel_crtc_state *crtc_state,
-   const struct drm_dp_vsc_sdp *vsc);
 void intel_dp_set_infoframes(struct intel_encoder *encoder, bool enable,
 const struct intel_crtc_state *crtc_state,
 const struct drm_connector_state *conn_state);
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c 
b/drivers/gpu/drm/i915/display/intel_psr.c
index d9fffc802335..494d08817d71 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1374,10 +1374,6 @@ void 

[PATCH 0/7] VSC SDP rework

2023-12-14 Thread Jouni Högander
Current VSC SDP configuration code is broken:

1. Driver configured header and data is not used at all
2. Colorimetry data is not added into VSC SDP if PSR1 is used

This patch set fixes these problems and makes VSC SDP configuration a
bit more simpler by unifying PSR and non-PSR cases.

Cc: shawn.c@intel.com

Jouni Högander (7):
  drm/i915/display: Remove intel_crtc_state->psr_vsc
  drm/i915/display: Move colorimetry_support from intel_psr to intel_dp
  drm/i915/display: Unify VSC SPD preparation
  drm/i915/display: Fix vsc_sdp computation
  drm/i915/display: Ignore only psr specific part of vsc sdp
  drm/i915/display: Read PSR configuration before VSC SDP
  drm/i915/display: Take care of VSC select field in video dip ctl
register

 drivers/gpu/drm/i915/display/intel_ddi.c  |  4 +-
 drivers/gpu/drm/i915/display/intel_display.c  |  9 +-
 .../drm/i915/display/intel_display_types.h|  4 +-
 drivers/gpu/drm/i915/display/intel_dp.c   | 97 ++-
 drivers/gpu/drm/i915/display/intel_dp.h   |  7 --
 drivers/gpu/drm/i915/display/intel_hdmi.c |  8 +-
 drivers/gpu/drm/i915/display/intel_psr.c  | 11 +--
 7 files changed, 44 insertions(+), 96 deletions(-)

-- 
2.34.1



[PATCH 1/7] drm/i915/display: Remove intel_crtc_state->psr_vsc

2023-12-14 Thread Jouni Högander
There is no really need to have separate vsc for psr usage. Use
intel_crtc_state->infoframes.vsc instead.

Signed-off-by: Jouni Högander 
---
 drivers/gpu/drm/i915/display/intel_display_types.h | 1 -
 drivers/gpu/drm/i915/display/intel_psr.c   | 4 ++--
 2 files changed, 2 insertions(+), 3 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..a9c9b6edcc25 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1220,7 +1220,6 @@ struct intel_crtc_state {
bool wm_level_disabled;
u32 dc3co_exitline;
u16 su_y_granularity;
-   struct drm_dp_vsc_sdp psr_vsc;
 
/*
 * Frequence the dpll for the port should run at. Differs from the
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c 
b/drivers/gpu/drm/i915/display/intel_psr.c
index b6e2e70e1290..9d5dc3fb6f20 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1380,7 +1380,7 @@ void intel_psr_compute_config(struct intel_dp *intel_dp,
 
crtc_state->infoframes.enable |= 
intel_hdmi_infoframe_enable(DP_SDP_VSC);
intel_dp_compute_psr_vsc_sdp(intel_dp, crtc_state, conn_state,
-_state->psr_vsc);
+_state->infoframes.vsc);
 }
 
 void intel_psr_get_config(struct intel_encoder *encoder,
@@ -1652,7 +1652,7 @@ static void intel_psr_enable_locked(struct intel_dp 
*intel_dp,
drm_dbg_kms(_priv->drm, "Enabling PSR%s\n",
intel_dp->psr.psr2_enabled ? "2" : "1");
 
-   intel_write_dp_vsc_sdp(encoder, crtc_state, _state->psr_vsc);
+   intel_write_dp_vsc_sdp(encoder, crtc_state, 
_state->infoframes.vsc);
intel_snps_phy_update_psr_power_state(dev_priv, phy, true);
intel_psr_enable_sink(intel_dp);
intel_psr_enable_source(intel_dp, crtc_state);
-- 
2.34.1



Re: [PATCH] drm/xe: Add wait for completion after gt force reset

2023-12-14 Thread Nilawar, Badal

I think title should be make sysfs  gt force reset synchronous.

On 14-12-2023 15:36, Karthik Poosa wrote:

Wait for gt reset to complete before returning from force_reset
sysfs call. Without this igt test freq_reset_multiple fails
sporadically in case xe_guc_pc is not started.

Testcase: igt@xe_guc_pc@freq_reset_multiple
Signed-off-by: Karthik Poosa 
---
  drivers/gpu/drm/xe/xe_gt.c |  3 +++
  drivers/gpu/drm/xe/xe_gt_debugfs.c | 10 ++
  drivers/gpu/drm/xe/xe_gt_types.h   |  3 +++
  3 files changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index dfd9cf01a5d5..eb7552b6dfa5 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -65,6 +65,7 @@ struct xe_gt *xe_gt_alloc(struct xe_tile *tile)
  
  	gt->tile = tile;

gt->ordered_wq = alloc_ordered_workqueue("gt-ordered-wq", 0);
+   init_completion(>reset_done);
  
  	return gt;

  }
@@ -647,6 +648,8 @@ static int gt_reset(struct xe_gt *gt)
xe_device_mem_access_put(gt_to_xe(gt));
XE_WARN_ON(err);
  
+	complete(>reset_done);

+
xe_gt_info(gt, "reset done\n");
  
  	return 0;

diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c 
b/drivers/gpu/drm/xe/xe_gt_debugfs.c
index c4b67cf09f8f..49b30937a28b 100644
--- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
@@ -23,6 +23,8 @@
  #include "xe_uc_debugfs.h"
  #include "xe_wa.h"
  
+#define XE_GT_RESET_TIMEOUT_MS	(msecs_to_jiffies(5*1000))

+
  static struct xe_gt *node_to_gt(struct drm_info_node *node)
  {
return node->info_ent->data;
@@ -58,9 +60,17 @@ static int hw_engines(struct seq_file *m, void *data)
  static int force_reset(struct seq_file *m, void *data)
  {
struct xe_gt *gt = node_to_gt(m->private);
+   struct xe_device *xe = gt_to_xe(gt);
+   unsigned long timeout;
  

This may not work when multiple processes tries gt reset simultaneously.
Check for reset in progress should be here.

Regards,
Badal

xe_gt_reset_async(gt);
  
+	timeout = wait_for_completion_timeout(>reset_done, XE_GT_RESET_TIMEOUT_MS);

+   if (timeout == 0) {
+   drm_err(>drm, "gt reset timed out");
+   return -ETIMEDOUT;
+   }
+
return 0;
  }
  
diff --git a/drivers/gpu/drm/xe/xe_gt_types.h b/drivers/gpu/drm/xe/xe_gt_types.h

index f74684660475..6f2fb9e3cfea 100644
--- a/drivers/gpu/drm/xe/xe_gt_types.h
+++ b/drivers/gpu/drm/xe/xe_gt_types.h
@@ -358,6 +358,9 @@ struct xe_gt {
/** @oob: bitmap with active OOB workaroudns */
unsigned long *oob;
} wa_active;
+
+   /** @reset_done : Completion of GT reset */
+   struct completion reset_done;
  };
  
  #endif


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

2023-12-14 Thread Andrzej Hajda




On 13.12.2023 17:13, Andrzej Hajda wrote:

On 13.12.2023 02:37, Patchwork wrote:

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


*State:*    failure
*Details:* 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127721v1/index.html 




  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:

  o bat-mtlp-8: NOTRUN -> INCOMPLETE





This is due to overlapping initial fb's vma with GuC reserved area on 
MTL, see ggtt_reserve_guc_top.


My dirty quick_fix proposed:
@@ -143,6 +143,9 @@ initial_plane_vma(struct drm_i915_private *i915,
     if (IS_ERR(vma))
     goto err_obj;

+   if (base + size > GUC_GGTT_TOP)
+   base = min(base, GUC_GGTT_TOP) - size;
+
     pinctl = PIN_GLOBAL | PIN_OFFSET_FIXED | base;
     if (HAS_GMCH(i915))
     pinctl |= PIN_MAPPABLE;



Copy/Paste Ville response for this proposition from another thread:

On 13.12.2023 17:03, Ville Syrjälä wrote:
>
> This is not a solution. The correct fix is either:
> 1. fix the guc code to not insist on a fixed chunk of the ggtt
>and instead allocate it normally like a good boy. It could
>still try to allocate as high as possible to ideally
>land in the GUC_GGTT_TOP range

This would be the best solution from initial plane PoV for sure, I am 
not sure about GuC PoV.


>
> 2. relocate the display vma to a different part of the ggtt

I think this point is what I have proposed.

>
>
> 1. should be far simpler by the looks of it, as 2. would involve:
> a) pinning the same object into two places in the ggtt simultanously
>I don't think we have support for that except for special ggtt views,
>and xe doesn't have even that (should we need this trick there as 
well)


AFAIU the fb is not yet pinned in terms of kernel structures, so it 
doesn't seems to be an issue.
Of course there is problem with PLANE_SURF still pointing to old VA, it 
should be replaced with new VA before ggtt will be populated with new stuff.


>
> b) flip the plane(s) over to the relocated vma
> c) wait for vblank(s)
> d) discard the original vma
> e) all of that would need to happen pretty early so we may not have
>a lot of the required normal machinery fully up and running yet

Async update to PLANE_SURF shouldn't be enough?

Regards
Andrzej


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

2023-12-14 Thread Jani Nikula
On Tue, 12 Dec 2023, Jani Nikula  wrote:
> __packed is preferred over __attribute__((packed)).
>
> Signed-off-by: Jani Nikula 

Pushed both to drm-misc-next with Simon's irc r-b.

Thanks,
Jani.


> ---
>  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))

-- 
Jani Nikula, Intel


✓ Fi.CI.IGT: success for drm/i915/guc: Change wa registers to MCR type (rev2)

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

Series: drm/i915/guc: Change wa registers to MCR type (rev2)
URL   : https://patchwork.freedesktop.org/series/127788/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14017_full -> Patchwork_127788v2_full


Summary
---

  **WARNING**

  Minor unknown changes coming with Patchwork_127788v2_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_127788v2_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 -> 7)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Warnings 

  * igt@i915_pm_rps@fence-order:
- shard-dg1:  [ABORT][1] ([i915#9855]) -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-dg1-13/igt@i915_pm_...@fence-order.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127788v2/shard-dg1-12/igt@i915_pm_...@fence-order.html

  
New tests
-

  New tests have been introduced between CI_DRM_14017_full and 
Patchwork_127788v2_full:

### New IGT tests (8) ###

  * igt@gem_exec_balancer@parallel:
- Statuses :
- Exec time: [None] s

  * igt@gem_exec_balancer@parallel-balancer:
- Statuses : 1 abort(s) 1 skip(s)
- Exec time: [0.0, 0.57] s

  * igt@gem_exec_balancer@parallel-bb-first:
- Statuses : 1 skip(s)
- Exec time: [0.0] s

  * igt@gem_exec_balancer@parallel-contexts:
- Statuses : 2 abort(s) 1 skip(s)
- Exec time: [0.0] s

  * igt@gem_exec_balancer@parallel-keep-in-fence:
- Statuses :
- Exec time: [None] s

  * igt@gem_exec_balancer@parallel-keep-submit-fence:
- Statuses :
- Exec time: [None] s

  * igt@gem_exec_balancer@parallel-ordering:
- Statuses :
- Exec time: [None] s

  * igt@gem_exec_balancer@parallel-out-fence:
- Statuses :
- Exec time: [None] s

  

Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- shard-rkl:  ([PASS][3], [PASS][4], [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], [FAIL][33], [PASS][34], [PASS][35], [PASS][36], 
[PASS][37], [PASS][38], [PASS][39], [PASS][40], [PASS][41], [PASS][42], 
[PASS][43], [PASS][44], [PASS][45], [PASS][46], [PASS][47], [PASS][48], 
[PASS][49], [PASS][50], [PASS][51]) ([i915#8293])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-7/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-7/boot.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-7/boot.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-7/boot.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-6/boot.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-6/boot.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-6/boot.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-5/boot.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-5/boot.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-5/boot.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-5/boot.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-5/boot.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-4/boot.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-4/boot.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-4/boot.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-4/boot.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-2/boot.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-2/boot.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-2/boot.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-2/boot.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-1/boot.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-1/boot.html
   [25]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-1/boot.html
   [26]: 

[PATCH] drm/xe: Add wait for completion after gt force reset

2023-12-14 Thread Karthik Poosa
Wait for gt reset to complete before returning from force_reset
sysfs call. Without this igt test freq_reset_multiple fails
sporadically in case xe_guc_pc is not started.

Testcase: igt@xe_guc_pc@freq_reset_multiple
Signed-off-by: Karthik Poosa 
---
 drivers/gpu/drm/xe/xe_gt.c |  3 +++
 drivers/gpu/drm/xe/xe_gt_debugfs.c | 10 ++
 drivers/gpu/drm/xe/xe_gt_types.h   |  3 +++
 3 files changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index dfd9cf01a5d5..eb7552b6dfa5 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -65,6 +65,7 @@ struct xe_gt *xe_gt_alloc(struct xe_tile *tile)
 
gt->tile = tile;
gt->ordered_wq = alloc_ordered_workqueue("gt-ordered-wq", 0);
+   init_completion(>reset_done);
 
return gt;
 }
@@ -647,6 +648,8 @@ static int gt_reset(struct xe_gt *gt)
xe_device_mem_access_put(gt_to_xe(gt));
XE_WARN_ON(err);
 
+   complete(>reset_done);
+
xe_gt_info(gt, "reset done\n");
 
return 0;
diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c 
b/drivers/gpu/drm/xe/xe_gt_debugfs.c
index c4b67cf09f8f..49b30937a28b 100644
--- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
@@ -23,6 +23,8 @@
 #include "xe_uc_debugfs.h"
 #include "xe_wa.h"
 
+#define XE_GT_RESET_TIMEOUT_MS (msecs_to_jiffies(5*1000))
+
 static struct xe_gt *node_to_gt(struct drm_info_node *node)
 {
return node->info_ent->data;
@@ -58,9 +60,17 @@ static int hw_engines(struct seq_file *m, void *data)
 static int force_reset(struct seq_file *m, void *data)
 {
struct xe_gt *gt = node_to_gt(m->private);
+   struct xe_device *xe = gt_to_xe(gt);
+   unsigned long timeout;
 
xe_gt_reset_async(gt);
 
+   timeout = wait_for_completion_timeout(>reset_done, 
XE_GT_RESET_TIMEOUT_MS);
+   if (timeout == 0) {
+   drm_err(>drm, "gt reset timed out");
+   return -ETIMEDOUT;
+   }
+
return 0;
 }
 
diff --git a/drivers/gpu/drm/xe/xe_gt_types.h b/drivers/gpu/drm/xe/xe_gt_types.h
index f74684660475..6f2fb9e3cfea 100644
--- a/drivers/gpu/drm/xe/xe_gt_types.h
+++ b/drivers/gpu/drm/xe/xe_gt_types.h
@@ -358,6 +358,9 @@ struct xe_gt {
/** @oob: bitmap with active OOB workaroudns */
unsigned long *oob;
} wa_active;
+
+   /** @reset_done : Completion of GT reset */
+   struct completion reset_done;
 };
 
 #endif
-- 
2.25.1



[PULL] drm-misc-next

2023-12-14 Thread Maxime Ripard
Hi,

Here's this week (and probably last for 6.8) drm-misc-next PR.

Thanks!
Maxime

drm-misc-next-2023-12-14:
drm-misc-next for $kernel-version:

UAPI Changes:

Cross-subsystem Changes:
 - A few fixes for usb/typec

Core Changes:
 - ci: Updates to the defconfig, igt version, etc.
 - writeback: Move the atomic_check helper from the encoder to connector

Driver Changes:
 - rockchip: Add support for rk3588
 - xe: Update the TODO list
 - panel:
   - nv3052c: Register documentation, init sequence improvements and
 support for the Fascontek FS035VG158
   - st7701: Add support for the Anbernic RG-ARC
   - new driver: Synaptics R63353 panel controller, Ilitek ILI9805 panel
 controller
   - new panel: AUO G156HAN04.0
The following changes since commit 90d50b8d85834e73536fdccd5aa913b30494fef0:

  drm/mipi-dsi: Fix detach call without attach (2023-12-07 09:22:47 +0200)

are available in the Git repository at:

  git://anongit.freedesktop.org/drm/drm-misc tags/drm-misc-next-2023-12-14

for you to fetch changes up to b1a2aa9bcbb88a7dc1c4df98dbf4f4df9ca79c9f:

  drm: ci: Update xfails (2023-12-13 15:18:30 -0300)


drm-misc-next for $kernel-version:

UAPI Changes:

Cross-subsystem Changes:
 - A few fixes for usb/typec

Core Changes:
 - ci: Updates to the defconfig, igt version, etc.
 - writeback: Move the atomic_check helper from the encoder to connector

Driver Changes:
 - rockchip: Add support for rk3588
 - xe: Update the TODO list
 - panel:
   - nv3052c: Register documentation, init sequence improvements and
 support for the Fascontek FS035VG158
   - st7701: Add support for the Anbernic RG-ARC
   - new driver: Synaptics R63353 panel controller, Ilitek ILI9805 panel
 controller
   - new panel: AUO G156HAN04.0


Alex Bee (1):
  drm/imagination: vm: Fix heap lookup condition

Andy Yan (13):
  drm/rockchip: move output interface related definition to 
rockchip_drm_drv.h
  Revert "drm/rockchip: vop2: Use regcache_sync() to fix suspend/resume"
  drm/rockchip: vop2: set half_block_en bit in all mode
  drm/rockchip: vop2: clear afbc en and transform bit for cluster window at 
linear mode
  drm/rockchip: vop2: Add write mask for VP config done
  drm/rockchip: vop2: Set YUV/RGB overlay mode
  drm/rockchip: vop2: set bg dly and prescan dly at vop2_post_config
  drm/rockchip: vop2: rename grf to sys_grf
  dt-bindings: display: vop2: Add rk3588 support
  dt-bindings: rockchip,vop2: Add more endpoint definition
  drm/rockchip: vop2: Add support for rk3588
  drm/rockchip: vop2: rename VOP_FEATURE_OUTPUT_10BIT to 
VOP2_VP_FEATURE_OUTPUT_10BIT
  MAINTAINERS: Add myself as a reviewer for rockchip drm

Chris Morgan (3):
  drm/panel: st7701: Fix AVCL calculation
  dt-bindings: display: st7701: Add Anbernic RG-ARC panel
  drm/panel: st7701: Add Anbernic RG-ARC Panel Support

Dan Carpenter (1):
  drm/imagination: Move dereference after NULL check in 
pvr_mmu_backing_page_init()

Dario Binacchi (2):
  drm/panel: synaptics-r63353: adjust the includes
  drm/panel: ilitek-ili9805: adjust the includes

Dmitry Baryshkov (2):
  drm/atomic-helper: rename drm_atomic_helper_check_wb_encoder_state
  drm/vkms: move wb's atomic_check from encoder to connector

Elmar Albert (2):
  dt-bindings: display: simple: Add AUO G156HAN04.0 LVDS display
  drm/panel: simple: Add AUO G156HAN04.0 LVDS display support

John Watts (7):
  drm/panel: nv3052c: Document known register names
  drm/panel: nv3052c: Add SPI device IDs
  drm/panel: nv3052c: Allow specifying registers per panel
  drm/panel: nv3052c: Add Fascontek FS035VG158 LCD display
  dt-bindings: display: panel: Clean up leadtek,ltk035c5444t properties
  dt-bindings: vendor-prefixes: Add fascontek
  dt-bindings: display: panel: add Fascontek FS035VG158 panel

Marek Szyprowski (1):
  drm/debugfs: fix potential NULL pointer dereference

Matthew Brost (1):
  drm/doc/rfc: Mark long running workload as complete.

Maxime Ripard (1):
  drm/vc4: hdmi: Create destroy state implementation

Michael Trimarchi (4):
  drm/panel: Add Synaptics R63353 panel driver
  dt-bindings: display: panel: Add Ilitek ili9805 panel controller
  drm/panel: Add Ilitek ILI9805 panel driver
  drm/panel: ilitek-ili9805: add support for Tianma TM041XDHG01 panel

Nathan Chancellor (3):
  usb: typec: nb7vpq904m: Only select DRM_AUX_BRIDGE with OF
  usb: typec: qcom-pmic-typec: Only select DRM_AUX_HPD_BRIDGE with OF
  drm/bridge: Return NULL instead of plain 0 in 
drm_dp_hpd_bridge_register() stub

Pin-yen Lin (1):
  drm/edp-panel: Move the KDC panel to a separate group

Randy Dunlap (3):
  drm/fourcc: fix spelling/typos
  drm/drm_modeset_helper_vtables.h: fix typos/spellos
  drm/uapi: drm_mode.h: fix spellos and grammar

Rob 

[PULL] drm-misc-fixes

2023-12-14 Thread Maarten Lankhorst

Hi Dave, Daniel,

Small fixes all over the place, one regression fix for master capability.

Cheers,
~Maarten

drm-misc-fixes-2023-12-14:
drm-misc-fixes for v6.7-rc6:
- Fix regression for checking if FD is master capable.
- Fix uninitialized variables in drm/crtc.
- Fix ivpu w/a.
- Refresh modes correctly when updating EDID.
- Small panel fixes.
The following changes since commit e0f04e41e8eedd4e5a1275f2318df7e1841855f2:

  drm/atomic-helpers: Invoke end_fb_access while owning plane state 
(2023-12-06 10:51:27 +0100)


are available in the Git repository at:

  git://anongit.freedesktop.org/drm/drm-misc tags/drm-misc-fixes-2023-12-14

for you to fetch changes up to 6c9dbee84cd005bed5f9d07b3a2797ae6414b435:

  drm/panel: ltk050h3146w: Set burst mode for ltk050h3148w (2023-12-13 
18:33:43 +0100)



drm-misc-fixes for v6.7-rc6:
- Fix regression for checking if FD is master capable.
- Fix uninitialized variables in drm/crtc.
- Fix ivpu w/a.
- Refresh modes correctly when updating EDID.
- Small panel fixes.


Andrzej Kacprowski (1):
  accel/ivpu/37xx: Fix interrupt_clear_with_0 WA initialization

David Heidelberg (1):
  dt-bindings: panel-simple-dsi: move LG 5" HD TFT LCD panel into 
DSI yaml


Farouk Bouabid (1):
  drm/panel: ltk050h3146w: Set burst mode for ltk050h3148w

Jani Nikula (2):
  drm/crtc: fix uninitialized variable use
  drm/edid: also call add modes in EDID connector update fallback

Lingkai Dong (1):
  drm: Fix FD ownership check in drm_master_check_perm()

Ziqi Zhao (1):
  drm/crtc: Fix uninit-value bug in drm_mode_setcrtc

 .../devicetree/bindings/display/panel/panel-simple-dsi.yaml  |  2 ++
 .../devicetree/bindings/display/panel/panel-simple.yaml  |  2 --
 drivers/accel/ivpu/ivpu_hw_37xx.c| 12 
+---

 drivers/gpu/drm/drm_auth.c   |  2 +-
 drivers/gpu/drm/drm_crtc.c   |  8 
 drivers/gpu/drm/drm_edid.c   |  3 ++-
 drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c   |  2 +-
 7 files changed, 19 insertions(+), 12 deletions(-)


✓ Fi.CI.BAT: success for drm/i915/guc: Change wa registers to MCR type (rev2)

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

Series: drm/i915/guc: Change wa registers to MCR type (rev2)
URL   : https://patchwork.freedesktop.org/series/127788/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14017 -> Patchwork_127788v2


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (37 -> 38)
--

  Additional (3): bat-dg2-8 bat-rpls-2 bat-kbl-2 
  Missing(2): fi-tgl-1115g4 fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Suppressed 

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

  * {igt@kms_psr@psr-primary-page-flip}:
- bat-rpls-2: NOTRUN -> [ABORT][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127788v2/bat-rpls-2/igt@kms_...@psr-primary-page-flip.html

  
New tests
-

  New tests have been introduced between CI_DRM_14017 and Patchwork_127788v2:

### New IGT tests (13) ###

  * igt@fbdev@eof:
- Statuses : 31 pass(s) 6 skip(s)
- Exec time: [0.0, 0.00] s

  * igt@fbdev@nullptr:
- Statuses : 31 pass(s) 6 skip(s)
- Exec time: [0.0] s

  * igt@fbdev@read:
- Statuses : 31 pass(s) 6 skip(s)
- Exec time: [0.0, 12.34] s

  * igt@fbdev@write:
- Statuses : 31 pass(s) 6 skip(s)
- Exec time: [0.0, 6.33] s

  * igt@gem_exec_suspend@basic-s0:
- Statuses :
- Exec time: [None] s

  * igt@gem_lmem_swapping@basic:
- Statuses : 26 skip(s)
- Exec time: [0.0] s

  * igt@gem_lmem_swapping@basic@lmem0:
- Statuses : 5 pass(s)
- Exec time: [13.62, 28.97] s

  * igt@gem_lmem_swapping@parallel-random-engines:
- Statuses : 26 skip(s)
- Exec time: [0.0] s

  * igt@gem_lmem_swapping@parallel-random-engines@lmem0:
- Statuses : 5 pass(s)
- Exec time: [31.46, 51.23] s

  * igt@gem_lmem_swapping@random-engines:
- Statuses : 26 skip(s)
- Exec time: [0.0] s

  * igt@gem_lmem_swapping@random-engines@lmem0:
- Statuses : 5 pass(s)
- Exec time: [0.47, 1.23] s

  * igt@gem_lmem_swapping@verify-random:
- Statuses : 26 skip(s)
- Exec time: [0.0] s

  * igt@gem_lmem_swapping@verify-random@lmem0:
- Statuses : 5 pass(s)
- Exec time: [6.64, 13.13] s

  

Known issues


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

### IGT changes ###

 Issues hit 

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

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

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

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

  * igt@gem_exec_suspend@basic-s3@smem:
- fi-rkl-11600:   [PASS][7] -> [FAIL][8] ([fdo#103375])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/fi-rkl-11600/igt@gem_exec_suspend@basic...@smem.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127788v2/fi-rkl-11600/igt@gem_exec_suspend@basic...@smem.html

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

  * igt@gem_lmem_swapping@random-engines (NEW):
- {bat-rpls-3}:   [SKIP][10] -> [SKIP][11] ([i915#4613]) +3 other tests 
skip
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/bat-rpls-3/igt@gem_lmem_swapp...@random-engines.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127788v2/bat-rpls-3/igt@gem_lmem_swapp...@random-engines.html

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

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

✓ Fi.CI.BAT: success for drm/i915/guc: Change wa registers to MCR type

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

Series: drm/i915/guc: Change wa registers to MCR type
URL   : https://patchwork.freedesktop.org/series/127788/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14017 -> Patchwork_127788v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (37 -> 37)
--

  Additional (2): bat-rpls-2 bat-kbl-2 
  Missing(2): bat-dg2-9 fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Suppressed 

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

  * {igt@kms_psr@psr-primary-page-flip}:
- bat-rpls-2: NOTRUN -> [ABORT][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127788v1/bat-rpls-2/igt@kms_...@psr-primary-page-flip.html

  
New tests
-

  New tests have been introduced between CI_DRM_14017 and Patchwork_127788v1:

### New IGT tests (13) ###

  * igt@fbdev@eof:
- Statuses : 30 pass(s) 5 skip(s)
- Exec time: [0.0, 0.00] s

  * igt@fbdev@nullptr:
- Statuses : 30 pass(s) 5 skip(s)
- Exec time: [0.0] s

  * igt@fbdev@read:
- Statuses : 30 pass(s) 5 skip(s)
- Exec time: [0.0, 9.45] s

  * igt@fbdev@write:
- Statuses : 30 pass(s) 5 skip(s)
- Exec time: [0.0, 6.33] s

  * igt@gem_exec_suspend@basic-s0:
- Statuses :
- Exec time: [None] s

  * igt@gem_lmem_swapping@basic:
- Statuses : 26 skip(s)
- Exec time: [0.0] s

  * igt@gem_lmem_swapping@basic@lmem0:
- Statuses : 3 pass(s)
- Exec time: [13.73, 29.67] s

  * igt@gem_lmem_swapping@parallel-random-engines:
- Statuses : 26 skip(s)
- Exec time: [0.0] s

  * igt@gem_lmem_swapping@parallel-random-engines@lmem0:
- Statuses : 3 pass(s)
- Exec time: [29.94, 51.25] s

  * igt@gem_lmem_swapping@random-engines:
- Statuses : 26 skip(s)
- Exec time: [0.0] s

  * igt@gem_lmem_swapping@random-engines@lmem0:
- Statuses : 3 pass(s)
- Exec time: [0.47, 1.31] s

  * igt@gem_lmem_swapping@verify-random:
- Statuses : 26 skip(s)
- Exec time: [0.0] s

  * igt@gem_lmem_swapping@verify-random@lmem0:
- Statuses : 3 pass(s)
- Exec time: [6.42, 12.32] s

  

Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- bat-adlp-11:[PASS][2] -> [FAIL][3] ([i915#8293])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/bat-adlp-11/boot.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127788v1/bat-adlp-11/boot.html

  

### IGT changes ###

 Issues hit 

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

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

  * igt@gem_exec_suspend@basic-s0@smem:
- bat-jsl-1:  [PASS][6] -> [INCOMPLETE][7] ([i915#9275])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/bat-jsl-1/igt@gem_exec_suspend@basic...@smem.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127788v1/bat-jsl-1/igt@gem_exec_suspend@basic...@smem.html

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

  * igt@gem_tiled_pread_basic:
- bat-rpls-2: NOTRUN -> [SKIP][9] ([i915#3282])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127788v1/bat-rpls-2/igt@gem_tiled_pread_basic.html

  * igt@i915_suspend@basic-s3-without-i915:
- bat-kbl-2:  NOTRUN -> [INCOMPLETE][10] ([i915#4817])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127788v1/bat-kbl-2/igt@i915_susp...@basic-s3-without-i915.html
- bat-jsl-1:  [PASS][11] -> [FAIL][12] ([fdo#103375])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/bat-jsl-1/igt@i915_susp...@basic-s3-without-i915.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127788v1/bat-jsl-1/igt@i915_susp...@basic-s3-without-i915.html

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

  * igt@kms_dsc@dsc-basic:
- 

Re: [PATCH 3/4] drm/ttm: improve idle/busy handling

2023-12-14 Thread kernel test robot
Hi Christian,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on drm-intel/for-linux-next 
drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.7-rc5 
next-20231214]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:
https://github.com/intel-lab-lkp/linux/commits/Christian-K-nig/drm-ttm-replace-busy-placement-with-flags-v3/20231213-224456
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:
https://lore.kernel.org/r/20231213144222.1871-3-christian.koenig%40amd.com
patch subject: [PATCH 3/4] drm/ttm: improve idle/busy handling
config: arm-defconfig 
(https://download.01.org/0day-ci/archive/20231214/202312141637.ciyxvfvl-...@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git 
f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20231214/202312141637.ciyxvfvl-...@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot 
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202312141637.ciyxvfvl-...@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/ttm/ttm_resource.c:301: warning: Function parameter or 
>> member 'busy' not described in 'ttm_resource_compatible'


vim +301 drivers/gpu/drm/ttm/ttm_resource.c

544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20  289  
544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20  290  /**
9909b7ee1d1561 Somalapuram Amaranath2023-12-13  291   * 
ttm_resource_compatible - check if resource is compatible with placement
544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20  292   *
9909b7ee1d1561 Somalapuram Amaranath2023-12-13  293   * @res: the resource 
to check
9909b7ee1d1561 Somalapuram Amaranath2023-12-13  294   * @placement: the 
placement to check against
544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20  295   *
9909b7ee1d1561 Somalapuram Amaranath2023-12-13  296   * Returns true if the 
placement is compatible.
544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20  297   */
9909b7ee1d1561 Somalapuram Amaranath2023-12-13  298  bool 
ttm_resource_compatible(struct ttm_resource *res,
1e59504faf5d28 Christian König  2023-12-13  299 
 struct ttm_placement *placement,
1e59504faf5d28 Christian König  2023-12-13  300 
 bool busy)
98cca519df6da6 Christian König  2021-08-30 @301  {
544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20  302 struct 
ttm_buffer_object *bo = res->bo;
544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20  303 struct 
ttm_device *bdev = bo->bdev;
98cca519df6da6 Christian König  2021-08-30  304 unsigned i;
98cca519df6da6 Christian König  2021-08-30  305  
98cca519df6da6 Christian König  2021-08-30  306 if 
(res->placement & TTM_PL_FLAG_TEMPORARY)
98cca519df6da6 Christian König  2021-08-30  307 return 
false;
98cca519df6da6 Christian König  2021-08-30  308  
9909b7ee1d1561 Somalapuram Amaranath2023-12-13  309 for (i = 0; i < 
placement->num_placement; i++) {
9909b7ee1d1561 Somalapuram Amaranath2023-12-13  310 const 
struct ttm_place *place = >placement[i];
9909b7ee1d1561 Somalapuram Amaranath2023-12-13  311 struct 
ttm_resource_manager *man;
9909b7ee1d1561 Somalapuram Amaranath2023-12-13  312  
9909b7ee1d1561 Somalapuram Amaranath2023-12-13  313 if 
(res->mem_type != place->mem_type)
9909b7ee1d1561 Somalapuram Amaranath2023-12-13  314 
continue;
98cca519df6da6 Christian König  2021-08-30  315  
1e59504faf5d28 Christian König  2023-12-13  316 if 
(place->flags & (busy ? TTM_PL_FLAG_IDLE : TTM_PL_FLAG_BUSY))
1e59504faf5d28 Christian König  2023-12-13  317 
continue;
1e59504faf5d28 Christian König  2023-12-13  318  
1e59504faf5d28 Christian König  2023-12-13  319 if 
(place->flags & TTM_PL_FLAG_CONTIGUOUS &&
1e59504faf5d28 Christian König  2023-12-13  320  
!(res->placement & TTM_PL_FLAG_CONTIGUOUS))
1e59504faf5d28 Christian König  2023-12-13  321 
continue;
1e59504faf5d28 Christian König  2023-12-13  322  
9909b7ee1d1561 Somalapuram Amaranath2023-12-13  323 man = 
ttm_manager_type(bdev, res->mem_type);
9909b7ee1d1561 Somalapuram Amaranath2023-12-13  324 if 
(ma

[PATCH] drm/i915/guc: Change wa registers to MCR type

2023-12-14 Thread Shuicheng Lin
some of the wa registers are MCR registers, which have different
read/write process with normal MMIO registers. As the MCR process
also work for normal MMIO registers, change all wa registers to
MCR process for simplicity.

Signed-off-by: Shuicheng Lin 
Cc: Matt Roper 
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
index 63724e17829a..5edf05401f08 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
@@ -377,8 +377,12 @@ static int guc_mmio_regset_init(struct temp_regset *regset,
CCS_MASK(engine->gt))
ret |= GUC_MMIO_REG_ADD(gt, regset, GEN12_RCU_MODE, true);
 
+   /* some of the wa registers are MCR registers */
for (i = 0, wa = wal->list; i < wal->count; i++, wa++)
-   ret |= GUC_MMIO_REG_ADD(gt, regset, wa->reg, wa->masked_reg);
+   if (GRAPHICS_VER_FULL(engine->i915) >= IP_VER(12, 50))
+   ret |= GUC_MCR_REG_ADD(gt, regset, wa->mcr_reg, 
wa->masked_reg);
+   else
+   ret |= GUC_MMIO_REG_ADD(gt, regset, wa->reg, 
wa->masked_reg);
 
/* Be extra paranoid and include all whitelist registers. */
for (i = 0; i < RING_MAX_NONPRIV_SLOTS; i++)
-- 
2.25.1