[Intel-gfx] [RFC 1/2] drm/i915: Add RPL-U sub platform

2023-01-16 Thread Chaitanya Kumar Borah
Separate out RPLU device ids and add them to both RPL and
newly created RPL-U subplatforms.

v2: (Matt)
- Sort PCI-IDs numerically
- Name the sub-platform to accurately depict what it is for
- Make RPL-U part of RPL subplatform

v3: revert to RPL-U subplatform (Jani)

Signed-off-by: Chaitanya Kumar Borah 
---
 drivers/gpu/drm/i915/i915_drv.h  |  2 ++
 drivers/gpu/drm/i915/i915_pci.c  |  1 +
 drivers/gpu/drm/i915/intel_device_info.c |  8 
 drivers/gpu/drm/i915/intel_device_info.h |  2 ++
 include/drm/i915_pciids.h| 11 +++
 5 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 48fd82722f12..c88e514728a0 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -619,6 +619,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
IS_SUBPLATFORM(dev_priv, INTEL_ALDERLAKE_P, INTEL_SUBPLATFORM_N)
 #define IS_ADLP_RPLP(dev_priv) \
IS_SUBPLATFORM(dev_priv, INTEL_ALDERLAKE_P, INTEL_SUBPLATFORM_RPL)
+#define IS_ADLP_RPLU(dev_priv) \
+   IS_SUBPLATFORM(dev_priv, INTEL_ALDERLAKE_P, INTEL_SUBPLATFORM_RPLU)
 #define IS_HSW_EARLY_SDV(dev_priv) (IS_HASWELL(dev_priv) && \
(INTEL_DEVID(dev_priv) & 0xFF00) == 0x0C00)
 #define IS_BDW_ULT(dev_priv) \
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 6cc65079b18d..e9f3b99b3e00 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -1234,6 +1234,7 @@ static const struct pci_device_id pciidlist[] = {
INTEL_DG1_IDS(_info),
INTEL_RPLS_IDS(_s_info),
INTEL_RPLP_IDS(_p_info),
+   INTEL_RPLU_IDS(_p_info),
INTEL_DG2_IDS(_info),
INTEL_ATS_M_IDS(_m_info),
INTEL_MTL_IDS(_info),
diff --git a/drivers/gpu/drm/i915/intel_device_info.c 
b/drivers/gpu/drm/i915/intel_device_info.c
index 849baf6c3b3c..fec8bd116436 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -199,6 +199,11 @@ static const u16 subplatform_n_ids[] = {
 static const u16 subplatform_rpl_ids[] = {
INTEL_RPLS_IDS(0),
INTEL_RPLP_IDS(0),
+   INTEL_RPLU_IDS(0)
+};
+
+static const u16 subplatform_rplu_ids[] = {
+   INTEL_RPLU_IDS(0),
 };
 
 static const u16 subplatform_g10_ids[] = {
@@ -268,6 +273,9 @@ static void intel_device_info_subplatform_init(struct 
drm_i915_private *i915)
} else if (find_devid(devid, subplatform_rpl_ids,
  ARRAY_SIZE(subplatform_rpl_ids))) {
mask = BIT(INTEL_SUBPLATFORM_RPL);
+   if (find_devid(devid, subplatform_rplu_ids,
+  ARRAY_SIZE(subplatform_rplu_ids)))
+   mask |= BIT(INTEL_SUBPLATFORM_RPLU);
} else if (find_devid(devid, subplatform_g10_ids,
  ARRAY_SIZE(subplatform_g10_ids))) {
mask = BIT(INTEL_SUBPLATFORM_G10);
diff --git a/drivers/gpu/drm/i915/intel_device_info.h 
b/drivers/gpu/drm/i915/intel_device_info.h
index d588e5fd2eea..4a5cd337e4b5 100644
--- a/drivers/gpu/drm/i915/intel_device_info.h
+++ b/drivers/gpu/drm/i915/intel_device_info.h
@@ -127,6 +127,8 @@ enum intel_platform {
  * bit set
  */
 #define INTEL_SUBPLATFORM_N1
+/* Sub Platform for RPL-U */
+#define INTEL_SUBPLATFORM_RPLU  2
 
 /* MTL */
 #define INTEL_SUBPLATFORM_M0
diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
index 4a4c190f7698..758be5fb09a2 100644
--- a/include/drm/i915_pciids.h
+++ b/include/drm/i915_pciids.h
@@ -684,14 +684,17 @@
INTEL_VGA_DEVICE(0xA78A, info), \
INTEL_VGA_DEVICE(0xA78B, info)
 
+/* RPL-U */
+#define INTEL_RPLU_IDS(info) \
+   INTEL_VGA_DEVICE(0xA721, info), \
+   INTEL_VGA_DEVICE(0xA7A1, info), \
+   INTEL_VGA_DEVICE(0xA7A9, info)
+
 /* RPL-P */
 #define INTEL_RPLP_IDS(info) \
INTEL_VGA_DEVICE(0xA720, info), \
-   INTEL_VGA_DEVICE(0xA721, info), \
INTEL_VGA_DEVICE(0xA7A0, info), \
-   INTEL_VGA_DEVICE(0xA7A1, info), \
-   INTEL_VGA_DEVICE(0xA7A8, info), \
-   INTEL_VGA_DEVICE(0xA7A9, info)
+   INTEL_VGA_DEVICE(0xA7A8, info)
 
 /* DG2 */
 #define INTEL_DG2_G10_IDS(info) \
-- 
2.25.1



[Intel-gfx] [RFC 2/2] drm/i915/display: Add 480 MHz CDCLK steps for RPL-U

2023-01-16 Thread Chaitanya Kumar Borah
A new step of 480MHz has been added on SKUs that have a RPL-U
device id to support 120Hz displays more efficiently. Use a
new quirk to identify the machine for which this change needs
to be applied.

BSpec: 55409

v2: (Matt)
- Add missing clock steps
- Correct reference clock typo

v3: - Revert to RPL-U subplatform

Signed-off-by: Chaitanya Kumar Borah 
---
 drivers/gpu/drm/i915/display/intel_cdclk.c | 27 ++
 1 file changed, 27 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c 
b/drivers/gpu/drm/i915/display/intel_cdclk.c
index 0c107a38f9d0..a5e3497534f3 100644
--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
@@ -1329,6 +1329,30 @@ static const struct intel_cdclk_vals adlp_cdclk_table[] 
= {
{}
 };
 
+static const struct intel_cdclk_vals rplu_cdclk_table[] = {
+   { .refclk = 19200, .cdclk = 172800, .divider = 3, .ratio = 27 },
+   { .refclk = 19200, .cdclk = 192000, .divider = 2, .ratio = 20 },
+   { .refclk = 19200, .cdclk = 307200, .divider = 2, .ratio = 32 },
+   { .refclk = 19200, .cdclk = 48, .divider = 2, .ratio = 50 },
+   { .refclk = 19200, .cdclk = 556800, .divider = 2, .ratio = 58 },
+   { .refclk = 19200, .cdclk = 652800, .divider = 2, .ratio = 68 },
+
+   { .refclk = 24000, .cdclk = 176000, .divider = 3, .ratio = 22 },
+   { .refclk = 24000, .cdclk = 192000, .divider = 2, .ratio = 16 },
+   { .refclk = 24000, .cdclk = 312000, .divider = 2, .ratio = 26 },
+   { .refclk = 24000, .cdclk = 48, .divider = 2, .ratio = 40 },
+   { .refclk = 24000, .cdclk = 552000, .divider = 2, .ratio = 46 },
+   { .refclk = 24000, .cdclk = 648000, .divider = 2, .ratio = 54 },
+
+   { .refclk = 38400, .cdclk = 179200, .divider = 3, .ratio = 14 },
+   { .refclk = 38400, .cdclk = 192000, .divider = 2, .ratio = 10 },
+   { .refclk = 38400, .cdclk = 307200, .divider = 2, .ratio = 16 },
+   { .refclk = 38400, .cdclk = 48, .divider = 2, .ratio = 25 },
+   { .refclk = 38400, .cdclk = 556800, .divider = 2, .ratio = 29 },
+   { .refclk = 38400, .cdclk = 652800, .divider = 2, .ratio = 34 },
+   {}
+};
+
 static const struct intel_cdclk_vals dg2_cdclk_table[] = {
{ .refclk = 38400, .cdclk = 163200, .divider = 2, .ratio = 34, 
.waveform = 0x },
{ .refclk = 38400, .cdclk = 204000, .divider = 2, .ratio = 34, 
.waveform = 0x9248 },
@@ -3353,6 +3377,9 @@ void intel_init_cdclk_hooks(struct drm_i915_private 
*dev_priv)
/* Wa_22011320316:adl-p[a0] */
if (IS_ADLP_DISPLAY_STEP(dev_priv, STEP_A0, STEP_B0))
dev_priv->display.cdclk.table = adlp_a_step_cdclk_table;
+   /* Bspec: 55409 */
+   else if (IS_ADLP_RPLU(dev_priv))
+   dev_priv->display.cdclk.table = rplu_cdclk_table;
else
dev_priv->display.cdclk.table = adlp_cdclk_table;
} else if (IS_ROCKETLAKE(dev_priv)) {
-- 
2.25.1



[Intel-gfx] [RFC 0/2] Add new CDCLK step for RPL-U

2023-01-16 Thread Chaitanya Kumar Borah
A new step of 480MHz has been added on SKUs that have an RPL-U
device id. This particular step is to support 120Hz panels
more efficiently.

This patchset adds a new table to include this new CDCLK
step. Details can be found in BSpec entry 55409.

Create a new sub-platform to identify RPL-U which will enable
us to make the differentiation during CDCLK initialization.

Furthermore, we need to make a distinction between ES (Engineering
Sample) and QS (Quality Sample) parts as this change comes only
to QS parts. This version of the patch does not include this change
as we are yet to make a decision if this particular part needs
to be upstreamed.(see comments on revision 2)

Chaitanya Kumar Borah (2):
  drm/i915: Add RPL-U sub platform
  drm/i915/display: Add 480 MHz CDCLK steps for RPL-U

 drivers/gpu/drm/i915/display/intel_cdclk.c | 27 ++
 drivers/gpu/drm/i915/i915_drv.h|  2 ++
 drivers/gpu/drm/i915/i915_pci.c|  1 +
 drivers/gpu/drm/i915/intel_device_info.c   |  8 +++
 drivers/gpu/drm/i915/intel_device_info.h   |  2 ++
 include/drm/i915_pciids.h  | 11 +
 6 files changed, 47 insertions(+), 4 deletions(-)

-- 
2.25.1



[Intel-gfx] linux-next: duplicate patch in the kspp tree

2023-01-16 Thread Stephen Rothwell
Hi all,

The following commit is also in the drm-misc tree as a different commit
(but the same patch):

  06b19f46455c ("drm/nouveau/fb/ga102: Replace zero-length array of trailing 
structs with flex-array")

This is commit

  54d47689c6e3 ("drm/nouveau/fb/ga102: Replace zero-length array of trailing 
structs with flex-array")

in the drm-misc tree.

-- 
Cheers,
Stephen Rothwell


pgpazNsBngQ0D.pgp
Description: OpenPGP digital signature


[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/display: add intel_display_limits.h for key enums (rev3)

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915/display: add intel_display_limits.h for key enums (rev3)
URL   : https://patchwork.freedesktop.org/series/111334/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12588_full -> Patchwork_111334v3_full


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (13 -> 10)
--

  Missing(3): pig-skl-6260u pig-kbl-iris pig-glk-j5005 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_exec_fair@basic-none@rcs0:
- shard-glk:  [PASS][1] -> [FAIL][2] ([i915#2842])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-glk5/igt@gem_exec_fair@basic-n...@rcs0.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/shard-glk3/igt@gem_exec_fair@basic-n...@rcs0.html

  * igt@gem_lmem_swapping@verify-random-ccs:
- shard-glk:  NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#4613]) +1 
similar issue
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/shard-glk6/igt@gem_lmem_swapp...@verify-random-ccs.html

  * igt@gem_render_copy@y-tiled-ccs-to-y-tiled-mc-ccs:
- shard-glk:  NOTRUN -> [SKIP][4] ([fdo#109271]) +26 similar issues
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/shard-glk6/igt@gem_render_c...@y-tiled-ccs-to-y-tiled-mc-ccs.html

  * igt@kms_ccs@pipe-b-missing-ccs-buffer-y_tiled_gen12_mc_ccs:
- shard-glk:  NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#3886])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/shard-glk6/igt@kms_ccs@pipe-b-missing-ccs-buffer-y_tiled_gen12_mc_ccs.html

  * igt@kms_psr2_sf@cursor-plane-update-sf:
- shard-glk:  NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#658])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/shard-glk6/igt@kms_psr2...@cursor-plane-update-sf.html

  
 Possible fixes 

  * igt@drm_fdinfo@virtual-idle:
- {shard-rkl}:[FAIL][7] ([i915#7742]) -> [PASS][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-1/igt@drm_fdi...@virtual-idle.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/shard-rkl-3/igt@drm_fdi...@virtual-idle.html

  * igt@fbdev@read:
- {shard-rkl}:[SKIP][9] ([i915#2582]) -> [PASS][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-4/igt@fb...@read.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/shard-rkl-6/igt@fb...@read.html

  * igt@gem_exec_fair@basic-deadline:
- {shard-rkl}:[FAIL][11] ([i915#2846]) -> [PASS][12]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-3/igt@gem_exec_f...@basic-deadline.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/shard-rkl-5/igt@gem_exec_f...@basic-deadline.html

  * igt@gem_exec_reloc@basic-wc-read-noreloc:
- {shard-rkl}:[SKIP][13] ([i915#3281]) -> [PASS][14] +5 similar 
issues
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-2/igt@gem_exec_re...@basic-wc-read-noreloc.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/shard-rkl-5/igt@gem_exec_re...@basic-wc-read-noreloc.html

  * igt@gem_partial_pwrite_pread@write:
- {shard-rkl}:[SKIP][15] ([i915#3282]) -> [PASS][16] +1 similar 
issue
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-2/igt@gem_partial_pwrite_pr...@write.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/shard-rkl-5/igt@gem_partial_pwrite_pr...@write.html

  * igt@gen9_exec_parse@valid-registers:
- {shard-rkl}:[SKIP][17] ([i915#2527]) -> [PASS][18] +1 similar 
issue
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-2/igt@gen9_exec_pa...@valid-registers.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/shard-rkl-5/igt@gen9_exec_pa...@valid-registers.html

  * igt@i915_pm_rc6_residency@rc6-idle@vcs0:
- {shard-rkl}:[WARN][19] ([i915#2681]) -> [PASS][20]
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-5/igt@i915_pm_rc6_residency@rc6-i...@vcs0.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/shard-rkl-6/igt@i915_pm_rc6_residency@rc6-i...@vcs0.html

  * igt@i915_pm_rpm@modeset-non-lpsp:
- {shard-dg1}:[SKIP][21] ([i915#1397]) -> [PASS][22] +3 similar 
issues
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-dg1-14/igt@i915_pm_...@modeset-non-lpsp.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/shard-dg1-16/igt@i915_pm_...@modeset-non-lpsp.html

  * igt@kms_big_fb@linear-32bpp-rotate-0:
- {shard-rkl}:

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915: add struct i915_dsm to wrap dsm members together

2023-01-16 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/i915: add struct i915_dsm to wrap dsm 
members together
URL   : https://patchwork.freedesktop.org/series/112898/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12588_full -> Patchwork_112898v1_full


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (13 -> 9)
--

  Missing(4): shard-rkl0 pig-kbl-iris pig-glk-j5005 pig-skl-6260u 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_exec_fair@basic-none@rcs0:
- shard-glk:  [PASS][1] -> [FAIL][2] ([i915#2842])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-glk5/igt@gem_exec_fair@basic-n...@rcs0.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/shard-glk3/igt@gem_exec_fair@basic-n...@rcs0.html

  * igt@gem_lmem_swapping@verify-random-ccs:
- shard-glk:  NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#4613]) +1 
similar issue
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/shard-glk4/igt@gem_lmem_swapp...@verify-random-ccs.html

  * igt@gem_render_copy@y-tiled-ccs-to-y-tiled-mc-ccs:
- shard-glk:  NOTRUN -> [SKIP][4] ([fdo#109271]) +26 similar issues
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/shard-glk4/igt@gem_render_c...@y-tiled-ccs-to-y-tiled-mc-ccs.html

  * igt@kms_ccs@pipe-b-missing-ccs-buffer-y_tiled_gen12_mc_ccs:
- shard-glk:  NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#3886])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/shard-glk4/igt@kms_ccs@pipe-b-missing-ccs-buffer-y_tiled_gen12_mc_ccs.html

  * igt@kms_psr2_sf@cursor-plane-update-sf:
- shard-glk:  NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#658])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/shard-glk4/igt@kms_psr2...@cursor-plane-update-sf.html

  
 Possible fixes 

  * igt@drm_fdinfo@virtual-idle:
- {shard-rkl}:[FAIL][7] ([i915#7742]) -> [PASS][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-1/igt@drm_fdi...@virtual-idle.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/shard-rkl-5/igt@drm_fdi...@virtual-idle.html

  * igt@fbdev@nullptr:
- {shard-rkl}:[SKIP][9] ([i915#2582]) -> [PASS][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-1/igt@fb...@nullptr.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/shard-rkl-6/igt@fb...@nullptr.html

  * igt@gem_create@hog-create@smem0:
- {shard-rkl}:[FAIL][11] ([i915#7679]) -> [PASS][12]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-1/igt@gem_create@hog-cre...@smem0.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/shard-rkl-5/igt@gem_create@hog-cre...@smem0.html

  * igt@gem_ctx_exec@basic-nohangcheck:
- {shard-rkl}:[FAIL][13] ([i915#6268]) -> [PASS][14]
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-4/igt@gem_ctx_e...@basic-nohangcheck.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/shard-rkl-2/igt@gem_ctx_e...@basic-nohangcheck.html

  * igt@gem_exec_fair@basic-none@vcs0:
- {shard-rkl}:[FAIL][15] ([i915#2842]) -> [PASS][16] +1 similar 
issue
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-6/igt@gem_exec_fair@basic-n...@vcs0.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/shard-rkl-5/igt@gem_exec_fair@basic-n...@vcs0.html

  * igt@gem_exec_reloc@basic-write-read-noreloc:
- {shard-rkl}:[SKIP][17] ([i915#3281]) -> [PASS][18] +11 similar 
issues
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-6/igt@gem_exec_re...@basic-write-read-noreloc.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/shard-rkl-5/igt@gem_exec_re...@basic-write-read-noreloc.html

  * igt@gem_partial_pwrite_pread@write-uncached:
- {shard-rkl}:[SKIP][19] ([i915#3282]) -> [PASS][20] +2 similar 
issues
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-4/igt@gem_partial_pwrite_pr...@write-uncached.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/shard-rkl-5/igt@gem_partial_pwrite_pr...@write-uncached.html

  * igt@gen9_exec_parse@unaligned-access:
- {shard-rkl}:[SKIP][21] ([i915#2527]) -> [PASS][22] +2 similar 
issues
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/shard-rkl-4/igt@gen9_exec_pa...@unaligned-access.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/shard-rkl-5/igt@gen9_exec_pa...@unaligned-access.html

  * 

Re: [Intel-gfx] [PATCH] drm/i915/mtl: Connect root sysfs entries to GT0

2023-01-16 Thread Andi Shyti
Hi Vinay,

On Mon, Jan 16, 2023 at 11:35:41AM -0800, Belgaumkar, Vinay wrote:
> 
> On 1/16/2023 10:58 AM, Andi Shyti wrote:
> > Hi,
> > 
> > On Thu, Jan 12, 2023 at 08:48:11PM -0800, Belgaumkar, Vinay wrote:
> > > On 1/12/2023 8:37 PM, Dixit, Ashutosh wrote:
> > > > On Thu, 12 Jan 2023 20:26:34 -0800, Belgaumkar, Vinay wrote:
> > > > > I think the ABI was changed by the patch mentioned in the commit
> > > > > (a8a4f0467d70).
> > > > The ABI was originally changed in 80cf8af17af04 and 56a709cf77468.
> > In theory the ABI has never changed, we just needed to agree once
> > and for all what to do when reading the upper level interface.
> > There has never been a previous multitile specification before
> > this change.
> > 
> > There have been long and exhaustive discussions on what to do and
> > the decision is that in some cases we show the average, in others
> > the maximum. Never the GT0, though.
> > 
> > > Yes, you are right. @Andi, did we have a plan to update the IGT tests that
> > > use these interfaces to properly refer to the per GT entries as well? They
> > > now receive average values instead of absolute, hence will fail on a
> > > multi-GT device.
> > I don't know what's the plan for igt's.
> > 
> > Which tests are failing? I think we shouldn't be using the upper
> > level interfaces at all in IGT's. Previously there has been an
> > error printed on dmesg when this was happening. The error has
> > been removed in order to set the ABI as agreed above.
> 
> Tests like perf_mu and gem_ctx_freq will fail as they read upper level sysfs
> entries and expect them to change as per the test. I think this includes all
> of the tests that read RC6 or Trubo related sysfs entries for that matter.

First of all I hope we are talking about multitile machines. In
a single tile we shouldn't see any difference. If there is, then
there is a bug.

I think the tests need to be updated. In a multitile card we have
decided that reading from the upper interfaces would provide a
somehow meaningful value for all the GTs. It's like asking "what
is the RC6 for all the GTs in one number?" or "what is the
frequency for all the GTs in one single frequency?". Providing
the value of GT0 is misleading and with Joonas we agreed that RC6
would provide the average, while the frequencies would provide
the maximum. This when reading.

When writing, instead, the command sent to the upper layers
applies to all the GTs.

The original approach was to mark the upper interfaces as
deprecated, for this reason I added initially an error message in
order to avoid confusion and force IGTs to update. But the error
message was removed and meanwhile we agreed to give some meaning
to the upper interfaces.

Do you need help with updating the IGTs?

Andi

> Thanks,
> 
> Vinay.
> 
> > 
> > Andi


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: add intel_display_limits.h for key enums (rev3)

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915/display: add intel_display_limits.h for key enums (rev3)
URL   : https://patchwork.freedesktop.org/series/111334/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12588 -> Patchwork_111334v3


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (45 -> 43)
--

  Missing(2): fi-kbl-soraka fi-snb-2520m 

Known issues


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

### IGT changes ###

 Possible fixes 

  * igt@i915_pm_rpm@basic-rte:
- {bat-adln-1}:   [DMESG-WARN][1] ([i915#7077]) -> [PASS][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/bat-adln-1/igt@i915_pm_...@basic-rte.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/bat-adln-1/igt@i915_pm_...@basic-rte.html

  * igt@i915_selftest@live@migrate:
- {bat-dg2-11}:   [DMESG-FAIL][3] -> [PASS][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/bat-dg2-11/igt@i915_selftest@l...@migrate.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/bat-dg2-11/igt@i915_selftest@l...@migrate.html

  * igt@i915_selftest@live@reset:
- {bat-rpls-1}:   [DMESG-FAIL][5] ([i915#4983]) -> [PASS][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/bat-rpls-1/igt@i915_selftest@l...@reset.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/bat-rpls-1/igt@i915_selftest@l...@reset.html

  * igt@kms_pipe_crc_basic@suspend-read-crc@pipe-b-lvds-1:
- fi-ctg-p8600:   [FAIL][7] ([fdo#103375]) -> [PASS][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/fi-ctg-p8600/igt@kms_pipe_crc_basic@suspend-read-...@pipe-b-lvds-1.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v3/fi-ctg-p8600/igt@kms_pipe_crc_basic@suspend-read-...@pipe-b-lvds-1.html

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

  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
  [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
  [i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
  [i915#7077]: https://gitlab.freedesktop.org/drm/intel/issues/7077
  [i915#7359]: https://gitlab.freedesktop.org/drm/intel/issues/7359
  [i915#7625]: https://gitlab.freedesktop.org/drm/intel/issues/7625
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#7834]: https://gitlab.freedesktop.org/drm/intel/issues/7834


Build changes
-

  * Linux: CI_DRM_12588 -> Patchwork_111334v3

  CI-20190529: 20190529
  CI_DRM_12588: 4289f17cae840c77e9d314330a635cebe762a735 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7120: dffabf00c79c55e0ae23b75d0a7922d55251ee5e @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_111334v3: 4289f17cae840c77e9d314330a635cebe762a735 @ 
git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

56b675c32fe4 drm/i915/display: add intel_display_limits.h for key enums

== Logs ==

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


Re: [Intel-gfx] [PATCH] drm/i915/mtl: Connect root sysfs entries to GT0

2023-01-16 Thread Belgaumkar, Vinay



On 1/16/2023 10:58 AM, Andi Shyti wrote:

Hi,

On Thu, Jan 12, 2023 at 08:48:11PM -0800, Belgaumkar, Vinay wrote:

On 1/12/2023 8:37 PM, Dixit, Ashutosh wrote:

On Thu, 12 Jan 2023 20:26:34 -0800, Belgaumkar, Vinay wrote:

I think the ABI was changed by the patch mentioned in the commit
(a8a4f0467d70).

The ABI was originally changed in 80cf8af17af04 and 56a709cf77468.

In theory the ABI has never changed, we just needed to agree once
and for all what to do when reading the upper level interface.
There has never been a previous multitile specification before
this change.

There have been long and exhaustive discussions on what to do and
the decision is that in some cases we show the average, in others
the maximum. Never the GT0, though.


Yes, you are right. @Andi, did we have a plan to update the IGT tests that
use these interfaces to properly refer to the per GT entries as well? They
now receive average values instead of absolute, hence will fail on a
multi-GT device.

I don't know what's the plan for igt's.

Which tests are failing? I think we shouldn't be using the upper
level interfaces at all in IGT's. Previously there has been an
error printed on dmesg when this was happening. The error has
been removed in order to set the ABI as agreed above.


Tests like perf_mu and gem_ctx_freq will fail as they read upper level 
sysfs entries and expect them to change as per the test. I think this 
includes all of the tests that read RC6 or Trubo related sysfs entries 
for that matter.


Thanks,

Vinay.



Andi


[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/gt: Add selftests for TLB invalidation

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915/gt: Add selftests for TLB invalidation
URL   : https://patchwork.freedesktop.org/series/112894/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12587_full -> Patchwork_112894v1_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_112894v1_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_112894v1_full, please notify your bug team 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_112894v1/index.html

Participating hosts (13 -> 10)
--

  Missing(3): pig-skl-6260u pig-kbl-iris pig-glk-j5005 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * {igt@i915_selftest@live@gt_tlb} (NEW):
- {shard-dg1}:NOTRUN -> [DMESG-FAIL][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/shard-dg1-17/igt@i915_selftest@live@gt_tlb.html

  * igt@kms_ccs@pipe-a-crc-primary-basic-y_tiled_ccs:
- shard-glk:  [PASS][2] -> [FAIL][3]
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/shard-glk7/igt@kms_ccs@pipe-a-crc-primary-basic-y_tiled_ccs.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/shard-glk8/igt@kms_ccs@pipe-a-crc-primary-basic-y_tiled_ccs.html

  
New tests
-

  New tests have been introduced between CI_DRM_12587_full and 
Patchwork_112894v1_full:

### New IGT tests (1) ###

  * igt@i915_selftest@live@gt_tlb:
- Statuses : 1 dmesg-fail(s) 3 pass(s)
- Exec time: [0.0] s

  

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_lmem_swapping@heavy-verify-random:
- shard-glk:  NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#4613])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/shard-glk3/igt@gem_lmem_swapp...@heavy-verify-random.html

  * igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs:
- shard-glk:  NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#3886]) +3 
similar issues
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/shard-glk3/igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html

  * igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions-varying-size:
- shard-glk:  [PASS][6] -> [FAIL][7] ([i915#2346])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/shard-glk6/igt@kms_cursor_legacy@flip-vs-cur...@atomic-transitions-varying-size.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/shard-glk3/igt@kms_cursor_legacy@flip-vs-cur...@atomic-transitions-varying-size.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-gtt:
- shard-glk:  NOTRUN -> [SKIP][8] ([fdo#109271]) +35 similar issues
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/shard-glk3/igt@kms_frontbuffer_track...@psr-1p-primscrn-pri-indfb-draw-mmap-gtt.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area:
- shard-glk:  NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#658])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/shard-glk3/igt@kms_psr2...@overlay-primary-update-sf-dmg-area.html

  
 Possible fixes 

  * igt@drm_fdinfo@virtual-idle:
- {shard-rkl}:[FAIL][10] ([i915#7742]) -> [PASS][11] +1 similar 
issue
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/shard-rkl-2/igt@drm_fdi...@virtual-idle.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/shard-rkl-6/igt@drm_fdi...@virtual-idle.html

  * igt@fbdev@pan:
- {shard-rkl}:[SKIP][12] ([i915#2582]) -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/shard-rkl-1/igt@fb...@pan.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/shard-rkl-6/igt@fb...@pan.html

  * igt@gem_exec_fair@basic-deadline:
- shard-glk:  [FAIL][14] ([i915#2846]) -> [PASS][15]
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/shard-glk1/igt@gem_exec_f...@basic-deadline.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/shard-glk2/igt@gem_exec_f...@basic-deadline.html

  * igt@gem_exec_fair@basic-none-vip@rcs0:
- {shard-rkl}:[FAIL][16] ([i915#2842]) -> [PASS][17]
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/shard-rkl-1/igt@gem_exec_fair@basic-none-...@rcs0.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/shard-rkl-5/igt@gem_exec_fair@basic-none-...@rcs0.html

  * 

Re: [Intel-gfx] [PATCH] drm/i915/pcode: Wait 10 seconds for pcode to settle

2023-01-16 Thread Andi Shyti
Hi Rodrigo,

On Wed, Jan 11, 2023 at 12:06:24PM -0500, Rodrigo Vivi wrote:
> On Wed, Jan 11, 2023 at 04:39:36PM +0100, Andi Shyti wrote:
> > Hi Rodrigo,
> > 
> > On Wed, Jan 11, 2023 at 10:25:56AM -0500, Rodrigo Vivi wrote:
> > > On Wed, Jan 11, 2023 at 11:44:47AM +0100, Andi Shyti wrote:
> > > > From: Aravind Iddamsetty 
> > > > 
> > > > During module load not all the punit transaction have completed
> > > > and we might end up timing out, as shown by the following
> > > > warning:
> > > > 
> > > >i915 :4d:00.0: drm_WARN_ON_ONCE(timeout_base_ms > 3)
> > > > 
> > > > Wait 10 seconds for the punit to settle and complete any
> > > > outstanding transactions upon module load.
> > > 
> > > 10 *SECONDS* ?!
> > 
> > Don't be alarmed :)
> > 
> > It's up to 10 seconds, otherwise we would end up waiting up to 3
> > minutes.
> > 
> > And I've seen a version (and you did as well) where those 3
> > minutes were raised to 6 (for the PVC particular case).
> 
> Oh yeap! and that case is funny! Because the indication from PCODE
> is that 10 seconds is enough, but there are some rare cases where
> it gets stuck and end up taking a very long time. Then they multiplied
> the bad rare case to 3, and no idea why how that become 6.
> 
> But anyway, thanks for refreshing my memory. When I first noticed this
> patch I thought it was in all the platforms, where this wouldn't make
> sense. But on discrete where the pcode needs to bring the memory and
> gt up before we can really use it, it makes sense.
> 
> And then I noticed that your patch is indeed for dgfx only, so it
> would be okay. And 10 seconds is okay.

yes... :)

Thanks for the recap!

> However I also noticed that you do this before the other pcode_init
> check that we were told by pcode folks to use. So, I don't understand
> how your patch is helping now... you wait for 10 seconds and then you
> will wait more 10 seconds on the pcode_ready... why the pcode_ready
> check that we have in case already doesn't cover yours?

The difference is that the first timeout ensures that the punit
is ready during boot time. The need to wait is only in boot,
as we check if it's ready and then start communicating.

The second 10s wait comes after the read/write has actually
happened. I expect in this case to wait just a little because
it's just a test write done in boot to make sure the punit is
really responding and ready for the next writes.

But because skl_pcode_request() is used in other contexts, as
well, I assume that the punit is ready and I don't need to wait
anymore before communicating with it. Thus I wait only after
sending the command: I wait for it to complete and be ready again
for the next command.

In other words each wait makes sure that the punit is ready for
the next command. That's why we need a first 10 seconds wait as
at the very first write we weren't sure 100% the punit was ready.

> And why that return?

Becase the driver is not really failing. Most probably the
hardware is completing the boot routines thus we need to try
probing again later.

I hope I was able to explain myself.

Thanks for the comments and for looking into this,
Andi

> > 
> > Thanks for checking this,
> > Andi
> > 
> > > > 
> > > > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7814
> > > > 
> > > > Signed-off-by: Aravind Iddamsetty 
> > > > Co-developed-by: Chris Wilson 
> > > > Cc: Rodrigo Vivi 
> > > > Signed-off-by: Andi Shyti 
> > > > ---
> > > >  drivers/gpu/drm/i915/intel_pcode.c | 35 ++
> > > >  1 file changed, 31 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/intel_pcode.c 
> > > > b/drivers/gpu/drm/i915/intel_pcode.c
> > > > index a234d9b4ed14..3db2ba439bb5 100644
> > > > --- a/drivers/gpu/drm/i915/intel_pcode.c
> > > > +++ b/drivers/gpu/drm/i915/intel_pcode.c
> > > > @@ -204,15 +204,42 @@ int skl_pcode_request(struct intel_uncore 
> > > > *uncore, u32 mbox, u32 request,
> > > >  #undef COND
> > > >  }
> > > >  
> > > > +static int pcode_init_wait(struct intel_uncore *uncore, int timeout_ms)
> > > > +{
> > > > +   if (__intel_wait_for_register_fw(uncore,
> > > > +GEN6_PCODE_MAILBOX,
> > > > +GEN6_PCODE_READY, 0,
> > > > +500, timeout_ms,
> > > > +NULL))
> > > > +   return -EPROBE_DEFER;
> > > > +
> > > > +   return skl_pcode_request(uncore,
> > > > +DG1_PCODE_STATUS,
> > > > +DG1_UNCORE_GET_INIT_STATUS,
> > > > +DG1_UNCORE_INIT_STATUS_COMPLETE,
> > > > +DG1_UNCORE_INIT_STATUS_COMPLETE, 
> > > > timeout_ms);
> > > > +}
> > > > +
> > > >  int intel_pcode_init(struct intel_uncore *uncore)
> > > >  {
> > > > +   int err;
> > > > +
> > > > if (!IS_DGFX(uncore->i915))
> > > > 

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/display: add intel_display_limits.h for key enums (rev3)

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915/display: add intel_display_limits.h for key enums (rev3)
URL   : https://patchwork.freedesktop.org/series/111334/
State : warning

== Summary ==

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




[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: add struct i915_dsm to wrap dsm members together

2023-01-16 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/i915: add struct i915_dsm to wrap dsm 
members together
URL   : https://patchwork.freedesktop.org/series/112898/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12588 -> Patchwork_112898v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (45 -> 42)
--

  Missing(3): fi-kbl-soraka fi-bsw-kefka fi-snb-2520m 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@i915_selftest@live@gt_heartbeat:
- fi-cfl-guc: [PASS][1] -> [DMESG-FAIL][2] ([i915#5334])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/fi-cfl-guc/igt@i915_selftest@live@gt_heartbeat.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/fi-cfl-guc/igt@i915_selftest@live@gt_heartbeat.html

  
 Possible fixes 

  * igt@i915_pm_rpm@basic-rte:
- {bat-adlp-6}:   [DMESG-WARN][3] ([i915#7077]) -> [PASS][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/bat-adlp-6/igt@i915_pm_...@basic-rte.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/bat-adlp-6/igt@i915_pm_...@basic-rte.html
- {bat-adln-1}:   [DMESG-WARN][5] ([i915#7077]) -> [PASS][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/bat-adln-1/igt@i915_pm_...@basic-rte.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/bat-adln-1/igt@i915_pm_...@basic-rte.html

  * igt@i915_selftest@live@migrate:
- {bat-dg2-11}:   [DMESG-FAIL][7] -> [PASS][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/bat-dg2-11/igt@i915_selftest@l...@migrate.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/bat-dg2-11/igt@i915_selftest@l...@migrate.html

  * igt@i915_selftest@live@reset:
- {bat-rpls-1}:   [DMESG-FAIL][9] ([i915#4983]) -> [PASS][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/bat-rpls-1/igt@i915_selftest@l...@reset.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/bat-rpls-1/igt@i915_selftest@l...@reset.html

  * igt@kms_pipe_crc_basic@suspend-read-crc@pipe-b-lvds-1:
- fi-ctg-p8600:   [FAIL][11] ([fdo#103375]) -> [PASS][12]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12588/fi-ctg-p8600/igt@kms_pipe_crc_basic@suspend-read-...@pipe-b-lvds-1.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112898v1/fi-ctg-p8600/igt@kms_pipe_crc_basic@suspend-read-...@pipe-b-lvds-1.html

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

  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
  [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
  [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
  [i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
  [i915#7077]: https://gitlab.freedesktop.org/drm/intel/issues/7077
  [i915#7625]: https://gitlab.freedesktop.org/drm/intel/issues/7625
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828


Build changes
-

  * Linux: CI_DRM_12588 -> Patchwork_112898v1

  CI-20190529: 20190529
  CI_DRM_12588: 4289f17cae840c77e9d314330a635cebe762a735 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7120: dffabf00c79c55e0ae23b75d0a7922d55251ee5e @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_112898v1: 4289f17cae840c77e9d314330a635cebe762a735 @ 
git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

0248a796c8be drm/i915: drop cast from DEFINE_RES_MEM() usage
2d3afc3c0864 drm/i915: add struct i915_dsm to wrap dsm members together

== Logs ==

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


Re: [Intel-gfx] [PATCH] drm/i915/mtl: Connect root sysfs entries to GT0

2023-01-16 Thread Andi Shyti
Hi,

On Thu, Jan 12, 2023 at 08:48:11PM -0800, Belgaumkar, Vinay wrote:
> 
> On 1/12/2023 8:37 PM, Dixit, Ashutosh wrote:
> > On Thu, 12 Jan 2023 20:26:34 -0800, Belgaumkar, Vinay wrote:
> > > I think the ABI was changed by the patch mentioned in the commit
> > > (a8a4f0467d70).
> > The ABI was originally changed in 80cf8af17af04 and 56a709cf77468.

In theory the ABI has never changed, we just needed to agree once
and for all what to do when reading the upper level interface.
There has never been a previous multitile specification before
this change.

There have been long and exhaustive discussions on what to do and
the decision is that in some cases we show the average, in others
the maximum. Never the GT0, though.

> Yes, you are right. @Andi, did we have a plan to update the IGT tests that
> use these interfaces to properly refer to the per GT entries as well? They
> now receive average values instead of absolute, hence will fail on a
> multi-GT device.

I don't know what's the plan for igt's.

Which tests are failing? I think we shouldn't be using the upper
level interfaces at all in IGT's. Previously there has been an
error printed on dmesg when this was happening. The error has
been removed in order to set the ABI as agreed above.

Andi


[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/i915: add struct i915_dsm to wrap dsm members together

2023-01-16 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/i915: add struct i915_dsm to wrap dsm 
members together
URL   : https://patchwork.freedesktop.org/series/112898/
State : warning

== Summary ==

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




[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: add struct i915_dsm to wrap dsm members together

2023-01-16 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/i915: add struct i915_dsm to wrap dsm 
members together
URL   : https://patchwork.freedesktop.org/series/112898/
State : warning

== Summary ==

Error: dim checkpatch failed
05c75413d4b5 drm/i915: add struct i915_dsm to wrap dsm members together
-:21: WARNING:AVOID_BUG: Do not crash the kernel unless it is absolutely 
unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of 
BUG() or variants
#21: FILE: drivers/gpu/drm/i915/display/intel_fbc.c:334:
+   GEM_BUG_ON(range_overflows_end_t(u64, i915->dsm.stolen.start,

-:24: WARNING:AVOID_BUG: Do not crash the kernel unless it is absolutely 
unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of 
BUG() or variants
#24: FILE: drivers/gpu/drm/i915/display/intel_fbc.c:336:
+   GEM_BUG_ON(range_overflows_end_t(u64, i915->dsm.stolen.start,

-:186: WARNING:AVOID_BUG: Do not crash the kernel unless it is absolutely 
unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of 
BUG() or variants
#186: FILE: drivers/gpu/drm/i915/gem/i915_gem_stolen.c:590:
+   GEM_BUG_ON(range_overflows(offset, size, 
resource_size(>dsm.stolen)));

total: 0 errors, 3 warnings, 0 checks, 284 lines checked
3c151f68417c drm/i915: drop cast from DEFINE_RES_MEM() usage




Re: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error

2023-01-16 Thread Andi Shyti
Hi Nirmoy,

On Fri, Jan 13, 2023 at 01:00:53PM +0100, Nirmoy Das wrote:
> From: Chris Wilson 
> 
> Make sure that upon error after we have acquired the wakeref we do
> release it again.
> 
> Fixes: 027c38b4121e ("drm/i915/selftests: Grab the runtime pm in shrink_thp")
> Reviewed-by: Matthew Auld 
> Signed-off-by: Chris Wilson 
> Signed-off-by: Nirmoy Das 
> Cc:  # v6.0+
> ---
>  drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c 
> b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> index c281b0ec9e05..295d6f2cc4ff 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> @@ -1855,7 +1855,7 @@ static int igt_shrink_thp(void *arg)
>   I915_SHRINK_ACTIVE);
>   i915_vma_unpin(vma);
>   if (err)
> - goto out_put;
> + goto out_wf;
>  
>   /*
>* Now that the pages are *unpinned* shrinking should invoke
> @@ -1871,7 +1871,7 @@ static int igt_shrink_thp(void *arg)
>   pr_err("unexpected pages mismatch, should_swap=%s\n",
>  str_yes_no(should_swap));
>   err = -EINVAL;
> - goto out_put;
> + goto out_wf;
>   }

aren't we missing here one out_put -> out_wf change?

This one:

@@ -1878,7 +1878,7 @@ static int igt_shrink_thp(void *arg)
pr_err("unexpected residual page-size bits, should_swap=%s\n",
   str_yes_no(should_swap));
err = -EINVAL;
-   goto out_put;
+   goto out_wf;
}
 
err = i915_vma_pin(vma, 0, 0, flags);

Andi

>  
>   if (should_swap == (obj->mm.page_sizes.sg || obj->mm.page_sizes.phys)) {
> @@ -1883,7 +1883,7 @@ static int igt_shrink_thp(void *arg)
>  
>   err = i915_vma_pin(vma, 0, 0, flags);
>   if (err)
> - goto out_put;
> + goto out_wf;
>  
>   while (n--) {
>   err = cpu_check(obj, n, 0xdeadbeaf);
> -- 
> 2.39.0


Re: [Intel-gfx] [PATCH v3 0/3] drm/{amdgpu, i915, nouveau, radeon}: Fix fbdev and vga-switcheroo

2023-01-16 Thread Alex Deucher
On Mon, Jan 16, 2023 at 6:54 AM Thomas Zimmermann  wrote:
>
> (was: drm: Generic fbdev and vga-switcheroo)
>
> This patchset fixes how fbdev helpers interact with vga-switcheroo. The
> first two patches are bug fixes for the existing code. The third patch
> cleans up the drivers.
>
> Patch 1 fixes i915 to do the correct thing if the device has not been
> initialized yet. Switching to the device is only possible after the
> initialization, but switching away is always possible.
>
> Patch 2 is the original patch without the amdgpu changes. Installs
> the fbdev framebuffer in vga-switcheroo for the PCI device. Does
> nothing for drivers without vga-switcheroo.
>
> Patch 3 cleans up vga_switcheroo_process_delayed_switch() in amdgpu
> and the other related drivers (i.e., i915, nouveau and radeon). The
> call is now located at the end of drm_lastclose() and drivers do not
> need their own lastclose helpers any longer.
>
> I kept the r-bs from v1, but patch 1 is entirely new and patch 3 has
> significantly grown in size.

Series is:
Reviewed-by: Alex Deucher 

>
> v3:
> * include drm_fb_helper.h in radeon_drv.c
> v2:
> * expand to patch series
> * fix i915, nouveau and radeon
>
> Thomas Zimmermann (3):
>   drm/i915: Allow switching away via vga-switcheroo if uninitialized
>   drm/fb-helper: Set framebuffer for vga-switcheroo clients
>   drm: Call vga_switcheroo_process_delayed_switch() in drm_lastclose
>
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h |  1 -
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c |  2 --
>  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 13 -
>  drivers/gpu/drm/drm_fb_helper.c |  8 
>  drivers/gpu/drm/drm_file.c  |  3 +++
>  drivers/gpu/drm/i915/i915_driver.c  | 26 ++---
>  drivers/gpu/drm/i915/i915_switcheroo.c  |  6 +-
>  drivers/gpu/drm/nouveau/nouveau_drm.c   |  1 -
>  drivers/gpu/drm/nouveau/nouveau_vga.c   |  7 ---
>  drivers/gpu/drm/nouveau/nouveau_vga.h   |  1 -
>  drivers/gpu/drm/radeon/radeon_drv.c |  3 ++-
>  drivers/gpu/drm/radeon/radeon_drv.h |  1 -
>  drivers/gpu/drm/radeon/radeon_kms.c | 18 -
>  drivers/gpu/vga/vga_switcheroo.c|  4 ++--
>  14 files changed, 22 insertions(+), 72 deletions(-)
>
>
> base-commit: 68d139b609a97a83e7c231189d4864aba4e1679b
> prerequisite-patch-id: 0aa359f6144c4015c140c8a6750be19099c676fb
> prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
> prerequisite-patch-id: 3f204510fcbf9530d6540bd8e6128cce598988b6
> --
> 2.39.0
>


[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: extract vblank/scanline code to a separate file (rev3)

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915: extract vblank/scanline code to a separate file (rev3)
URL   : https://patchwork.freedesktop.org/series/111854/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12587_full -> Patchwork_111854v3_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_111854v3_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_111854v3_full, please notify your bug team 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_111854v3/index.html

Participating hosts (13 -> 11)
--

  Additional (1): shard-rkl0 
  Missing(3): pig-skl-6260u pig-kbl-iris pig-glk-j5005 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@kms_ccs@pipe-a-crc-primary-basic-y_tiled_ccs:
- shard-glk:  [PASS][1] -> [FAIL][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/shard-glk7/igt@kms_ccs@pipe-a-crc-primary-basic-y_tiled_ccs.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/shard-glk5/igt@kms_ccs@pipe-a-crc-primary-basic-y_tiled_ccs.html

  
 Suppressed 

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

  * igt@kms_force_connector_basic@force-edid:
- {shard-dg1}:[PASS][3] -> [DMESG-WARN][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/shard-dg1-17/igt@kms_force_connector_ba...@force-edid.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/shard-dg1-19/igt@kms_force_connector_ba...@force-edid.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_lmem_swapping@heavy-verify-random:
- shard-glk:  NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#4613])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/shard-glk4/igt@gem_lmem_swapp...@heavy-verify-random.html

  * igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs:
- shard-glk:  NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#3886]) +3 
similar issues
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/shard-glk4/igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html

  * igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions-varying-size:
- shard-glk:  [PASS][7] -> [FAIL][8] ([i915#2346])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/shard-glk6/igt@kms_cursor_legacy@flip-vs-cur...@atomic-transitions-varying-size.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/shard-glk9/igt@kms_cursor_legacy@flip-vs-cur...@atomic-transitions-varying-size.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-gtt:
- shard-glk:  NOTRUN -> [SKIP][9] ([fdo#109271]) +35 similar issues
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/shard-glk4/igt@kms_frontbuffer_track...@psr-1p-primscrn-pri-indfb-draw-mmap-gtt.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area:
- shard-glk:  NOTRUN -> [SKIP][10] ([fdo#109271] / [i915#658])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/shard-glk4/igt@kms_psr2...@overlay-primary-update-sf-dmg-area.html

  
 Possible fixes 

  * igt@drm_fdinfo@virtual-idle:
- {shard-rkl}:[FAIL][11] ([i915#7742]) -> [PASS][12] +1 similar 
issue
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/shard-rkl-2/igt@drm_fdi...@virtual-idle.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/shard-rkl-5/igt@drm_fdi...@virtual-idle.html

  * igt@fbdev@pan:
- {shard-rkl}:[SKIP][13] ([i915#2582]) -> [PASS][14] +1 similar 
issue
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/shard-rkl-1/igt@fb...@pan.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/shard-rkl-6/igt@fb...@pan.html

  * igt@gem_create@hog-create@smem0:
- {shard-rkl}:[FAIL][15] ([i915#7679]) -> [PASS][16]
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/shard-rkl-2/igt@gem_create@hog-cre...@smem0.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/shard-rkl-5/igt@gem_create@hog-cre...@smem0.html

  * igt@gem_exec_fair@basic-none-rrul@rcs0:
- {shard-rkl}:[FAIL][17] ([i915#2842]) -> [PASS][18]
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/shard-rkl-1/igt@gem_exec_fair@basic-none-r...@rcs0.html
   [18]: 

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/display: add intel_display_limits.h for key enums (rev2)

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915/display: add intel_display_limits.h for key enums (rev2)
URL   : https://patchwork.freedesktop.org/series/111334/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12587 -> Patchwork_111334v2


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_111334v2 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_111334v2, please notify your bug team 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_111334v2/index.html

Participating hosts (41 -> 44)
--

  Additional (4): fi-kbl-soraka fi-ctg-p8600 fi-rkl-11600 bat-adls-5 
  Missing(1): fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_selftest@live@gem_contexts:
- fi-bsw-kefka:   [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/fi-bsw-kefka/igt@i915_selftest@live@gem_contexts.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-bsw-kefka/igt@i915_selftest@live@gem_contexts.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@debugfs_test@basic-hwmon:
- fi-rkl-11600:   NOTRUN -> [SKIP][3] ([i915#7456])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-rkl-11600/igt@debugfs_t...@basic-hwmon.html

  * igt@gem_exec_gttfill@basic:
- fi-kbl-soraka:  NOTRUN -> [SKIP][4] ([fdo#109271]) +15 similar issues
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-kbl-soraka/igt@gem_exec_gttf...@basic.html

  * igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka:  NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#2190])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-kbl-soraka/igt@gem_huc_c...@huc-copy.html
- fi-rkl-11600:   NOTRUN -> [SKIP][6] ([i915#2190])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-rkl-11600/igt@gem_huc_c...@huc-copy.html

  * igt@gem_lmem_swapping@basic:
- fi-kbl-soraka:  NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#4613]) +3 
similar issues
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-kbl-soraka/igt@gem_lmem_swapp...@basic.html
- fi-rkl-11600:   NOTRUN -> [SKIP][8] ([i915#4613]) +3 similar issues
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-rkl-11600/igt@gem_lmem_swapp...@basic.html

  * igt@gem_tiled_pread_basic:
- fi-rkl-11600:   NOTRUN -> [SKIP][9] ([i915#3282])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-rkl-11600/igt@gem_tiled_pread_basic.html

  * igt@i915_pm_backlight@basic-brightness:
- fi-rkl-11600:   NOTRUN -> [SKIP][10] ([i915#7561])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-rkl-11600/igt@i915_pm_backli...@basic-brightness.html

  * igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka:  NOTRUN -> [DMESG-FAIL][11] ([i915#1886])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html

  * igt@i915_selftest@live@guc_multi_lrc:
- fi-kbl-soraka:  NOTRUN -> [INCOMPLETE][12] ([i915#5334] / [i915#7640])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-kbl-soraka/igt@i915_selftest@live@guc_multi_lrc.html

  * igt@i915_suspend@basic-s3-without-i915:
- fi-rkl-11600:   NOTRUN -> [INCOMPLETE][13] ([i915#4817])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-rkl-11600/igt@i915_susp...@basic-s3-without-i915.html

  * igt@kms_chamelium_frames@dp-crc-fast:
- fi-ctg-p8600:   NOTRUN -> [SKIP][14] ([fdo#109271]) +31 similar issues
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-ctg-p8600/igt@kms_chamelium_fra...@dp-crc-fast.html

  * igt@kms_chamelium_hpd@dp-hpd-fast:
- fi-rkl-11600:   NOTRUN -> [SKIP][15] ([i915#7828]) +7 similar issues
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-rkl-11600/igt@kms_chamelium_...@dp-hpd-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
- fi-rkl-11600:   NOTRUN -> [SKIP][16] ([i915#4103])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111334v2/fi-rkl-11600/igt@kms_cursor_leg...@basic-busy-flip-before-cursor.html

  * igt@kms_force_connector_basic@force-load-detect:
- fi-rkl-11600:   NOTRUN -> [SKIP][17] ([fdo#109285] / [i915#4098])
   [17]: 

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/display: add intel_display_limits.h for key enums (rev2)

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915/display: add intel_display_limits.h for key enums (rev2)
URL   : https://patchwork.freedesktop.org/series/111334/
State : warning

== Summary ==

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




[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gt: Add selftests for TLB invalidation

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915/gt: Add selftests for TLB invalidation
URL   : https://patchwork.freedesktop.org/series/112894/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12587 -> Patchwork_112894v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (41 -> 41)
--

  Additional (3): fi-ctg-p8600 fi-rkl-11600 bat-adls-5 
  Missing(3): bat-rpls-2 bat-atsm-1 fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * {igt@i915_selftest@live@gt_tlb} (NEW):
- {bat-dg2-11}:   NOTRUN -> [DMESG-FAIL][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/bat-dg2-11/igt@i915_selftest@live@gt_tlb.html
- bat-dg1-6:  NOTRUN -> [DMESG-FAIL][2]
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/bat-dg1-6/igt@i915_selftest@live@gt_tlb.html
- fi-bsw-nick:NOTRUN -> [INCOMPLETE][3]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/fi-bsw-nick/igt@i915_selftest@live@gt_tlb.html
- fi-bsw-kefka:   NOTRUN -> [DMESG-FAIL][4]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/fi-bsw-kefka/igt@i915_selftest@live@gt_tlb.html
- fi-bsw-n3050:   NOTRUN -> [DMESG-FAIL][5]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/fi-bsw-n3050/igt@i915_selftest@live@gt_tlb.html
- bat-dg1-5:  NOTRUN -> [DMESG-FAIL][6]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/bat-dg1-5/igt@i915_selftest@live@gt_tlb.html
- {bat-dg1-7}:NOTRUN -> [DMESG-FAIL][7]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/bat-dg1-7/igt@i915_selftest@live@gt_tlb.html

  
 Suppressed 

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

  * igt@i915_selftest@live@gt_engines:
- {bat-dg2-8}:[PASS][8] -> [FAIL][9]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/bat-dg2-8/igt@i915_selftest@live@gt_engines.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/bat-dg2-8/igt@i915_selftest@live@gt_engines.html

  * igt@i915_selftest@live@migrate:
- {bat-dg2-11}:   [PASS][10] -> [DMESG-WARN][11]
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/bat-dg2-11/igt@i915_selftest@l...@migrate.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/bat-dg2-11/igt@i915_selftest@l...@migrate.html

  
New tests
-

  New tests have been introduced between CI_DRM_12587 and Patchwork_112894v1:

### New IGT tests (1) ###

  * igt@i915_selftest@live@gt_tlb:
- Statuses : 6 dmesg-fail(s) 1 incomplete(s) 32 pass(s)
- Exec time: [0.0] s

  

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@debugfs_test@basic-hwmon:
- fi-rkl-11600:   NOTRUN -> [SKIP][12] ([i915#7456])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/fi-rkl-11600/igt@debugfs_t...@basic-hwmon.html

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

  * igt@gem_lmem_swapping@basic:
- fi-rkl-11600:   NOTRUN -> [SKIP][14] ([i915#4613]) +3 similar issues
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/fi-rkl-11600/igt@gem_lmem_swapp...@basic.html

  * igt@gem_tiled_pread_basic:
- fi-rkl-11600:   NOTRUN -> [SKIP][15] ([i915#3282])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/fi-rkl-11600/igt@gem_tiled_pread_basic.html

  * igt@i915_pm_backlight@basic-brightness:
- fi-rkl-11600:   NOTRUN -> [SKIP][16] ([i915#7561])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/fi-rkl-11600/igt@i915_pm_backli...@basic-brightness.html

  * igt@i915_suspend@basic-s3-without-i915:
- fi-rkl-11600:   NOTRUN -> [INCOMPLETE][17] ([i915#4817])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/fi-rkl-11600/igt@i915_susp...@basic-s3-without-i915.html

  * igt@kms_chamelium_frames@dp-crc-fast:
- fi-ctg-p8600:   NOTRUN -> [SKIP][18] ([fdo#109271]) +31 similar issues
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112894v1/fi-ctg-p8600/igt@kms_chamelium_fra...@dp-crc-fast.html

  * igt@kms_chamelium_hpd@dp-hpd-fast:
- fi-rkl-11600:   NOTRUN -> [SKIP][19] ([i915#7828]) +7 similar issues
   [19]: 

[Intel-gfx] [PATCH 2/2] drm/i915: drop cast from DEFINE_RES_MEM() usage

2023-01-16 Thread Jani Nikula
Since commit 52c4d11f1dce ("resource: Convert DEFINE_RES_NAMED() to be
compound literal") it's no longer necessary to cast DEFINE_RES_MEM() to
struct resource.

This also fixes sparse warnings "cast from non-scalar" and "cast to
non-scalar".

Signed-off-by: Jani Nikula 
---
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 10 +++---
 drivers/gpu/drm/i915/gt/intel_ggtt.c   |  4 ++--
 drivers/gpu/drm/i915/gt/intel_ggtt_gmch.c  |  3 +--
 drivers/gpu/drm/i915/intel_memory_region.c |  2 +-
 drivers/gpu/drm/i915/selftests/mock_gtt.c  |  2 +-
 5 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c 
b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index de873498d95b..90a967374b1a 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -110,9 +110,7 @@ static int adjust_stolen(struct drm_i915_private *i915,
else
ggtt_start &= PGTBL_ADDRESS_LO_MASK;
 
-   ggtt_res =
-   (struct resource) DEFINE_RES_MEM(ggtt_start,
-
ggtt_total_entries(ggtt) * 4);
+   ggtt_res = DEFINE_RES_MEM(ggtt_start, ggtt_total_entries(ggtt) 
* 4);
 
if (ggtt_res.start >= stolen[0].start && ggtt_res.start < 
stolen[0].end)
stolen[0].end = ggtt_res.start;
@@ -471,8 +469,7 @@ static int init_reserved_stolen(struct drm_i915_private 
*i915)
goto bail_out;
}
 
-   i915->dsm.reserved =
-   (struct resource)DEFINE_RES_MEM(reserved_base, reserved_size);
+   i915->dsm.reserved = DEFINE_RES_MEM(reserved_base, reserved_size);
 
if (!resource_contains(>dsm.stolen, >dsm.reserved)) {
drm_err(>drm,
@@ -485,8 +482,7 @@ static int init_reserved_stolen(struct drm_i915_private 
*i915)
return 0;
 
 bail_out:
-   i915->dsm.reserved =
-   (struct resource)DEFINE_RES_MEM(reserved_base, 0);
+   i915->dsm.reserved = DEFINE_RES_MEM(reserved_base, 0);
 
return ret;
 }
diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c 
b/drivers/gpu/drm/i915/gt/intel_ggtt.c
index 0c7fe360f873..fe64c13fd3b4 100644
--- a/drivers/gpu/drm/i915/gt/intel_ggtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c
@@ -885,8 +885,8 @@ static void gen6_gmch_remove(struct i915_address_space *vm)
 
 static struct resource pci_resource(struct pci_dev *pdev, int bar)
 {
-   return (struct resource)DEFINE_RES_MEM(pci_resource_start(pdev, bar),
-  pci_resource_len(pdev, bar));
+   return DEFINE_RES_MEM(pci_resource_start(pdev, bar),
+ pci_resource_len(pdev, bar));
 }
 
 static int gen8_gmch_probe(struct i915_ggtt *ggtt)
diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt_gmch.c 
b/drivers/gpu/drm/i915/gt/intel_ggtt_gmch.c
index 4e2163a1aa46..4192d06df0f2 100644
--- a/drivers/gpu/drm/i915/gt/intel_ggtt_gmch.c
+++ b/drivers/gpu/drm/i915/gt/intel_ggtt_gmch.c
@@ -89,8 +89,7 @@ int intel_ggtt_gmch_probe(struct i915_ggtt *ggtt)
 
intel_gmch_gtt_get(>vm.total, _base, >mappable_end);
 
-   ggtt->gmadr =
-   (struct resource)DEFINE_RES_MEM(gmadr_base, ggtt->mappable_end);
+   ggtt->gmadr = DEFINE_RES_MEM(gmadr_base, ggtt->mappable_end);
 
ggtt->vm.alloc_pt_dma = alloc_pt_dma;
ggtt->vm.alloc_scratch_dma = alloc_pt_dma;
diff --git a/drivers/gpu/drm/i915/intel_memory_region.c 
b/drivers/gpu/drm/i915/intel_memory_region.c
index b9a164efd6ae..3d1fdea9811d 100644
--- a/drivers/gpu/drm/i915/intel_memory_region.c
+++ b/drivers/gpu/drm/i915/intel_memory_region.c
@@ -235,7 +235,7 @@ intel_memory_region_create(struct drm_i915_private *i915,
return ERR_PTR(-ENOMEM);
 
mem->i915 = i915;
-   mem->region = (struct resource)DEFINE_RES_MEM(start, size);
+   mem->region = DEFINE_RES_MEM(start, size);
mem->io_start = io_start;
mem->io_size = io_size;
mem->min_page_size = min_page_size;
diff --git a/drivers/gpu/drm/i915/selftests/mock_gtt.c 
b/drivers/gpu/drm/i915/selftests/mock_gtt.c
index 568840e7ca66..ece97e4faacb 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gtt.c
@@ -112,7 +112,7 @@ void mock_init_ggtt(struct intel_gt *gt)
ggtt->vm.i915 = gt->i915;
ggtt->vm.is_ggtt = true;
 
-   ggtt->gmadr = (struct resource) DEFINE_RES_MEM(0, 2048 * PAGE_SIZE);
+   ggtt->gmadr = DEFINE_RES_MEM(0, 2048 * PAGE_SIZE);
ggtt->mappable_end = resource_size(>gmadr);
ggtt->vm.total = 4096 * PAGE_SIZE;
 
-- 
2.34.1



[Intel-gfx] [PATCH 1/2] drm/i915: add struct i915_dsm to wrap dsm members together

2023-01-16 Thread Jani Nikula
Wrap the stolen memory related struct drm_i915_private members (dsm,
dsm_reserved, and stolen_usable_size) together in a a new struct
i915_dsm.

Signed-off-by: Jani Nikula 
---
 drivers/gpu/drm/i915/display/intel_fbc.c  | 10 ++--
 drivers/gpu/drm/i915/display/intel_fbdev.c|  2 +-
 .../drm/i915/display/intel_plane_initial.c|  2 +-
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c| 36 ++---
 drivers/gpu/drm/i915/gt/intel_rc6.c   | 12 ++---
 drivers/gpu/drm/i915/gt/selftest_reset.c  |  2 +-
 drivers/gpu/drm/i915/i915_drv.h   | 53 +++
 drivers/gpu/drm/i915/selftests/i915_gem.c |  4 +-
 8 files changed, 64 insertions(+), 57 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c 
b/drivers/gpu/drm/i915/display/intel_fbc.c
index c508dcf415b4..b507ff944864 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -331,15 +331,15 @@ static void i8xx_fbc_program_cfb(struct intel_fbc *fbc)
 {
struct drm_i915_private *i915 = fbc->i915;
 
-   GEM_BUG_ON(range_overflows_end_t(u64, i915->dsm.start,
+   GEM_BUG_ON(range_overflows_end_t(u64, i915->dsm.stolen.start,
 fbc->compressed_fb.start, U32_MAX));
-   GEM_BUG_ON(range_overflows_end_t(u64, i915->dsm.start,
+   GEM_BUG_ON(range_overflows_end_t(u64, i915->dsm.stolen.start,
 fbc->compressed_llb.start, U32_MAX));
 
intel_de_write(i915, FBC_CFB_BASE,
-  i915->dsm.start + fbc->compressed_fb.start);
+  i915->dsm.stolen.start + fbc->compressed_fb.start);
intel_de_write(i915, FBC_LL_BASE,
-  i915->dsm.start + fbc->compressed_llb.start);
+  i915->dsm.stolen.start + fbc->compressed_llb.start);
 }
 
 static const struct intel_fbc_funcs i8xx_fbc_funcs = {
@@ -712,7 +712,7 @@ static u64 intel_fbc_stolen_end(struct drm_i915_private 
*i915)
 * underruns, even if that range is not reserved by the BIOS. */
if (IS_BROADWELL(i915) ||
(DISPLAY_VER(i915) == 9 && !IS_BROXTON(i915)))
-   end = resource_size(>dsm) - 8 * 1024 * 1024;
+   end = resource_size(>dsm.stolen) - 8 * 1024 * 1024;
else
end = U64_MAX;
 
diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c 
b/drivers/gpu/drm/i915/display/intel_fbdev.c
index bbdb98d7c96e..19f3b5d92a55 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
@@ -170,7 +170,7 @@ static int intelfb_alloc(struct drm_fb_helper *helper,
 * important and we should probably use that space with FBC or 
other
 * features.
 */
-   if (size * 2 < dev_priv->stolen_usable_size)
+   if (size * 2 < dev_priv->dsm.usable_size)
obj = i915_gem_object_create_stolen(dev_priv, size);
if (IS_ERR(obj))
obj = i915_gem_object_create_shmem(dev_priv, size);
diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c 
b/drivers/gpu/drm/i915/display/intel_plane_initial.c
index 76be796df255..bb6ea7de5c61 100644
--- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
+++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c
@@ -107,7 +107,7 @@ initial_plane_vma(struct drm_i915_private *i915,
 */
if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) &&
mem == i915->mm.stolen_region &&
-   size * 2 > i915->stolen_usable_size)
+   size * 2 > i915->dsm.usable_size)
return NULL;
 
obj = i915_gem_object_create_region_at(mem, phys_base, size, 0);
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c 
b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index bc9521078807..de873498d95b 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -211,7 +211,7 @@ static void g4x_get_stolen_reserved(struct drm_i915_private 
*i915,
IS_GM45(i915) ?
CTG_STOLEN_RESERVED :
ELK_STOLEN_RESERVED);
-   resource_size_t stolen_top = i915->dsm.end + 1;
+   resource_size_t stolen_top = i915->dsm.stolen.end + 1;
 
drm_dbg(>drm, "%s_STOLEN_RESERVED = %08x\n",
IS_GM45(i915) ? "CTG" : "ELK", reg_val);
@@ -276,7 +276,7 @@ static void vlv_get_stolen_reserved(struct drm_i915_private 
*i915,
resource_size_t *size)
 {
u32 reg_val = intel_uncore_read(uncore, GEN6_STOLEN_RESERVED);
-   resource_size_t stolen_top = i915->dsm.end + 1;
+   resource_size_t stolen_top = i915->dsm.stolen.end + 1;
 
drm_dbg(>drm, "GEN6_STOLEN_RESERVED = %08x\n", reg_val);
 
@@ -365,7 +365,7 @@ static void bdw_get_stolen_reserved(struct drm_i915_private 
*i915,

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: extract vblank/scanline code to a separate file (rev3)

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915: extract vblank/scanline code to a separate file (rev3)
URL   : https://patchwork.freedesktop.org/series/111854/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12587 -> Patchwork_111854v3


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (41 -> 43)
--

  Additional (4): fi-kbl-soraka fi-ctg-p8600 fi-rkl-11600 bat-adls-5 
  Missing(2): bat-atsm-1 fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Suppressed 

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

  * igt@i915_selftest@live@workarounds:
- {bat-dg2-11}:   [PASS][1] -> [DMESG-WARN][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/bat-dg2-11/igt@i915_selftest@l...@workarounds.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/bat-dg2-11/igt@i915_selftest@l...@workarounds.html

  * igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-dp-3:
- {bat-dg2-9}:[PASS][3] -> [FAIL][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/bat-dg2-9/igt@kms_pipe_crc_basic@suspend-read-...@pipe-c-dp-3.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/bat-dg2-9/igt@kms_pipe_crc_basic@suspend-read-...@pipe-c-dp-3.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@debugfs_test@basic-hwmon:
- fi-rkl-11600:   NOTRUN -> [SKIP][5] ([i915#7456])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/fi-rkl-11600/igt@debugfs_t...@basic-hwmon.html

  * igt@gem_exec_gttfill@basic:
- fi-kbl-soraka:  NOTRUN -> [SKIP][6] ([fdo#109271]) +15 similar issues
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/fi-kbl-soraka/igt@gem_exec_gttf...@basic.html

  * igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka:  NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#2190])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/fi-kbl-soraka/igt@gem_huc_c...@huc-copy.html
- fi-rkl-11600:   NOTRUN -> [SKIP][8] ([i915#2190])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/fi-rkl-11600/igt@gem_huc_c...@huc-copy.html

  * igt@gem_lmem_swapping@basic:
- fi-kbl-soraka:  NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#4613]) +3 
similar issues
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/fi-kbl-soraka/igt@gem_lmem_swapp...@basic.html
- fi-rkl-11600:   NOTRUN -> [SKIP][10] ([i915#4613]) +3 similar issues
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/fi-rkl-11600/igt@gem_lmem_swapp...@basic.html

  * igt@gem_tiled_pread_basic:
- fi-rkl-11600:   NOTRUN -> [SKIP][11] ([i915#3282])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/fi-rkl-11600/igt@gem_tiled_pread_basic.html

  * igt@i915_module_load@reload:
- fi-kbl-soraka:  NOTRUN -> [DMESG-WARN][12] ([i915#1982])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/fi-kbl-soraka/igt@i915_module_l...@reload.html

  * igt@i915_pm_backlight@basic-brightness:
- fi-rkl-11600:   NOTRUN -> [SKIP][13] ([i915#7561])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/fi-rkl-11600/igt@i915_pm_backli...@basic-brightness.html

  * igt@i915_selftest@live@gt_heartbeat:
- fi-kbl-soraka:  NOTRUN -> [DMESG-FAIL][14] ([i915#5334])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html

  * igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka:  NOTRUN -> [DMESG-FAIL][15] ([i915#1886])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html

  * igt@i915_selftest@live@guc_multi_lrc:
- fi-kbl-soraka:  NOTRUN -> [INCOMPLETE][16] ([i915#7640])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/fi-kbl-soraka/igt@i915_selftest@live@guc_multi_lrc.html

  * igt@i915_suspend@basic-s3-without-i915:
- fi-rkl-11600:   NOTRUN -> [INCOMPLETE][17] ([i915#4817])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/fi-rkl-11600/igt@i915_susp...@basic-s3-without-i915.html

  * igt@kms_chamelium_frames@dp-crc-fast:
- fi-ctg-p8600:   NOTRUN -> [SKIP][18] ([fdo#109271]) +31 similar issues
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v3/fi-ctg-p8600/igt@kms_chamelium_fra...@dp-crc-fast.html

  * igt@kms_chamelium_hpd@dp-hpd-fast:
- fi-rkl-11600:   NOTRUN -> [SKIP][19] ([i915#7828]) +7 similar issues
   

[Intel-gfx] [PATCH] drm/i915/display: add intel_display_limits.h for key enums

2023-01-16 Thread Jani Nikula
Move a handful of key enums to a new file intel_display_limits.h. These
are the enum types, and the MAX/NUM enumerations within them, that are
used in other headers. Otherwise, there's no common theme between them.

Replace intel_display.h include with intel_display_limit.h where
relevant, and add the intel_display.h include directly in the .c files
where needed.

Since intel_display.h is used almost everywhere in display/, include it
from intel_display_types.h to avoid massive changes across the
board. There are very few files that would need intel_display_types.h
but not intel_display.h so this is neglible, and further cleanup between
these headers can be left for the future.

Overall this change drops the direct and indirect dependencies on
intel_display.h from about 300 to about 100 compilation units, because
we can drop the include from i915_drv.h.

Signed-off-by: Jani Nikula 

---

N.b. intel_display_limits.h is not a great name. I was hoping it was
only needed for the MAX/NUM enumerations such as I915_MAX_PIPES but
there are a number of headers that use the types for struct members as
well. intel_display_enums.h sounds too generic too. Suggestions?
---
 drivers/gpu/drm/i915/display/intel_bw.h   |   2 +-
 drivers/gpu/drm/i915/display/intel_cdclk.h|   2 +-
 drivers/gpu/drm/i915/display/intel_display.h  | 115 +---
 .../gpu/drm/i915/display/intel_display_core.h |   2 +-
 .../drm/i915/display/intel_display_limits.h   | 124 ++
 .../i915/display/intel_display_power_map.c|   1 +
 .../drm/i915/display/intel_display_types.h|   1 +
 drivers/gpu/drm/i915/display/intel_dvo_dev.h  |   2 +-
 drivers/gpu/drm/i915/display/skl_watermark.h  |   2 +-
 drivers/gpu/drm/i915/gem/i915_gem_create.c|   1 +
 drivers/gpu/drm/i915/gem/i915_gem_domain.c|   1 +
 drivers/gpu/drm/i915/gt/intel_ggtt.c  |   1 +
 drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c  |   1 +
 drivers/gpu/drm/i915/gt/intel_rps.c   |   1 +
 drivers/gpu/drm/i915/gvt/cmd_parser.c |   1 +
 drivers/gpu/drm/i915/gvt/display.c|   1 +
 drivers/gpu/drm/i915/gvt/fb_decoder.h |   2 +-
 drivers/gpu/drm/i915/i915_drv.h   |   2 +-
 drivers/gpu/drm/i915/i915_pci.c   |   1 +
 drivers/gpu/drm/i915/i915_vma.c   |   1 +
 drivers/gpu/drm/i915/intel_device_info.c  |   1 +
 drivers/gpu/drm/i915/intel_device_info.h  |   2 +-
 drivers/gpu/drm/i915/intel_gvt_mmio_table.c   |   1 +
 drivers/gpu/drm/i915/intel_pm.c   |   1 +
 drivers/gpu/drm/i915/intel_pm_types.h |   2 +-
 drivers/gpu/drm/i915/vlv_sideband.c   |   1 +
 26 files changed, 149 insertions(+), 123 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/display/intel_display_limits.h

diff --git a/drivers/gpu/drm/i915/display/intel_bw.h 
b/drivers/gpu/drm/i915/display/intel_bw.h
index cb7ee3a24a58..f20292143745 100644
--- a/drivers/gpu/drm/i915/display/intel_bw.h
+++ b/drivers/gpu/drm/i915/display/intel_bw.h
@@ -8,7 +8,7 @@
 
 #include 
 
-#include "intel_display.h"
+#include "intel_display_limits.h"
 #include "intel_display_power.h"
 #include "intel_global_state.h"
 
diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.h 
b/drivers/gpu/drm/i915/display/intel_cdclk.h
index c674879a84a5..51e2f6a11ce4 100644
--- a/drivers/gpu/drm/i915/display/intel_cdclk.h
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.h
@@ -8,7 +8,7 @@
 
 #include 
 
-#include "intel_display.h"
+#include "intel_display_limits.h"
 #include "intel_global_state.h"
 
 struct drm_i915_private;
diff --git a/drivers/gpu/drm/i915/display/intel_display.h 
b/drivers/gpu/drm/i915/display/intel_display.h
index ef73730f32b0..cb6f520cc575 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -28,6 +28,7 @@
 #include 
 
 #include "i915_reg_defs.h"
+#include "intel_display_limits.h"
 
 enum drm_scaling_filter;
 struct dpll;
@@ -62,51 +63,9 @@ struct intel_remapped_info;
 struct intel_rotation_info;
 struct pci_dev;
 
-/*
- * Keep the pipe enum values fixed: the code assumes that PIPE_A=0, the
- * rest have consecutive values and match the enum values of transcoders
- * with a 1:1 transcoder -> pipe mapping.
- */
-enum pipe {
-   INVALID_PIPE = -1,
-
-   PIPE_A = 0,
-   PIPE_B,
-   PIPE_C,
-   PIPE_D,
-   _PIPE_EDP,
-
-   I915_MAX_PIPES = _PIPE_EDP
-};
 
 #define pipe_name(p) ((p) + 'A')
 
-enum transcoder {
-   INVALID_TRANSCODER = -1,
-   /*
-* The following transcoders have a 1:1 transcoder -> pipe mapping,
-* keep their values fixed: the code assumes that TRANSCODER_A=0, the
-* rest have consecutive values and match the enum values of the pipes
-* they map to.
-*/
-   TRANSCODER_A = PIPE_A,
-   TRANSCODER_B = PIPE_B,
-   TRANSCODER_C = PIPE_C,
-   TRANSCODER_D = PIPE_D,
-
-   /*
-* The following transcoders can map to any pipe, their enum value
- 

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: extract vblank/scanline code to a separate file (rev3)

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915: extract vblank/scanline code to a separate file (rev3)
URL   : https://patchwork.freedesktop.org/series/111854/
State : warning

== Summary ==

Error: dim checkpatch failed
255ef7a91efb drm/i915/irq: split out vblank/scanline code to intel_vblank.[ch]
Traceback (most recent call last):
  File "scripts/spdxcheck.py", line 6, in 
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
Traceback (most recent call last):
  File "scripts/spdxcheck.py", line 6, in 
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:53: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does 
MAINTAINERS need updating?
#53: 
new file mode 100644

-:95: WARNING:LONG_LINE_COMMENT: line length of 104 exceeds 100 columns
#95: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:38:
+ * -vbs-> <---vbs+1---> <---vbs+2---> <-0-> <-1-> 
<-2--- (scanline counter gen2)

-:96: WARNING:LONG_LINE_COMMENT: line length of 105 exceeds 100 columns
#96: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:39:
+ * -vbs-2---> <---vbs-1---> <---vbs-> <---vbs+1---> <---vbs+2---> 
<-0--- (scanline counter gen3+)

-:97: WARNING:LONG_LINE_COMMENT: line length of 109 exceeds 100 columns
#97: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:40:
+ * -vbs-2---> <---vbs-2---> <---vbs-1---> <---vbs-> <---vbs+1---> 
<---vbs+2- (scanline counter hsw+ hdmi)

-:396: WARNING:LONG_LINE: line length of 116 exceeds 100 columns
#396: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:339:
+   position = (intel_de_read_fw(dev_priv, PIPEFRAMEPIXEL(pipe)) & 
PIPE_PIXEL_MASK) >> PIPE_PIXEL_SHIFT;

-:460: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#460: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:403:
+   return drm_crtc_vblank_helper_get_vblank_timestamp_internal(

total: 0 errors, 5 warnings, 1 checks, 893 lines checked
f9f98d352fac drm/i915/display: move more scanline functions to intel_vblank.[ch]
-:87: WARNING:MSLEEP: msleep < 20ms can sleep for up to 20ms; see 
Documentation/timers/timers-howto.rst
#87: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:428:
+   msleep(5);

total: 0 errors, 1 warnings, 0 checks, 93 lines checked
ed5d7de6d4db drm/i915/display: use common function for checking scanline is 
moving
9237d6aace41 drm/i915/vblank: use intel_de_read()
0dd79cd01777 drm/i915/vblank: add and use intel_de_read64_2x32() to read vblank 
counter




[Intel-gfx] [PATCH] drm/i915/gt: Add selftests for TLB invalidation

2023-01-16 Thread Andrzej Hajda
From: Chris Wilson 

Check that we invalidate the TLB cache, the updated physical addresses
are immediately visible to the HW, and there is no retention of the old
physical address for concurrent HW access.

Signed-off-by: Chris Wilson 
[ahajda: adjust to upstream driver]
Signed-off-by: Andrzej Hajda 
---
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h  |   1 +
 drivers/gpu/drm/i915/gt/intel_gt.c|   4 +
 drivers/gpu/drm/i915/gt/selftest_tlb.c| 405 ++
 .../drm/i915/selftests/i915_live_selftests.h  |   1 +
 4 files changed, 411 insertions(+)
 create mode 100644 drivers/gpu/drm/i915/gt/selftest_tlb.c

diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h 
b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
index 2af1ae3831df98..e10507fa71ce63 100644
--- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
+++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
@@ -394,6 +394,7 @@
 #define MI_LOAD_URB_MEM MI_INSTR(0x2C, 0)
 #define MI_STORE_URB_MEMMI_INSTR(0x2D, 0)
 #define MI_CONDITIONAL_BATCH_BUFFER_END MI_INSTR(0x36, 0)
+#define  MI_DO_COMPARE REG_BIT(21)
 
 #define STATE_BASE_ADDRESS \
((0x3 << 29) | (0x0 << 27) | (0x1 << 24) | (0x1 << 16))
diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c 
b/drivers/gpu/drm/i915/gt/intel_gt.c
index 75a7cb33cb..e6358373eb9c92 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt.c
@@ -1196,3 +1196,7 @@ void intel_gt_invalidate_tlb(struct intel_gt *gt, u32 
seqno)
mutex_unlock(>tlb.invalidate_lock);
}
 }
+
+#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
+#include "selftest_tlb.c"
+#endif
diff --git a/drivers/gpu/drm/i915/gt/selftest_tlb.c 
b/drivers/gpu/drm/i915/gt/selftest_tlb.c
new file mode 100644
index 00..a5082a70f06a77
--- /dev/null
+++ b/drivers/gpu/drm/i915/gt/selftest_tlb.c
@@ -0,0 +1,405 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2022 Intel Corporation
+ */
+
+#include "i915_selftest.h"
+
+#include "gem/i915_gem_internal.h"
+#include "gem/i915_gem_region.h"
+
+#include "gen8_engine_cs.h"
+#include "i915_gem_ww.h"
+#include "intel_engine_regs.h"
+#include "intel_gpu_commands.h"
+#include "intel_context.h"
+#include "intel_gt.h"
+#include "intel_ring.h"
+
+#include "selftests/igt_flush_test.h"
+#include "selftests/i915_random.h"
+
+static void clear_dw(struct i915_vma *vma, u64 addr, u32 val)
+{
+   GEM_BUG_ON(addr < i915_vma_offset(vma));
+   GEM_BUG_ON(addr >= i915_vma_offset(vma) + i915_vma_size(vma));
+   memset32(page_mask_bits(vma->obj->mm.mapping) +
+(addr - i915_vma_offset(vma)), val, 1);
+}
+
+static int
+pte_tlbinv(struct intel_context *ce,
+  struct i915_vma *va,
+  struct i915_vma *vb,
+  u64 align,
+  void (*tlbinv)(struct i915_address_space *vm, u64 addr, u64 length),
+  u64 length,
+  struct rnd_state *prng)
+{
+   const int use_64b = GRAPHICS_VER(ce->vm->i915) >= 8;
+   struct drm_i915_gem_object *batch;
+   struct i915_request *rq;
+   struct i915_vma *vma;
+   int retries;
+   u64 addr;
+   int err;
+   u32 *cs;
+
+   batch = i915_gem_object_create_internal(ce->vm->i915, 4096);
+   if (IS_ERR(batch))
+   return PTR_ERR(batch);
+
+   vma = i915_vma_instance(batch, ce->vm, NULL);
+   if (IS_ERR(vma)) {
+   err = PTR_ERR(vma);
+   goto out;
+   }
+
+   err = i915_vma_pin(vma, 0, 0, PIN_USER);
+   if (err)
+   goto out;
+
+   retries = 5;
+   do {
+   addr = igt_random_offset(prng,
+i915_vma_offset(vma),
+/* upper limit for MI_BB_START */
+min(ce->vm->total, BIT_ULL(48)),
+va->size, 4);
+
+   err = i915_vma_pin(va,  0, 0, (addr & -align) | 
PIN_OFFSET_FIXED | PIN_USER);
+   } while (err == -ENOSPC && --retries);
+   if (err) {
+   err = 0;
+   goto out;
+   }
+   GEM_BUG_ON(i915_vma_offset(va) != (addr & -align));
+   vb->node = va->node; /* overwrites the _same_ PTE  */
+
+   if (align == SZ_64K) {
+   u64 end = addr + va->size;
+
+   /*
+* SZ_64K pages on dg1 require that the whole PT be marked
+* containing 64KiB entries. So we make sure that our vma
+* covers the whole PT, despite being randomly aligned to 64KiB
+* and restrict our sampling to the 2MiB PT within where
+* we know that we will be using 64KiB pages.
+*/
+   addr = round_up(addr & -align, SZ_2M);
+   addr |= igt_random_offset(prng, 0, end - addr, 4, 4);
+   }
+
+   if (addr - i915_vma_offset(va) >= i915_vma_size(va))
+   addr = igt_random_offset(prng,
+   

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Use designated initializers for struct pci_device_id init

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915: Use designated initializers for struct pci_device_id init
URL   : https://patchwork.freedesktop.org/series/112887/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12586_full -> Patchwork_112887v1_full


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (13 -> 11)
--

  Additional (1): shard-rkl0 
  Missing(3): pig-skl-6260u pig-kbl-iris pig-glk-j5005 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk:  [PASS][1] -> [FAIL][2] ([i915#2842])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-glk1/igt@gem_exec_fair@basic-pace-sh...@rcs0.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/shard-glk2/igt@gem_exec_fair@basic-pace-sh...@rcs0.html

  * igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_ccs:
- shard-glk:  NOTRUN -> [SKIP][3] ([fdo#109271]) +4 similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/shard-glk2/igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_ccs.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible@c-hdmi-a1:
- shard-glk:  [PASS][4] -> [FAIL][5] ([i915#79])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-glk6/igt@kms_flip@flip-vs-expired-vblank-interrupti...@c-hdmi-a1.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/shard-glk6/igt@kms_flip@flip-vs-expired-vblank-interrupti...@c-hdmi-a1.html

  
 Possible fixes 

  * igt@drm_fdinfo@idle@rcs0:
- {shard-rkl}:[FAIL][6] ([i915#7742]) -> [PASS][7]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-4/igt@drm_fdinfo@i...@rcs0.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/shard-rkl-4/igt@drm_fdinfo@i...@rcs0.html

  * igt@drm_read@short-buffer-nonblock:
- {shard-rkl}:[SKIP][8] ([i915#4098]) -> [PASS][9] +1 similar issue
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-5/igt@drm_r...@short-buffer-nonblock.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/shard-rkl-6/igt@drm_r...@short-buffer-nonblock.html

  * igt@gem_ctx_exec@basic-nohangcheck:
- {shard-rkl}:[FAIL][10] ([i915#6268]) -> [PASS][11]
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-1/igt@gem_ctx_e...@basic-nohangcheck.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/shard-rkl-5/igt@gem_ctx_e...@basic-nohangcheck.html

  * igt@gem_exec_fair@basic-deadline:
- shard-glk:  [FAIL][12] ([i915#2846]) -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-glk5/igt@gem_exec_f...@basic-deadline.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/shard-glk9/igt@gem_exec_f...@basic-deadline.html

  * igt@gem_exec_reloc@basic-write-read-noreloc:
- {shard-rkl}:[SKIP][14] ([i915#3281]) -> [PASS][15] +8 similar 
issues
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-1/igt@gem_exec_re...@basic-write-read-noreloc.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/shard-rkl-5/igt@gem_exec_re...@basic-write-read-noreloc.html

  * igt@gem_mmap_gtt@coherency:
- {shard-rkl}:[SKIP][16] ([fdo#111656]) -> [PASS][17]
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-6/igt@gem_mmap_...@coherency.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/shard-rkl-5/igt@gem_mmap_...@coherency.html

  * igt@gem_partial_pwrite_pread@writes-after-reads-uncached:
- {shard-rkl}:[SKIP][18] ([i915#3282]) -> [PASS][19] +3 similar 
issues
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-6/igt@gem_partial_pwrite_pr...@writes-after-reads-uncached.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/shard-rkl-5/igt@gem_partial_pwrite_pr...@writes-after-reads-uncached.html

  * igt@gen9_exec_parse@secure-batches:
- {shard-rkl}:[SKIP][20] ([i915#2527]) -> [PASS][21] +1 similar 
issue
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-1/igt@gen9_exec_pa...@secure-batches.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/shard-rkl-5/igt@gen9_exec_pa...@secure-batches.html

  * igt@i915_hangman@engine-engine-error@bcs0:
- {shard-rkl}:[SKIP][22] ([i915#6258]) -> [PASS][23]
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-5/igt@i915_hangman@engine-engine-er...@bcs0.html
   [23]: 

Re: [Intel-gfx] [PATCH v4] vfio: fix potential deadlock on vfio group lock

2023-01-16 Thread Jason Gunthorpe
On Fri, Jan 13, 2023 at 07:03:51PM -0500, Matthew Rosato wrote:
> Currently it is possible that the final put of a KVM reference comes from
> vfio during its device close operation.  This occurs while the vfio group
> lock is held; however, if the vfio device is still in the kvm device list,
> then the following call chain could result in a deadlock:
> 
> kvm_put_kvm
>  -> kvm_destroy_vm
>   -> kvm_destroy_devices
>-> kvm_vfio_destroy
> -> kvm_vfio_file_set_kvm
>  -> vfio_file_set_kvm
>   -> group->group_lock/group_rwsem
> 
> Avoid this scenario by having vfio core code acquire a KVM reference
> the first time a device is opened and hold that reference until right
> after the group lock is released after the last device is closed.
> 
> Fixes: 421cfe6596f6 ("vfio: remove VFIO_GROUP_NOTIFY_SET_KVM")
> Reported-by: Alex Williamson 
> Signed-off-by: Matthew Rosato 
> ---

Reviewed-by: Jason Gunthorpe 

Jason


[Intel-gfx] ✓ Fi.CI.IGT: success for drm/{amdgpu, i915, nouveau, radeon}: Fix fbdev and vga-switcheroo

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/{amdgpu, i915, nouveau, radeon}: Fix fbdev and vga-switcheroo
URL   : https://patchwork.freedesktop.org/series/112884/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12586_full -> Patchwork_112884v1_full


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (13 -> 10)
--

  Missing(3): pig-skl-6260u pig-kbl-iris pig-glk-j5005 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@fbdev@write:
- shard-glk:  [PASS][1] -> [FAIL][2] ([i915#6724])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-glk4/igt@fb...@write.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/shard-glk7/igt@fb...@write.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk:  [PASS][3] -> [FAIL][4] ([i915#2842])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-glk1/igt@gem_exec_fair@basic-pace-sh...@rcs0.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/shard-glk9/igt@gem_exec_fair@basic-pace-sh...@rcs0.html

  * igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_ccs:
- shard-glk:  NOTRUN -> [SKIP][5] ([fdo#109271]) +4 similar issues
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/shard-glk9/igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_ccs.html

  
 Possible fixes 

  * igt@drm_fdinfo@idle@rcs0:
- {shard-rkl}:[FAIL][6] ([i915#7742]) -> [PASS][7]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-4/igt@drm_fdinfo@i...@rcs0.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/shard-rkl-2/igt@drm_fdinfo@i...@rcs0.html

  * igt@fbdev@eof:
- {shard-rkl}:[SKIP][8] ([i915#2582]) -> [PASS][9]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-1/igt@fb...@eof.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/shard-rkl-6/igt@fb...@eof.html

  * igt@gem_eio@in-flight-suspend:
- {shard-rkl}:[FAIL][10] ([fdo#103375]) -> [PASS][11] +1 similar 
issue
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-3/igt@gem_...@in-flight-suspend.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/shard-rkl-1/igt@gem_...@in-flight-suspend.html

  * igt@gem_eio@suspend:
- {shard-rkl}:[FAIL][12] ([i915#7052]) -> [PASS][13] +1 similar 
issue
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-3/igt@gem_...@suspend.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/shard-rkl-2/igt@gem_...@suspend.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
- {shard-rkl}:[FAIL][14] ([i915#2842]) -> [PASS][15]
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-6/igt@gem_exec_fair@basic-none-s...@rcs0.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/shard-rkl-4/igt@gem_exec_fair@basic-none-s...@rcs0.html

  * igt@gem_exec_reloc@basic-gtt:
- {shard-rkl}:[SKIP][16] ([i915#3281]) -> [PASS][17] +3 similar 
issues
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-1/igt@gem_exec_re...@basic-gtt.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/shard-rkl-5/igt@gem_exec_re...@basic-gtt.html

  * igt@gem_pwrite@basic-random:
- {shard-rkl}:[SKIP][18] ([i915#3282]) -> [PASS][19] +2 similar 
issues
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-1/igt@gem_pwr...@basic-random.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/shard-rkl-5/igt@gem_pwr...@basic-random.html

  * igt@gen9_exec_parse@batch-without-end:
- {shard-rkl}:[SKIP][20] ([i915#2527]) -> [PASS][21]
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-2/igt@gen9_exec_pa...@batch-without-end.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/shard-rkl-5/igt@gen9_exec_pa...@batch-without-end.html

  * igt@i915_hangman@engine-engine-error@bcs0:
- {shard-rkl}:[SKIP][22] ([i915#6258]) -> [PASS][23]
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-5/igt@i915_hangman@engine-engine-er...@bcs0.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/shard-rkl-2/igt@i915_hangman@engine-engine-er...@bcs0.html

  * igt@i915_pm_rpm@dpms-mode-unset-lpsp:
- {shard-rkl}:[SKIP][24] ([i915#1397]) -> [PASS][25]
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-1/igt@i915_pm_...@dpms-mode-unset-lpsp.html
   [25]: 

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: extract vblank/scanline code to a separate file (rev2)

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915: extract vblank/scanline code to a separate file (rev2)
URL   : https://patchwork.freedesktop.org/series/111854/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12587 -> Patchwork_111854v2


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_111854v2 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_111854v2, please notify your bug team 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_111854v2/index.html

Participating hosts (41 -> 43)
--

  Additional (3): fi-ctg-p8600 fi-ilk-m540 bat-adls-5 
  Missing(1): fi-snb-2520m 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_module_load@load:
- fi-ctg-p8600:   NOTRUN -> [DMESG-WARN][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v2/fi-ctg-p8600/igt@i915_module_l...@load.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@kms_chamelium_edid@vga-edid-read:
- fi-ilk-m540:NOTRUN -> [SKIP][2] ([fdo#109271]) +29 similar issues
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v2/fi-ilk-m540/igt@kms_chamelium_e...@vga-edid-read.html

  * igt@kms_chamelium_frames@dp-crc-fast:
- fi-ctg-p8600:   NOTRUN -> [SKIP][3] ([fdo#109271]) +31 similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v2/fi-ctg-p8600/igt@kms_chamelium_fra...@dp-crc-fast.html

  
 Possible fixes 

  * igt@i915_pm_rpm@basic-rte:
- {bat-adlp-6}:   [DMESG-WARN][4] ([i915#7077]) -> [PASS][5]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/bat-adlp-6/igt@i915_pm_...@basic-rte.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v2/bat-adlp-6/igt@i915_pm_...@basic-rte.html

  * igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [DMESG-FAIL][6] ([i915#5334]) -> [PASS][7]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v2/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html

  * igt@i915_selftest@live@reset:
- {bat-rpls-2}:   [DMESG-FAIL][8] ([i915#4983]) -> [PASS][9]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/bat-rpls-2/igt@i915_selftest@l...@reset.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v2/bat-rpls-2/igt@i915_selftest@l...@reset.html

  * igt@i915_suspend@basic-s3-without-i915:
- fi-apl-guc: [DMESG-WARN][10] ([i915#1982]) -> [PASS][11]
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12587/fi-apl-guc/igt@i915_susp...@basic-s3-without-i915.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111854v2/fi-apl-guc/igt@i915_susp...@basic-s3-without-i915.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
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
  [i915#5591]: https://gitlab.freedesktop.org/drm/intel/issues/5591
  [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
  [i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
  [i915#7077]: https://gitlab.freedesktop.org/drm/intel/issues/7077
  [i915#7443]: https://gitlab.freedesktop.org/drm/intel/issues/7443
  [i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828


Build changes
-

  * Linux: CI_DRM_12587 -> Patchwork_111854v2

  CI-20190529: 20190529
  

[Intel-gfx] ✓ Fi.CI.IGT: success for We need to have additional checks for DP MST UHBR

2023-01-16 Thread Patchwork
== Series Details ==

Series: We need to have additional checks for DP MST UHBR
URL   : https://patchwork.freedesktop.org/series/112876/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12586_full -> Patchwork_112876v1_full


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (13 -> 10)
--

  Missing(3): pig-skl-6260u pig-kbl-iris pig-glk-j5005 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk:  [PASS][1] -> [FAIL][2] ([i915#2842]) +1 similar issue
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-glk1/igt@gem_exec_fair@basic-pace-sh...@rcs0.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/shard-glk4/igt@gem_exec_fair@basic-pace-sh...@rcs0.html

  * igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_ccs:
- shard-glk:  NOTRUN -> [SKIP][3] ([fdo#109271]) +4 similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/shard-glk4/igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_ccs.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible@a-hdmi-a1:
- shard-glk:  [PASS][4] -> [FAIL][5] ([i915#79])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-glk6/igt@kms_flip@flip-vs-expired-vblank-interrupti...@a-hdmi-a1.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/shard-glk8/igt@kms_flip@flip-vs-expired-vblank-interrupti...@a-hdmi-a1.html

  * igt@perf@stress-open-close:
- shard-glk:  [PASS][6] -> [INCOMPLETE][7] ([i915#5213])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-glk2/igt@p...@stress-open-close.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/shard-glk5/igt@p...@stress-open-close.html

  * igt@runner@aborted:
- shard-glk:  NOTRUN -> [FAIL][8] ([i915#4312])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/shard-glk5/igt@run...@aborted.html

  
 Possible fixes 

  * igt@drm_fdinfo@idle@rcs0:
- {shard-rkl}:[FAIL][9] ([i915#7742]) -> [PASS][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-4/igt@drm_fdinfo@i...@rcs0.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/shard-rkl-5/igt@drm_fdinfo@i...@rcs0.html

  * igt@fbdev@eof:
- {shard-rkl}:[SKIP][11] ([i915#2582]) -> [PASS][12]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-1/igt@fb...@eof.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/shard-rkl-6/igt@fb...@eof.html

  * igt@fbdev@write:
- {shard-dg1}:[FAIL][13] ([i915#7863]) -> [PASS][14]
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-dg1-13/igt@fb...@write.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/shard-dg1-19/igt@fb...@write.html

  * igt@gem_eio@in-flight-suspend:
- {shard-rkl}:[FAIL][15] ([fdo#103375]) -> [PASS][16] +1 similar 
issue
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-3/igt@gem_...@in-flight-suspend.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/shard-rkl-1/igt@gem_...@in-flight-suspend.html

  * igt@gem_eio@suspend:
- {shard-rkl}:[FAIL][17] ([i915#7052]) -> [PASS][18] +1 similar 
issue
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-3/igt@gem_...@suspend.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/shard-rkl-5/igt@gem_...@suspend.html

  * igt@gem_exec_fair@basic-none-rrul@rcs0:
- {shard-rkl}:[FAIL][19] ([i915#2842]) -> [PASS][20]
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-4/igt@gem_exec_fair@basic-none-r...@rcs0.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/shard-rkl-5/igt@gem_exec_fair@basic-none-r...@rcs0.html

  * igt@gem_exec_reloc@basic-gtt-read-noreloc:
- {shard-rkl}:[SKIP][21] ([i915#3281]) -> [PASS][22] +9 similar 
issues
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-4/igt@gem_exec_re...@basic-gtt-read-noreloc.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/shard-rkl-5/igt@gem_exec_re...@basic-gtt-read-noreloc.html

  * igt@gem_pwrite@basic-self:
- {shard-rkl}:[SKIP][23] ([i915#3282]) -> [PASS][24] +4 similar 
issues
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/shard-rkl-4/igt@gem_pwr...@basic-self.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/shard-rkl-5/igt@gem_pwr...@basic-self.html

  * igt@gen9_exec_parse@batch-invalid-length:
- {shard-rkl}:

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: extract vblank/scanline code to a separate file (rev2)

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915: extract vblank/scanline code to a separate file (rev2)
URL   : https://patchwork.freedesktop.org/series/111854/
State : warning

== Summary ==

Error: dim checkpatch failed
f7f0f440ba53 drm/i915/irq: split out vblank/scanline code to intel_vblank.[ch]
Traceback (most recent call last):
  File "scripts/spdxcheck.py", line 6, in 
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
Traceback (most recent call last):
  File "scripts/spdxcheck.py", line 6, in 
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:53: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does 
MAINTAINERS need updating?
#53: 
new file mode 100644

-:95: WARNING:LONG_LINE_COMMENT: line length of 104 exceeds 100 columns
#95: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:38:
+ * -vbs-> <---vbs+1---> <---vbs+2---> <-0-> <-1-> 
<-2--- (scanline counter gen2)

-:96: WARNING:LONG_LINE_COMMENT: line length of 105 exceeds 100 columns
#96: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:39:
+ * -vbs-2---> <---vbs-1---> <---vbs-> <---vbs+1---> <---vbs+2---> 
<-0--- (scanline counter gen3+)

-:97: WARNING:LONG_LINE_COMMENT: line length of 109 exceeds 100 columns
#97: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:40:
+ * -vbs-2---> <---vbs-2---> <---vbs-1---> <---vbs-> <---vbs+1---> 
<---vbs+2- (scanline counter hsw+ hdmi)

-:396: WARNING:LONG_LINE: line length of 116 exceeds 100 columns
#396: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:339:
+   position = (intel_de_read_fw(dev_priv, PIPEFRAMEPIXEL(pipe)) & 
PIPE_PIXEL_MASK) >> PIPE_PIXEL_SHIFT;

-:460: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#460: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:403:
+   return drm_crtc_vblank_helper_get_vblank_timestamp_internal(

total: 0 errors, 5 warnings, 1 checks, 893 lines checked
3c80acd1a292 drm/i915/display: move more scanline functions to intel_vblank.[ch]
-:87: WARNING:MSLEEP: msleep < 20ms can sleep for up to 20ms; see 
Documentation/timers/timers-howto.rst
#87: FILE: drivers/gpu/drm/i915/display/intel_vblank.c:428:
+   msleep(5);

total: 0 errors, 1 warnings, 0 checks, 93 lines checked
90576232dbdf drm/i915/display: use common function for checking scanline is 
moving
9da93ebd1e3d drm/i915/vblank: use intel_de_read()
7587efc4f41a drm/i915/vblank: add and use intel_de_read64_2x32() to read vblank 
counter




[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Use designated initializers for struct pci_device_id init

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915: Use designated initializers for struct pci_device_id init
URL   : https://patchwork.freedesktop.org/series/112887/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12586 -> Patchwork_112887v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (44 -> 42)
--

  Missing(2): fi-rkl-11600 fi-snb-2520m 

Possible new issues
---

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

### CI changes ###

 Suppressed 

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

  * boot:
- {fi-jsl-1}: [PASS][1] -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/fi-jsl-1/boot.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/fi-jsl-1/boot.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@fbdev@write:
- fi-blb-e6850:   [PASS][3] -> [SKIP][4] ([fdo#109271]) +4 similar 
issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/fi-blb-e6850/igt@fb...@write.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/fi-blb-e6850/igt@fb...@write.html

  
 Possible fixes 

  * igt@gem_exec_gttfill@basic:
- fi-pnv-d510:[FAIL][5] ([i915#7229]) -> [PASS][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/fi-pnv-d510/igt@gem_exec_gttf...@basic.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/fi-pnv-d510/igt@gem_exec_gttf...@basic.html

  * igt@gem_exec_suspend@basic-s0@smem:
- {bat-rplp-1}:   [DMESG-WARN][7] -> [PASS][8] +5 similar issues
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/bat-rplp-1/igt@gem_exec_suspend@basic...@smem.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/bat-rplp-1/igt@gem_exec_suspend@basic...@smem.html

  * igt@i915_pm_rpm@module-reload:
- {bat-rplp-1}:   [SKIP][9] -> [PASS][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/bat-rplp-1/igt@i915_pm_...@module-reload.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/bat-rplp-1/igt@i915_pm_...@module-reload.html

  * igt@i915_selftest@live@requests:
- {bat-rpls-1}:   [INCOMPLETE][11] ([i915#4983] / [i915#6257]) -> 
[PASS][12]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/bat-rpls-1/igt@i915_selftest@l...@requests.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/bat-rpls-1/igt@i915_selftest@l...@requests.html

  * igt@i915_suspend@basic-s3-without-i915:
- fi-apl-guc: [DMESG-WARN][13] ([i915#1982]) -> [PASS][14]
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/fi-apl-guc/igt@i915_susp...@basic-s3-without-i915.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/fi-apl-guc/igt@i915_susp...@basic-s3-without-i915.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic:
- fi-bsw-kefka:   [FAIL][15] ([i915#2346]) -> [PASS][16]
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cur...@atomic.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112887v1/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cur...@atomic.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
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
  [i915#7229]: https://gitlab.freedesktop.org/drm/intel/issues/7229
  [i915#7359]: https://gitlab.freedesktop.org/drm/intel/issues/7359
  [i915#7625]: https://gitlab.freedesktop.org/drm/intel/issues/7625


Build changes
-

  * Linux: CI_DRM_12586 -> Patchwork_112887v1

  CI-20190529: 20190529
  CI_DRM_12586: fa21fb1326b89fe3d376d82a6ce95d7cf0bcefb1 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7119: 1e6d24e6dfa42b22f950f7d5e436b8f9acf8747f @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_112887v1: fa21fb1326b89fe3d376d82a6ce95d7cf0bcefb1 @ 
git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

67fe73e8930c drm/i915: define INTEL_VGA_DEVICE_INIT() 

Re: [Intel-gfx] [PATCH 1/4] drm/i915/gt: Remove platform comments from workarounds

2023-01-16 Thread Tvrtko Ursulin



On 12/01/2023 21:42, Lucas De Marchi wrote:

On Thu, Jan 05, 2023 at 01:35:52PM +, Tvrtko Ursulin wrote:


Okay to sum it up below with some final notes..

On 04/01/2023 19:34, Matt Roper wrote:

On Wed, Jan 04, 2023 at 09:58:13AM +, Tvrtko Ursulin wrote:


On 23/12/2022 18:28, Lucas De Marchi wrote:

On Fri, Dec 23, 2022 at 09:02:35AM +, Tvrtko Ursulin wrote:


On 22/12/2022 15:55, Lucas De Marchi wrote:

On Thu, Dec 22, 2022 at 10:27:00AM +, Tvrtko Ursulin wrote:


On 22/12/2022 08:25, Lucas De Marchi wrote:

The comments are redundant to the checks being done to apply the
workarounds and very often get outdated as workarounds need to be
extended to new platforms or steppings.  Remove them altogether 
with
the following matches (platforms extracted from 
intel_workarounds.c):


find drivers/gpu/drm/i915/gt/ -name '*.c' | xargs sed -i -E \
's/(Wa.*):(bdw|chv|bxt|glk|skl|kbl|cfl|cfl|whl|cml|aml|chv|cl|bw|ctg|elk|ilk|snb|dg|pvc|g4x|ilk|gen|glk|kbl|cml|glk|kbl|cml|hsw|icl|ehl|ivb|hsw|ivb|vlv|kbl|pvc|rkl|dg|adl|skl|skl|bxt|blk|cfl|cnl|glk|snb|tgl|vlv|xehpsdv).*/\1/'
find drivers/gpu/drm/i915/gt/ -name '*.c' | xargs sed -i -E \
's/(Wa.*):(bdw|chv|bxt|glk|skl|kbl|cfl|cfl|whl|cml|aml|chv|cl|bw|ctg|elk|ilk|snb|dg|pvc|g4x|ilk|gen|glk|kbl|cml|glk|kbl|cml|hsw|icl|ehl|ivb|hsw|ivb|vlv|kbl|pvc|rkl|dg|adl|skl|skl|bxt|blk|cfl|cnl|glk|snb|tgl|vlv|xehpsdv).*\*\//\1

Same things was executed in the gem directory, omitted
here for brevity.



There were a few false positives that included the workaround
description. Those were manually patched.


sed -E 's/(Wa[a-zA-Z0-9_]+)[:,]([a-zA-Z0-9,-_\+\[]{2,})/\1/'


then there are false negatives. We have Was in the form
"Wa_xxx:tgl,dg2, mtl". False positives we can fixup, false negatives
we simply don't see. After running that in gt/:

$ git grep ": mtl" -- drivers/gpu/drm/i915/
drivers/gpu/drm/i915/gt/intel_gt_pm.c:  /* Wa_14017073508: mtl */
drivers/gpu/drm/i915/gt/intel_gt_pm.c:  /* Wa_14017073508: mtl */
drivers/gpu/drm/i915/gt/intel_gt_pm.c:  /* Wa_14017073508: mtl */
drivers/gpu/drm/i915/gt/intel_gt_pm.c:  /* Wa_14017073508: mtl */
drivers/gpu/drm/i915/gt/uc/intel_guc_rc.c:   * 
Wa_14017073508: mtl

drivers/gpu/drm/i915/i915_reg.h:/* Wa_14017210380: mtl */

I was going with the platform names to avoid the false
negatives and because I was entertaining the idea of only doing 
this for

latest platforms where we do have the "Wa_[[:number:]]" form



Maybe..

Matt recently said he has this worked planned, but more
importantly - I gather then that the WA lookup tool
definitely does not output these strings?


Whatever it does it's true only at the time it's called. It
simply tells what
are the platforms and steppings the Wa applies to. We can change the
output to whatever we want, but that is not the point.
Those comments get stale and bring no real value as they match 1:1
what the code is supposed to be doing. Several times a patch has to
update just that comment to "extend a workaround" to a next 
platform.
This is not always done, so we get a comment that doesn't match 
what is

supposed to be there.


Tl;dr; version - lets park this until January and discuss once
everyone is back.


I'll leave my comment here since I will be out until mid January.



Longer version. I've been trying to get us talking about this a
couple times before and I'd really like to close with an explicit
consensus, discussion points addressed instead of skipped and just
moving ahead with patches.

References:
 3fcf71b9-337f-6186-7b00-27cbfd116...@linux.intel.com
 Y5j0b/bykbitc...@mdroper-desk1.amr.corp.intel.com

So point I wanted to discuss is whether these comments are truly
useless or maybe they can help during review. If the tool can
actually output them then I am leaning towards that they can be.


I consider "can the tool output xyz?" asking the wrong question.
"The tool", which is our own small python script querying a 
database can
output anything like that if we want to. The database has 
information of
what are the platforms/steppings for each the WA is known to be 
applied
*today*. And that can change and do change often, particularly for 
early

steppings and recent platforms.


Thought is, when a patch comes for review adding a new platform,
stepping, whatever, to an existing if condition, if it contains the
comments reviewer can more easily spot a hyphotetical logic
inversion error or similar. It is also trivial to check that both
condition and comment have been updated. (So lets not be rash and
remove something maybe useful just because it can go stale *only if*
reviewers are not giving sufficient attention that changes are made
in tandem.)


I can argue to the other side too. We don't have comments in the 
kernel

like

 /* Add 1 to i */
 i += 1;

This is exactly what these comments are doing. And they are misleading


I'll file this under "Reductio ad absurdum", kind of. :)


which actually proves my point?


I don't think so, but lets move on.



[Intel-gfx] [PATCH v2 5/5] drm/i915/vblank: add and use intel_de_read64_2x32() to read vblank counter

2023-01-16 Thread Jani Nikula
Add intel_de_read64_2x32() wrapper for the uncore version of the same,
and use it to read the high and low frame registers. Avoid duplicating
code for existing helpers.

The slight functional difference is checking that the entire high
register remains the same across two reads, instead of just the part
we're interested in. This should be of no consequence. (Unless those
bits function as a PRNG.)

Cc: Ville Syrjälä 
Signed-off-by: Jani Nikula 
---
 drivers/gpu/drm/i915/display/intel_de.h |  7 ++
 drivers/gpu/drm/i915/display/intel_vblank.c | 25 +
 2 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_de.h 
b/drivers/gpu/drm/i915/display/intel_de.h
index 3dbd76fdabd6..42552d8c151e 100644
--- a/drivers/gpu/drm/i915/display/intel_de.h
+++ b/drivers/gpu/drm/i915/display/intel_de.h
@@ -22,6 +22,13 @@ intel_de_read8(struct drm_i915_private *i915, i915_reg_t reg)
return intel_uncore_read8(>uncore, reg);
 }
 
+static inline u64
+intel_de_read64_2x32(struct drm_i915_private *i915,
+i915_reg_t lower_reg, i915_reg_t upper_reg)
+{
+   return intel_uncore_read64_2x32(>uncore, lower_reg, upper_reg);
+}
+
 static inline void
 intel_de_posting_read(struct drm_i915_private *i915, i915_reg_t reg)
 {
diff --git a/drivers/gpu/drm/i915/display/intel_vblank.c 
b/drivers/gpu/drm/i915/display/intel_vblank.c
index b2d4d289aaa7..4c83e2320bca 100644
--- a/drivers/gpu/drm/i915/display/intel_vblank.c
+++ b/drivers/gpu/drm/i915/display/intel_vblank.c
@@ -68,9 +68,8 @@ u32 i915_get_vblank_counter(struct drm_crtc *crtc)
struct drm_vblank_crtc *vblank = 
_priv->drm.vblank[drm_crtc_index(crtc)];
const struct drm_display_mode *mode = >hwmode;
enum pipe pipe = to_intel_crtc(crtc)->pipe;
-   i915_reg_t high_frame, low_frame;
-   u32 high1, high2, low, pixel, vbl_start, hsync_start, htotal;
-   unsigned long irqflags;
+   u32 pixel, vbl_start, hsync_start, htotal;
+   u64 frame;
 
/*
 * On i965gm TV output the frame counter only works up to
@@ -98,34 +97,22 @@ u32 i915_get_vblank_counter(struct drm_crtc *crtc)
/* Start of vblank event occurs at start of hsync */
vbl_start -= htotal - hsync_start;
 
-   high_frame = PIPEFRAME(pipe);
-   low_frame = PIPEFRAMEPIXEL(pipe);
-
-   spin_lock_irqsave(_priv->uncore.lock, irqflags);
-
/*
 * High & low register fields aren't synchronized, so make sure
 * we get a low value that's stable across two reads of the high
 * register.
 */
-   do {
-   high1 = intel_de_read_fw(dev_priv, high_frame) & 
PIPE_FRAME_HIGH_MASK;
-   low   = intel_de_read_fw(dev_priv, low_frame);
-   high2 = intel_de_read_fw(dev_priv, high_frame) & 
PIPE_FRAME_HIGH_MASK;
-   } while (high1 != high2);
-
-   spin_unlock_irqrestore(_priv->uncore.lock, irqflags);
+   frame = intel_de_read64_2x32(dev_priv, PIPEFRAMEPIXEL(pipe), 
PIPEFRAME(pipe));
 
-   high1 >>= PIPE_FRAME_HIGH_SHIFT;
-   pixel = low & PIPE_PIXEL_MASK;
-   low >>= PIPE_FRAME_LOW_SHIFT;
+   pixel = frame & PIPE_PIXEL_MASK;
+   frame = (frame >> PIPE_FRAME_LOW_SHIFT) & 0xff;
 
/*
 * The frame counter increments at beginning of active.
 * Cook up a vblank counter by also checking the pixel
 * counter against vblank start.
 */
-   return (((high1 << 8) | low) + (pixel >= vbl_start)) & 0xff;
+   return (frame + (pixel >= vbl_start)) & 0xff;
 }
 
 u32 g4x_get_vblank_counter(struct drm_crtc *crtc)
-- 
2.34.1



[Intel-gfx] [PATCH v2 4/5] drm/i915/vblank: use intel_de_read()

2023-01-16 Thread Jani Nikula
Use the intel_de_* functions for display registers.

Cc: Ville Syrjälä 
Reviewed-by: Arun R Murthy 
Signed-off-by: Jani Nikula 
---
 drivers/gpu/drm/i915/display/intel_vblank.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_vblank.c 
b/drivers/gpu/drm/i915/display/intel_vblank.c
index bc792b363ffc..b2d4d289aaa7 100644
--- a/drivers/gpu/drm/i915/display/intel_vblank.c
+++ b/drivers/gpu/drm/i915/display/intel_vblank.c
@@ -137,7 +137,7 @@ u32 g4x_get_vblank_counter(struct drm_crtc *crtc)
if (!vblank->max_vblank_count)
return 0;
 
-   return intel_uncore_read(_priv->uncore, PIPE_FRMCOUNT_G4X(pipe));
+   return intel_de_read(dev_priv, PIPE_FRMCOUNT_G4X(pipe));
 }
 
 static u32 intel_crtc_scanlines_since_frame_timestamp(struct intel_crtc *crtc)
-- 
2.34.1



[Intel-gfx] [PATCH v2 3/5] drm/i915/display: use common function for checking scanline is moving

2023-01-16 Thread Jani Nikula
cpt_verify_modeset() is roughly the same as
intel_wait_for_pipe_scanline_moving(). Assume it's close enough.

Cc: Ville Syrjälä 
Reviewed-by: Arun R Murthy 
Signed-off-by: Jani Nikula 
---
 drivers/gpu/drm/i915/display/intel_display.c | 18 +-
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index b5c0ab0f5e51..9b73663a0499 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1060,22 +1060,6 @@ intel_get_crtc_new_encoder(const struct 
intel_atomic_state *state,
return encoder;
 }
 
-static void cpt_verify_modeset(struct drm_i915_private *dev_priv,
-  enum pipe pipe)
-{
-   i915_reg_t dslreg = PIPEDSL(pipe);
-   u32 temp;
-
-   temp = intel_de_read(dev_priv, dslreg);
-   udelay(500);
-   if (wait_for(intel_de_read(dev_priv, dslreg) != temp, 5)) {
-   if (wait_for(intel_de_read(dev_priv, dslreg) != temp, 5))
-   drm_err(_priv->drm,
-   "mode set failed: pipe %c stuck\n",
-   pipe_name(pipe));
-   }
-}
-
 static void ilk_pfit_enable(const struct intel_crtc_state *crtc_state)
 {
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
@@ -1770,7 +1754,7 @@ static void ilk_crtc_enable(struct intel_atomic_state 
*state,
intel_encoders_enable(state, crtc);
 
if (HAS_PCH_CPT(dev_priv))
-   cpt_verify_modeset(dev_priv, pipe);
+   intel_wait_for_pipe_scanline_moving(crtc);
 
/*
 * Must wait for vblank to avoid spurious PCH FIFO underruns.
-- 
2.34.1



[Intel-gfx] [PATCH v2 2/5] drm/i915/display: move more scanline functions to intel_vblank.[ch]

2023-01-16 Thread Jani Nikula
Reduce clutter in intel_display.c by moving the scanline moving/stopped
wait functions to intel_vblank.[ch].

Cc: Ville Syrjälä 
Reviewed-by: Arun R Murthy 
Signed-off-by: Jani Nikula 
---
 drivers/gpu/drm/i915/display/intel_display.c | 36 +---
 drivers/gpu/drm/i915/display/intel_vblank.c  | 35 +++
 drivers/gpu/drm/i915/display/intel_vblank.h  |  2 ++
 3 files changed, 38 insertions(+), 35 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index 734e8e613f8e..b5c0ab0f5e51 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -112,6 +112,7 @@
 #include "intel_sprite.h"
 #include "intel_tc.h"
 #include "intel_tv.h"
+#include "intel_vblank.h"
 #include "intel_vdsc.h"
 #include "intel_vga.h"
 #include "intel_vrr.h"
@@ -384,41 +385,6 @@ struct intel_crtc *intel_master_crtc(const struct 
intel_crtc_state *crtc_state)
return to_intel_crtc(crtc_state->uapi.crtc);
 }
 
-static bool pipe_scanline_is_moving(struct drm_i915_private *dev_priv,
-   enum pipe pipe)
-{
-   i915_reg_t reg = PIPEDSL(pipe);
-   u32 line1, line2;
-
-   line1 = intel_de_read(dev_priv, reg) & PIPEDSL_LINE_MASK;
-   msleep(5);
-   line2 = intel_de_read(dev_priv, reg) & PIPEDSL_LINE_MASK;
-
-   return line1 != line2;
-}
-
-static void wait_for_pipe_scanline_moving(struct intel_crtc *crtc, bool state)
-{
-   struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
-   enum pipe pipe = crtc->pipe;
-
-   /* Wait for the display line to settle/start moving */
-   if (wait_for(pipe_scanline_is_moving(dev_priv, pipe) == state, 100))
-   drm_err(_priv->drm,
-   "pipe %c scanline %s wait timed out\n",
-   pipe_name(pipe), str_on_off(state));
-}
-
-static void intel_wait_for_pipe_scanline_stopped(struct intel_crtc *crtc)
-{
-   wait_for_pipe_scanline_moving(crtc, false);
-}
-
-static void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc)
-{
-   wait_for_pipe_scanline_moving(crtc, true);
-}
-
 static void
 intel_wait_for_pipe_off(const struct intel_crtc_state *old_crtc_state)
 {
diff --git a/drivers/gpu/drm/i915/display/intel_vblank.c 
b/drivers/gpu/drm/i915/display/intel_vblank.c
index 6392a56ae7d4..bc792b363ffc 100644
--- a/drivers/gpu/drm/i915/display/intel_vblank.c
+++ b/drivers/gpu/drm/i915/display/intel_vblank.c
@@ -417,3 +417,38 @@ int intel_get_crtc_scanline(struct intel_crtc *crtc)
 
return position;
 }
+
+static bool pipe_scanline_is_moving(struct drm_i915_private *dev_priv,
+   enum pipe pipe)
+{
+   i915_reg_t reg = PIPEDSL(pipe);
+   u32 line1, line2;
+
+   line1 = intel_de_read(dev_priv, reg) & PIPEDSL_LINE_MASK;
+   msleep(5);
+   line2 = intel_de_read(dev_priv, reg) & PIPEDSL_LINE_MASK;
+
+   return line1 != line2;
+}
+
+static void wait_for_pipe_scanline_moving(struct intel_crtc *crtc, bool state)
+{
+   struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
+   enum pipe pipe = crtc->pipe;
+
+   /* Wait for the display line to settle/start moving */
+   if (wait_for(pipe_scanline_is_moving(dev_priv, pipe) == state, 100))
+   drm_err(_priv->drm,
+   "pipe %c scanline %s wait timed out\n",
+   pipe_name(pipe), str_on_off(state));
+}
+
+void intel_wait_for_pipe_scanline_stopped(struct intel_crtc *crtc)
+{
+   wait_for_pipe_scanline_moving(crtc, false);
+}
+
+void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc)
+{
+   wait_for_pipe_scanline_moving(crtc, true);
+}
diff --git a/drivers/gpu/drm/i915/display/intel_vblank.h 
b/drivers/gpu/drm/i915/display/intel_vblank.h
index c68eda6488bf..c9fea2c2a990 100644
--- a/drivers/gpu/drm/i915/display/intel_vblank.h
+++ b/drivers/gpu/drm/i915/display/intel_vblank.h
@@ -17,5 +17,7 @@ u32 g4x_get_vblank_counter(struct drm_crtc *crtc);
 bool intel_crtc_get_vblank_timestamp(struct drm_crtc *crtc, int *max_error,
 ktime_t *vblank_time, bool in_vblank_irq);
 int intel_get_crtc_scanline(struct intel_crtc *crtc);
+void intel_wait_for_pipe_scanline_stopped(struct intel_crtc *crtc);
+void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc);
 
 #endif /* __INTEL_VBLANK_H__ */
-- 
2.34.1



[Intel-gfx] [PATCH v2 1/5] drm/i915/irq: split out vblank/scanline code to intel_vblank.[ch]

2023-01-16 Thread Jani Nikula
The vblank/scanline code is fairly isolated in i915_irq.c. Split it out
to new intel_vblank.[ch].

Cc: Ville Syrjälä 
Signed-off-by: Jani Nikula 
---
 drivers/gpu/drm/i915/Makefile |   1 +
 drivers/gpu/drm/i915/display/intel_crtc.c |   1 +
 .../drm/i915/display/intel_display_trace.h|   1 +
 drivers/gpu/drm/i915/display/intel_vblank.c   | 419 ++
 drivers/gpu/drm/i915/display/intel_vblank.h   |  21 +
 drivers/gpu/drm/i915/i915_irq.c   | 408 -
 drivers/gpu/drm/i915/i915_irq.h   |   6 -
 7 files changed, 443 insertions(+), 414 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/display/intel_vblank.c
 create mode 100644 drivers/gpu/drm/i915/display/intel_vblank.h

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index f47f00b162a4..2184bc5b2be7 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -266,6 +266,7 @@ i915-y += \
display/intel_quirks.o \
display/intel_sprite.o \
display/intel_tc.o \
+   display/intel_vblank.o \
display/intel_vga.o \
display/i9xx_plane.o \
display/skl_scaler.o \
diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c 
b/drivers/gpu/drm/i915/display/intel_crtc.c
index 037fc140b585..82be0fbe9934 100644
--- a/drivers/gpu/drm/i915/display/intel_crtc.c
+++ b/drivers/gpu/drm/i915/display/intel_crtc.c
@@ -28,6 +28,7 @@
 #include "intel_pipe_crc.h"
 #include "intel_psr.h"
 #include "intel_sprite.h"
+#include "intel_vblank.h"
 #include "intel_vrr.h"
 #include "skl_universal_plane.h"
 
diff --git a/drivers/gpu/drm/i915/display/intel_display_trace.h 
b/drivers/gpu/drm/i915/display/intel_display_trace.h
index 725aba3fa531..651ea8564e1b 100644
--- a/drivers/gpu/drm/i915/display/intel_display_trace.h
+++ b/drivers/gpu/drm/i915/display/intel_display_trace.h
@@ -17,6 +17,7 @@
 #include "i915_irq.h"
 #include "intel_crtc.h"
 #include "intel_display_types.h"
+#include "intel_vblank.h"
 
 #define __dev_name_i915(i915) dev_name((i915)->drm.dev)
 #define __dev_name_kms(obj) dev_name((obj)->base.dev->dev)
diff --git a/drivers/gpu/drm/i915/display/intel_vblank.c 
b/drivers/gpu/drm/i915/display/intel_vblank.c
new file mode 100644
index ..6392a56ae7d4
--- /dev/null
+++ b/drivers/gpu/drm/i915/display/intel_vblank.c
@@ -0,0 +1,419 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2022-2023 Intel Corporation
+ */
+
+#include "i915_drv.h"
+#include "i915_reg.h"
+#include "intel_de.h"
+#include "intel_display_types.h"
+#include "intel_vblank.h"
+
+/*
+ * This timing diagram depicts the video signal in and
+ * around the vertical blanking period.
+ *
+ * Assumptions about the fictitious mode used in this example:
+ *  vblank_start >= 3
+ *  vsync_start = vblank_start + 1
+ *  vsync_end = vblank_start + 2
+ *  vtotal = vblank_start + 3
+ *
+ *   start of vblank:
+ *   latch double buffered registers
+ *   increment frame counter (ctg+)
+ *   generate start of vblank interrupt (gen4+)
+ *   |
+ *   |  frame start:
+ *   |  generate frame start interrupt (aka. vblank interrupt) 
(gmch)
+ *   |  may be shifted forward 1-3 extra lines via PIPECONF
+ *   |  |
+ *   |  |  start of vsync:
+ *   |  |  generate vsync interrupt
+ *   |  |  |
+ * ______________________________
___
+ *   .   \hs/   .  \hs/  \hs/  \hs/   .  \hs/
+ * va---> <-vb> 
 |
+ * -vbs-> <---vbs+1---> <---vbs+2---> <-0-> <-1-> 
<-2--- (scanline counter gen2)
+ * -vbs-2---> <---vbs-1---> <---vbs-> <---vbs+1---> <---vbs+2---> 
<-0--- (scanline counter gen3+)
+ * -vbs-2---> <---vbs-2---> <---vbs-1---> <---vbs-> <---vbs+1---> 
<---vbs+2- (scanline counter hsw+ hdmi)
+ *   |  | |
+ *   last visible pixel   first visible 
pixel
+ *  | increment frame 
counter (gen3/4)
+ *  pixel counter = vblank_start * htotal pixel counter = 
0 (gen3/4)
+ *
+ * x  = horizontal active
+ * _  = horizontal blanking
+ * hs = horizontal sync
+ * va = vertical active
+ * vb = vertical blanking
+ * vs = vertical sync
+ * vbs = vblank_start (number)
+ *
+ * Summary:
+ * - most events happen at the start of horizontal sync
+ * - frame start happens at the start of horizontal blank, 1-4 lines
+ *   (depending on PIPECONF settings) after the start of vblank
+ * - gen3/4 pixel and frame counter are synchronized with the start
+ *   of horizontal active on the first line of vertical active
+ */
+
+/*
+ * Called from drm generic code, passed a 

[Intel-gfx] [PATCH v2 0/5] drm/i915: extract vblank/scanline code to a separate file

2023-01-16 Thread Jani Nikula
Basically just https://patchwork.freedesktop.org/series/111854/ with the
two controversial patches dropped for now.

BR,
Jani.

Jani Nikula (5):
  drm/i915/irq: split out vblank/scanline code to intel_vblank.[ch]
  drm/i915/display: move more scanline functions to intel_vblank.[ch]
  drm/i915/display: use common function for checking scanline is moving
  drm/i915/vblank: use intel_de_read()
  drm/i915/vblank: add and use intel_de_read64_2x32() to read vblank
counter

 drivers/gpu/drm/i915/Makefile |   1 +
 drivers/gpu/drm/i915/display/intel_crtc.c |   1 +
 drivers/gpu/drm/i915/display/intel_de.h   |   7 +
 drivers/gpu/drm/i915/display/intel_display.c  |  54 +--
 .../drm/i915/display/intel_display_trace.h|   1 +
 drivers/gpu/drm/i915/display/intel_vblank.c   | 441 ++
 drivers/gpu/drm/i915/display/intel_vblank.h   |  23 +
 drivers/gpu/drm/i915/i915_irq.c   | 408 
 drivers/gpu/drm/i915/i915_irq.h   |   6 -
 9 files changed, 476 insertions(+), 466 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/display/intel_vblank.c
 create mode 100644 drivers/gpu/drm/i915/display/intel_vblank.h

-- 
2.34.1



[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Use designated initializers for struct pci_device_id init

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/i915: Use designated initializers for struct pci_device_id init
URL   : https://patchwork.freedesktop.org/series/112887/
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:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced 
symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced 
symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced 
symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced 
symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced 
symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced 
symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced 
symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced 
symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced 
symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced 
symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced 
symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced 
symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced 
symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced 
symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced 
symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:57:9: warning: unreplaced 
symbol 'mask'

Re: [Intel-gfx] [PATCH 3/4] drm/i915/guc: Look for a guilty context when an engine reset fails

2023-01-16 Thread Tvrtko Ursulin



On 14/01/2023 01:27, John Harrison wrote:

On 1/13/2023 01:22, Tvrtko Ursulin wrote:

On 12/01/2023 20:59, John Harrison wrote:

On 1/12/2023 02:15, Tvrtko Ursulin wrote:

On 12/01/2023 02:53, john.c.harri...@intel.com wrote:

From: John Harrison 

Engine resets are supposed to never fail. But in the case when one
does (due to unknown reasons that normally come down to a missing
w/a), it is useful to get as much information out of the system as
possible. Given that the GuC effectively dies on such a situation, it
is not possible to get a guilty context notification back. So do a
manual search instead. Given that GuC is dead, this is safe because
GuC won't be changing the engine state asynchronously.

Signed-off-by: John Harrison 
---
  .../gpu/drm/i915/gt/uc/intel_guc_submission.c   | 17 
+++--

  1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c

index b436dd7f12e42..99d09e3394597 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -4754,11 +4754,24 @@ static void reset_fail_worker_func(struct 
work_struct *w)

  guc->submission_state.reset_fail_mask = 0;
spin_unlock_irqrestore(>submission_state.lock, flags);
  -    if (likely(reset_fail_mask))
+    if (likely(reset_fail_mask)) {
+    struct intel_engine_cs *engine;
+    enum intel_engine_id id;
+
+    /*
+ * GuC is toast at this point - it dead loops after 
sending the failed
+ * reset notification. So need to manually determine the 
guilty context.
+ * Note that it should be safe/reliable to do this here 
because the GuC

+ * is toast and will not be scheduling behind the KMD's back.
+ */
+    for_each_engine_masked(engine, gt, reset_fail_mask, id)
+    intel_guc_find_hung_context(engine);
+
  intel_gt_handle_error(gt, reset_fail_mask,
    I915_ERROR_CAPTURE,
-  "GuC failed to reset engine mask=0x%x\n",
+  "GuC failed to reset engine mask=0x%x",
    reset_fail_mask);
+    }
  }
    int intel_guc_engine_failure_process_msg(struct intel_guc *guc,


This one I don't feel "at home" enough to r-b. Just a question - can 
we be sure at this point that GuC is 100% stuck and there isn't a 
chance it somehow comes alive and starts running in parallel (being 
driven in parallel by a different "thread" in i915), interfering 
with the assumption made in the comment?
The GuC API definition for the engine reset failure notification is 
that GuC will dead loop itself after sending - to quote "This is a 
catastrophic failure that requires a full GT reset, or FLR to 
recover.". So yes, GuC is 100% stuck and is not going to self 
recover. Guaranteed. If that changes in the future then that would be 
a backwards breaking API change and would require a corresponding 
driver update to go with supporting the new GuC firmware version.


There is the potential for a GT reset to maybe occur in parallel and 
resurrect the GuC that way. Not sure how that could happen though. 
The heartbeat timeout is significantly longer than the GuC's 
pre-emption timeout + engine reset timeout. That just leaves manual 
resets from the user or maybe from a selftest. If the user is 
manually poking reset debugfs files then it is already known that all 
bets are off in terms of getting an accurate error capture. And if a 
selftest is triggering GT resets in parallel with engine resets then 
either it is a broken test or it is attempting to test an evil corner 
case in which it is expected that error capture results will be 
unreliable. Having said all that, given that the submission_state 
lock is held here, such a GT reset would not get very far in bring 
the GuC back up anyway. Certainly, it would not be able to get as far 
as submitting new work and thus potentially changing the engine state.


So yes, if multiple impossible events occur back to back then the 
error capture may be wonky. Where wonky means a potentially innocent 
context/request gets blamed for breaking the hardware. Oh dear. I can 
live with that.


Okay, so I was triggered by the "safe/reliable" qualification from the 
comment. I agree "reliable" does not have to be and was mostly worried 
about the "safe" part.


From what you explain if short heartbeat, or manual reset invocation, 
could actually mess up any of the data structures which added 
intel_guc_find_hung_context walks and so crash the kernel.


Looking inside, there is some lock dropping going on (and undocumented 
irqsave games), and walking the list while unlocked. So whether or not 
that can go bang if a full reset happens in parallel and re-activates 
the normal driver flows.
There is no walking of unlocked lists. The xa_lock is held whenever it 
looks at the xa structure itself. The release is only while 

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/{amdgpu, i915, nouveau, radeon}: Fix fbdev and vga-switcheroo

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/{amdgpu, i915, nouveau, radeon}: Fix fbdev and vga-switcheroo
URL   : https://patchwork.freedesktop.org/series/112884/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12586 -> Patchwork_112884v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (44 -> 42)
--

  Missing(2): fi-bsw-kefka fi-snb-2520m 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@fbdev@write:
- fi-blb-e6850:   [PASS][1] -> [SKIP][2] ([fdo#109271]) +4 similar 
issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/fi-blb-e6850/igt@fb...@write.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/fi-blb-e6850/igt@fb...@write.html

  * igt@gem_exec_suspend@basic-s3@smem:
- fi-rkl-11600:   NOTRUN -> [INCOMPLETE][3] ([i915#7793])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/fi-rkl-11600/igt@gem_exec_suspend@basic...@smem.html

  
 Possible fixes 

  * igt@gem_exec_suspend@basic-s0@smem:
- {bat-rplp-1}:   [DMESG-WARN][4] -> [PASS][5] +5 similar issues
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/bat-rplp-1/igt@gem_exec_suspend@basic...@smem.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/bat-rplp-1/igt@gem_exec_suspend@basic...@smem.html

  * igt@i915_pm_rpm@module-reload:
- {bat-rplp-1}:   [SKIP][6] -> [PASS][7]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/bat-rplp-1/igt@i915_pm_...@module-reload.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/bat-rplp-1/igt@i915_pm_...@module-reload.html

  * igt@i915_selftest@live@hangcheck:
- {bat-dg2-11}:   [INCOMPLETE][8] ([i915#7834]) -> [PASS][9]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/bat-dg2-11/igt@i915_selftest@l...@hangcheck.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/bat-dg2-11/igt@i915_selftest@l...@hangcheck.html

  * igt@i915_selftest@live@requests:
- {bat-rpls-1}:   [INCOMPLETE][10] ([i915#4983] / [i915#6257]) -> 
[PASS][11]
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/bat-rpls-1/igt@i915_selftest@l...@requests.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/bat-rpls-1/igt@i915_selftest@l...@requests.html

  * igt@i915_suspend@basic-s3-without-i915:
- fi-apl-guc: [DMESG-WARN][12] ([i915#1982]) -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/fi-apl-guc/igt@i915_susp...@basic-s3-without-i915.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/fi-apl-guc/igt@i915_susp...@basic-s3-without-i915.html

  
 Warnings 

  * igt@i915_suspend@basic-s3-without-i915:
- fi-rkl-11600:   [INCOMPLETE][14] ([i915#4817]) -> [FAIL][15] 
([fdo#103375])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/fi-rkl-11600/igt@i915_susp...@basic-s3-without-i915.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112884v1/fi-rkl-11600/igt@i915_susp...@basic-s3-without-i915.html

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

  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#4817]: https://gitlab.freedesktop.org/drm/intel/issues/4817
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
  [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
  [i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
  [i915#7625]: https://gitlab.freedesktop.org/drm/intel/issues/7625
  [i915#7793]: https://gitlab.freedesktop.org/drm/intel/issues/7793
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#7834]: https://gitlab.freedesktop.org/drm/intel/issues/7834


Build changes
-

  * Linux: CI_DRM_12586 -> Patchwork_112884v1

  CI-20190529: 20190529
  CI_DRM_12586: fa21fb1326b89fe3d376d82a6ce95d7cf0bcefb1 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7119: 1e6d24e6dfa42b22f950f7d5e436b8f9acf8747f @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_112884v1: fa21fb1326b89fe3d376d82a6ce95d7cf0bcefb1 @ 
git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

4ca9b180c90f drm: Call vga_switcheroo_process_delayed_switch() in drm_lastclose
4b806f586c2a drm/fb-helper: Set framebuffer for 

Re: [Intel-gfx] [PATCH 1/4] drm/i915: Allow error capture without a request

2023-01-16 Thread Tvrtko Ursulin



On 13/01/2023 21:29, John Harrison wrote:

On 1/13/2023 09:46, Hellstrom, Thomas wrote:

On Fri, 2023-01-13 at 09:51 +, Tvrtko Ursulin wrote:

On 12/01/2023 20:40, John Harrison wrote:

On 1/12/2023 02:01, Tvrtko Ursulin wrote:

On 12/01/2023 02:53, john.c.harri...@intel.com wrote:


[snip]


+ engine->name);
+    rq = NULL;
+    }
   } else {
   /*
    * Getting here with GuC enabled means it is a forced
error
capture
@@ -1622,22 +1645,24 @@ capture_engine(struct intel_engine_cs
*engine,
  flags);
   }
   }
-    if (rq)
+    if (rq) {
   rq = i915_request_get_rcu(rq);
+    capture = intel_engine_coredump_add_request(ee, rq,
ATOMIC_MAYFAIL);
+    } else if (ce) {
+    capture = engine_coredump_add_context(ee, ce,
ATOMIC_MAYFAIL);
+    }
   -    if (!rq)
-    goto no_request_capture;
-
-    capture = intel_engine_coredump_add_request(ee, rq,
ATOMIC_MAYFAIL);
   if (!capture) {
-    i915_request_put(rq);
+    if (rq)
+    i915_request_put(rq);
   goto no_request_capture;
   }
   if (dump_flags & CORE_DUMP_FLAG_IS_GUC_CAPTURE)
   intel_guc_capture_get_matching_node(engine->gt, ee,
ce);

This step requires non-NULL ce, so if you move it under the "else
if
(ce)" above then I *think* exit from the function can be
consolidated
to just:

if (capture) {
 intel_engine_coredump_add_vma(ee, capture, compress);
 if (rq)
 i915_request_put(rq);

Is there any reason the rq ref needs to be held during the add_vma
call?
Can it now just be moved earlier to be:
  if (rq) {
      rq = i915_request_get_rcu(rq);
      capture = intel_engine_coredump_add_request(ee, rq,
ATOMIC_MAYFAIL);
      i915_request_put(rq);
  }

The internals of the request object are only touched in the above
_add_request() code. The later _add_vma() call fiddles around with
vmas
that pulled from the request but the capture_vma code inside
_add_request() has already copied everything, hasn't it? Or rather,
it
has grabbed its own private vma resource locks. So there is no
requirement to keep the request itself around still?

That sounds correct. It was some time ago since I worked with this code
but when i started IIRC KASAN told me the request along with the whole
capture list could disappear under us due to a parallel capture.

So the request reference added then might cover a bit too much now that
we also hold references on vma resources, which it looks like we do in
intel_engine_coredump_add_vma().

So that means we end up with:
     rq = intel_context_find_active_request(ce);
     ...
     [test stuff like i915_request_started(rq)]
     ...
  if (rq) {
         rq = i915_request_get_rcu(rq);
         capture = intel_engine_coredump_add_request(ee, rq, 
ATOMIC_MAYFAIL);

         i915_request_put(rq);
     }

What is special about coredump_add_request() that it needs the request 
to be extra locked for that call and only that call? If the request can 
magically vanish after being found then what protects the _started() 
query? For that matter, what stops the request_get_rcu() itself being 
called on a pointer that is no longer valid? And if we do actually have 
sufficient locking in place to prevent that, why doesn't that cover the 
coredump_add_request() usage?


There is definitely a red flag there with the difference between the if 
and else blocks at the top of capture_engine(). And funnily enough, the 
first block appears to be GuC only. That is not obvious from the code 
and should probably have a comment, or function names made self-documenting.


I guess the special thing about intel_engine_coredump_add_request() is 
that it dereferences the rq. So it is possibly 573ba126aef3 
("drm/i915/guc: Capture error state on context reset") which added a bug 
where rq can be dereferenced with a reference held. Or perhaps with the 
GuC backend there is a guarantee request cannot be retired from 
elsewhere while error capture is examining it.


To unravel the error entry points into error capture, from execlists, 
debugfs, ringbuffer, I don't have the time to remind myself how all that 
works right now. Quite possibly at least some of those run async to the 
GPU so must be safe against parallel request retirement. So I don't know 
if the i915_request_get_rcu safe in all those cases without spending 
some time to refresh my knowledge a bit.


Sounds like the best plan is not to change this too much - just leave 
the scope of reference held as is and ideally eliminate the necessary 
goto labels. AFAIR that should be doable without changing anything real 
and unblock these improvements.


Regards,

Tvrtko


[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/{amdgpu, i915, nouveau, radeon}: Fix fbdev and vga-switcheroo

2023-01-16 Thread Patchwork
== Series Details ==

Series: drm/{amdgpu, i915, nouveau, radeon}: Fix fbdev and vga-switcheroo
URL   : https://patchwork.freedesktop.org/series/112884/
State : warning

== Summary ==

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




[Intel-gfx] [PATCH 3/3] drm/i915: define INTEL_VGA_DEVICE_INIT() for subplatform init

2023-01-16 Thread Jani Nikula
Redefine INTEL_VGA_DEVICE_INIT() instead of INTEL_VGA_DEVICE() for
subplatform init. This is only for completeness as we don't use
subplatforms for Quanta devices.

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

diff --git a/drivers/gpu/drm/i915/intel_device_info.c 
b/drivers/gpu/drm/i915/intel_device_info.c
index 05e90d09b208..00a2b229cd7c 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -143,8 +143,8 @@ void intel_device_info_print(const struct intel_device_info 
*info,
drm_printf(p, "rawclk rate: %u kHz\n", runtime->rawclk_freq);
 }
 
-#undef INTEL_VGA_DEVICE
-#define INTEL_VGA_DEVICE(id, info) (id)
+#undef INTEL_VGA_DEVICE_INIT
+#define INTEL_VGA_DEVICE_INIT(__id, ...) (__id)
 
 static const u16 subplatform_ult_ids[] = {
INTEL_HSW_ULT_GT1_IDS(0),
-- 
2.34.1



[Intel-gfx] [PATCH 0/3] drm/i915: Use designated initializers for struct pci_device_id init

2023-01-16 Thread Jani Nikula
Use designated initializers for struct pci_device_id init.

Jani Nikula (3):
  drm/i915/pciids: add common INTEL_VGA_DEVICE_INIT macro
  drm/i915/pciids: use designated initializers for struct pci_device_id
  drm/i915: define INTEL_VGA_DEVICE_INIT() for subplatform init

 drivers/gpu/drm/i915/intel_device_info.c |  4 +--
 include/drm/i915_pciids.h| 43 +---
 2 files changed, 26 insertions(+), 21 deletions(-)

-- 
2.34.1



[Intel-gfx] [PATCH 2/3] drm/i915/pciids: use designated initializers for struct pci_device_id

2023-01-16 Thread Jani Nikula
Use designated initializers for struct pci_device_id in kernel to avoid
the dependency on struct pci_device_id remaining unchanged. Recently,
commit 343b7258687e ("PCI: Add 'override_only' field to struct
pci_device_id") added a new member leading to warnings about missing
field initializers.

Any userspace using this header should switch to defining their own
initializers. The old one is left in place for now.

References: https://lore.kernel.org/all/202108272322.eipbbeap-...@intel.com
Reported-by: kernel test robot 
Signed-off-by: Jani Nikula 
---
 include/drm/i915_pciids.h | 20 
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
index 0987bc12476f..7baf14fcb7c2 100644
--- a/include/drm/i915_pciids.h
+++ b/include/drm/i915_pciids.h
@@ -25,15 +25,18 @@
 #ifndef _I915_PCIIDS_H
 #define _I915_PCIIDS_H
 
+#ifdef __KERNEL__
+/* Initializer for struct pci_device_id. */
+#define INTEL_VGA_DEVICE_INIT(__id, __subvendor, __subdevice, __info) { \
+   .vendor = 0x8086, .device = (__id), \
+   .subvendor = (__subvendor), .subdevice = (__subdevice), \
+   .class = 0x03, .class_mask = 0xff,  \
+   .driver_data = (kernel_ulong_t)(__info),\
+   }
+#else
 /*
- * A pci_device_id struct {
- * __u32 vendor, device;
- *  __u32 subvendor, subdevice;
- * __u32 class, class_mask;
- * kernel_ulong_t driver_data;
- * };
- * Don't use C99 here because "class" is reserved and we want to
- * give userspace flexibility.
+ * Transitional. Non-kernel users should define INTEL_VGA_DEVICE_INIT()
+ * themselves.
  */
 #define INTEL_VGA_DEVICE_INIT(__id, __subvendor, __subdevice, __info) { \
0x8086, (__id), \
@@ -41,6 +44,7 @@
0x03, 0xff, \
(unsigned long)(__info),\
}
+#endif
 
 #define INTEL_VGA_DEVICE(__id, __info) \
INTEL_VGA_DEVICE_INIT(__id, ~0, ~0, __info)
-- 
2.34.1



[Intel-gfx] [PATCH 1/3] drm/i915/pciids: add common INTEL_VGA_DEVICE_INIT macro

2023-01-16 Thread Jani Nikula
Add a shared abstraction for the INTEL_VGA_DEVICE() and
INTEL_QUANTA_VGA_DEVICE() initializers to help follow-up changes.

Sprinkle in some underscores and parenthesis to be safe.

Signed-off-by: Jani Nikula 
---
 include/drm/i915_pciids.h | 23 ---
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
index 4a4c190f7698..0987bc12476f 100644
--- a/include/drm/i915_pciids.h
+++ b/include/drm/i915_pciids.h
@@ -35,17 +35,18 @@
  * Don't use C99 here because "class" is reserved and we want to
  * give userspace flexibility.
  */
-#define INTEL_VGA_DEVICE(id, info) {   \
-   0x8086, id, \
-   ~0, ~0, \
-   0x03, 0xff, \
-   (unsigned long) info }
-
-#define INTEL_QUANTA_VGA_DEVICE(info) {\
-   0x8086, 0x16a,  \
-   0x152d, 0x8990, \
-   0x03, 0xff, \
-   (unsigned long) info }
+#define INTEL_VGA_DEVICE_INIT(__id, __subvendor, __subdevice, __info) { \
+   0x8086, (__id), \
+   (__subvendor), (__subdevice),   \
+   0x03, 0xff, \
+   (unsigned long)(__info),\
+   }
+
+#define INTEL_VGA_DEVICE(__id, __info) \
+   INTEL_VGA_DEVICE_INIT(__id, ~0, ~0, __info)
+
+#define INTEL_QUANTA_VGA_DEVICE(__info)\
+   INTEL_VGA_DEVICE_INIT(0x16a, 0x152d, 0x8990, __info)
 
 #define INTEL_I810_IDS(info)   \
INTEL_VGA_DEVICE(0x7121, info), /* I810 */  \
-- 
2.34.1



Re: [Intel-gfx] [PATCH 1/4] drm/i915: Allow error capture without a request

2023-01-16 Thread Tvrtko Ursulin



On 13/01/2023 17:46, Hellstrom, Thomas wrote:

On Fri, 2023-01-13 at 09:51 +, Tvrtko Ursulin wrote:


On 12/01/2023 20:40, John Harrison wrote:

On 1/12/2023 02:01, Tvrtko Ursulin wrote:

On 12/01/2023 02:53, john.c.harri...@intel.com wrote:

From: John Harrison 

There was a report of error captures occurring without any hung
context being indicated despite the capture being initiated by
a 'hung
context notification' from GuC. The problem was not
reproducible.
However, it is possible to happen if the context in question
has no
active requests. For example, if the hang was in the context
switch
itself then the breadcrumb write would have occurred and the
KMD would
see an idle context.

In the interests of attempting to provide as much information
as
possible about a hang, it seems wise to include the engine info
regardless of whether a request was found or not. As opposed to
just
prentending there was no hang at all.

So update the error capture code to always record engine
information
if an engine is given. Which means updating record_context() to
take a
context instead of a request (which it only ever used to find
the
context anyway). And split the request agnostic parts of
intel_engine_coredump_add_request() out into a seaprate
function.

v2: Remove a duplicate 'if' statement (Umesh) and fix a put of
a null
pointer.

Signed-off-by: John Harrison 
Reviewed-by: Umesh Nerlige Ramappa

---
   drivers/gpu/drm/i915/i915_gpu_error.c | 61
+++
   1 file changed, 43 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c
b/drivers/gpu/drm/i915/i915_gpu_error.c
index 9d5d5a397b64e..bd2cf7d235df0 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -1370,14 +1370,14 @@ static void
engine_record_execlists(struct
intel_engine_coredump *ee)
   }
     static bool record_context(struct i915_gem_context_coredump
*e,
-   const struct i915_request *rq)
+   struct intel_context *ce)
   {
   struct i915_gem_context *ctx;
   struct task_struct *task;
   bool simulated;
     rcu_read_lock();
-    ctx = rcu_dereference(rq->context->gem_context);
+    ctx = rcu_dereference(ce->gem_context);
   if (ctx && !kref_get_unless_zero(>ref))
   ctx = NULL;
   rcu_read_unlock();
@@ -1396,8 +1396,8 @@ static bool record_context(struct
i915_gem_context_coredump *e,
   e->guilty = atomic_read(>guilty_count);
   e->active = atomic_read(>active_count);
   -    e->total_runtime =
intel_context_get_total_runtime_ns(rq->context);
-    e->avg_runtime = intel_context_get_avg_runtime_ns(rq-

context);

+    e->total_runtime = intel_context_get_total_runtime_ns(ce);
+    e->avg_runtime = intel_context_get_avg_runtime_ns(ce);
     simulated = i915_gem_context_no_error_capture(ctx);
   @@ -1532,15 +1532,37 @@ intel_engine_coredump_alloc(struct
intel_engine_cs *engine, gfp_t gfp, u32 dump_
   return ee;
   }
   +static struct intel_engine_capture_vma *
+engine_coredump_add_context(struct intel_engine_coredump *ee,
+    struct intel_context *ce,
+    gfp_t gfp)
+{
+    struct intel_engine_capture_vma *vma = NULL;
+
+    ee->simulated |= record_context(>context, ce);
+    if (ee->simulated)
+    return NULL;
+
+    /*
+ * We need to copy these to an anonymous buffer
+ * as the simplest method to avoid being overwritten
+ * by userspace.
+ */
+    vma = capture_vma(vma, ce->ring->vma, "ring", gfp);
+    vma = capture_vma(vma, ce->state, "HW context", gfp);
+
+    return vma;
+}
+
   struct intel_engine_capture_vma *
   intel_engine_coredump_add_request(struct
intel_engine_coredump *ee,
     struct i915_request *rq,
     gfp_t gfp)
   {
-    struct intel_engine_capture_vma *vma = NULL;
+    struct intel_engine_capture_vma *vma;
   -    ee->simulated |= record_context(>context, rq);
-    if (ee->simulated)
+    vma = engine_coredump_add_context(ee, rq->context, gfp);
+    if (!vma)
   return NULL;
     /*
@@ -1550,8 +1572,6 @@ intel_engine_coredump_add_request(struct
intel_engine_coredump *ee,
    */
   vma = capture_vma_snapshot(vma, rq->batch_res, gfp,
"batch");
   vma = capture_user(vma, rq, gfp);
-    vma = capture_vma(vma, rq->ring->vma, "ring", gfp);
-    vma = capture_vma(vma, rq->context->state, "HW context",
gfp);
     ee->rq_head = rq->head;
   ee->rq_post = rq->postfix;
@@ -1608,8 +1628,11 @@ capture_engine(struct intel_engine_cs
*engine,
   if (ce) {
   intel_engine_clear_hung_context(engine);
   rq = intel_context_find_active_request(ce);
-    if (!rq || !i915_request_started(rq))
-    goto no_request_capture;
+    if (rq && !i915_request_started(rq)) {
+    drm_info(>gt->i915->drm, "Got hung context
on %s
with no active request!\n",


Suggest s/active/started/ since we have both i915_request_active
and

[Intel-gfx] ✓ Fi.CI.BAT: success for We need to have additional checks for DP MST UHBR

2023-01-16 Thread Patchwork
== Series Details ==

Series: We need to have additional checks for DP MST UHBR
URL   : https://patchwork.freedesktop.org/series/112876/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12586 -> Patchwork_112876v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (44 -> 41)
--

  Missing(3): fi-rkl-11600 bat-atsm-1 fi-snb-2520m 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@fbdev@write:
- fi-blb-e6850:   [PASS][1] -> [SKIP][2] ([fdo#109271]) +4 similar 
issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/fi-blb-e6850/igt@fb...@write.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/fi-blb-e6850/igt@fb...@write.html

  * igt@i915_selftest@live@execlists:
- fi-bsw-n3050:   [PASS][3] -> [INCOMPLETE][4] ([i915#6972])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/fi-bsw-n3050/igt@i915_selftest@l...@execlists.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/fi-bsw-n3050/igt@i915_selftest@l...@execlists.html

  * igt@runner@aborted:
- fi-bsw-n3050:   NOTRUN -> [FAIL][5] ([fdo#109271] / [i915#4312])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/fi-bsw-n3050/igt@run...@aborted.html

  
 Possible fixes 

  * igt@gem_exec_gttfill@basic:
- fi-pnv-d510:[FAIL][6] ([i915#7229]) -> [PASS][7]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/fi-pnv-d510/igt@gem_exec_gttf...@basic.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/fi-pnv-d510/igt@gem_exec_gttf...@basic.html

  * igt@gem_exec_suspend@basic-s0@smem:
- {bat-rplp-1}:   [DMESG-WARN][8] -> [PASS][9] +5 similar issues
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/bat-rplp-1/igt@gem_exec_suspend@basic...@smem.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/bat-rplp-1/igt@gem_exec_suspend@basic...@smem.html

  * igt@i915_pm_rpm@module-reload:
- {bat-rplp-1}:   [SKIP][10] -> [PASS][11]
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/bat-rplp-1/igt@i915_pm_...@module-reload.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/bat-rplp-1/igt@i915_pm_...@module-reload.html

  * igt@i915_selftest@live@hangcheck:
- fi-adl-ddr5:[DMESG-WARN][12] ([i915#5591]) -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/fi-adl-ddr5/igt@i915_selftest@l...@hangcheck.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/fi-adl-ddr5/igt@i915_selftest@l...@hangcheck.html
- {bat-dg2-11}:   [INCOMPLETE][14] ([i915#7834]) -> [PASS][15]
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/bat-dg2-11/igt@i915_selftest@l...@hangcheck.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/bat-dg2-11/igt@i915_selftest@l...@hangcheck.html

  * igt@i915_selftest@live@requests:
- {bat-rpls-1}:   [INCOMPLETE][16] ([i915#4983] / [i915#6257]) -> 
[PASS][17]
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/bat-rpls-1/igt@i915_selftest@l...@requests.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/bat-rpls-1/igt@i915_selftest@l...@requests.html

  * igt@i915_suspend@basic-s3-without-i915:
- fi-apl-guc: [DMESG-WARN][18] ([i915#1982]) -> [PASS][19]
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/fi-apl-guc/igt@i915_susp...@basic-s3-without-i915.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/fi-apl-guc/igt@i915_susp...@basic-s3-without-i915.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic:
- fi-bsw-kefka:   [FAIL][20] ([i915#2346]) -> [PASS][21]
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12586/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cur...@atomic.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_112876v1/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cur...@atomic.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
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5591]: https://gitlab.freedesktop.org/drm/intel/issues/5591
  [i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
  [i915#6367]: 

[Intel-gfx] [PATCH v3 3/3] drm: Call vga_switcheroo_process_delayed_switch() in drm_lastclose

2023-01-16 Thread Thomas Zimmermann
Several lastclose helpers call vga_switcheroo_process_delayed_switch().
It's better to call the helper from drm_lastclose() after the kernel
client's screen has been restored. This way, all drivers can benefit
without having to implement their own lastclose helper. For drivers
without vga-switcheroo, vga_switcheroo_process_delayed_switch() does
nothing.

There was an earlier patchset to do something similar. [1]

v3:
* include drm_fb_helper.h in radeon_drv.c
v2:
* handle vga_switcheroo_client_fb_set() in a separate patch
* also update i915, nouveau and radeon
* remove unnecessary include statements
* update vga-switcheroo docs

Suggested-by: Alexander Deucher 
Signed-off-by: Thomas Zimmermann 
Reviewed-by: Daniel Vetter 
Reviewed-by: Alex Deucher 
Link: 
https://lore.kernel.org/amd-gfx/20221020143603.563929-1-alexander.deuc...@amd.com/
 # 1
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c |  2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 13 -
 drivers/gpu/drm/drm_file.c  |  3 +++
 drivers/gpu/drm/i915/i915_driver.c  | 25 ++---
 drivers/gpu/drm/nouveau/nouveau_drm.c   |  1 -
 drivers/gpu/drm/nouveau/nouveau_vga.c   |  7 ---
 drivers/gpu/drm/nouveau/nouveau_vga.h   |  1 -
 drivers/gpu/drm/radeon/radeon_drv.c |  3 ++-
 drivers/gpu/drm/radeon/radeon_drv.h |  1 -
 drivers/gpu/drm/radeon/radeon_kms.c | 18 --
 drivers/gpu/vga/vga_switcheroo.c|  4 ++--
 12 files changed, 9 insertions(+), 70 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h 
b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 63c921c55fb9..7120b9b6e580 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1330,7 +1330,6 @@ extern const int amdgpu_max_kms_ioctl;
 
 int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags);
 void amdgpu_driver_unload_kms(struct drm_device *dev);
-void amdgpu_driver_lastclose_kms(struct drm_device *dev);
 int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv);
 void amdgpu_driver_postclose_kms(struct drm_device *dev,
 struct drm_file *file_priv);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index c39245f737a7..b9b22a355cb0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -33,7 +33,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -2778,7 +2777,6 @@ static const struct drm_driver amdgpu_kms_driver = {
DRIVER_SYNCOBJ_TIMELINE,
.open = amdgpu_driver_open_kms,
.postclose = amdgpu_driver_postclose_kms,
-   .lastclose = amdgpu_driver_lastclose_kms,
.ioctls = amdgpu_ioctls_kms,
.num_ioctls = ARRAY_SIZE(amdgpu_ioctls_kms),
.dumb_create = amdgpu_mode_dumb_create,
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 7aa7e52ca784..a37be02fb2fc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -34,7 +34,6 @@
 #include "amdgpu_vce.h"
 #include "atom.h"
 
-#include 
 #include 
 #include 
 #include 
@@ -1104,18 +1103,6 @@ int amdgpu_info_ioctl(struct drm_device *dev, void 
*data, struct drm_file *filp)
 /*
  * Outdated mess for old drm with Xorg being in charge (void function now).
  */
-/**
- * amdgpu_driver_lastclose_kms - drm callback for last close
- *
- * @dev: drm dev pointer
- *
- * Switch vga_switcheroo state after last close (all asics).
- */
-void amdgpu_driver_lastclose_kms(struct drm_device *dev)
-{
-   drm_fb_helper_lastclose(dev);
-   vga_switcheroo_process_delayed_switch();
-}
 
 /**
  * amdgpu_driver_open_kms - drm callback for open
diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c
index a51ff8cee049..314c309db9a3 100644
--- a/drivers/gpu/drm/drm_file.c
+++ b/drivers/gpu/drm/drm_file.c
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -460,6 +461,8 @@ void drm_lastclose(struct drm_device * dev)
drm_legacy_dev_reinit(dev);
 
drm_client_dev_restore(dev);
+
+   vga_switcheroo_process_delayed_switch();
 }
 
 /**
diff --git a/drivers/gpu/drm/i915/i915_driver.c 
b/drivers/gpu/drm/i915/i915_driver.c
index 33e231b120c1..bf6ad8620970 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -29,6 +29,7 @@
 
 #include 
 #include 
+#include  /* for FBINFO_STATE_ */
 #include 
 #include 
 #include 
@@ -37,7 +38,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -1057,27 +1057,6 @@ static int i915_driver_open(struct drm_device *dev, 
struct drm_file *file)
return 0;
 }
 
-/**
- * i915_driver_lastclose - clean up after all DRM clients have exited
- * @dev: DRM device
- *
- * Take care of 

[Intel-gfx] [PATCH v3 2/3] drm/fb-helper: Set framebuffer for vga-switcheroo clients

2023-01-16 Thread Thomas Zimmermann
Set the framebuffer info for drivers that support VGA switcheroo. Only
affects the amdgpu and nouveau drivers, which use VGA switcheroo and
generic fbdev emulation. For other drivers, this does nothing.

This fixes a potential regression in the console code. Both, amdgpu and
nouveau, invoked vga_switcheroo_client_fb_set() from their internal fbdev
code. But the call got lost when the drivers switched to the generic
emulation.

Fixes: 087451f372bf ("drm/amdgpu: use generic fb helpers instead of setting up 
AMD own's.")
Fixes: 4a16dd9d18a0 ("drm/nouveau/kms: switch to drm fbdev helpers")
Signed-off-by: Thomas Zimmermann 
Reviewed-by: Daniel Vetter 
Reviewed-by: Alex Deucher 
Cc: Ben Skeggs 
Cc: Karol Herbst 
Cc: Lyude Paul 
Cc: Thomas Zimmermann 
Cc: Javier Martinez Canillas 
Cc: Laurent Pinchart 
Cc: Jani Nikula 
Cc: Dave Airlie 
Cc: Evan Quan 
Cc: Christian König 
Cc: Alex Deucher 
Cc: Hawking Zhang 
Cc: Likun Gao 
Cc: "Christian König" 
Cc: Stanley Yang 
Cc: "Tianci.Yin" 
Cc: Xiaojian Du 
Cc: Andrey Grodzovsky 
Cc: YiPeng Chai 
Cc: Somalapuram Amaranath 
Cc: Bokun Zhang 
Cc: Guchun Chen 
Cc: Hamza Mahfooz 
Cc: Aurabindo Pillai 
Cc: Mario Limonciello 
Cc: Solomon Chiu 
Cc: Kai-Heng Feng 
Cc: Felix Kuehling 
Cc: Daniel Vetter 
Cc: "Marek Olšák" 
Cc: Sam Ravnborg 
Cc: Hans de Goede 
Cc: "Ville Syrjälä" 
Cc: dri-de...@lists.freedesktop.org
Cc: nouv...@lists.freedesktop.org
Cc:  # v5.17+
---
 drivers/gpu/drm/drm_fb_helper.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 367fb8b2d5fa..c5c13e192b64 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -30,7 +30,9 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include 
+#include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1924,6 +1926,7 @@ static int drm_fb_helper_single_fb_probe(struct 
drm_fb_helper *fb_helper,
 int preferred_bpp)
 {
struct drm_client_dev *client = _helper->client;
+   struct drm_device *dev = fb_helper->dev;
struct drm_fb_helper_surface_size sizes;
int ret;
 
@@ -1945,6 +1948,11 @@ static int drm_fb_helper_single_fb_probe(struct 
drm_fb_helper *fb_helper,
return ret;
 
strcpy(fb_helper->fb->comm, "[fbcon]");
+
+   /* Set the fb info for vgaswitcheroo clients. Does nothing otherwise. */
+   if (dev_is_pci(dev->dev))
+   vga_switcheroo_client_fb_set(to_pci_dev(dev->dev), 
fb_helper->info);
+
return 0;
 }
 
-- 
2.39.0



[Intel-gfx] [PATCH v3 1/3] drm/i915: Allow switching away via vga-switcheroo if uninitialized

2023-01-16 Thread Thomas Zimmermann
Always allow switching away via vga-switcheroo if the display is
uninitalized. Instead prevent switching to i915 if the device has
not been initialized.

This issue was introduced by commit 5df7bd130818 ("drm/i915: skip
display initialization when there is no display") protected, which
protects code paths from being executed on uninitialized devices.
In the case of vga-switcheroo, we want to allow a switch away from
i915's device. So run vga_switcheroo_process_delayed_switch() and
test in the switcheroo callbacks if the i915 device is available.

Fixes: 5df7bd130818 ("drm/i915: skip display initialization when there is no 
display")
Signed-off-by: Thomas Zimmermann 
Cc: Radhakrishna Sripada 
Cc: Lucas De Marchi 
Cc: José Roberto de Souza 
Cc: Jani Nikula 
Cc: Ville Syrjälä 
Cc: Jani Nikula 
Cc: Joonas Lahtinen 
Cc: Rodrigo Vivi 
Cc: Tvrtko Ursulin 
Cc: "Ville Syrjälä" 
Cc: Manasi Navare 
Cc: Stanislav Lisovskiy 
Cc: Imre Deak 
Cc: "Jouni Högander" 
Cc: Uma Shankar 
Cc: Ankit Nautiyal 
Cc: "Jason A. Donenfeld" 
Cc: Matt Roper 
Cc: Ramalingam C 
Cc: Thomas Zimmermann 
Cc: Andi Shyti 
Cc: Andrzej Hajda 
Cc: "José Roberto de Souza" 
Cc: Julia Lawall 
Cc: intel-gfx@lists.freedesktop.org
Cc:  # v5.14+
---
 drivers/gpu/drm/i915/i915_driver.c | 3 +--
 drivers/gpu/drm/i915/i915_switcheroo.c | 6 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_driver.c 
b/drivers/gpu/drm/i915/i915_driver.c
index c1e427ba57ae..33e231b120c1 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -1075,8 +1075,7 @@ static void i915_driver_lastclose(struct drm_device *dev)
 
intel_fbdev_restore_mode(dev);
 
-   if (HAS_DISPLAY(i915))
-   vga_switcheroo_process_delayed_switch();
+   vga_switcheroo_process_delayed_switch();
 }
 
 static void i915_driver_postclose(struct drm_device *dev, struct drm_file 
*file)
diff --git a/drivers/gpu/drm/i915/i915_switcheroo.c 
b/drivers/gpu/drm/i915/i915_switcheroo.c
index 23777d500cdf..f45bd6b6cede 100644
--- a/drivers/gpu/drm/i915/i915_switcheroo.c
+++ b/drivers/gpu/drm/i915/i915_switcheroo.c
@@ -19,6 +19,10 @@ static void i915_switcheroo_set_state(struct pci_dev *pdev,
dev_err(>dev, "DRM not initialized, aborting switch.\n");
return;
}
+   if (!HAS_DISPLAY(i915)) {
+   dev_err(>dev, "Device state not initialized, aborting 
switch.\n");
+   return;
+   }
 
if (state == VGA_SWITCHEROO_ON) {
drm_info(>drm, "switched on\n");
@@ -44,7 +48,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev)
 * locking inversion with the driver load path. And the access here is
 * completely racy anyway. So don't bother with locking for now.
 */
-   return i915 && atomic_read(>drm.open_count) == 0;
+   return i915 && HAS_DISPLAY(i915) && atomic_read(>drm.open_count) 
== 0;
 }
 
 static const struct vga_switcheroo_client_ops i915_switcheroo_ops = {
-- 
2.39.0



[Intel-gfx] [PATCH v3 0/3] drm/{amdgpu, i915, nouveau, radeon}: Fix fbdev and vga-switcheroo

2023-01-16 Thread Thomas Zimmermann
(was: drm: Generic fbdev and vga-switcheroo)

This patchset fixes how fbdev helpers interact with vga-switcheroo. The
first two patches are bug fixes for the existing code. The third patch
cleans up the drivers.

Patch 1 fixes i915 to do the correct thing if the device has not been
initialized yet. Switching to the device is only possible after the
initialization, but switching away is always possible.

Patch 2 is the original patch without the amdgpu changes. Installs
the fbdev framebuffer in vga-switcheroo for the PCI device. Does
nothing for drivers without vga-switcheroo.

Patch 3 cleans up vga_switcheroo_process_delayed_switch() in amdgpu
and the other related drivers (i.e., i915, nouveau and radeon). The
call is now located at the end of drm_lastclose() and drivers do not
need their own lastclose helpers any longer.

I kept the r-bs from v1, but patch 1 is entirely new and patch 3 has
significantly grown in size.

v3:
* include drm_fb_helper.h in radeon_drv.c
v2:
* expand to patch series
* fix i915, nouveau and radeon

Thomas Zimmermann (3):
  drm/i915: Allow switching away via vga-switcheroo if uninitialized
  drm/fb-helper: Set framebuffer for vga-switcheroo clients
  drm: Call vga_switcheroo_process_delayed_switch() in drm_lastclose

 drivers/gpu/drm/amd/amdgpu/amdgpu.h |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c |  2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 13 -
 drivers/gpu/drm/drm_fb_helper.c |  8 
 drivers/gpu/drm/drm_file.c  |  3 +++
 drivers/gpu/drm/i915/i915_driver.c  | 26 ++---
 drivers/gpu/drm/i915/i915_switcheroo.c  |  6 +-
 drivers/gpu/drm/nouveau/nouveau_drm.c   |  1 -
 drivers/gpu/drm/nouveau/nouveau_vga.c   |  7 ---
 drivers/gpu/drm/nouveau/nouveau_vga.h   |  1 -
 drivers/gpu/drm/radeon/radeon_drv.c |  3 ++-
 drivers/gpu/drm/radeon/radeon_drv.h |  1 -
 drivers/gpu/drm/radeon/radeon_kms.c | 18 -
 drivers/gpu/vga/vga_switcheroo.c|  4 ++--
 14 files changed, 22 insertions(+), 72 deletions(-)


base-commit: 68d139b609a97a83e7c231189d4864aba4e1679b
prerequisite-patch-id: 0aa359f6144c4015c140c8a6750be19099c676fb
prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
prerequisite-patch-id: 3f204510fcbf9530d6540bd8e6128cce598988b6
-- 
2.39.0



Re: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error

2023-01-16 Thread Andrzej Hajda

On 13.01.2023 12:49, Nirmoy Das wrote:

From: Chris Wilson 

Make sure that upon error after we have acquired the wakeref we do
release it again.

Signed-off-by: Chris Wilson 
Signed-off-by: Nirmoy Das 


Reviewed-by: Andrzej Hajda 

Regards
Andrzej


---
  drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c 
b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
index c281b0ec9e05..295d6f2cc4ff 100644
--- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
+++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
@@ -1855,7 +1855,7 @@ static int igt_shrink_thp(void *arg)
I915_SHRINK_ACTIVE);
i915_vma_unpin(vma);
if (err)
-   goto out_put;
+   goto out_wf;
  
  	/*

 * Now that the pages are *unpinned* shrinking should invoke
@@ -1871,7 +1871,7 @@ static int igt_shrink_thp(void *arg)
pr_err("unexpected pages mismatch, should_swap=%s\n",
   str_yes_no(should_swap));
err = -EINVAL;
-   goto out_put;
+   goto out_wf;
}
  
  	if (should_swap == (obj->mm.page_sizes.sg || obj->mm.page_sizes.phys)) {

@@ -1883,7 +1883,7 @@ static int igt_shrink_thp(void *arg)
  
  	err = i915_vma_pin(vma, 0, 0, flags);

if (err)
-   goto out_put;
+   goto out_wf;
  
  	while (n--) {

err = cpu_check(obj, n, 0xdeadbeaf);




[Intel-gfx] [PATCH 2/2] drm/i915: Implement UHBR bandwidth check

2023-01-16 Thread Stanislav Lisovskiy
According to spec, we should check if output_bpp * pixel_rate is less
than DDI clock * 72, if UHBR is used.

HSDES: 1406899791
BSPEC: 49259

v2: - Removed wrong comment(Rodrigo Vivi)
- Added HSDES to the commit msg(Rodrigo Vivi)
- Moved UHBR check to the MST specific code

v3: - Changed commit subject(Rodrigo Vivi)
- Fixed the error message if check fails(Rodrigo Vivi)

v4: - Move UHBR check to new helper function
- Now both for non-DSC/DSC we use that new check as
  one of the constraints, when figuring out output bpp
  to be used(Ville Syrjälä)

Signed-off-by: Stanislav Lisovskiy 
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index e3e7c305fece..b95051fed23d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -47,8 +47,19 @@
 
 static int intel_dp_mst_check_constraints(struct drm_i915_private *i915, int 
bpp,
  const struct drm_display_mode 
*adjusted_mode,
- struct intel_crtc_state *crtc_state)
+ struct intel_crtc_state *pipe_config)
 {
+   if (intel_dp_is_uhbr(pipe_config)) {
+   int output_bpp = bpp;
+
+   if (output_bpp * adjusted_mode->crtc_clock >=
+   pipe_config->port_clock * 72) {
+   drm_dbg_kms(>drm, "UHBR check failed(required bw 
%d available %d)\n",
+   output_bpp * adjusted_mode->crtc_clock, 
pipe_config->port_clock * 72);
+   return -EINVAL;
+   }
+   }
+
return 0;
 }
 
-- 
2.37.3



[Intel-gfx] [PATCH 1/2] drm/i915: Add generic constraint checker when determining DP MST DSC bpp

2023-01-16 Thread Stanislav Lisovskiy
There are might be multiple contraints which we need to check while determining
if we can use desired compressed bpp, so might be good idea to add a special
helper, so that we don't overcomplicate the main bpp calculation function.

Signed-off-by: Stanislav Lisovskiy 
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 8b0e4defa3f1..e3e7c305fece 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -45,6 +45,13 @@
 #include "intel_hotplug.h"
 #include "skl_scaler.h"
 
+static int intel_dp_mst_check_constraints(struct drm_i915_private *i915, int 
bpp,
+ const struct drm_display_mode 
*adjusted_mode,
+ struct intel_crtc_state *crtc_state)
+{
+   return 0;
+}
+
 static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder,
struct intel_crtc_state 
*crtc_state,
int max_bpp,
@@ -87,6 +94,10 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct 
intel_encoder *encoder,
 
drm_dbg_kms(>drm, "Trying bpp %d\n", bpp);
 
+   ret = intel_dp_mst_check_constraints(i915, bpp, adjusted_mode, 
crtc_state);
+   if (ret)
+   continue;
+
slots = drm_dp_atomic_find_time_slots(state, _dp->mst_mgr,
  connector->port,
  crtc_state->pbn);
@@ -104,8 +115,8 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct 
intel_encoder *encoder,
}
}
 
-   /* Despite slots are non-zero, we still failed the atomic check */
-   if (ret && slots >= 0)
+   /* We failed to find a proper bpp/timeslots, return error */
+   if (ret)
slots = ret;
 
if (slots < 0) {
-- 
2.37.3



[Intel-gfx] [PATCH 0/2] We need to have additional checks for DP MST UHBR

2023-01-16 Thread Stanislav Lisovskiy
According to BSpec UHBR might hit hw limitation which must be checked.
So this series adds first some generic checker function, which might
be used to add this or similar checks in future, then we introduce
that particular UHBR check.

Stanislav Lisovskiy (2):
  drm/i915: Add generic constraint checker when determining DP MST DSC
bpp
  drm/i915: Implement UHBR bandwidth check

 drivers/gpu/drm/i915/display/intel_dp_mst.c | 26 +++--
 1 file changed, 24 insertions(+), 2 deletions(-)

-- 
2.37.3



Re: [Intel-gfx] [PATCH v4] arch: rename all internal names __xchg to __arch_xchg

2023-01-16 Thread Geert Uytterhoeven
On Thu, Jan 5, 2023 at 10:54 AM Andrzej Hajda  wrote:
> __xchg will be used for non-atomic xchg macro.
>
> Signed-off-by: Andrzej Hajda 
> Reviewed-by: Arnd Bergmann 
> ---
> v2: squashed all arch patches into one
> v3: fixed alpha/xchg_local, thx to l...@intel.com
> v4: adjusted indentation (Heiko)

>  arch/m68k/include/asm/cmpxchg.h  |  6 +++---

Acked-by: Geert Uytterhoeven  [m68k]

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [Intel-gfx] linux-next: manual merge of the fbdev tree with the drm-misc tree

2023-01-16 Thread Helge Deller

On 1/16/23 01:54, Stephen Rothwell wrote:

Hi all,

Today's linux-next merge of the fbdev tree got a conflict in:

   include/linux/fb.h

between commit:

   5b6373de4351 ("drm/fbdev: Remove aperture handling and FBINFO_MISC_FIRMWARE")

from the drm-misc tree and commit:

   72ac3535c2c5 ("fbdev: fb.h: Replace 0-length array with flexible array")

from the fbdev tree.


I've dropped the offending patch from the fbdev git tree, so it should
be resolved now.

Thanks!
Helge



Re: [Intel-gfx] [PATCH] drm/i915/display: Fix typo for reference clock

2023-01-16 Thread Borah, Chaitanya Kumar
Hello Jani,

Sorry about the previous mail. Replying in-line.

> -Original Message-
> From: Jani Nikula 
> Sent: Monday, January 16, 2023 2:42 PM
> To: Borah, Chaitanya Kumar ; intel-
> g...@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Fix typo for reference 
> clock
> 
> On Thu, 12 Jan 2023, Chaitanya Kumar Borah
>  wrote:
> > Fix typo for reference clock from 24400 to 24000
> 
> Is there a bug report? What's the impact?
> 
> It's obvious and easy to say there's a typo, but the harder part is matching
> this against observed faulty behaviour, and that's something people will
> want to do to match bug reports and fixes.
> 

There are no bug reports for it. It was pointed out by Matt in another patch 
series.

https://patchwork.freedesktop.org/patch/517283/?series=111472=3

Regards

Chaitanya

> BR,
> Jani.
> 
> >
> > Signed-off-by: Chaitanya Kumar Borah
> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_cdclk.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c
> > b/drivers/gpu/drm/i915/display/intel_cdclk.c
> > index 0c107a38f9d0..7e16b655c833 100644
> > --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> > +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> > @@ -1319,7 +1319,7 @@ static const struct intel_cdclk_vals
> adlp_cdclk_table[] = {
> > { .refclk = 24000, .cdclk = 192000, .divider = 2, .ratio = 16 },
> > { .refclk = 24000, .cdclk = 312000, .divider = 2, .ratio = 26 },
> > { .refclk = 24000, .cdclk = 552000, .divider = 2, .ratio = 46 },
> > -   { .refclk = 24400, .cdclk = 648000, .divider = 2, .ratio = 54 },
> > +   { .refclk = 24000, .cdclk = 648000, .divider = 2, .ratio = 54 },
> >
> > { .refclk = 38400, .cdclk = 179200, .divider = 3, .ratio = 14 },
> > { .refclk = 38400, .cdclk = 192000, .divider = 2, .ratio = 10 },
> 
> --
> Jani Nikula, Intel Open Source Graphics Center


Re: [Intel-gfx] [PATCH] drm/i915/display: Fix typo for reference clock

2023-01-16 Thread Borah, Chaitanya Kumar
Hello Jani,

There are no bug reports for it. It was pointed out by Matt in another patch 
series.

https://patchwork.freedesktop.org/patch/517283/?series=111472=3

Regards

Chaitanya

> -Original Message-
> From: Jani Nikula 
> Sent: Monday, January 16, 2023 2:42 PM
> To: Borah, Chaitanya Kumar ; intel-
> g...@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Fix typo for reference 
> clock
> 
> On Thu, 12 Jan 2023, Chaitanya Kumar Borah
>  wrote:
> > Fix typo for reference clock from 24400 to 24000
> 
> Is there a bug report? What's the impact?
> 
> It's obvious and easy to say there's a typo, but the harder part is matching
> this against observed faulty behaviour, and that's something people will
> want to do to match bug reports and fixes.
> 
> BR,
> Jani.
> 
> >
> > Signed-off-by: Chaitanya Kumar Borah
> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_cdclk.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c
> > b/drivers/gpu/drm/i915/display/intel_cdclk.c
> > index 0c107a38f9d0..7e16b655c833 100644
> > --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> > +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> > @@ -1319,7 +1319,7 @@ static const struct intel_cdclk_vals
> adlp_cdclk_table[] = {
> > { .refclk = 24000, .cdclk = 192000, .divider = 2, .ratio = 16 },
> > { .refclk = 24000, .cdclk = 312000, .divider = 2, .ratio = 26 },
> > { .refclk = 24000, .cdclk = 552000, .divider = 2, .ratio = 46 },
> > -   { .refclk = 24400, .cdclk = 648000, .divider = 2, .ratio = 54 },
> > +   { .refclk = 24000, .cdclk = 648000, .divider = 2, .ratio = 54 },
> >
> > { .refclk = 38400, .cdclk = 179200, .divider = 3, .ratio = 14 },
> > { .refclk = 38400, .cdclk = 192000, .divider = 2, .ratio = 10 },
> 
> --
> Jani Nikula, Intel Open Source Graphics Center


Re: [Intel-gfx] [PATCH] drm/i915/display: Fix typo for reference clock

2023-01-16 Thread Jani Nikula
On Thu, 12 Jan 2023, Chaitanya Kumar Borah  
wrote:
> Fix typo for reference clock from 24400 to 24000

Is there a bug report? What's the impact?

It's obvious and easy to say there's a typo, but the harder part is
matching this against observed faulty behaviour, and that's something
people will want to do to match bug reports and fixes.

BR,
Jani.

>
> Signed-off-by: Chaitanya Kumar Borah 
> ---
>  drivers/gpu/drm/i915/display/intel_cdclk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c 
> b/drivers/gpu/drm/i915/display/intel_cdclk.c
> index 0c107a38f9d0..7e16b655c833 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> @@ -1319,7 +1319,7 @@ static const struct intel_cdclk_vals adlp_cdclk_table[] 
> = {
>   { .refclk = 24000, .cdclk = 192000, .divider = 2, .ratio = 16 },
>   { .refclk = 24000, .cdclk = 312000, .divider = 2, .ratio = 26 },
>   { .refclk = 24000, .cdclk = 552000, .divider = 2, .ratio = 46 },
> - { .refclk = 24400, .cdclk = 648000, .divider = 2, .ratio = 54 },
> + { .refclk = 24000, .cdclk = 648000, .divider = 2, .ratio = 54 },
>  
>   { .refclk = 38400, .cdclk = 179200, .divider = 3, .ratio = 14 },
>   { .refclk = 38400, .cdclk = 192000, .divider = 2, .ratio = 10 },

-- 
Jani Nikula, Intel Open Source Graphics Center