[Intel-gfx] [PATCH] drm/i915/selftests: Don't restart WL for every frequency step

2022-01-20 Thread Vinay Belgaumkar
Move spinner start out of the steps loop. If we restart WL for each
freq step, the rapid start/stop causes SLPC algorithm to think that
GT busyness is 50% for it's evaluation interval. This leads to SLPC
not increasing the requested frequency as per the test expectation.

Fixes: 8ee2c227822e (drm/i915/guc/slpc: Add SLPC selftest)

Signed-off-by: Vinay Belgaumkar 
---
 drivers/gpu/drm/i915/gt/selftest_slpc.c | 104 
 1 file changed, 52 insertions(+), 52 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/selftest_slpc.c 
b/drivers/gpu/drm/i915/gt/selftest_slpc.c
index b768cea5943d..eef416747c67 100644
--- a/drivers/gpu/drm/i915/gt/selftest_slpc.c
+++ b/drivers/gpu/drm/i915/gt/selftest_slpc.c
@@ -79,6 +79,29 @@ static int live_slpc_clamp_min(void *arg)
if (!intel_engine_can_store_dword(engine))
continue;
 
+   st_engine_heartbeat_disable(engine);
+
+   rq = igt_spinner_create_request(,
+   engine->kernel_context,
+   MI_NOOP);
+   if (IS_ERR(rq)) {
+   err = PTR_ERR(rq);
+   st_engine_heartbeat_enable(engine);
+   break;
+   }
+
+   i915_request_add(rq);
+
+   if (!igt_wait_for_spinner(, rq)) {
+   pr_err("%s: Spinner did not start\n",
+  engine->name);
+   igt_spinner_end();
+   st_engine_heartbeat_enable(engine);
+   intel_gt_set_wedged(engine->gt);
+   err = -EIO;
+   break;
+   }
+
/* Go from min to max in 5 steps */
step = (slpc_max_freq - slpc_min_freq) / NUM_STEPS;
max_act_freq = slpc_min_freq;
@@ -88,29 +111,6 @@ static int live_slpc_clamp_min(void *arg)
if (err)
break;
 
-   st_engine_heartbeat_disable(engine);
-
-   rq = igt_spinner_create_request(,
-   engine->kernel_context,
-   MI_NOOP);
-   if (IS_ERR(rq)) {
-   err = PTR_ERR(rq);
-   st_engine_heartbeat_enable(engine);
-   break;
-   }
-
-   i915_request_add(rq);
-
-   if (!igt_wait_for_spinner(, rq)) {
-   pr_err("%s: Spinner did not start\n",
-  engine->name);
-   igt_spinner_end();
-   st_engine_heartbeat_enable(engine);
-   intel_gt_set_wedged(engine->gt);
-   err = -EIO;
-   break;
-   }
-
/* Wait for GuC to detect business and raise
 * requested frequency if necessary.
 */
@@ -131,9 +131,6 @@ static int live_slpc_clamp_min(void *arg)
act_freq =  intel_rps_read_actual_frequency(rps);
if (act_freq > max_act_freq)
max_act_freq = act_freq;
-
-   igt_spinner_end();
-   st_engine_heartbeat_enable(engine);
}
 
pr_info("Max actual frequency for %s was %d\n",
@@ -145,6 +142,9 @@ static int live_slpc_clamp_min(void *arg)
err = -EINVAL;
}
 
+   igt_spinner_end();
+   st_engine_heartbeat_enable(engine);
+
if (err)
break;
}
@@ -210,6 +210,29 @@ static int live_slpc_clamp_max(void *arg)
if (!intel_engine_can_store_dword(engine))
continue;
 
+   st_engine_heartbeat_disable(engine);
+
+   rq = igt_spinner_create_request(,
+   engine->kernel_context,
+   MI_NOOP);
+   if (IS_ERR(rq)) {
+   st_engine_heartbeat_enable(engine);
+   err = PTR_ERR(rq);
+   break;
+   }
+
+   i915_request_add(rq);
+
+   if (!igt_wait_for_spinner(, rq)) {
+   pr_err("%s: SLPC spinner did not start\n",
+  engine->name);
+   igt_spinner_end();
+   st_engine_heartbeat_enable(engine);
+   intel_gt_set_wedged(engine->gt);
+   err = -EIO;
+   break;
+   }
+
/* Go from 

[Intel-gfx] ✓ Fi.CI.BAT: success for A few CT updates

2022-01-20 Thread Patchwork
== Series Details ==

Series: A few CT updates
URL   : https://patchwork.freedesktop.org/series/99117/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_4 -> Patchwork_22044


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (42 -> 36)
--

  Additional (2): fi-kbl-soraka fi-ilk-650 
  Missing(8): bat-dg1-6 bat-dg1-5 fi-bsw-cyan bat-adlp-6 bat-adlp-4 
fi-pnv-d510 fi-bdw-samus bat-jsl-1 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_cs_nop@nop-compute0:
- fi-ilk-650: NOTRUN -> [SKIP][1] ([fdo#109271]) +39 similar issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/fi-ilk-650/igt@amdgpu/amd_cs_...@nop-compute0.html

  * igt@amdgpu/amd_cs_nop@sync-fork-gfx0:
- fi-skl-6600u:   NOTRUN -> [SKIP][2] ([fdo#109271]) +21 similar issues
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/fi-skl-6600u/igt@amdgpu/amd_cs_...@sync-fork-gfx0.html

  * igt@gem_exec_fence@basic-busy@bcs0:
- fi-kbl-soraka:  NOTRUN -> [SKIP][3] ([fdo#109271]) +8 similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/fi-kbl-soraka/igt@gem_exec_fence@basic-b...@bcs0.html

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

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

  * igt@gem_lmem_swapping@verify-random:
- fi-skl-6600u:   NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#4613]) +3 
similar issues
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/fi-skl-6600u/igt@gem_lmem_swapp...@verify-random.html

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

  * igt@i915_selftest@live@hangcheck:
- fi-hsw-4770:[PASS][9] -> [INCOMPLETE][10] ([i915#3303])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/fi-hsw-4770/igt@i915_selftest@l...@hangcheck.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/fi-hsw-4770/igt@i915_selftest@l...@hangcheck.html
- fi-snb-2600:[PASS][11] -> [INCOMPLETE][12] ([i915#3921])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/fi-snb-2600/igt@i915_selftest@l...@hangcheck.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/fi-snb-2600/igt@i915_selftest@l...@hangcheck.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-soraka:  NOTRUN -> [SKIP][13] ([fdo#109271] / [fdo#111827]) +8 
similar issues
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/fi-kbl-soraka/igt@kms_chamel...@common-hpd-after-suspend.html

  * igt@kms_chamelium@dp-hpd-fast:
- fi-ilk-650: NOTRUN -> [SKIP][14] ([fdo#109271] / [fdo#111827]) +8 
similar issues
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/fi-ilk-650/igt@kms_chamel...@dp-hpd-fast.html

  * igt@kms_chamelium@vga-edid-read:
- fi-skl-6600u:   NOTRUN -> [SKIP][15] ([fdo#109271] / [fdo#111827]) +8 
similar issues
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/fi-skl-6600u/igt@kms_chamel...@vga-edid-read.html

  * igt@kms_frontbuffer_tracking@basic:
- fi-cml-u2:  [PASS][16] -> [DMESG-WARN][17] ([i915#4269])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/fi-cml-u2/igt@kms_frontbuffer_track...@basic.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/fi-cml-u2/igt@kms_frontbuffer_track...@basic.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- fi-skl-6600u:   NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#533])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/fi-skl-6600u/igt@kms_pipe_crc_ba...@compare-crc-sanitycheck-pipe-d.html
- fi-kbl-soraka:  NOTRUN -> [SKIP][19] ([fdo#109271] / [i915#533])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/fi-kbl-soraka/igt@kms_pipe_crc_ba...@compare-crc-sanitycheck-pipe-d.html

  * igt@runner@aborted:
- fi-hsw-4770:NOTRUN -> [FAIL][20] ([fdo#109271] / [i915#1436] / 
[i915#4312])
   [20]: 

[Intel-gfx] ✗ Fi.CI.BAT: failure for discrete card 64K page support

2022-01-20 Thread Patchwork
== Series Details ==

Series: discrete card 64K page support
URL   : https://patchwork.freedesktop.org/series/99119/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_4 -> Patchwork_22045


Summary
---

  **FAILURE**

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

Participating hosts (42 -> 45)
--

  Additional (5): fi-kbl-soraka bat-adls-5 fi-ilk-650 bat-rpls-1 bat-jsl-2 
  Missing(2): fi-bsw-cyan fi-bdw-samus 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@runner@aborted:
- fi-rkl-11600:   NOTRUN -> [FAIL][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/fi-rkl-11600/igt@run...@aborted.html
- bat-dg1-5:  NOTRUN -> [FAIL][2]
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/bat-dg1-5/igt@run...@aborted.html
- fi-bwr-2160:NOTRUN -> [FAIL][3]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/fi-bwr-2160/igt@run...@aborted.html
- fi-hsw-4770:NOTRUN -> [FAIL][4]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/fi-hsw-4770/igt@run...@aborted.html
- bat-dg1-6:  NOTRUN -> [FAIL][5]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/bat-dg1-6/igt@run...@aborted.html

  
 Warnings 

  * igt@runner@aborted:
- bat-adlp-4: [FAIL][6] ([i915#4312]) -> [FAIL][7]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/bat-adlp-4/igt@run...@aborted.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/bat-adlp-4/igt@run...@aborted.html

  
 Suppressed 

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

  * igt@runner@aborted:
- {bat-adls-5}:   NOTRUN -> [FAIL][8]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/bat-adls-5/igt@run...@aborted.html
- {bat-adlp-6}:   [FAIL][9] ([i915#4312]) -> [FAIL][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/bat-adlp-6/igt@run...@aborted.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/bat-adlp-6/igt@run...@aborted.html
- {bat-jsl-2}:NOTRUN -> [FAIL][11]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/bat-jsl-2/igt@run...@aborted.html
- {fi-jsl-1}: NOTRUN -> [FAIL][12]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/fi-jsl-1/igt@run...@aborted.html
- {bat-jsl-1}:NOTRUN -> [FAIL][13]
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/bat-jsl-1/igt@run...@aborted.html
- {fi-ehl-2}: NOTRUN -> [FAIL][14]
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/fi-ehl-2/igt@run...@aborted.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@runner@aborted:
- fi-snb-2600:NOTRUN -> [FAIL][15] ([i915#2426])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/fi-snb-2600/igt@run...@aborted.html
- fi-ilk-650: NOTRUN -> [FAIL][16] ([i915#2426])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/fi-ilk-650/igt@run...@aborted.html
- fi-pnv-d510:NOTRUN -> [FAIL][17] ([i915#2403])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/fi-pnv-d510/igt@run...@aborted.html
- fi-kbl-x1275:   NOTRUN -> [FAIL][18] ([i915#2426])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/fi-kbl-x1275/igt@run...@aborted.html
- fi-bsw-kefka:   NOTRUN -> [FAIL][19] ([i915#3690])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/fi-bsw-kefka/igt@run...@aborted.html
- fi-bdw-gvtdvm:  NOTRUN -> [FAIL][20] ([i915#2426])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/fi-bdw-gvtdvm/igt@run...@aborted.html
- fi-cfl-8700k:   NOTRUN -> [FAIL][21] ([i915#2426])
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/fi-cfl-8700k/igt@run...@aborted.html
- fi-cfl-8109u:   NOTRUN -> [FAIL][22] ([i915#2426])
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/fi-cfl-8109u/igt@run...@aborted.html
- fi-glk-dsi: NOTRUN -> [FAIL][23] ([i915#2426] / [k.org#202321])
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22045/fi-glk-dsi/igt@run...@aborted.html
- fi-bsw-nick: 

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/wopcm: Handle pre-programmed WOPCM registers (rev3)

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915/wopcm: Handle pre-programmed WOPCM registers (rev3)
URL   : https://patchwork.freedesktop.org/series/98910/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
0abf9917c5c0 drm/i915/wopcm: Handle pre-programmed WOPCM registers
-:14: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description 
(prefer a maximum 75 chars per line)
#14: 
sometimes using a smaller WOPCM size that the actual HW support (which isn't

-:39: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#39: FILE: drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h:98:
+#define   GUC_IS_PRIVILEGED(1<<29)
  ^

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




Re: [Intel-gfx] [PATCH] drm/i915: Lock timeline mutex directly in error path of eb_pin_timeline

2022-01-20 Thread John Harrison

On 1/11/2022 08:39, Matthew Brost wrote:

Don't use the interruptable version of the timeline mutex lock in the
error path of eb_pin_timeline as the cleanup must always happen.

v2:
  (John Harrison)
   - Don't check for interrupt during mutex lock
v3:
  (Tvrtko)
   - A comment explaining why lock helper isn't used

Fixes: 544460c33821 ("drm/i915: Multi-BB execbuf")
Signed-off-by: Matthew Brost 

Reviewed-by: John Harrison 


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

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c 
b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index 9e221ce427075..4a611d62e991a 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -2518,9 +2518,14 @@ static int eb_pin_timeline(struct i915_execbuffer *eb, 
struct intel_context *ce,
  timeout) < 0) {
i915_request_put(rq);
  
-			tl = intel_context_timeline_lock(ce);

+   /*
+* Error path, cannot use intel_context_timeline_lock as
+* that is user interruptable and this clean up step
+* must be done.
+*/
+   mutex_lock(>timeline->mutex);
intel_context_exit(ce);
-   intel_context_timeline_unlock(tl);
+   mutex_unlock(>timeline->mutex);
  
  			if (nonblock)

return -EWOULDBLOCK;




[Intel-gfx] [PATCH] drm/i915/guc: Update guc shim control programming on newer platforms

2022-01-20 Thread Daniele Ceraolo Spurio
Starting from xehpsdv, bit 0 of of the GuC shim control register has
been repurposed, while bit 2 is now reserved, so we need to avoid
setting those for their old meaning on newer platforms.

Cc: Vinay Belgaumkar 
Cc: Stuart Summers 
Signed-off-by: Daniele Ceraolo Spurio 
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c
index f773e7f35bc1a..40f7d4779c9ec 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c
@@ -15,13 +15,15 @@
 
 static void guc_prepare_xfer(struct intel_uncore *uncore)
 {
-   u32 shim_flags = GUC_DISABLE_SRAM_INIT_TO_ZEROES |
-GUC_ENABLE_READ_CACHE_LOGIC |
-GUC_ENABLE_MIA_CACHING |
+   u32 shim_flags = GUC_ENABLE_READ_CACHE_LOGIC |
 GUC_ENABLE_READ_CACHE_FOR_SRAM_DATA |
 GUC_ENABLE_READ_CACHE_FOR_WOPCM_DATA |
 GUC_ENABLE_MIA_CLOCK_GATING;
 
+   if (GRAPHICS_VER_FULL(uncore->i915) < IP_VER(12, 50))
+   shim_flags |= GUC_DISABLE_SRAM_INIT_TO_ZEROES |
+ GUC_ENABLE_MIA_CACHING;
+
/* Must program this register before loading the ucode with DMA */
intel_uncore_write(uncore, GUC_SHIM_CONTROL, shim_flags);
 
-- 
2.25.1



[Intel-gfx] [PATCH] drm/i915/guc: Don't check CT descriptor status before CT write / read

2022-01-20 Thread Matthew Brost
Don't check CT descriptor status, unless CONFIG_DRM_I915_DEBUG_GUC is
set, before CT write / read as this could result in a read across the
PCIe bus thus adding latency to every CT write / read. On well behavied
systems this vaue should always read as zero. For some reason it doesn't
the CT channel is broken and will eventually recover from a GT reset,
albeit the GT reset will not be triggered immediately by seeing that
descriptor status is non-zero.

Signed-off-by: Matthew Brost 
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
index de89d40abd38d..18af99a802f64 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
@@ -379,8 +379,10 @@ static int ct_write(struct intel_guc_ct *ct,
u32 *cmds = ctb->cmds;
unsigned int i;
 
+#ifdef CONFIG_DRM_I915_DEBUG_GUC
if (unlikely(desc->status))
goto corrupted;
+#endif
 
GEM_BUG_ON(tail > size);
 
@@ -815,8 +817,10 @@ static int ct_read(struct intel_guc_ct *ct, struct 
ct_incoming_msg **msg)
if (unlikely(ctb->broken))
return -EPIPE;
 
+#ifdef CONFIG_DRM_I915_DEBUG_GUC
if (unlikely(desc->status))
goto corrupted;
+#endif
 
GEM_BUG_ON(head > size);
 
-- 
2.34.1



Re: [Intel-gfx] [PATCH] drm/i915/wopcm: Handle pre-programmed WOPCM registers

2022-01-20 Thread Matthew Brost
On Thu, Jan 20, 2022 at 06:13:47PM +, Teres Alexis, Alan Previn wrote:
> Just one nit below, (assuming that igt CI failure isnt related - kms flip not 
> completing)
> Reviewed-by Alan Previn 
> 
> -Original Message-
> From: Ceraolo Spurio, Daniele  
> Sent: Friday, January 14, 2022 11:33 AM
> To: intel-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org; Ceraolo Spurio, Daniele 
> ; Summers, Stuart 
> ; Harrison, John C ; 
> Teres Alexis, Alan Previn 
> Subject: [PATCH] drm/i915/wopcm: Handle pre-programmed WOPCM registers
> 
> Starting from DG2, some of the programming previously done by i915 and the 
> GuC has been moved to the GSC and the relevant registers are no longer 
> writable by either CPU or GuC. This is also referred to as GuC deprivilege.
> On the i915 side, this affects the WOPCM registers: these are no longer 
> programmed by the driver and we do instead expect to find them already set. 
> This can lead to verification failures because in i915 we cheat a bit with 
> the WOPCM size defines, to keep the code common across platforms, by 
> sometimes using a smaller WOPCM size that the actual HW support (which isn't 
> a problem because the extra size is not needed if the FW fits in the smaller 
> chunk), while the pre-programmed values can use the actual size.
> Given tha the new programming entity is trusted, relax the amount of the 
> checks done on the pre-programmed values by not limiting the max programmed 
> size. In the extremely unlikely scenario that the registers have been 
> misprogrammed, we will still fail later at DMA time.
> 
> Signed-off-by: Daniele Ceraolo Spurio 
> Cc: Stuart Summers 
> Cc: John Harrison 
> Cc: Alan Previn 
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h |  3 ++
>  drivers/gpu/drm/i915/i915_drv.h|  3 ++
>  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   |  1 +
>  drivers/gpu/drm/i915/intel_wopcm.c | 42 ++
>  6 files changed, 51 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c 
> b/drivers/gpu/drm/i915/intel_device_info.c
> index 93b251b25aba..88aad892a0fc 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -394,6 +394,14 @@ void intel_device_info_runtime_init(struct 
> drm_i915_private *dev_priv)
>   memset(runtime->num_sprites, 0, sizeof(runtime->num_sprites));
>   memset(runtime->num_scalers, 0, sizeof(runtime->num_scalers));
>   }
> +
> + /*
> +  * Early DG2 steppings don't have the GuC depriv feature. We can't
> +  * rely on the fuse on those platforms because the meaning of the fuse
> +  * bit is inverted on platforms that do have the feature.
> +  */
> + if (IS_DG2_GRAPHICS_STEP(dev_priv, G10, STEP_A0, STEP_A1))
> + info->has_guc_deprivilege = 0;
> 
> Nit: not sure if it matters if this stepping is not-public (although I am not 
> 100% sure I am correct in my assumption this is not-public).

Agree with Alan.

Are we ever going to let A0 / A1 stepping for DG2 be publicly available?
If the answer is no, I think this can be removed.

Matt

>  }


Re: [Intel-gfx] [PATCH] drm/i915/dmc: Eliminate remnant GEN references

2022-01-20 Thread Lucas De Marchi

On Thu, Jan 20, 2022 at 03:31:34AM +, Tolakanahalli Pradeep, Madhumitha 
wrote:

On Tue, 2022-01-18 at 13:37 -0800, Lucas De Marchi wrote:

On Thu, Dec 23, 2021 at 03:18:57AM +, Tolakanahalli Pradeep,
Madhumitha wrote:
> On Fri, 2021-12-17 at 21:37 +, Yokoyama, Caz wrote:
> > On Thu, 2021-12-16 at 19:41 -0800, Madhumitha Tolakanahalli
> > Pradeep
> > wrote:
> > > Replace GEN with DISPLAY_VER, in line with the naming
> > > convention
> > > followed in the i915 driver code.
> > >
> > > Signed-off-by: Madhumitha Tolakanahalli Pradeep <
> > > madhumitha.tolakanahalli.prad...@intel.com>

I was checking to apply this today, but BAT is failing on CI and it
didn't trigger the full run. Error seems unrelated and I don't think
this would trigger any error in the machines in CI, but I'd prefer to
merge this with a clean run.

Can you re-submit or trigger it again via patchwork if the patch
still
applies?

thanks
Lucas De Marchi


The error does seem pretty random. I've triggered a rerun, awaiting
results.


CI results are now clean. Pushed.

thanks
Lucas De Marchi


[Intel-gfx] [PATCH v3 2/5] drm/i915: enforce min GTT alignment for discrete cards

2022-01-20 Thread Robert Beckett
From: Matthew Auld 

For local-memory objects we need to align the GTT addresses
to 64K, both for the ppgtt and ggtt.

We need to support vm->min_alignment > 4K, depending
on the vm itself and the type of object we are inserting.
With this in mind update the GTT selftests to take this
into account.

For compact-pt we further align and pad lmem object GTT addresses
to 2MB to ensure PDEs contain consistent page sizes as
required by the HW.

v3:
* use needs_compact_pt flag to discriminate between
  64K and 64K with compact-pt
* add i915_vm_obj_min_alignment
* use i915_vm_obj_min_alignment to round up vma reservation
  if compact-pt instead of hard coding

Signed-off-by: Matthew Auld 
Signed-off-by: Ramalingam C 
Signed-off-by: Robert Beckett 
Cc: Joonas Lahtinen 
Cc: Rodrigo Vivi 
---
 .../i915/gem/selftests/i915_gem_client_blt.c  | 23 +++--
 drivers/gpu/drm/i915/gt/intel_gtt.c   | 12 +++
 drivers/gpu/drm/i915/gt/intel_gtt.h   | 15 +++
 drivers/gpu/drm/i915/i915_vma.c   |  9 ++
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 96 ---
 5 files changed, 114 insertions(+), 41 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c 
b/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c
index c08f766e6e15..7fee95a65414 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c
@@ -39,6 +39,7 @@ struct tiled_blits {
struct blit_buffer scratch;
struct i915_vma *batch;
u64 hole;
+   u64 align;
u32 width;
u32 height;
 };
@@ -410,14 +411,21 @@ tiled_blits_create(struct intel_engine_cs *engine, struct 
rnd_state *prng)
goto err_free;
}
 
-   hole_size = 2 * PAGE_ALIGN(WIDTH * HEIGHT * 4);
+   t->align = I915_GTT_PAGE_SIZE_2M; /* XXX worst case, derive from vm! */
+   t->align = max(t->align,
+  i915_vm_min_alignment(t->ce->vm, INTEL_MEMORY_LOCAL));
+   t->align = max(t->align,
+  i915_vm_min_alignment(t->ce->vm, INTEL_MEMORY_SYSTEM));
+
+   hole_size = 2 * round_up(WIDTH * HEIGHT * 4, t->align);
hole_size *= 2; /* room to maneuver */
-   hole_size += 2 * I915_GTT_MIN_ALIGNMENT;
+   hole_size += 2 * t->align; /* padding on either side */
 
mutex_lock(>ce->vm->mutex);
memset(, 0, sizeof(hole));
err = drm_mm_insert_node_in_range(>ce->vm->mm, ,
- hole_size, 0, I915_COLOR_UNEVICTABLE,
+ hole_size, t->align,
+ I915_COLOR_UNEVICTABLE,
  0, U64_MAX,
  DRM_MM_INSERT_BEST);
if (!err)
@@ -428,7 +436,7 @@ tiled_blits_create(struct intel_engine_cs *engine, struct 
rnd_state *prng)
goto err_put;
}
 
-   t->hole = hole.start + I915_GTT_MIN_ALIGNMENT;
+   t->hole = hole.start + t->align;
pr_info("Using hole at %llx\n", t->hole);
 
err = tiled_blits_create_buffers(t, WIDTH, HEIGHT, prng);
@@ -455,7 +463,7 @@ static void tiled_blits_destroy(struct tiled_blits *t)
 static int tiled_blits_prepare(struct tiled_blits *t,
   struct rnd_state *prng)
 {
-   u64 offset = PAGE_ALIGN(t->width * t->height * 4);
+   u64 offset = round_up(t->width * t->height * 4, t->align);
u32 *map;
int err;
int i;
@@ -486,8 +494,7 @@ static int tiled_blits_prepare(struct tiled_blits *t,
 
 static int tiled_blits_bounce(struct tiled_blits *t, struct rnd_state *prng)
 {
-   u64 offset =
-   round_up(t->width * t->height * 4, 2 * I915_GTT_MIN_ALIGNMENT);
+   u64 offset = round_up(t->width * t->height * 4, 2 * t->align);
int err;
 
/* We want to check position invariant tiling across GTT eviction */
@@ -500,7 +507,7 @@ static int tiled_blits_bounce(struct tiled_blits *t, struct 
rnd_state *prng)
 
/* Reposition so that we overlap the old addresses, and slightly off */
err = tiled_blit(t,
->buffers[2], t->hole + I915_GTT_MIN_ALIGNMENT,
+>buffers[2], t->hole + t->align,
 >buffers[1], t->hole + 3 * offset / 2);
if (err)
return err;
diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c 
b/drivers/gpu/drm/i915/gt/intel_gtt.c
index 46be4197b93f..df23ebdfc994 100644
--- a/drivers/gpu/drm/i915/gt/intel_gtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gtt.c
@@ -223,6 +223,18 @@ void i915_address_space_init(struct i915_address_space 
*vm, int subclass)
 
GEM_BUG_ON(!vm->total);
drm_mm_init(>mm, 0, vm->total);
+
+   memset64(vm->min_alignment, I915_GTT_MIN_ALIGNMENT,
+ARRAY_SIZE(vm->min_alignment));
+
+   if (HAS_64K_PAGES(vm->i915) && 

[Intel-gfx] [PATCH v3 3/5] drm/i915: support 64K GTT pages for discrete cards

2022-01-20 Thread Robert Beckett
From: Matthew Auld 

discrete cards optimise 64K GTT pages for local-memory, since everything
should be allocated at 64K granularity. We say goodbye to sparse
entries, and instead get a compact 256B page-table for 64K pages,
which should be more cache friendly. 4K pages for local-memory
are no longer supported by the HW.

Signed-off-by: Matthew Auld 
Signed-off-by: Stuart Summers 
Signed-off-by: Ramalingam C 
Cc: Joonas Lahtinen 
Cc: Rodrigo Vivi 
---
 .../gpu/drm/i915/gem/selftests/huge_pages.c   |  60 ++
 drivers/gpu/drm/i915/gt/gen8_ppgtt.c  | 108 +-
 drivers/gpu/drm/i915/gt/intel_gtt.h   |   3 +
 drivers/gpu/drm/i915/gt/intel_ppgtt.c |   1 +
 4 files changed, 169 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 26f997c376a2..7efa6a598b03 100644
--- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
+++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
@@ -1478,6 +1478,65 @@ static int igt_ppgtt_sanity_check(void *arg)
return err;
 }
 
+static int igt_ppgtt_compact(void *arg)
+{
+   struct drm_i915_private *i915 = arg;
+   struct drm_i915_gem_object *obj;
+   int err;
+
+   /*
+* Simple test to catch issues with compact 64K pages -- since the pt is
+* compacted to 256B that gives us 32 entries per pt, however since the
+* backing page for the pt is 4K, any extra entries we might incorrectly
+* write out should be ignored by the HW. If ever hit such a case this
+* test should catch it since some of our writes would land in scratch.
+*/
+
+   if (!HAS_64K_PAGES(i915)) {
+   pr_info("device lacks compact 64K page support, skipping\n");
+   return 0;
+   }
+
+   if (!HAS_LMEM(i915)) {
+   pr_info("device lacks LMEM support, skipping\n");
+   return 0;
+   }
+
+   /* We want the range to cover multiple page-table boundaries. */
+   obj = i915_gem_object_create_lmem(i915, SZ_4M, 0);
+   if (IS_ERR(obj))
+   return err;
+
+   err = i915_gem_object_pin_pages_unlocked(obj);
+   if (err)
+   goto out_put;
+
+   if (obj->mm.page_sizes.phys < I915_GTT_PAGE_SIZE_64K) {
+   pr_info("LMEM compact unable to allocate huge-page(s)\n");
+   goto out_unpin;
+   }
+
+   /*
+* Disable 2M GTT pages by forcing the page-size to 64K for the GTT
+* insertion.
+*/
+   obj->mm.page_sizes.sg = I915_GTT_PAGE_SIZE_64K;
+
+   err = igt_write_huge(i915, obj);
+   if (err)
+   pr_err("LMEM compact write-huge failed\n");
+
+out_unpin:
+   i915_gem_object_unpin_pages(obj);
+out_put:
+   i915_gem_object_put(obj);
+
+   if (err == -ENOMEM)
+   err = 0;
+
+   return err;
+}
+
 static int igt_tmpfs_fallback(void *arg)
 {
struct drm_i915_private *i915 = arg;
@@ -1735,6 +1794,7 @@ int i915_gem_huge_page_live_selftests(struct 
drm_i915_private *i915)
SUBTEST(igt_tmpfs_fallback),
SUBTEST(igt_ppgtt_smoke_huge),
SUBTEST(igt_ppgtt_sanity_check),
+   SUBTEST(igt_ppgtt_compact),
};
 
if (!HAS_PPGTT(i915)) {
diff --git a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c 
b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
index c43e724afa9f..62471730266c 100644
--- a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
+++ b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
@@ -233,6 +233,8 @@ static u64 __gen8_ppgtt_clear(struct i915_address_space * 
const vm,
   start, end, lvl);
} else {
unsigned int count;
+   unsigned int pte = gen8_pd_index(start, 0);
+   unsigned int num_ptes;
u64 *vaddr;
 
count = gen8_pt_count(start, end);
@@ -242,10 +244,18 @@ static u64 __gen8_ppgtt_clear(struct i915_address_space * 
const vm,
atomic_read(>used));
GEM_BUG_ON(!count || count >= atomic_read(>used));
 
+   num_ptes = count;
+   if (pt->is_compact) {
+   GEM_BUG_ON(num_ptes % 16);
+   GEM_BUG_ON(pte % 16);
+   num_ptes /= 16;
+   pte /= 16;
+   }
+
vaddr = px_vaddr(pt);
-   memset64(vaddr + gen8_pd_index(start, 0),
+   memset64(vaddr + pte,
 vm->scratch[0]->encode,
-count);
+num_ptes);
 
atomic_sub(count, >used);
start += count;
@@ -453,6 +463,95 @@ gen8_ppgtt_insert_pte(struct i915_ppgtt *ppgtt,

[Intel-gfx] [PATCH v3 5/5] drm/i915/uapi: document behaviour for DG2 64K support

2022-01-20 Thread Robert Beckett
From: Matthew Auld 

On discrete platforms like DG2, we need to support a minimum page size
of 64K when dealing with device local-memory. This is quite tricky for
various reasons, so try to document the new implicit uapi for this.

v3: fix typos and less emphasis
v2: Fixed suggestions on formatting [Daniel]

Signed-off-by: Matthew Auld 
Signed-off-by: Ramalingam C 
Signed-off-by: Robert Beckett 
Acked-by: Jordan Justen 
cc: Simon Ser 
cc: Pekka Paalanen 
Cc: Jordan Justen 
Cc: Kenneth Graunke 
Cc: mesa-...@lists.freedesktop.org
Cc: Tony Ye 
Cc: Slawomir Milczarek 
---
 include/uapi/drm/i915_drm.h | 44 -
 1 file changed, 39 insertions(+), 5 deletions(-)

diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index 5e678917da70..77e5e74c32c1 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -1118,10 +1118,16 @@ struct drm_i915_gem_exec_object2 {
/**
 * When the EXEC_OBJECT_PINNED flag is specified this is populated by
 * the user with the GTT offset at which this object will be pinned.
+*
 * When the I915_EXEC_NO_RELOC flag is specified this must contain the
 * presumed_offset of the object.
+*
 * During execbuffer2 the kernel populates it with the value of the
 * current GTT offset of the object, for future presumed_offset writes.
+*
+* See struct drm_i915_gem_create_ext for the rules when dealing with
+* alignment restrictions with I915_MEMORY_CLASS_DEVICE, on devices with
+* minimum page sizes, like DG2.
 */
__u64 offset;
 
@@ -3145,11 +3151,39 @@ struct drm_i915_gem_create_ext {
 *
 * The (page-aligned) allocated size for the object will be returned.
 *
-* Note that for some devices we have might have further minimum
-* page-size restrictions(larger than 4K), like for device local-memory.
-* However in general the final size here should always reflect any
-* rounding up, if for example using the 
I915_GEM_CREATE_EXT_MEMORY_REGIONS
-* extension to place the object in device local-memory.
+*
+* DG2 64K min page size implications:
+*
+* On discrete platforms, starting from DG2, we have to contend with GTT
+* page size restrictions when dealing with I915_MEMORY_CLASS_DEVICE
+* objects.  Specifically the hardware only supports 64K or larger GTT
+* page sizes for such memory. The kernel will already ensure that all
+* I915_MEMORY_CLASS_DEVICE memory is allocated using 64K or larger page
+* sizes underneath.
+*
+* Note that the returned size here will always reflect any required
+* rounding up done by the kernel, i.e 4K will now become 64K on devices
+* such as DG2.
+*
+* Special DG2 GTT address alignment requirement:
+*
+* The GTT alignment will also need to be at least 2M for such objects.
+*
+* Note that due to how the hardware implements 64K GTT page support, we
+* have some further complications:
+*
+*   1) The entire PDE (which covers a 2MB virtual address range), must
+*   contain only 64K PTEs, i.e mixing 4K and 64K PTEs in the same
+*   PDE is forbidden by the hardware.
+*
+*   2) We still need to support 4K PTEs for I915_MEMORY_CLASS_SYSTEM
+*   objects.
+*
+* To keep things simple for userland, we mandate that any GTT mappings
+* must be aligned to and rounded up to 2MB. As this only wastes virtual
+* address space and avoids userland having to copy any needlessly
+* complicated PDE sharing scheme (coloring) and only affects DG2, this
+* is deemed to be a good compromise.
 */
__u64 size;
/**
-- 
2.25.1



[Intel-gfx] [PATCH v3 4/5] drm/i915: add gtt misalignment test

2022-01-20 Thread Robert Beckett
add test to check handling of misaligned offsets and sizes

Signed-off-by: Robert Beckett 
---
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 130 ++
 1 file changed, 130 insertions(+)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c 
b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
index 2f3f0c01786b..76696a5e547e 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
@@ -22,10 +22,12 @@
  *
  */
 
+#include "gt/intel_gtt.h"
 #include 
 #include 
 
 #include "gem/i915_gem_context.h"
+#include "gem/i915_gem_region.h"
 #include "gem/selftests/mock_context.h"
 #include "gt/intel_context.h"
 #include "gt/intel_gpu_commands.h"
@@ -1067,6 +1069,120 @@ static int shrink_boom(struct i915_address_space *vm,
return err;
 }
 
+static int misaligned_case(struct i915_address_space *vm, struct 
intel_memory_region *mr,
+  u64 addr, u64 size, unsigned long flags)
+{
+   struct drm_i915_gem_object *obj;
+   struct i915_vma *vma;
+   int err = 0;
+   u64 expected_vma_size, expected_node_size;
+
+   obj = i915_gem_object_create_region(mr, size, 0, 0);
+   if (IS_ERR(obj))
+   return PTR_ERR(obj);
+
+   vma = i915_vma_instance(obj, vm, NULL);
+   if (IS_ERR(vma)) {
+   err = PTR_ERR(vma);
+   goto err_put;
+   }
+
+   err = i915_vma_pin(vma, 0, 0, addr | flags);
+   if (err)
+   goto err_put;
+   i915_vma_unpin(vma);
+
+   if (!drm_mm_node_allocated(>node)) {
+   err = -EINVAL;
+   goto err_put;
+   }
+
+   if (i915_vma_misplaced(vma, 0, 0, addr | flags)) {
+   err = -EINVAL;
+   goto err_put;
+   }
+
+   expected_vma_size = round_up(size, 1 << 
(ffs(vma->resource->page_sizes_gtt) - 1));
+   expected_node_size = expected_vma_size;
+
+   if (IS_DG2(vm->i915) && i915_gem_object_is_lmem(obj)) {
+   /* dg2 should expand lmem node to 2MB */
+   expected_vma_size = round_up(size, I915_GTT_PAGE_SIZE_64K);
+   expected_node_size = round_up(size, I915_GTT_PAGE_SIZE_2M);
+   }
+
+   if (vma->size != expected_vma_size || vma->node.size != 
expected_node_size) {
+   err = i915_vma_unbind(vma);
+   err = -EBADSLT;
+   goto err_put;
+   }
+
+   err = i915_vma_unbind(vma);
+   if (err)
+   goto err_put;
+
+   GEM_BUG_ON(drm_mm_node_allocated(>node));
+
+err_put:
+   i915_gem_object_put(obj);
+   cleanup_freed_objects(vm->i915);
+   return err;
+}
+
+static int misaligned_pin(struct i915_address_space *vm,
+ u64 hole_start, u64 hole_end,
+ unsigned long end_time)
+{
+   struct intel_memory_region *mr;
+   enum intel_region_id id;
+   unsigned long flags = PIN_OFFSET_FIXED | PIN_USER;
+   int err = 0;
+   u64 hole_size = hole_end - hole_start;
+
+   if (i915_is_ggtt(vm))
+   flags |= PIN_GLOBAL;
+
+   for_each_memory_region(mr, vm->i915, id) {
+   u64 min_alignment = i915_vm_min_alignment(vm, id);
+   u64 size = min_alignment;
+   u64 addr = round_up(hole_start + (hole_size / 2), 
min_alignment);
+
+   /* we can't test < 4k alignment due to flags being encoded in 
lower bits */
+   if (min_alignment != I915_GTT_PAGE_SIZE_4K) {
+   err = misaligned_case(vm, mr, addr + (min_alignment / 
2), size, flags);
+   /* misaligned should error with -EINVAL*/
+   if (!err)
+   err = -EBADSLT;
+   if (err != -EINVAL)
+   return err;
+   }
+
+   /* test for vma->size expansion to min page size */
+   err = misaligned_case(vm, mr, addr, PAGE_SIZE, flags);
+   if (min_alignment > hole_size) {
+   if (!err)
+   err = -EBADSLT;
+   else if (err == -ENOSPC)
+   err = 0;
+   }
+   if (err)
+   return err;
+
+   /* test for intermediate size not expanding vma->size for large 
alignments */
+   err = misaligned_case(vm, mr, addr, size / 2, flags);
+   if (min_alignment > hole_size) {
+   if (!err)
+   err = -EBADSLT;
+   else if (err == -ENOSPC)
+   err = 0;
+   }
+   if (err)
+   return err;
+   }
+
+   return 0;
+}
+
 static int exercise_ppgtt(struct drm_i915_private *dev_priv,
  int (*func)(struct i915_address_space *vm,
  u64 hole_start, u64 hole_end,
@@ 

[Intel-gfx] [PATCH v3 1/5] drm/i915: add needs_compact_pt flag

2022-01-20 Thread Robert Beckett
From: Ramalingam C 

Add a new platform flag, needs_compact_pt, to mark the requirement of
compact pt layout support for the ppGTT when using 64K GTT pages.

With this flag has_64k_pages will only indicate requirement of 64K
GTT page sizes or larger for device local memory access.

Suggested-by: Matthew Auld 
Signed-off-by: Ramalingam C 
Signed-off-by: Robert Beckett 
---
 drivers/gpu/drm/i915/i915_drv.h  | 10 +++---
 drivers/gpu/drm/i915/i915_pci.c  |  2 ++
 drivers/gpu/drm/i915/intel_device_info.h |  1 +
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 890f1f6fbc49..23f4713005bb 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1512,12 +1512,16 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
 
 /*
  * Set this flag, when platform requires 64K GTT page sizes or larger for
- * device local memory access. Also this flag implies that we require or
- * at least support the compact PT layout for the ppGTT when using the 64K
- * GTT pages.
+ * device local memory access.
  */
 #define HAS_64K_PAGES(dev_priv) (INTEL_INFO(dev_priv)->has_64k_pages)
 
+/* Set this flag when platform doesn't allow both 64k pages and 4k pages in
+ * the same PT. this flag means we need to support compact PT layout for the
+ * ppGTT when using the 64K GTT pages.
+ */
+#define NEEDS_COMPACT_PT(dev_priv) (INTEL_INFO(dev_priv)->needs_compact_pt)
+
 #define HAS_IPC(dev_priv)   (INTEL_INFO(dev_priv)->display.has_ipc)
 
 #define HAS_REGION(i915, i) (INTEL_INFO(i915)->memory_regions & (i))
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 4081fd50ba9d..799b56569ef5 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -1028,6 +1028,7 @@ static const struct intel_device_info xehpsdv_info = {
PLATFORM(INTEL_XEHPSDV),
.display = { },
.has_64k_pages = 1,
+   .needs_compact_pt = 1,
.platform_engine_mask =
BIT(RCS0) | BIT(BCS0) |
BIT(VECS0) | BIT(VECS1) | BIT(VECS2) | BIT(VECS3) |
@@ -1045,6 +1046,7 @@ static const struct intel_device_info dg2_info = {
.media.rel = 55,
PLATFORM(INTEL_DG2),
.has_64k_pages = 1,
+   .needs_compact_pt = 1,
.platform_engine_mask =
BIT(RCS0) | BIT(BCS0) |
BIT(VECS0) | BIT(VECS1) |
diff --git a/drivers/gpu/drm/i915/intel_device_info.h 
b/drivers/gpu/drm/i915/intel_device_info.h
index 3699b1c539ea..c8aaf646430c 100644
--- a/drivers/gpu/drm/i915/intel_device_info.h
+++ b/drivers/gpu/drm/i915/intel_device_info.h
@@ -130,6 +130,7 @@ enum intel_ppgtt_type {
/* Keep has_* in alphabetical order */ \
func(has_64bit_reloc); \
func(has_64k_pages); \
+   func(needs_compact_pt); \
func(gpu_reset_clobbers_display); \
func(has_reset_engine); \
func(has_global_mocs); \
-- 
2.25.1



[Intel-gfx] [PATCH v3 0/5] discrete card 64K page support

2022-01-20 Thread Robert Beckett
This series continues support for 64K pages for discrete cards.
It supersedes the 64K patches from 
https://patchwork.freedesktop.org/series/95686/#rev4
Changes since that series:

- set min alignment for DG2 to 2MB in i915_address_space_init
- replace coloring with simpler 2MB VA alignment for lmem buffers
- enforce alignment to 2MB for lmem objects on DG2 in i915_vma_insert
- expand vma reservation to round up to 2MB on DG2 in i915_vma_insert
- add alignment test

v2: rebase and fix for async vma that landed
v3:
* fix uapi doc typos
* add needs_compact_pt flag patch
* cleanup vma expansion to use vm->min_alignment instead of hard coding

Matthew Auld (3):
  drm/i915: enforce min GTT alignment for discrete cards
  drm/i915: support 64K GTT pages for discrete cards
  drm/i915/uapi: document behaviour for DG2 64K support

Ramalingam C (1):
  drm/i915: add needs_compact_pt flag

Robert Beckett (1):
  drm/i915: add gtt misalignment test

 .../gpu/drm/i915/gem/selftests/huge_pages.c   |  60 +
 .../i915/gem/selftests/i915_gem_client_blt.c  |  23 +-
 drivers/gpu/drm/i915/gt/gen8_ppgtt.c  | 108 -
 drivers/gpu/drm/i915/gt/intel_gtt.c   |  12 +
 drivers/gpu/drm/i915/gt/intel_gtt.h   |  18 ++
 drivers/gpu/drm/i915/gt/intel_ppgtt.c |   1 +
 drivers/gpu/drm/i915/i915_drv.h   |  10 +-
 drivers/gpu/drm/i915/i915_pci.c   |   2 +
 drivers/gpu/drm/i915/i915_vma.c   |   9 +
 drivers/gpu/drm/i915/intel_device_info.h  |   1 +
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 226 +++---
 include/uapi/drm/i915_drm.h   |  44 +++-
 12 files changed, 462 insertions(+), 52 deletions(-)

-- 
2.25.1



[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/guc: Update guc shim control programming on newer platforms

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915/guc: Update guc shim control programming on newer platforms
URL   : https://patchwork.freedesktop.org/series/99125/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
0b46254f664d drm/i915/guc: Update guc shim control programming on newer 
platforms
-:7: WARNING:REPEATED_WORD: Possible repeated word: 'of'
#7: 
Starting from xehpsdv, bit 0 of of the GuC shim control register has

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




[Intel-gfx] ✗ Fi.CI.SPARSE: warning for discrete card 64K page support

2022-01-20 Thread Patchwork
== Series Details ==

Series: discrete card 64K page support
URL   : https://patchwork.freedesktop.org/series/99119/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.




[Intel-gfx] [PATCH 1/2] drm/i915/guc: Don't check CT descriptor status before CT write / read

2022-01-20 Thread Matthew Brost
Don't check CT descriptor status, unless CONFIG_DRM_I915_DEBUG_GUC is
set, before CT write / read as this could result in a read across the
PCIe bus thus adding latency to every CT write / read. On well behavied
systems this vaue should always read as zero. For some reason it doesn't
the CT channel is broken and will eventually recover from a GT reset,
albeit the GT reset will not be triggered immediately by seeing that
descriptor status is non-zero.

v2:
 (CI)
  - Fix build error (hide corrupted label in write function behind
CONFIG_DRM_I915_DEBUG_GUC)

Signed-off-by: Matthew Brost 
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
index de89d40abd38d..948cf31429412 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
@@ -379,8 +379,10 @@ static int ct_write(struct intel_guc_ct *ct,
u32 *cmds = ctb->cmds;
unsigned int i;
 
+#ifdef CONFIG_DRM_I915_DEBUG_GUC
if (unlikely(desc->status))
goto corrupted;
+#endif
 
GEM_BUG_ON(tail > size);
 
@@ -445,11 +447,13 @@ static int ct_write(struct intel_guc_ct *ct,
 
return 0;
 
+#ifdef CONFIG_DRM_I915_DEBUG_GUC
 corrupted:
CT_ERROR(ct, "Corrupted descriptor head=%u tail=%u status=%#x\n",
 desc->head, desc->tail, desc->status);
ctb->broken = true;
return -EPIPE;
+#endif
 }
 
 /**
@@ -815,8 +819,10 @@ static int ct_read(struct intel_guc_ct *ct, struct 
ct_incoming_msg **msg)
if (unlikely(ctb->broken))
return -EPIPE;
 
+#ifdef CONFIG_DRM_I915_DEBUG_GUC
if (unlikely(desc->status))
goto corrupted;
+#endif
 
GEM_BUG_ON(head > size);
 
-- 
2.34.1



[Intel-gfx] [PATCH 0/2] A few CT updates

2022-01-20 Thread Matthew Brost
A couple of minor CT updates. 1 for performance, 1 for extra debug.

Signed-off-by: Matthew Brost 

Matthew Brost (2):
  drm/i915/guc: Don't check CT descriptor status before CT write / read
  drm/i915/guc: Print CT descriptor status in CT debug function

 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 10 ++
 1 file changed, 10 insertions(+)

-- 
2.34.1



[Intel-gfx] [PATCH 2/2] drm/i915/guc: Print CT descriptor status in CT debug function

2022-01-20 Thread Matthew Brost
Noticed that the CT descriptor status was not printed in the CT debug
function, add that in.

Signed-off-by: Matthew Brost 
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
index 948cf31429412..5df2e3413796e 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
@@ -1219,10 +1219,14 @@ void intel_guc_ct_print_info(struct intel_guc_ct *ct,
   ct->ctbs.send.desc->head);
drm_printf(p, "Tail: %u\n",
   ct->ctbs.send.desc->tail);
+   drm_printf(p, "Status: %u\n",
+  ct->ctbs.send.desc->status);
drm_printf(p, "G2H Space: %u\n",
   atomic_read(>ctbs.recv.space) * 4);
drm_printf(p, "Head: %u\n",
   ct->ctbs.recv.desc->head);
drm_printf(p, "Tail: %u\n",
   ct->ctbs.recv.desc->tail);
+   drm_printf(p, "Status: %u\n",
+  ct->ctbs.recv.desc->status);
 }
-- 
2.34.1



Re: [Intel-gfx] [PATCH] drm/i915/wopcm: Handle pre-programmed WOPCM registers

2022-01-20 Thread Teres Alexis, Alan Previn
Just one nit below, (assuming that igt CI failure isnt related - kms flip not 
completing)
Reviewed-by Alan Previn 

-Original Message-
From: Ceraolo Spurio, Daniele  
Sent: Friday, January 14, 2022 11:33 AM
To: intel-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org; Ceraolo Spurio, Daniele 
; Summers, Stuart ; 
Harrison, John C ; Teres Alexis, Alan Previn 

Subject: [PATCH] drm/i915/wopcm: Handle pre-programmed WOPCM registers

Starting from DG2, some of the programming previously done by i915 and the GuC 
has been moved to the GSC and the relevant registers are no longer writable by 
either CPU or GuC. This is also referred to as GuC deprivilege.
On the i915 side, this affects the WOPCM registers: these are no longer 
programmed by the driver and we do instead expect to find them already set. 
This can lead to verification failures because in i915 we cheat a bit with the 
WOPCM size defines, to keep the code common across platforms, by sometimes 
using a smaller WOPCM size that the actual HW support (which isn't a problem 
because the extra size is not needed if the FW fits in the smaller chunk), 
while the pre-programmed values can use the actual size.
Given tha the new programming entity is trusted, relax the amount of the checks 
done on the pre-programmed values by not limiting the max programmed size. In 
the extremely unlikely scenario that the registers have been misprogrammed, we 
will still fail later at DMA time.

Signed-off-by: Daniele Ceraolo Spurio 
Cc: Stuart Summers 
Cc: John Harrison 
Cc: Alan Previn 
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h |  3 ++
 drivers/gpu/drm/i915/i915_drv.h|  3 ++
 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   |  1 +
 drivers/gpu/drm/i915/intel_wopcm.c | 42 ++
 6 files changed, 51 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_device_info.c 
b/drivers/gpu/drm/i915/intel_device_info.c
index 93b251b25aba..88aad892a0fc 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -394,6 +394,14 @@ void intel_device_info_runtime_init(struct 
drm_i915_private *dev_priv)
memset(runtime->num_sprites, 0, sizeof(runtime->num_sprites));
memset(runtime->num_scalers, 0, sizeof(runtime->num_scalers));
}
+
+   /*
+* Early DG2 steppings don't have the GuC depriv feature. We can't
+* rely on the fuse on those platforms because the meaning of the fuse
+* bit is inverted on platforms that do have the feature.
+*/
+   if (IS_DG2_GRAPHICS_STEP(dev_priv, G10, STEP_A0, STEP_A1))
+   info->has_guc_deprivilege = 0;

Nit: not sure if it matters if this stepping is not-public (although I am not 
100% sure I am correct in my assumption this is not-public).
 }


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

2022-01-20 Thread Ramalingam C
On 2022-01-20 at 16:42:52 +, Robert Beckett wrote:
> 
> 
> On 20/01/2022 16:21, Ramalingam C wrote:
> > Add a new platform flag, needs_compact_pt, to mark the requirement of
> > compact pt layout support for the ppGTT when using 64K GTT pages.
> > 
> > With this flag has_64k_pages will only indicate requirement of 64K
> > GTT page sizes or larger for device local memory access.
> > 
> > Suggested-by: Matthew Auld 
> > Signed-off-by: Ramalingam C 
> > cc: Robert Beckett 
> > ---
> >   drivers/gpu/drm/i915/i915_drv.h  | 10 +++---
> >   drivers/gpu/drm/i915/i915_pci.c  |  2 ++
> >   drivers/gpu/drm/i915/intel_device_info.h |  1 +
> >   3 files changed, 10 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h 
> > b/drivers/gpu/drm/i915/i915_drv.h
> > index 890f1f6fbc49..23f4713005bb 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -1512,12 +1512,16 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
> >   /*
> >* Set this flag, when platform requires 64K GTT page sizes or larger for
> > - * device local memory access. Also this flag implies that we require or
> > - * at least support the compact PT layout for the ppGTT when using the 64K
> > - * GTT pages.
> > + * device local memory access.
> >*/
> >   #define HAS_64K_PAGES(dev_priv) (INTEL_INFO(dev_priv)->has_64k_pages)
> > +/* Set this flag when platform doesn't allow both 64k pages and 4k pages in
> > + * the same PT. this flag means we need to support compact PT layout for 
> > the
> > + * ppGTT when using the 64K GTT pages.
> > + */
> > +#define NEEDS_COMPACT_PT(dev_priv) (INTEL_INFO(dev_priv)->needs_compact_pt)
> > +
> >   #define HAS_IPC(dev_priv)  (INTEL_INFO(dev_priv)->display.has_ipc)
> >   #define HAS_REGION(i915, i) (INTEL_INFO(i915)->memory_regions & (i))
> > diff --git a/drivers/gpu/drm/i915/i915_pci.c 
> > b/drivers/gpu/drm/i915/i915_pci.c
> > index 8261b6455747..3e7555ce6894 100644
> > --- a/drivers/gpu/drm/i915/i915_pci.c
> > +++ b/drivers/gpu/drm/i915/i915_pci.c
> > @@ -1028,6 +1028,7 @@ static const struct intel_device_info xehpsdv_info = {
> > PLATFORM(INTEL_XEHPSDV),
> > .display = { },
> > .has_64k_pages = 1,
> > +   .needs_compact_pt = 1,
> > .platform_engine_mask =
> > BIT(RCS0) | BIT(BCS0) |
> > BIT(VECS0) | BIT(VECS1) | BIT(VECS2) | BIT(VECS3) |
> > @@ -1046,6 +1047,7 @@ static const struct intel_device_info dg2_info = {
> > .media.rel = 55,
> > PLATFORM(INTEL_DG2),
> > .has_64k_pages = 1,
> > +   .needs_compact_pt = 1,
> > .platform_engine_mask =
> > BIT(RCS0) | BIT(BCS0) |
> > BIT(VECS0) | BIT(VECS1) |
> > diff --git a/drivers/gpu/drm/i915/intel_device_info.h 
> > b/drivers/gpu/drm/i915/intel_device_info.h
> > index 3699b1c539ea..8ff676f49471 100644
> > --- a/drivers/gpu/drm/i915/intel_device_info.h
> > +++ b/drivers/gpu/drm/i915/intel_device_info.h
> > @@ -130,6 +130,7 @@ enum intel_ppgtt_type {
> > /* Keep has_* in alphabetical order */ \
> > func(has_64bit_reloc); \
> > func(has_64k_pages); \
> > +   func(needs_compact_pt; \
> 
> missing `)`
> instead of chucking untested patches on ml, I'll add a fixed version to the
> in review series and include it in v3 after testing
Thanks

Ram
> 
> > func(gpu_reset_clobbers_display); \
> > func(has_reset_engine); \
> > func(has_global_mocs); \
> > 


[Intel-gfx] [GIT PULL] PCI fixes for v5.17

2022-01-20 Thread Bjorn Helgaas
The following changes since commit fa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf:

  Linux 5.16-rc1 (2021-11-14 13:56:52 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git 
tags/pci-v5.17-fixes-1

for you to fetch changes up to 9c494ca4d3a535f9ca11ad6af1813983c1c6cbdd:

  x86/gpu: Reserve stolen memory for first integrated Intel GPU (2022-01-18 
14:19:06 -0600)


PCI fixes:

  - Reserve "stolen memory" for integrated Intel GPU, even if it's not
the first GPU to be enumerated (Lucas De Marchi)


Lucas De Marchi (1):
  x86/gpu: Reserve stolen memory for first integrated Intel GPU

 arch/x86/kernel/early-quirks.c | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)


[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for discrete card 64K page support

2022-01-20 Thread Patchwork
== Series Details ==

Series: discrete card 64K page support
URL   : https://patchwork.freedesktop.org/series/99119/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
2ad66084bf0b drm/i915: add needs_compact_pt flag
f2a348f85370 drm/i915: enforce min GTT alignment for discrete cards
-:288: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code 
refactoring
#288: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:457:
+   if (offset < hole_start + 
aligned_size)

-:300: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code 
refactoring
#300: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:481:
+   if (offset + aligned_size > 
hole_end)

-:318: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code 
refactoring
#318: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:497:
+   if (offset < hole_start + 
aligned_size)

-:330: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code 
refactoring
#330: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:520:
+   if (offset + aligned_size > 
hole_end)

-:348: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code 
refactoring
#348: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:536:
+   if (offset < hole_start + 
aligned_size)

-:360: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code 
refactoring
#360: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:560:
+   if (offset + aligned_size > 
hole_end)

-:378: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code 
refactoring
#378: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:576:
+   if (offset < hole_start + 
aligned_size)

-:390: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code 
refactoring
#390: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:599:
+   if (offset + aligned_size > 
hole_end)

total: 0 errors, 8 warnings, 0 checks, 433 lines checked
e270ed3aae8a drm/i915: support 64K GTT pages for discrete cards
3ccd33b30eb1 drm/i915: add gtt misalignment test
-:157: CHECK:LINE_SPACING: Please don't use multiple blank lines
#157: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:1260:
+
+

-:170: CHECK:LINE_SPACING: Please don't use multiple blank lines
#170: FILE: drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:1338:
+
+

total: 0 errors, 0 warnings, 2 checks, 170 lines checked
5b1165701d6d drm/i915/uapi: document behaviour for DG2 64K support




[Intel-gfx] [CI] drm/i915/wopcm: Handle pre-programmed WOPCM registers

2022-01-20 Thread Daniele Ceraolo Spurio
Starting from DG2, some of the programming previously done by i915 and
the GuC has been moved to the GSC and the relevant registers are no
longer writable by either CPU or GuC. This is also referred to as GuC
deprivilege.
On the i915 side, this affects the WOPCM registers: these are no longer
programmed by the driver and we do instead expect to find them already
set. This can lead to verification failures because in i915 we cheat a bit
with the WOPCM size defines, to keep the code common across platforms, by
sometimes using a smaller WOPCM size that the actual HW support (which isn't
a problem because the extra size is not needed if the FW fits in the smaller
chunk), while the pre-programmed values can use the actual size.
Given tha the new programming entity is trusted, relax the amount of the
checks done on the pre-programmed values by not limiting the max
programmed size. In the extremely unlikely scenario that the registers
have been misprogrammed, we will still fail later at DMA time.

v2: drop special case for DG2 G10 A0 (Alan)

Signed-off-by: Daniele Ceraolo Spurio 
Cc: Stuart Summers 
Cc: John Harrison 
Cc: Alan Previn 
Reviewed-by Alan Previn 
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h |  3 ++
 drivers/gpu/drm/i915/i915_drv.h|  3 ++
 drivers/gpu/drm/i915/i915_pci.c|  1 +
 drivers/gpu/drm/i915/intel_device_info.h   |  1 +
 drivers/gpu/drm/i915/intel_wopcm.c | 42 ++
 5 files changed, 43 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h
index e6bd66d6ce5a..cdb47c2291c8 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h
@@ -94,6 +94,9 @@
 #define   GUC_ENABLE_MIA_CLOCK_GATING  (1<<15)
 #define   GUC_GEN10_SHIM_WC_ENABLE (1<<21)
 
+#define GUC_SHIM_CONTROL2  _MMIO(0xc068)
+#define   GUC_IS_PRIVILEGED(1<<29)
+
 #define GUC_SEND_INTERRUPT _MMIO(0xc4c8)
 #define   GUC_SEND_TRIGGER   (1<<0)
 #define GEN11_GUC_HOST_INTERRUPT   _MMIO(0x1901f0)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 890f1f6fbc49..0ba820ec4e49 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1557,6 +1557,9 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
 #define INTEL_DISPLAY_ENABLED(dev_priv) \
(drm_WARN_ON(&(dev_priv)->drm, !HAS_DISPLAY(dev_priv)), 
!(dev_priv)->params.disable_display)
 
+#define HAS_GUC_DEPRIVILEGE(dev_priv) \
+   (INTEL_INFO(dev_priv)->has_guc_deprivilege)
+
 static inline bool run_as_guest(void)
 {
return !hypervisor_is_type(X86_HYPER_NATIVE);
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 8261b6455747..983546d5f415 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -1045,6 +1045,7 @@ static const struct intel_device_info dg2_info = {
.graphics.rel = 55,
.media.rel = 55,
PLATFORM(INTEL_DG2),
+   .has_guc_deprivilege = 1,
.has_64k_pages = 1,
.platform_engine_mask =
BIT(RCS0) | BIT(BCS0) |
diff --git a/drivers/gpu/drm/i915/intel_device_info.h 
b/drivers/gpu/drm/i915/intel_device_info.h
index 3699b1c539ea..abf1e103c558 100644
--- a/drivers/gpu/drm/i915/intel_device_info.h
+++ b/drivers/gpu/drm/i915/intel_device_info.h
@@ -134,6 +134,7 @@ enum intel_ppgtt_type {
func(has_reset_engine); \
func(has_global_mocs); \
func(has_gt_uc); \
+   func(has_guc_deprivilege); \
func(has_l3_dpf); \
func(has_llc); \
func(has_logical_ring_contexts); \
diff --git a/drivers/gpu/drm/i915/intel_wopcm.c 
b/drivers/gpu/drm/i915/intel_wopcm.c
index f06d21005106..322fb9eeb880 100644
--- a/drivers/gpu/drm/i915/intel_wopcm.c
+++ b/drivers/gpu/drm/i915/intel_wopcm.c
@@ -43,6 +43,7 @@
 /* Default WOPCM size is 2MB from Gen11, 1MB on previous platforms */
 #define GEN11_WOPCM_SIZE   SZ_2M
 #define GEN9_WOPCM_SIZESZ_1M
+#define MAX_WOPCM_SIZE SZ_8M
 /* 16KB WOPCM (RSVD WOPCM) is reserved from HuC firmware top. */
 #define WOPCM_RESERVED_SIZESZ_16K
 
@@ -207,6 +208,14 @@ static bool __wopcm_regs_locked(struct intel_uncore 
*uncore,
return true;
 }
 
+static bool __wopcm_regs_writable(struct intel_uncore *uncore)
+{
+   if (!HAS_GUC_DEPRIVILEGE(uncore->i915))
+   return true;
+
+   return intel_uncore_read(uncore, GUC_SHIM_CONTROL2) & GUC_IS_PRIVILEGED;
+}
+
 /**
  * intel_wopcm_init() - Initialize the WOPCM structure.
  * @wopcm: pointer to intel_wopcm.
@@ -224,18 +233,19 @@ void intel_wopcm_init(struct intel_wopcm *wopcm)
u32 guc_fw_size = intel_uc_fw_get_upload_size(>uc.guc.fw);
u32 huc_fw_size = intel_uc_fw_get_upload_size(>uc.huc.fw);
u32 ctx_rsvd = context_reserved_size(i915);
+   

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/wopcm: Handle pre-programmed WOPCM registers (rev3)

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915/wopcm: Handle pre-programmed WOPCM registers (rev3)
URL   : https://patchwork.freedesktop.org/series/98910/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_4 -> Patchwork_22046


Summary
---

  **WARNING**

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

Participating hosts (42 -> 40)
--

  Additional (3): bat-rpls-1 bat-jsl-2 fi-ilk-650 
  Missing(5): bat-dg1-5 fi-bsw-cyan bat-adlp-4 fi-pnv-d510 fi-bdw-samus 

Possible new issues
---

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

### IGT changes ###

 Warnings 

  * igt@i915_selftest@live@hangcheck:
- bat-dg1-6:  [DMESG-FAIL][1] ([i915#4494]) -> [DMESG-FAIL][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/bat-dg1-6/igt@i915_selftest@l...@hangcheck.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/bat-dg1-6/igt@i915_selftest@l...@hangcheck.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_cs_nop@nop-compute0:
- fi-ilk-650: NOTRUN -> [SKIP][3] ([fdo#109271]) +39 similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/fi-ilk-650/igt@amdgpu/amd_cs_...@nop-compute0.html

  * igt@gem_exec_suspend@basic-s3@smem:
- fi-skl-6600u:   [PASS][4] -> [INCOMPLETE][5] ([i915#4547])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/fi-skl-6600u/igt@gem_exec_suspend@basic...@smem.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/fi-skl-6600u/igt@gem_exec_suspend@basic...@smem.html

  * igt@kms_chamelium@dp-hpd-fast:
- fi-ilk-650: NOTRUN -> [SKIP][6] ([fdo#109271] / [fdo#111827]) +8 
similar issues
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/fi-ilk-650/igt@kms_chamel...@dp-hpd-fast.html

  * igt@kms_frontbuffer_tracking@basic:
- fi-cml-u2:  [PASS][7] -> [DMESG-WARN][8] ([i915#4269])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/fi-cml-u2/igt@kms_frontbuffer_track...@basic.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/fi-cml-u2/igt@kms_frontbuffer_track...@basic.html

  
 Possible fixes 

  * igt@core_hotunplug@unbind-rebind:
- fi-bwr-2160:[FAIL][9] ([i915#3194]) -> [PASS][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/fi-bwr-2160/igt@core_hotunp...@unbind-rebind.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/fi-bwr-2160/igt@core_hotunp...@unbind-rebind.html

  * igt@gem_exec_suspend@basic-s3@smem:
- fi-tgl-1115g4:  [FAIL][11] ([i915#1888]) -> [PASS][12] +1 similar 
issue
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/fi-tgl-1115g4/igt@gem_exec_suspend@basic...@smem.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/fi-tgl-1115g4/igt@gem_exec_suspend@basic...@smem.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#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
  [i915#3194]: https://gitlab.freedesktop.org/drm/intel/issues/3194
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4269]: https://gitlab.freedesktop.org/drm/intel/issues/4269
  [i915#4494]: https://gitlab.freedesktop.org/drm/intel/issues/4494
  [i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4898]: https://gitlab.freedesktop.org/drm/intel/issues/4898
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533


Build changes
-

  * Linux: CI_DRM_4 -> Patchwork_22046

  CI-20190529: 20190529
  CI_DRM_4: 95f7fe1c9f81eff6c3faab2a73ccaca51440f73c @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6329: 38f656fdd61119105ecfa2c4dac157cd7dcad204 @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_22046: 

Re: [Intel-gfx] [PATCH] drm/i915/pmu: Use PM timestamp instead of RING TIMESTAMP for reference

2022-01-20 Thread Teres Alexis, Alan Previn
Reviewed-by: Alan Previn 

On Mon, 2022-01-10 at 17:55 -0800, Umesh Nerlige Ramappa wrote:
> All timestamps returned by GuC for GuC PMU busyness are captured from
> GUC PM TIMESTAMP. Since this timestamp does not tick when GuC goes idle,
> kmd uses RING_TIMESTAMP to measure busyness of an engine with an active
> context. In further stress testing, the MMIO read of the RING_TIMESTAMP
> is seen to cause a rare hang. Resolve the issue by using gt specific
> timestamp from PM which is in sync with the GuC PM timestamp.
> 
> Fixes: 77cdd054dd2c ("drm/i915/pmu: Connect engine busyness stats from GuC to 
> pmu")
> Signed-off-by: Umesh Nerlige Ramappa 
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_guc.h|  5 ++
>  .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 56 ++-
>  drivers/gpu/drm/i915/i915_reg.h   |  3 +-
>  3 files changed, 50 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.h 
> b/drivers/gpu/drm/i915/gt/uc/intel_guc.h
> index f9240d4baa69..3aabe164c329 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h
> @@ -206,6 +206,11 @@ struct intel_guc {
>* context usage for overflows.
>*/
>   struct delayed_work work;
> +
> + /**
> +  * @shift: Right shift value for the gpm timestamp
> +  */
> + u32 shift;
>   } timestamp;
>  
>  #ifdef CONFIG_DRM_I915_SELFTEST
> 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 9989d121127d..d93e9547f5e4 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -1149,23 +1149,51 @@ static void guc_update_engine_gt_clks(struct 
> intel_engine_cs *engine)
>   }
>  }
>  
> -static void guc_update_pm_timestamp(struct intel_guc *guc,
> - struct intel_engine_cs *engine,
> - ktime_t *now)
> +static u32 gpm_timestamp_shift(struct intel_gt *gt)
>  {
> - u32 gt_stamp_now, gt_stamp_hi;
> + intel_wakeref_t wakeref;
> + u32 reg, shift;
> +
> + with_intel_runtime_pm(gt->uncore->rpm, wakeref)
> + reg = intel_uncore_read(gt->uncore, RPM_CONFIG0);
> +
> + shift = (reg & GEN10_RPM_CONFIG0_CTC_SHIFT_PARAMETER_MASK) >>
> + GEN10_RPM_CONFIG0_CTC_SHIFT_PARAMETER_SHIFT;
> +
> + return 3 - shift;
> +}
> +
> +static u64 gpm_timestamp(struct intel_gt *gt)
> +{
> + u32 lo, hi, old_hi, loop = 0;
> +
> + hi = intel_uncore_read(gt->uncore, MISC_STATUS1);
> + do {
> + lo = intel_uncore_read(gt->uncore, MISC_STATUS0);
> + old_hi = hi;
> + hi = intel_uncore_read(gt->uncore, MISC_STATUS1);
> + } while (old_hi != hi && loop++ < 2);
> +
> + return ((u64)hi << 32) | lo;
> +}
> +
> +static void guc_update_pm_timestamp(struct intel_guc *guc, ktime_t *now)
> +{
> + struct intel_gt *gt = guc_to_gt(guc);
> + u32 gt_stamp_lo, gt_stamp_hi;
> + u64 gpm_ts;
>  
>   lockdep_assert_held(>timestamp.lock);
>  
>   gt_stamp_hi = upper_32_bits(guc->timestamp.gt_stamp);
> - gt_stamp_now = intel_uncore_read(engine->uncore,
> -  RING_TIMESTAMP(engine->mmio_base));
> + gpm_ts = gpm_timestamp(gt) >> guc->timestamp.shift;
> + gt_stamp_lo = lower_32_bits(gpm_ts);
>   *now = ktime_get();
>  
> - if (gt_stamp_now < lower_32_bits(guc->timestamp.gt_stamp))
> + if (gt_stamp_lo < lower_32_bits(guc->timestamp.gt_stamp))
>   gt_stamp_hi++;
>  
> - guc->timestamp.gt_stamp = ((u64)gt_stamp_hi << 32) | gt_stamp_now;
> + guc->timestamp.gt_stamp = ((u64)gt_stamp_hi << 32) | gt_stamp_lo;
>  }
>  
>  /*
> @@ -1209,7 +1237,7 @@ static ktime_t guc_engine_busyness(struct 
> intel_engine_cs *engine, ktime_t *now)
>   stats_saved = *stats;
>   gt_stamp_saved = guc->timestamp.gt_stamp;
>   guc_update_engine_gt_clks(engine);
> - guc_update_pm_timestamp(guc, engine, now);
> + guc_update_pm_timestamp(guc, now);
>   intel_gt_pm_put_async(gt);
>   if (i915_reset_count(gpu_error) != reset_count) {
>   *stats = stats_saved;
> @@ -1241,8 +1269,8 @@ static void __reset_guc_busyness_stats(struct intel_guc 
> *guc)
>  
>   spin_lock_irqsave(>timestamp.lock, flags);
>  
> + guc_update_pm_timestamp(guc, );
>   for_each_engine(engine, gt, id) {
> - guc_update_pm_timestamp(guc, engine, );
>   guc_update_engine_gt_clks(engine);
>   engine->stats.guc.prev_total = 0;
>   }
> @@ -1259,10 +1287,11 @@ static void __update_guc_busyness_stats(struct 
> intel_guc *guc)
>   ktime_t unused;
>  
>   spin_lock_irqsave(>timestamp.lock, flags);
> - for_each_engine(engine, gt, id) {
> - 

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/selftests: Don't restart WL for every frequency step

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915/selftests: Don't restart WL for every frequency step
URL   : https://patchwork.freedesktop.org/series/99109/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_3 -> Patchwork_22043


Summary
---

  **FAILURE**

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

Participating hosts (43 -> 35)
--

  Additional (3): fi-kbl-soraka fi-kbl-guc fi-apl-guc 
  Missing(11): bat-dg1-6 bat-dg1-5 fi-bsw-cyan bat-adlp-6 bat-adlp-4 
fi-kbl-8809g fi-pnv-d510 bat-rpls-1 fi-bdw-samus bat-jsl-2 bat-jsl-1 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_selftest@live@gt_engines:
- fi-rkl-guc: [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3/fi-rkl-guc/igt@i915_selftest@live@gt_engines.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22043/fi-rkl-guc/igt@i915_selftest@live@gt_engines.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@debugfs_test@read_all_entries:
- fi-apl-guc: NOTRUN -> [DMESG-WARN][3] ([i915#1610])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22043/fi-apl-guc/igt@debugfs_test@read_all_entries.html

  * igt@gem_exec_fence@basic-busy@bcs0:
- fi-kbl-soraka:  NOTRUN -> [SKIP][4] ([fdo#109271]) +8 similar issues
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22043/fi-kbl-soraka/igt@gem_exec_fence@basic-b...@bcs0.html

  * igt@gem_exec_suspend@basic-s3@smem:
- fi-skl-6600u:   [PASS][5] -> [INCOMPLETE][6] ([i915#4547])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3/fi-skl-6600u/igt@gem_exec_suspend@basic...@smem.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22043/fi-skl-6600u/igt@gem_exec_suspend@basic...@smem.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_22043/fi-kbl-soraka/igt@gem_huc_c...@huc-copy.html

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

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

  * igt@i915_selftest@live@hangcheck:
- fi-snb-2600:[PASS][11] -> [INCOMPLETE][12] ([i915#3921])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3/fi-snb-2600/igt@i915_selftest@l...@hangcheck.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22043/fi-snb-2600/igt@i915_selftest@l...@hangcheck.html

  * igt@kms_busy@basic:
- fi-kbl-guc: NOTRUN -> [SKIP][13] ([fdo#109271] / [i915#1845])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22043/fi-kbl-guc/igt@kms_b...@basic.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-soraka:  NOTRUN -> [SKIP][14] ([fdo#109271] / [fdo#111827]) +8 
similar issues
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22043/fi-kbl-soraka/igt@kms_chamel...@common-hpd-after-suspend.html

  * igt@kms_chamelium@vga-hpd-fast:
- fi-kbl-guc: NOTRUN -> [SKIP][15] ([fdo#109271] / [fdo#111827]) +8 
similar issues
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22043/fi-kbl-guc/igt@kms_chamel...@vga-hpd-fast.html

  * igt@kms_frontbuffer_tracking@basic:
- fi-cml-u2:  [PASS][16] -> [DMESG-WARN][17] ([i915#4269])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3/fi-cml-u2/igt@kms_frontbuffer_track...@basic.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22043/fi-cml-u2/igt@kms_frontbuffer_track...@basic.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- fi-kbl-guc: NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#533])
   [18]: 

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/selftests: Don't restart WL for every frequency step

2022-01-20 Thread Belgaumkar, Vinay


On 1/20/2022 11:40 AM, Patchwork wrote:

Project List - Patchwork *Patch Details*
*Series:*   drm/i915/selftests: Don't restart WL for every frequency step
*URL:*  https://patchwork.freedesktop.org/series/99109/
*State:*failure
*Details:* 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22043/index.html



  CI Bug Log - changes from CI_DRM_3 -> Patchwork_22043


Summary

*FAILURE*

Serious unknown changes coming with Patchwork_22043 absolutely need to be
verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_22043, 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_22043/index.html



Participating hosts (43 -> 35)

Additional (3): fi-kbl-soraka fi-kbl-guc fi-apl-guc
Missing (11): bat-dg1-6 bat-dg1-5 fi-bsw-cyan bat-adlp-6 bat-adlp-4 
fi-kbl-8809g fi-pnv-d510 bat-rpls-1 fi-bdw-samus bat-jsl-2 bat-jsl-1



Possible new issues

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



  IGT changes


Possible regressions

  * igt@i915_selftest@live@gt_engines:
  o fi-rkl-guc: PASS


-> INCOMPLETE



This failure is not related to the patch. It only changes a selftest, so 
shouldn't affect any other test.


Thanks,

Vinay.


 *


Known issues

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


  IGT changes


Issues hit

 *

igt@debugfs_test@read_all_entries:

  o fi-apl-guc: NOTRUN -> DMESG-WARN


(i915#1610 )
 *

igt@gem_exec_fence@basic-busy@bcs0:

  o fi-kbl-soraka: NOTRUN -> SKIP


(fdo#109271
) +8
similar issues
 *

igt@gem_exec_suspend@basic-s3@smem:

  o fi-skl-6600u: PASS


-> INCOMPLETE


(i915#4547 )
 *

igt@gem_huc_copy@huc-copy:

  o fi-kbl-soraka: NOTRUN -> SKIP


(fdo#109271
 /
i915#2190 )
 *

igt@gem_lmem_swapping@basic:

 o

fi-kbl-guc: NOTRUN -> SKIP


(fdo#109271
 /
i915#4613
) +3
similar issues

 o

fi-kbl-soraka: NOTRUN -> SKIP


(fdo#109271
 /
i915#4613
) +3
similar issues

 *

igt@i915_selftest@live@gt_pm:

  o fi-kbl-soraka: NOTRUN -> DMESG-FAIL


(i915#1886
 /
i915#2291 )
 *

igt@i915_selftest@live@hangcheck:

  o fi-snb-2600: PASS


-> INCOMPLETE


(i915#3921 )
 *

igt@kms_busy@basic:

  o fi-kbl-guc: NOTRUN -> SKIP


(fdo#109271
 /
i915#1845 )
 *


[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/wopcm: Handle pre-programmed WOPCM registers (rev3)

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915/wopcm: Handle pre-programmed WOPCM registers (rev3)
URL   : https://patchwork.freedesktop.org/series/98910/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.




[Intel-gfx] [RFC PATCH 0/1] Splitting up platform-specific calls

2022-01-20 Thread Casey Bowman
In this RFC I would like to ask the community their thoughts
on how we can best handle splitting architecture-specific
calls.

I would like to address the following:

1. How do we want to split architecture calls? Different object files
per platform? Separate function calls within the same object file?

2. How do we address dummy functions? If we have a function call that is
used for one or more platforms, but is not used in another, what should
we do for this case?

I've given an example of splitting an architecture call
in my patch with run_as_guest() being split into different
implementations for x86 and arm64 in separate object files, sharing
a single header.

Another suggestion from Michael (michael.ch...@intel.com) involved
using a single object file, a single header, and splitting various
functions calls via ifdefs in the header file.

I would appreciate any input on how we can avoid scaling issues when
including multiple architectures and multiple functions (as the number
of function calls will inevitably increase with more architectures).

Casey Bowman (1):
  i915/drm: Split out x86 and arm64 functionality

 drivers/gpu/drm/i915/Makefile  |  4 +++
 drivers/gpu/drm/i915/i915_drv.h|  6 +---
 drivers/gpu/drm/i915/i915_platform.h   | 16 +++
 drivers/gpu/drm/i915/i915_platform_arm64.c | 33 ++
 drivers/gpu/drm/i915/i915_platform_x86.c   | 33 ++
 5 files changed, 87 insertions(+), 5 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_platform.h
 create mode 100644 drivers/gpu/drm/i915/i915_platform_arm64.c
 create mode 100644 drivers/gpu/drm/i915/i915_platform_x86.c

-- 
2.25.1



[Intel-gfx] [RFC PATCH 1/1] i915/drm: Split out x86 and arm64 functionality

2022-01-20 Thread Casey Bowman
Some x86 checks are unnecessary on arm64 systems, so they
are being split out to avoid being used. There may be
further arm64 implementations created in the future for
this area, so it's better to split this out now.

Signed-off-by: Casey Bowman 
---
 drivers/gpu/drm/i915/Makefile  |  4 +++
 drivers/gpu/drm/i915/i915_drv.h|  6 +---
 drivers/gpu/drm/i915/i915_platform.h   | 16 +++
 drivers/gpu/drm/i915/i915_platform_arm64.c | 33 ++
 drivers/gpu/drm/i915/i915_platform_x86.c   | 33 ++
 5 files changed, 87 insertions(+), 5 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_platform.h
 create mode 100644 drivers/gpu/drm/i915/i915_platform_arm64.c
 create mode 100644 drivers/gpu/drm/i915/i915_platform_x86.c

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 213c5f9fae32..dd66fe57934d 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -320,6 +320,10 @@ i915-y += intel_gvt.o
 include $(src)/gvt/Makefile
 endif
 
+# Architecture-specific calls
+i915-$(CONFIG_X86)   += i915_platform_x86.o
+i915-$(CONFIG_ARM64) += i915_platform_arm64.o
+
 obj-$(CONFIG_DRM_I915) += i915.o
 obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o
 
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 290dfd40c7b3..e688270c8257 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -107,6 +107,7 @@
 #include "gt/intel_timeline.h"
 #include "i915_vma.h"
 
+#include "i915_platform.h"
 
 /* General customization:
  */
@@ -1543,11 +1544,6 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
 #define INTEL_DISPLAY_ENABLED(dev_priv) \
(drm_WARN_ON(&(dev_priv)->drm, !HAS_DISPLAY(dev_priv)), 
!(dev_priv)->params.disable_display)
 
-static inline bool run_as_guest(void)
-{
-   return !hypervisor_is_type(X86_HYPER_NATIVE);
-}
-
 #define HAS_D12_PLANE_MINIMIZATION(dev_priv) (IS_ROCKETLAKE(dev_priv) || \
  IS_ALDERLAKE_S(dev_priv))
 
diff --git a/drivers/gpu/drm/i915/i915_platform.h 
b/drivers/gpu/drm/i915/i915_platform.h
new file mode 100644
index ..300f93d20f58
--- /dev/null
+++ b/drivers/gpu/drm/i915/i915_platform.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2022 Intel Corporation
+ */
+
+#ifndef _I915_PLATFORM_
+#define _I915_PLATFORM_
+
+#include 
+#include 
+
+/* Start of i915_drv functionality */
+bool run_as_guest(void);
+/* End of i915_drv functionality */
+
+#endif
diff --git a/drivers/gpu/drm/i915/i915_platform_arm64.c 
b/drivers/gpu/drm/i915/i915_platform_arm64.c
new file mode 100644
index ..95692c4dc75f
--- /dev/null
+++ b/drivers/gpu/drm/i915/i915_platform_arm64.c
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2022 Intel Corporation
+ */
+
+/*
+ * Read before adding/removing content!
+ *
+ * Ensure that all functions defined here are also defined
+ * in the i915_platform_x86.c file.
+ *
+ * If the function is a dummy function, be sure to add
+ * a DRM_WARN() call to note that the function is a
+ * dummy function to users so that we can better track
+ * any issues that arise due to changes in either file.
+ *
+ * Also be sure to label Start/End of sections where
+ * functions originate from. These files will host
+ * architecture-specific content from a myriad of files,
+ * labeling the sections will help devs keep track of
+ * where the calls interact.
+ */
+
+#include "i915_platform.h"
+
+/* Start of i915_drv functionality */
+/* Intel VT-d is not used on ARM64 systems */
+bool run_as_guest(void)
+{
+   WARN(1, "%s not supported on arm64 platforms.", __func__);
+   return false;
+}
+/* End of i915_drv functionality */
diff --git a/drivers/gpu/drm/i915/i915_platform_x86.c 
b/drivers/gpu/drm/i915/i915_platform_x86.c
new file mode 100644
index ..9a7174ad2147
--- /dev/null
+++ b/drivers/gpu/drm/i915/i915_platform_x86.c
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2022 Intel Corporation
+ */
+
+/*
+ * Read before adding/removing content!
+ *
+ * Ensure that all functions defined here are also defined
+ * in the i915_platform_arm64.c file.
+ *
+ * If the function is a dummy function, be sure to add
+ * a DRM_WARN() call to note that the function is a
+ * dummy function to users so that we can better track
+ * any issues that arise due to changes in either file.
+ *
+ * Also be sure to label Start/End of sections where
+ * functions originate from. These files will host
+ * architecture-specific content from a myriad of files,
+ * labeling the sections will help devs keep track of
+ * where the calls interact.
+ */
+
+#include "i915_platform.h"
+
+#include 
+
+/* Start of i915_drv functionality */
+bool run_as_guest(void)
+{
+   return !hypervisor_is_type(X86_HYPER_NATIVE);
+}
+/* End of i915_drv functionality */
-- 
2.25.1



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

2022-01-20 Thread kernel test robot
Hi Ramalingam,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next 
drm/drm-next next-20220120]
[cannot apply to tegra-drm/drm/tegra/for-next airlied/drm-next v5.16]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Ramalingam-C/drm-i915-Add-needs_compact_pt-flag/20220121-002256
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-a005 
(https://download.01.org/0day-ci/archive/20220121/202201210857.caeuyl4w-...@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
f7b7138a62648f4019c55e4671682af1f851f295)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/cf1a6660ac07b3b3618b35dccab57042d592ea2c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Ramalingam-C/drm-i915-Add-needs_compact_pt-flag/20220121-002256
git checkout cf1a6660ac07b3b3618b35dccab57042d592ea2c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 
O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/i915/i915_config.c:6:
   In file included from drivers/gpu/drm/i915/i915_drv.h:83:
   In file included from drivers/gpu/drm/i915/gt/intel_engine.h:18:
   In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
   In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
   In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:19:
>> drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h:12:2: error: embedding a #include 
>> directive within macro arguments is not supported
   #include "i915_gem.h"
^
   drivers/gpu/drm/i915/intel_device_info.h:201:25: note: expansion of macro 
'DEFINE_FLAG' requested here
   DEV_INFO_FOR_EACH_FLAG(DEFINE_FLAG);
  ^
   In file included from drivers/gpu/drm/i915/i915_config.c:6:
   In file included from drivers/gpu/drm/i915/i915_drv.h:83:
   In file included from drivers/gpu/drm/i915/gt/intel_engine.h:18:
   In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
   In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
   In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:19:
   drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h:13:2: error: embedding a #include 
directive within macro arguments is not supported
   #include "i915_vma.h"
^
   drivers/gpu/drm/i915/intel_device_info.h:201:25: note: expansion of macro 
'DEFINE_FLAG' requested here
   DEV_INFO_FOR_EACH_FLAG(DEFINE_FLAG);
  ^
   In file included from drivers/gpu/drm/i915/i915_config.c:6:
   In file included from drivers/gpu/drm/i915/i915_drv.h:83:
   In file included from drivers/gpu/drm/i915/gt/intel_engine.h:18:
   In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
   In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
>> drivers/gpu/drm/i915/gt/uc/intel_guc.h:20:2: error: embedding a #include 
>> directive within macro arguments is not supported
   #include "i915_utils.h"
^
   drivers/gpu/drm/i915/intel_device_info.h:201:25: note: expansion of macro 
'DEFINE_FLAG' requested here
   DEV_INFO_FOR_EACH_FLAG(DEFINE_FLAG);
  ^
   In file included from drivers/gpu/drm/i915/i915_config.c:6:
   In file included from drivers/gpu/drm/i915/i915_drv.h:83:
   In file included from drivers/gpu/drm/i915/gt/intel_engine.h:18:
   In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
   In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
   drivers/gpu/drm/i915/gt/uc/intel_guc.h:21:2: error: embedding a #include 
directive within macro arguments is not supported
   #include "i915_vma.h"
^
   drivers/gpu/drm/i915/intel_device_info.h:201:25: note: expansion of macro 
'DEFINE_FLAG' requested here
   DEV_INFO_FOR_EACH_FLAG(DEFINE_FLAG);
  ^
   In file included from drivers/gpu/drm/i915/i915_config.c:6:
   In file included from drivers/gpu/drm/i915/i915_drv.h:83:
   In file included from drivers/gpu/drm/i915/gt/intel_engine.h:18:
   In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
>> drivers/gpu/drm/i915/gt/uc/intel_uc.h:10:2: error: embedding 

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/dg2: Add Wa_18018781329

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915/dg2: Add Wa_18018781329
URL   : https://patchwork.freedesktop.org/series/99128/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5 -> Patchwork_22049


Summary
---

  **FAILURE**

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

Participating hosts (42 -> 40)
--

  Missing(2): fi-bsw-cyan fi-bdw-samus 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_selftest@live@execlists:
- fi-glk-j4005:   [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-glk-j4005/igt@i915_selftest@l...@execlists.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22049/fi-glk-j4005/igt@i915_selftest@l...@execlists.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_flink_basic@bad-flink:
- fi-skl-6600u:   [PASS][3] -> [INCOMPLETE][4] ([i915#4547])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-skl-6600u/igt@gem_flink_ba...@bad-flink.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22049/fi-skl-6600u/igt@gem_flink_ba...@bad-flink.html

  * igt@runner@aborted:
- fi-skl-6600u:   NOTRUN -> [FAIL][5] ([i915#2722] / [i915#4312])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22049/fi-skl-6600u/igt@run...@aborted.html
- fi-glk-j4005:   NOTRUN -> [FAIL][6] ([i915#2722] / [i915#4312] / 
[k.org#202321])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22049/fi-glk-j4005/igt@run...@aborted.html

  
 Possible fixes 

  * igt@i915_selftest@live@gtt:
- fi-bdw-5557u:   [DMESG-FAIL][7] -> [PASS][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22049/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html

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

  [i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
  [i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
  [k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321


Build changes
-

  * Linux: CI_DRM_5 -> Patchwork_22049

  CI-20190529: 20190529
  CI_DRM_5: 4e12213687264ffccb45d72fe638f94d3ca666bd @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6329: 38f656fdd61119105ecfa2c4dac157cd7dcad204 @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_22049: 3bb57af567ca7c35813b4f945576dbf573308408 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

3bb57af567ca drm/i915/dg2: Add Wa_18018781329

== Logs ==

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


Re: [Intel-gfx] [PATCH 2/3] drm/i915/guc: Add work queue to trigger a GT reset

2022-01-20 Thread John Harrison

On 1/19/2022 13:24, Matthew Brost wrote:

The G2H handler needs to be flushed during a GT reset but a G2H
indicating engine reset failure can trigger a GT reset. Add a worker to
trigger the GT when an engine reset failure is received to break this

trigger the GT reset?


circular dependency.

v2:
  (John Harrison)
   - Store engine reset mask
   - Fix typo in commit message

Signed-off-by: Matthew Brost 
---
  drivers/gpu/drm/i915/gt/uc/intel_guc.h|  9 +
  .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 37 +--
  2 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.h 
b/drivers/gpu/drm/i915/gt/uc/intel_guc.h
index 9d26a86fe557..c4a9fc7dd246 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h
@@ -119,6 +119,15 @@ struct intel_guc {
 * function as it might be in an atomic context (no sleeping)
 */
struct work_struct destroyed_worker;
+   /**
+* @reset_worker: worker to trigger a GT reset after an engine
+* reset fails
+*/
+   struct work_struct reset_worker;
+   /**
+* @reset_mask: mask of engines that failed to reset
+*/
+   intel_engine_mask_t reset_mask;
reset_fail_mask might be a less ambiguous name? Same for the worker 
struct and function.


John.


} submission_state;
  
  	/**

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 3918f1be114f..514b3060b141 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -1731,6 +1731,7 @@ void intel_guc_submission_reset_finish(struct intel_guc 
*guc)
  }
  
  static void destroyed_worker_func(struct work_struct *w);

+static void reset_worker_func(struct work_struct *w);
  
  /*

   * Set up the memory resources to be shared with the GuC (via the GGTT)
@@ -1761,6 +1762,8 @@ int intel_guc_submission_init(struct intel_guc *guc)
INIT_LIST_HEAD(>submission_state.destroyed_contexts);
INIT_WORK(>submission_state.destroyed_worker,
  destroyed_worker_func);
+   INIT_WORK(>submission_state.reset_worker,
+ reset_worker_func);
  
  	guc->submission_state.guc_ids_bitmap =

bitmap_zalloc(NUMBER_MULTI_LRC_GUC_ID(guc), GFP_KERNEL);
@@ -4026,6 +4029,26 @@ guc_lookup_engine(struct intel_guc *guc, u8 guc_class, 
u8 instance)
return gt->engine_class[engine_class][instance];
  }
  
+static void reset_worker_func(struct work_struct *w)

+{
+   struct intel_guc *guc = container_of(w, struct intel_guc,
+submission_state.reset_worker);
+   struct intel_gt *gt = guc_to_gt(guc);
+   intel_engine_mask_t reset_mask;
+   unsigned long flags;
+
+   spin_lock_irqsave(>submission_state.lock, flags);
+   reset_mask = guc->submission_state.reset_mask;
+   guc->submission_state.reset_mask = 0;
+   spin_unlock_irqrestore(>submission_state.lock, flags);
+
+   if (likely(reset_mask))
+   intel_gt_handle_error(gt, reset_mask,
+ I915_ERROR_CAPTURE,
+ "GuC failed to reset engine mask=0x%x\n",
+ reset_mask);
+}
+
  int intel_guc_engine_failure_process_msg(struct intel_guc *guc,
 const u32 *msg, u32 len)
  {
@@ -4033,6 +4056,7 @@ int intel_guc_engine_failure_process_msg(struct intel_guc 
*guc,
struct intel_gt *gt = guc_to_gt(guc);
u8 guc_class, instance;
u32 reason;
+   unsigned long flags;
  
  	if (unlikely(len != 3)) {

drm_err(>i915->drm, "Invalid length %u", len);
@@ -4057,10 +4081,15 @@ int intel_guc_engine_failure_process_msg(struct 
intel_guc *guc,
drm_err(>i915->drm, "GuC engine reset request failed on %d:%d (%s) 
because 0x%08X",
guc_class, instance, engine->name, reason);
  
-	intel_gt_handle_error(gt, engine->mask,

- I915_ERROR_CAPTURE,
- "GuC failed to reset %s (reason=0x%08x)\n",
- engine->name, reason);
+   spin_lock_irqsave(>submission_state.lock, flags);
+   guc->submission_state.reset_mask |= engine->mask;
+   spin_unlock_irqrestore(>submission_state.lock, flags);
+
+   /*
+* A GT reset flushes this worker queue (G2H handler) so we must use
+* another worker to trigger a GT reset.
+*/
+   queue_work(system_unbound_wq, >submission_state.reset_worker);
  
  	return 0;

  }




Re: [Intel-gfx] [PATCH] drm/i915/guc: Don't check CT descriptor status before CT write / read

2022-01-20 Thread kernel test robot
Hi Matthew,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip drm-exynos/exynos-drm-next 
drm/drm-next tegra-drm/drm/tegra/for-next v5.16 next-20220120]
[cannot apply to airlied/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Matthew-Brost/drm-i915-guc-Don-t-check-CT-descriptor-status-before-CT-write-read/20220121-023033
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-r002-20220117 
(https://download.01.org/0day-ci/archive/20220121/202201211022.gq2u1jns-...@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
f7b7138a62648f4019c55e4671682af1f851f295)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/0311a8b0f99c50ab1a666a5cdbe2b1a0a2c3c71d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Matthew-Brost/drm-i915-guc-Don-t-check-CT-descriptor-status-before-CT-write-read/20220121-023033
git checkout 0311a8b0f99c50ab1a666a5cdbe2b1a0a2c3c71d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 
O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/i915/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c:469:1: warning: unused label 
>> 'corrupted' [-Wunused-label]
   corrupted:
   ^~
   1 warning generated.


vim +/corrupted +469 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c

f8a58d639dd95b drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  422  
1d407096002bec drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2018-03-26  423   /*
572f2a5cd9742c drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  424* dw0: CT header (including fence)
572f2a5cd9742c drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  425* dw1: HXG header (including action code)
572f2a5cd9742c drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  426* dw2+: action data
f8a58d639dd95b drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  427*/
572f2a5cd9742c drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  428   header = FIELD_PREP(GUC_CTB_MSG_0_FORMAT, 
GUC_CTB_FORMAT_HXG) |
572f2a5cd9742c drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  429FIELD_PREP(GUC_CTB_MSG_0_NUM_DWORDS, len) |
572f2a5cd9742c drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  430FIELD_PREP(GUC_CTB_MSG_0_FENCE, fence);
f8a58d639dd95b drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  431  
1681924d8bdeb2 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  432   type = (flags & INTEL_GUC_CT_SEND_NB) ? 
GUC_HXG_TYPE_EVENT :
1681924d8bdeb2 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  433   GUC_HXG_TYPE_REQUEST;
1681924d8bdeb2 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  434   hxg = FIELD_PREP(GUC_HXG_MSG_0_TYPE, type) |
1681924d8bdeb2 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  435   FIELD_PREP(GUC_HXG_EVENT_MSG_0_ACTION |
1681924d8bdeb2 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  436  GUC_HXG_EVENT_MSG_0_DATA0, action[0]);
572f2a5cd9742c drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  437  
572f2a5cd9742c drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  438   CT_DEBUG(ct, "writing (tail %u) %*ph %*ph %*ph\n",
572f2a5cd9742c drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  439tail, 4, , 4, , 4 * (len - 1), 
[1]);
0a015ff9730c16 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2018-03-26  440  
f8a58d639dd95b drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  441   cmds[tail] = header;
f8a58d639dd95b drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  442   tail = (tail + 1) % size;
f8a58d639dd95b drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  443  
572f2a5cd9742c drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  444   cmds[tail] = hxg;
f8a58d639dd95b dri

Re: [Intel-gfx] [PATCH 3/3] drm/i915/guc: Flush G2H handler during a GT reset

2022-01-20 Thread Matthew Brost
On Thu, Jan 20, 2022 at 05:36:22PM -0800, John Harrison wrote:
> On 1/19/2022 13:24, Matthew Brost wrote:
> > Now that the error capture is fully decoupled from fence signalling
> > (request retirement to free memory, which in turn depends on resets) we
> > can safely flush the G2H handler during a GT reset. This is eliminates
> This eliminates
> 
> John.
> 

Yep, will fixup in the next rev.

Matt

> > corner cases where GuC generated G2H (e.g. engine resets) race with a GT
> > reset.
> > 
> > v2:
> >   (John Harrison)
> >- Fix typo in commit message (s/is/in)
> > 
> > Signed-off-by: Matthew Brost 
> > Reviewed-by: John Harrison 
> > ---
> >   .../gpu/drm/i915/gt/uc/intel_guc_submission.c  | 18 +-
> >   1 file changed, 1 insertion(+), 17 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 514b3060b141..406dd2e3f5a9 100644
> > --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> > +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> > @@ -1396,8 +1396,6 @@ static void guc_flush_destroyed_contexts(struct 
> > intel_guc *guc);
> >   void intel_guc_submission_reset_prepare(struct intel_guc *guc)
> >   {
> > -   int i;
> > -
> > if (unlikely(!guc_submission_initialized(guc))) {
> > /* Reset called during driver load? GuC not yet initialised! */
> > return;
> > @@ -1414,21 +1412,7 @@ void intel_guc_submission_reset_prepare(struct 
> > intel_guc *guc)
> > guc_flush_submissions(guc);
> > guc_flush_destroyed_contexts(guc);
> > -
> > -   /*
> > -* Handle any outstanding G2Hs before reset. Call IRQ handler directly
> > -* each pass as interrupt have been disabled. We always scrub for
> > -* outstanding G2H as it is possible for outstanding_submission_g2h to
> > -* be incremented after the context state update.
> > -*/
> > -   for (i = 0; i < 4 && atomic_read(>outstanding_submission_g2h); 
> > ++i) {
> > -   intel_guc_to_host_event_handler(guc);
> > -#define wait_for_reset(guc, wait_var) \
> > -   intel_guc_wait_for_pending_msg(guc, wait_var, false, (HZ / 20))
> > -   do {
> > -   wait_for_reset(guc, >outstanding_submission_g2h);
> > -   } while (!list_empty(>ct.requests.incoming));
> > -   }
> > +   flush_work(>ct.requests.worker);
> > scrub_guc_desc_for_outstanding_g2h(guc);
> >   }
> 


[Intel-gfx] [PATCH 1/3] drm/i915: Allocate intel_engine_coredump_alloc with ALLOW_FAIL

2022-01-20 Thread Matthew Brost
Allocate intel_engine_coredump_alloc with ALLOW_FAIL rather than
GFP_KERNEL to fully decouple the error capture from fence signalling.

v2:
 (John Harrison)
  - Fix typo in commit message (s/do/to)

Fixes: 8b91cdd4f8649 ("drm/i915: Use __GFP_KSWAPD_RECLAIM in the capture code")

Signed-off-by: Matthew Brost 
Reviewed-by: John Harrison 
---
 drivers/gpu/drm/i915/i915_gpu_error.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c 
b/drivers/gpu/drm/i915/i915_gpu_error.c
index 67f3515f07e7a..aee42eae4729f 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -1516,7 +1516,7 @@ capture_engine(struct intel_engine_cs *engine,
struct i915_request *rq = NULL;
unsigned long flags;
 
-   ee = intel_engine_coredump_alloc(engine, GFP_KERNEL);
+   ee = intel_engine_coredump_alloc(engine, ALLOW_FAIL);
if (!ee)
return NULL;
 
-- 
2.34.1



[Intel-gfx] [PATCH 2/3] drm/i915/guc: Add work queue to trigger a GT reset

2022-01-20 Thread Matthew Brost
The G2H handler needs to be flushed during a GT reset but a G2H
indicating engine reset failure can trigger a GT reset. Add a worker to
trigger the GT rest when an engine reset failure is received to break
this circular dependency.

v2:
 (John Harrison)
  - Store engine reset mask
  - Fix typo in commit message
v3:
 (John Harrison)
  - Fix another typo in commit message
  - s/reset_*/reset_fail_*/

Signed-off-by: Matthew Brost 
---
 drivers/gpu/drm/i915/gt/uc/intel_guc.h|  9 +
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 37 +--
 2 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.h 
b/drivers/gpu/drm/i915/gt/uc/intel_guc.h
index 9d26a86fe557a..d59bbf49d1c2b 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h
@@ -119,6 +119,15 @@ struct intel_guc {
 * function as it might be in an atomic context (no sleeping)
 */
struct work_struct destroyed_worker;
+   /**
+* @reset_fail_worker: worker to trigger a GT reset after an
+* engine reset fails
+*/
+   struct work_struct reset_fail_worker;
+   /**
+* @reset_fail_mask: mask of engines that failed to reset
+*/
+   intel_engine_mask_t reset_fail_mask;
} submission_state;
 
/**
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 3918f1be114fa..9a3f503d201aa 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -1731,6 +1731,7 @@ void intel_guc_submission_reset_finish(struct intel_guc 
*guc)
 }
 
 static void destroyed_worker_func(struct work_struct *w);
+static void reset_fail_worker_func(struct work_struct *w);
 
 /*
  * Set up the memory resources to be shared with the GuC (via the GGTT)
@@ -1761,6 +1762,8 @@ int intel_guc_submission_init(struct intel_guc *guc)
INIT_LIST_HEAD(>submission_state.destroyed_contexts);
INIT_WORK(>submission_state.destroyed_worker,
  destroyed_worker_func);
+   INIT_WORK(>submission_state.reset_fail_worker,
+ reset_fail_worker_func);
 
guc->submission_state.guc_ids_bitmap =
bitmap_zalloc(NUMBER_MULTI_LRC_GUC_ID(guc), GFP_KERNEL);
@@ -4026,6 +4029,26 @@ guc_lookup_engine(struct intel_guc *guc, u8 guc_class, 
u8 instance)
return gt->engine_class[engine_class][instance];
 }
 
+static void reset_fail_worker_func(struct work_struct *w)
+{
+   struct intel_guc *guc = container_of(w, struct intel_guc,
+
submission_state.reset_fail_worker);
+   struct intel_gt *gt = guc_to_gt(guc);
+   intel_engine_mask_t reset_fail_mask;
+   unsigned long flags;
+
+   spin_lock_irqsave(>submission_state.lock, flags);
+   reset_fail_mask = guc->submission_state.reset_fail_mask;
+   guc->submission_state.reset_fail_mask = 0;
+   spin_unlock_irqrestore(>submission_state.lock, flags);
+
+   if (likely(reset_fail_mask))
+   intel_gt_handle_error(gt, reset_fail_mask,
+ I915_ERROR_CAPTURE,
+ "GuC failed to reset engine mask=0x%x\n",
+ reset_fail_mask);
+}
+
 int intel_guc_engine_failure_process_msg(struct intel_guc *guc,
 const u32 *msg, u32 len)
 {
@@ -4033,6 +4056,7 @@ int intel_guc_engine_failure_process_msg(struct intel_guc 
*guc,
struct intel_gt *gt = guc_to_gt(guc);
u8 guc_class, instance;
u32 reason;
+   unsigned long flags;
 
if (unlikely(len != 3)) {
drm_err(>i915->drm, "Invalid length %u", len);
@@ -4057,10 +4081,15 @@ int intel_guc_engine_failure_process_msg(struct 
intel_guc *guc,
drm_err(>i915->drm, "GuC engine reset request failed on %d:%d (%s) 
because 0x%08X",
guc_class, instance, engine->name, reason);
 
-   intel_gt_handle_error(gt, engine->mask,
- I915_ERROR_CAPTURE,
- "GuC failed to reset %s (reason=0x%08x)\n",
- engine->name, reason);
+   spin_lock_irqsave(>submission_state.lock, flags);
+   guc->submission_state.reset_fail_mask |= engine->mask;
+   spin_unlock_irqrestore(>submission_state.lock, flags);
+
+   /*
+* A GT reset flushes this worker queue (G2H handler) so we must use
+* another worker to trigger a GT reset.
+*/
+   queue_work(system_unbound_wq, >submission_state.reset_fail_worker);
 
return 0;
 }
-- 
2.34.1



[Intel-gfx] [PATCH 3/3] drm/i915/guc: Flush G2H handler during a GT reset

2022-01-20 Thread Matthew Brost
Now that the error capture is fully decoupled from fence signalling
(request retirement to free memory, which in turn depends on resets) we
can safely flush the G2H handler during a GT reset. This eliminates
corner cases where GuC generated G2H (e.g. engine resets) race with a GT
reset.

v2:
 (John Harrison)
  - Fix typo in commit message (s/is/in)

Signed-off-by: Matthew Brost 
Reviewed-by: John Harrison 
---
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c  | 18 +-
 1 file changed, 1 insertion(+), 17 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 9a3f503d201aa..1331ff91c5b05 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -1396,8 +1396,6 @@ static void guc_flush_destroyed_contexts(struct intel_guc 
*guc);
 
 void intel_guc_submission_reset_prepare(struct intel_guc *guc)
 {
-   int i;
-
if (unlikely(!guc_submission_initialized(guc))) {
/* Reset called during driver load? GuC not yet initialised! */
return;
@@ -1414,21 +1412,7 @@ void intel_guc_submission_reset_prepare(struct intel_guc 
*guc)
 
guc_flush_submissions(guc);
guc_flush_destroyed_contexts(guc);
-
-   /*
-* Handle any outstanding G2Hs before reset. Call IRQ handler directly
-* each pass as interrupt have been disabled. We always scrub for
-* outstanding G2H as it is possible for outstanding_submission_g2h to
-* be incremented after the context state update.
-*/
-   for (i = 0; i < 4 && atomic_read(>outstanding_submission_g2h); 
++i) {
-   intel_guc_to_host_event_handler(guc);
-#define wait_for_reset(guc, wait_var) \
-   intel_guc_wait_for_pending_msg(guc, wait_var, false, (HZ / 20))
-   do {
-   wait_for_reset(guc, >outstanding_submission_g2h);
-   } while (!list_empty(>ct.requests.incoming));
-   }
+   flush_work(>ct.requests.worker);
 
scrub_guc_desc_for_outstanding_g2h(guc);
 }
-- 
2.34.1



[Intel-gfx] [PATCH 0/3] Flush G2H handler during a GT reset

2022-01-20 Thread Matthew Brost
After a small fix to error capture code, we now can flush G2H during a
GT reset which simplifies code and seals some extreme corner case races. 

v2:
 (CI)
  - Don't trigger GT reset from G2H handler
v3:
  - Address John Harrison's comments
v4:
  - Address John Harrison's comments

Signed-off-by: Matthew Brost 


Matthew Brost (3):
  drm/i915: Allocate intel_engine_coredump_alloc with ALLOW_FAIL
  drm/i915/guc: Add work queue to trigger a GT reset
  drm/i915/guc: Flush G2H handler during a GT reset

 drivers/gpu/drm/i915/gt/uc/intel_guc.h|  9 +++
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 55 ---
 drivers/gpu/drm/i915/i915_gpu_error.c |  2 +-
 3 files changed, 44 insertions(+), 22 deletions(-)

-- 
2.34.1



[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/guc: Update guc shim control programming on newer platforms

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915/guc: Update guc shim control programming on newer platforms
URL   : https://patchwork.freedesktop.org/series/99125/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_4 -> Patchwork_22047


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (42 -> 40)
--

  Additional (3): bat-rpls-1 bat-jsl-2 fi-ilk-650 
  Missing(5): bat-dg1-5 fi-bsw-cyan bat-adlp-4 fi-pnv-d510 fi-bdw-samus 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_cs_nop@nop-compute0:
- fi-ilk-650: NOTRUN -> [SKIP][1] ([fdo#109271]) +39 similar issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/fi-ilk-650/igt@amdgpu/amd_cs_...@nop-compute0.html

  * igt@gem_exec_suspend@basic-s3:
- fi-skl-6600u:   NOTRUN -> [FAIL][2] ([i915#4547])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/fi-skl-6600u/igt@gem_exec_susp...@basic-s3.html

  * igt@kms_chamelium@dp-hpd-fast:
- fi-ilk-650: NOTRUN -> [SKIP][3] ([fdo#109271] / [fdo#111827]) +8 
similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/fi-ilk-650/igt@kms_chamel...@dp-hpd-fast.html

  
 Possible fixes 

  * igt@core_hotunplug@unbind-rebind:
- fi-bwr-2160:[FAIL][4] ([i915#3194]) -> [PASS][5]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/fi-bwr-2160/igt@core_hotunp...@unbind-rebind.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/fi-bwr-2160/igt@core_hotunp...@unbind-rebind.html

  * igt@gem_exec_suspend@basic-s0@smem:
- fi-tgl-1115g4:  [FAIL][6] ([i915#1888]) -> [PASS][7]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/fi-tgl-1115g4/igt@gem_exec_suspend@basic...@smem.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/fi-tgl-1115g4/igt@gem_exec_suspend@basic...@smem.html

  
 Warnings 

  * igt@runner@aborted:
- fi-skl-6600u:   [FAIL][8] ([i915#2722] / [i915#4312]) -> [FAIL][9] 
([i915#4312])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/fi-skl-6600u/igt@run...@aborted.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/fi-skl-6600u/igt@run...@aborted.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#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
  [i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
  [i915#3194]: https://gitlab.freedesktop.org/drm/intel/issues/3194
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4898]: https://gitlab.freedesktop.org/drm/intel/issues/4898
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533


Build changes
-

  * Linux: CI_DRM_4 -> Patchwork_22047

  CI-20190529: 20190529
  CI_DRM_4: 95f7fe1c9f81eff6c3faab2a73ccaca51440f73c @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6329: 38f656fdd61119105ecfa2c4dac157cd7dcad204 @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_22047: 0b46254f664d19c7e35b04e09c35b6a205f3825d @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

0b46254f664d drm/i915/guc: Update guc shim control programming on newer 
platforms

== Logs ==

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


Re: [Intel-gfx] [PATCH 1/3] lib/string_helpers: Consolidate yesno() implementation

2022-01-20 Thread Joe Perches
On Wed, 2022-01-19 at 16:00 -0500, Steven Rostedt wrote:
> On Wed, 19 Jan 2022 21:25:08 +0200
> Andy Shevchenko  wrote:
> 
> > > I say keep it one line!
> > > 
> > > Reviewed-by: Steven Rostedt (Google)   
> > 
> > I believe Sakari strongly follows the 80 rule, which means...
> 
> Checkpatch says "100" I think we need to simply update the docs (the
> documentation always lags the code ;-)

checkpatch doesn't say anything normally, it's a stupid script.
It just mindlessly bleats a message when a line exceeds 100 chars...

Just fyi: I think it's nicer on a single line too.




[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Splitting up platform-specific calls

2022-01-20 Thread Patchwork
== Series Details ==

Series: Splitting up platform-specific calls
URL   : https://patchwork.freedesktop.org/series/99126/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
cfedaf9b9519 i915/drm: Split out x86 and arm64 functionality
-:53: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does 
MAINTAINERS need updating?
#53: 
new file mode 100644

-:112: CHECK:LINE_SPACING: Please use a blank line after 
function/struct/union/enum declarations
#112: FILE: drivers/gpu/drm/i915/i915_platform_arm64.c:33:
+}
+/* End of i915_drv functionality */

-:151: CHECK:LINE_SPACING: Please use a blank line after 
function/struct/union/enum declarations
#151: FILE: drivers/gpu/drm/i915/i915_platform_x86.c:33:
+}
+/* End of i915_drv functionality */

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




[Intel-gfx] ✓ Fi.CI.BAT: success for Splitting up platform-specific calls

2022-01-20 Thread Patchwork
== Series Details ==

Series: Splitting up platform-specific calls
URL   : https://patchwork.freedesktop.org/series/99126/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5 -> Patchwork_22048


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (42 -> 42)
--

  Additional (2): bat-jsl-2 fi-pnv-d510 
  Missing(2): fi-bsw-cyan fi-bdw-samus 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_cs_nop@sync-fork-compute0:
- fi-snb-2600:NOTRUN -> [SKIP][1] ([fdo#109271]) +17 similar issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/fi-snb-2600/igt@amdgpu/amd_cs_...@sync-fork-compute0.html

  * igt@gem_flink_basic@bad-flink:
- fi-skl-6600u:   [PASS][2] -> [INCOMPLETE][3] ([i915#4547])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-skl-6600u/igt@gem_flink_ba...@bad-flink.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/fi-skl-6600u/igt@gem_flink_ba...@bad-flink.html

  * igt@i915_selftest@live@hangcheck:
- fi-hsw-4770:[PASS][4] -> [INCOMPLETE][5] ([i915#4785])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-hsw-4770/igt@i915_selftest@l...@hangcheck.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/fi-hsw-4770/igt@i915_selftest@l...@hangcheck.html

  * igt@prime_vgem@basic-userptr:
- fi-pnv-d510:NOTRUN -> [SKIP][6] ([fdo#109271]) +57 similar issues
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/fi-pnv-d510/igt@prime_v...@basic-userptr.html

  * igt@runner@aborted:
- fi-skl-6600u:   NOTRUN -> [FAIL][7] ([i915#2722] / [i915#4312])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/fi-skl-6600u/igt@run...@aborted.html
- fi-hsw-4770:NOTRUN -> [FAIL][8] ([fdo#109271] / [i915#1436] / 
[i915#4312])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/fi-hsw-4770/igt@run...@aborted.html

  
 Possible fixes 

  * igt@gem_exec_suspend@basic-s3@smem:
- {bat-rpls-1}:   [INCOMPLETE][9] ([i915#4898]) -> [PASS][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/bat-rpls-1/igt@gem_exec_suspend@basic...@smem.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/bat-rpls-1/igt@gem_exec_suspend@basic...@smem.html

  * igt@i915_selftest@live@gtt:
- fi-bdw-5557u:   [DMESG-FAIL][11] -> [PASS][12]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html

  * igt@i915_selftest@live@hangcheck:
- fi-snb-2600:[INCOMPLETE][13] ([i915#3921]) -> [PASS][14]
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-snb-2600/igt@i915_selftest@l...@hangcheck.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/fi-snb-2600/igt@i915_selftest@l...@hangcheck.html

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

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
  [i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391
  [i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
  

Re: [Intel-gfx] [PATCH i-g-t] tests/i915/gem_exec_capture: Fix memory object size in gem_exec_capture

2022-01-20 Thread Dixit, Ashutosh
On Thu, 20 Jan 2022 17:09:28 -0800, john.c.harri...@intel.com wrote:
>
> From: John Harrison 
>
> The capture tests require knowing exactly how big the test allocation
> is. Part of the test is to compare the captured size against the
> allocated size to make sure they match. That doesn't work if the
> allocator creates an object of a different size than was requested
> without reporting the larger size.

Reviewed-by: Ashutosh Dixit 

> Fixes: 85a593809 ("tests/i915/gem_exec_capture: Add support for local memory")
> Signed-off-by: John Harrison 
> ---
>  tests/i915/gem_exec_capture.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/tests/i915/gem_exec_capture.c b/tests/i915/gem_exec_capture.c
> index 5b2482518..60f8df04c 100644
> --- a/tests/i915/gem_exec_capture.c
> +++ b/tests/i915/gem_exec_capture.c
> @@ -387,10 +387,9 @@ static void capture(int fd, int dir, const intel_ctx_t 
> *ctx,
>   const struct intel_execution_engine2 *e, uint32_t region)
>  {
>   uint32_t handle;
> - uint64_t ahnd;
> - int obj_size = 4096;
> + uint64_t ahnd, obj_size = 4096;
>
> - handle = gem_create_in_memory_regions(fd, obj_size, region);
> + igt_assert_eq(__gem_create_in_memory_regions(fd, , _size, 
> region), 0);
>   ahnd = get_reloc_ahnd(fd, ctx->id);
>
>   __capture1(fd, dir, ahnd, ctx, e, handle, obj_size, region);
> --
> 2.25.1
>


[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Splitting up platform-specific calls

2022-01-20 Thread Patchwork
== Series Details ==

Series: Splitting up platform-specific calls
URL   : https://patchwork.freedesktop.org/series/99126/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.




[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Flush G2H handler during a GT reset

2022-01-20 Thread Patchwork
== Series Details ==

Series: Flush G2H handler during a GT reset
URL   : https://patchwork.freedesktop.org/series/99136/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.




Re: [Intel-gfx] [PATCH] drm/i915/guc: Don't check CT descriptor status before CT write / read

2022-01-20 Thread kernel test robot
Hi Matthew,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next 
drm/drm-next tegra-drm/drm/tegra/for-next v5.16 next-20220121]
[cannot apply to airlied/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Matthew-Brost/drm-i915-guc-Don-t-check-CT-descriptor-status-before-CT-write-read/20220121-023033
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-defconfig 
(https://download.01.org/0day-ci/archive/20220121/202201211326.zspu6s33-...@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# 
https://github.com/0day-ci/linux/commit/0311a8b0f99c50ab1a666a5cdbe2b1a0a2c3c71d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Matthew-Brost/drm-i915-guc-Don-t-check-CT-descriptor-status-before-CT-write-read/20220121-023033
git checkout 0311a8b0f99c50ab1a666a5cdbe2b1a0a2c3c71d
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c: In function 'ct_write':
>> drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c:469:1: error: label 'corrupted' 
>> defined but not used [-Werror=unused-label]
 469 | corrupted:
 | ^
   cc1: all warnings being treated as errors


vim +/corrupted +469 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c

f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  422  
1d407096002beca drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2018-03-26  423  /*
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  424   * dw0: CT header (including fence)
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  425   * dw1: HXG header (including action code)
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  426   * dw2+: action data
f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  427   */
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  428  header = FIELD_PREP(GUC_CTB_MSG_0_FORMAT, 
GUC_CTB_FORMAT_HXG) |
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  429   FIELD_PREP(GUC_CTB_MSG_0_NUM_DWORDS, len) |
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  430   FIELD_PREP(GUC_CTB_MSG_0_FENCE, fence);
f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  431  
1681924d8bdeb24 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  432  type = (flags & INTEL_GUC_CT_SEND_NB) ? GUC_HXG_TYPE_EVENT 
:
1681924d8bdeb24 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  433  GUC_HXG_TYPE_REQUEST;
1681924d8bdeb24 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  434  hxg = FIELD_PREP(GUC_HXG_MSG_0_TYPE, type) |
1681924d8bdeb24 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  435  FIELD_PREP(GUC_HXG_EVENT_MSG_0_ACTION |
1681924d8bdeb24 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  436 GUC_HXG_EVENT_MSG_0_DATA0, action[0]);
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  437  
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  438  CT_DEBUG(ct, "writing (tail %u) %*ph %*ph %*ph\n",
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  439   tail, 4, , 4, , 4 * (len - 1), 
[1]);
0a015ff9730c169 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2018-03-26  440  
f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  441  cmds[tail] = header;
f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  442  tail = (tail + 1) % size;
f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  443  
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  444  cmds[tail] = hxg;
f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  445  tail = (tail + 1) % size;
f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  446  
f8a58d639dd95b0 

[Intel-gfx] ✓ Fi.CI.BAT: success for Flush G2H handler during a GT reset

2022-01-20 Thread Patchwork
== Series Details ==

Series: Flush G2H handler during a GT reset
URL   : https://patchwork.freedesktop.org/series/99136/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5 -> Patchwork_22051


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (42 -> 38)
--

  Missing(4): fi-kbl-soraka fi-bsw-cyan fi-bdw-samus fi-kbl-7500u 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_cs_nop@sync-fork-compute0:
- fi-snb-2600:NOTRUN -> [SKIP][1] ([fdo#109271]) +17 similar issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/fi-snb-2600/igt@amdgpu/amd_cs_...@sync-fork-compute0.html

  * igt@gem_flink_basic@bad-flink:
- fi-skl-6600u:   [PASS][2] -> [FAIL][3] ([i915#4547])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-skl-6600u/igt@gem_flink_ba...@bad-flink.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/fi-skl-6600u/igt@gem_flink_ba...@bad-flink.html

  * igt@i915_selftest@live@gt_engines:
- bat-dg1-6:  [PASS][4] -> [INCOMPLETE][5] ([i915#4418])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/bat-dg1-6/igt@i915_selftest@live@gt_engines.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/bat-dg1-6/igt@i915_selftest@live@gt_engines.html

  * igt@i915_selftest@live@requests:
- fi-blb-e6850:   [PASS][6] -> [DMESG-FAIL][7] ([i915#4528])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-blb-e6850/igt@i915_selftest@l...@requests.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/fi-blb-e6850/igt@i915_selftest@l...@requests.html

  * igt@runner@aborted:
- fi-skl-6600u:   NOTRUN -> [FAIL][8] ([i915#4312])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/fi-skl-6600u/igt@run...@aborted.html
- fi-bdw-5557u:   NOTRUN -> [FAIL][9] ([i915#2426] / [i915#4312])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/fi-bdw-5557u/igt@run...@aborted.html
- bat-dg1-6:  NOTRUN -> [FAIL][10] ([i915#4214] / [i915#4312])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/bat-dg1-6/igt@run...@aborted.html
- fi-blb-e6850:   NOTRUN -> [FAIL][11] ([fdo#109271] / [i915#2403] / 
[i915#4312])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/fi-blb-e6850/igt@run...@aborted.html

  
 Possible fixes 

  * igt@i915_selftest@live@hangcheck:
- fi-snb-2600:[INCOMPLETE][12] ([i915#3921]) -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-snb-2600/igt@i915_selftest@l...@hangcheck.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/fi-snb-2600/igt@i915_selftest@l...@hangcheck.html

  
 Warnings 

  * igt@i915_pm_rpm@basic-pci-d3-state:
- fi-kbl-guc: [SKIP][14] ([fdo#109271]) -> [FAIL][15] ([i915#3049])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-kbl-guc/igt@i915_pm_...@basic-pci-d3-state.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/fi-kbl-guc/igt@i915_pm_...@basic-pci-d3-state.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#2403]: https://gitlab.freedesktop.org/drm/intel/issues/2403
  [i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
  [i915#3049]: https://gitlab.freedesktop.org/drm/intel/issues/3049
  [i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
  [i915#4214]: https://gitlab.freedesktop.org/drm/intel/issues/4214
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4418]: https://gitlab.freedesktop.org/drm/intel/issues/4418
  [i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
  [i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
  [i915#4897]: https://gitlab.freedesktop.org/drm/intel/issues/4897


Build changes
-

  * Linux: CI_DRM_5 -> Patchwork_22051

  CI-20190529: 20190529
  CI_DRM_5: 4e12213687264ffccb45d72fe638f94d3ca666bd @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6329: 38f656fdd61119105ecfa2c4dac157cd7dcad204 @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_22051: 41d8611617d3b97ce000ec529dcef74aaa2efe04 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

41d8611617d3 drm/i915/guc: Flush G2H handler during a GT reset
e99d26d68785 drm/i915/guc: Add work queue to trigger a GT reset
054f74cfab51 drm/i915: Allocate intel_engine_coredump_alloc with ALLOW_FAIL

== Logs ==

For more details 

[Intel-gfx] [PATCH] drm/i915: Introduce G12 subplatform of DG2

2022-01-20 Thread Matt Roper
Another fork of the DG2 design has appeared, known as "DG2-G12;" let's
add it as a new subplatform.  As with G11, the GT stepping resets back
to A0 (so a DG2-G12 A0 is similar, but not identical, to a DG2-G10 C0)
but the display steppings continue to use the same numbering scheme as
G10 and G11.

Some existing DG2 workarounds are starting to be extended to the DG2-G12
subplatform.  So far only workarounds that were "permanent" for both
DG2-G10 and DG2-G11 have been tagged for DG2-G12, but more
stepping-specific workarounds are likely to show up in the future.

Bspec: 44477
Signed-off-by: Matt Roper 
---
 drivers/gpu/drm/i915/gt/intel_workarounds.c |  2 +-
 drivers/gpu/drm/i915/i915_drv.h | 19 +++
 drivers/gpu/drm/i915/intel_device_info.h|  3 ++-
 drivers/gpu/drm/i915/intel_step.c   |  7 +++
 4 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c 
b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index 6a4372c3a3c5..2d2e3ae9c997 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -2077,7 +2077,7 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct 
i915_wa_list *wal)
}
 
if (IS_DG2_GRAPHICS_STEP(engine->i915, G10, STEP_B0, STEP_FOREVER) ||
-   IS_DG2_G11(engine->i915)) {
+   IS_DG2_G11(engine->i915) || IS_DG2_G12(engine->i915)) {
/* Wa_22013037850:dg2 */
wa_write_or(wal, LSC_CHICKEN_BIT_0_UDW,
DISABLE_128B_EVICTION_COMMAND_UDW);
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 890f1f6fbc49..a2fe5a0a7acd 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1262,6 +1262,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
IS_SUBPLATFORM(dev_priv, INTEL_DG2, INTEL_SUBPLATFORM_G10)
 #define IS_DG2_G11(dev_priv) \
IS_SUBPLATFORM(dev_priv, INTEL_DG2, INTEL_SUBPLATFORM_G11)
+#define IS_DG2_G12(dev_priv) \
+   IS_SUBPLATFORM(dev_priv, INTEL_DG2, INTEL_SUBPLATFORM_G12)
 #define IS_ADLS_RPLS(dev_priv) \
IS_SUBPLATFORM(dev_priv, INTEL_ALDERLAKE_S, INTEL_SUBPLATFORM_RPL_S)
 #define IS_ADLP_N(dev_priv) \
@@ -1378,16 +1380,17 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
(IS_XEHPSDV(__i915) && IS_GRAPHICS_STEP(__i915, since, until))
 
 /*
- * DG2 hardware steppings are a bit unusual.  The hardware design was forked
- * to create two variants (G10 and G11) which have distinct workaround sets.
- * The G11 fork of the DG2 design resets the GT stepping back to "A0" for its
- * first iteration, even though it's more similar to a G10 B0 stepping in terms
- * of functionality and workarounds.  However the display stepping does not
- * reset in the same manner --- a specific stepping like "B0" has a consistent
- * meaning regardless of whether it belongs to a G10 or G11 DG2.
+ * DG2 hardware steppings are a bit unusual.  The hardware design was forked to
+ * create three variants (G10, G11, and G12) which each have distinct
+ * workaround sets.  The G11 and G12 forks of the DG2 design reset the GT
+ * stepping back to "A0" for their first iterations, even though they're more
+ * similar to a G10 B0 stepping and G10 C0 stepping respectively in terms of
+ * functionality and workarounds.  However the display stepping does not reset
+ * in the same manner --- a specific stepping like "B0" has a consistent
+ * meaning regardless of whether it belongs to a G10, G11, or G12 DG2.
  *
  * TLDR:  All GT workarounds and stepping-specific logic must be applied in
- * relation to a specific subplatform (G10 or G11), whereas display workarounds
+ * relation to a specific subplatform (G10/G11/G12), whereas display 
workarounds
  * and stepping-specific logic will be applied with a general DG2-wide stepping
  * number.
  */
diff --git a/drivers/gpu/drm/i915/intel_device_info.h 
b/drivers/gpu/drm/i915/intel_device_info.h
index 3699b1c539ea..364abcc7aa54 100644
--- a/drivers/gpu/drm/i915/intel_device_info.h
+++ b/drivers/gpu/drm/i915/intel_device_info.h
@@ -96,7 +96,7 @@ enum intel_platform {
  * it is fine for the same bit to be used on multiple parent platforms.
  */
 
-#define INTEL_SUBPLATFORM_BITS (2)
+#define INTEL_SUBPLATFORM_BITS (3)
 #define INTEL_SUBPLATFORM_MASK (BIT(INTEL_SUBPLATFORM_BITS) - 1)
 
 /* HSW/BDW/SKL/KBL/CFL */
@@ -109,6 +109,7 @@ enum intel_platform {
 /* DG2 */
 #define INTEL_SUBPLATFORM_G10  0
 #define INTEL_SUBPLATFORM_G11  1
+#define INTEL_SUBPLATFORM_G12  2
 
 /* ADL-S */
 #define INTEL_SUBPLATFORM_RPL_S0
diff --git a/drivers/gpu/drm/i915/intel_step.c 
b/drivers/gpu/drm/i915/intel_step.c
index a4b16b9e2e55..46556883e93d 100644
--- a/drivers/gpu/drm/i915/intel_step.c
+++ b/drivers/gpu/drm/i915/intel_step.c
@@ -122,6 +122,10 @@ static const struct intel_step_info 
dg2_g11_revid_step_tbl[] = {
[0x5] = { COMMON_GT_MEDIA_STEP(B1), 

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Introduce G12 subplatform of DG2

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915: Introduce G12 subplatform of DG2
URL   : https://patchwork.freedesktop.org/series/99129/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5_full -> Patchwork_22050_full


Summary
---

  **WARNING**

  Minor unknown changes coming with Patchwork_22050_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_22050_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (10 -> 10)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Warnings 

  * igt@runner@aborted:
- shard-apl:  ([FAIL][1], [FAIL][2], [FAIL][3], [FAIL][4], 
[FAIL][5], [FAIL][6]) ([fdo#109271] / [i915#180] / [i915#1814] / [i915#3002] / 
[i915#4312]) -> ([FAIL][7], [FAIL][8], [FAIL][9], [FAIL][10], [FAIL][11], 
[FAIL][12], [FAIL][13], [FAIL][14], [FAIL][15], [FAIL][16], [FAIL][17]) 
([i915#180] / [i915#1814] / [i915#3002] / [i915#4312])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl2/igt@run...@aborted.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl1/igt@run...@aborted.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl1/igt@run...@aborted.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl8/igt@run...@aborted.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl6/igt@run...@aborted.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl1/igt@run...@aborted.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-apl4/igt@run...@aborted.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-apl7/igt@run...@aborted.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-apl3/igt@run...@aborted.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-apl7/igt@run...@aborted.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-apl7/igt@run...@aborted.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-apl7/igt@run...@aborted.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-apl6/igt@run...@aborted.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-apl7/igt@run...@aborted.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-apl2/igt@run...@aborted.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-apl7/igt@run...@aborted.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-apl7/igt@run...@aborted.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_ctx_isolation@preservation-s3@bcs0:
- shard-apl:  [PASS][18] -> [DMESG-WARN][19] ([i915#180]) +1 
similar issue
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl3/igt@gem_ctx_isolation@preservation...@bcs0.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-apl2/igt@gem_ctx_isolation@preservation...@bcs0.html

  * igt@gem_ctx_persistence@engines-queued:
- shard-snb:  NOTRUN -> [SKIP][20] ([fdo#109271] / [i915#1099])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-snb7/igt@gem_ctx_persiste...@engines-queued.html

  * igt@gem_exec_balancer@parallel-keep-submit-fence:
- shard-iclb: [PASS][21] -> [SKIP][22] ([i915#4525])
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-iclb1/igt@gem_exec_balan...@parallel-keep-submit-fence.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-iclb5/igt@gem_exec_balan...@parallel-keep-submit-fence.html

  * igt@gem_exec_fair@basic-deadline:
- shard-glk:  [PASS][23] -> [FAIL][24] ([i915#2846])
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-glk8/igt@gem_exec_f...@basic-deadline.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-glk4/igt@gem_exec_f...@basic-deadline.html
- shard-apl:  NOTRUN -> [FAIL][25] ([i915#2846])
   [25]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/shard-apl7/igt@gem_exec_f...@basic-deadline.html

  * igt@gem_exec_fair@basic-flow@rcs0:
- shard-tglb: [PASS][26] -> [FAIL][27] ([i915#2842])
   [26]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-tglb3/igt@gem_exec_fair@basic-f...@rcs0.html
   [27]: 

[Intel-gfx] ✓ Fi.CI.IGT: success for A few CT updates

2022-01-20 Thread Patchwork
== Series Details ==

Series: A few CT updates
URL   : https://patchwork.freedesktop.org/series/99117/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_4_full -> Patchwork_22044_full


Summary
---

  **SUCCESS**

  No regressions found.

  

Participating hosts (10 -> 10)
--

  No changes in participating hosts

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_ctx_persistence@engines-hang:
- shard-snb:  NOTRUN -> [SKIP][1] ([fdo#109271] / [i915#1099])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-snb4/igt@gem_ctx_persiste...@engines-hang.html

  * igt@gem_eio@in-flight-contexts-immediate:
- shard-tglb: [PASS][2] -> [TIMEOUT][3] ([i915#3063])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-tglb5/igt@gem_...@in-flight-contexts-immediate.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-tglb3/igt@gem_...@in-flight-contexts-immediate.html

  * igt@gem_exec_balancer@parallel:
- shard-iclb: [PASS][4] -> [SKIP][5] ([i915#4525]) +1 similar issue
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-iclb1/igt@gem_exec_balan...@parallel.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-iclb6/igt@gem_exec_balan...@parallel.html

  * igt@gem_exec_fair@basic-pace@rcs0:
- shard-glk:  [PASS][6] -> [FAIL][7] ([i915#2842])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-glk2/igt@gem_exec_fair@basic-p...@rcs0.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-glk6/igt@gem_exec_fair@basic-p...@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs0:
- shard-iclb: [PASS][8] -> [FAIL][9] ([i915#2842]) +1 similar issue
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-iclb8/igt@gem_exec_fair@basic-p...@vcs0.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-iclb6/igt@gem_exec_fair@basic-p...@vcs0.html

  * igt@gem_exec_fair@basic-pace@vcs1:
- shard-kbl:  [PASS][10] -> [FAIL][11] ([i915#2842]) +1 similar 
issue
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-kbl6/igt@gem_exec_fair@basic-p...@vcs1.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-kbl6/igt@gem_exec_fair@basic-p...@vcs1.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
- shard-iclb: [PASS][12] -> [FAIL][13] ([i915#2849])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-iclb3/igt@gem_exec_fair@basic-throt...@rcs0.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-iclb8/igt@gem_exec_fair@basic-throt...@rcs0.html

  * igt@gem_exec_suspend@basic-s3@smem:
- shard-apl:  NOTRUN -> [DMESG-WARN][14] ([i915#180])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-apl4/igt@gem_exec_suspend@basic...@smem.html

  * igt@gem_exec_whisper@basic-contexts:
- shard-glk:  [PASS][15] -> [DMESG-WARN][16] ([i915#118]) +1 
similar issue
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-glk6/igt@gem_exec_whis...@basic-contexts.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-glk2/igt@gem_exec_whis...@basic-contexts.html

  * igt@gem_lmem_swapping@heavy-multi:
- shard-tglb: NOTRUN -> [SKIP][17] ([i915#4613])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-tglb3/igt@gem_lmem_swapp...@heavy-multi.html

  * igt@gem_lmem_swapping@parallel-multi:
- shard-apl:  NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#4613])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-apl6/igt@gem_lmem_swapp...@parallel-multi.html
- shard-kbl:  NOTRUN -> [SKIP][19] ([fdo#109271] / [i915#4613])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-kbl3/igt@gem_lmem_swapp...@parallel-multi.html

  * igt@gem_lmem_swapping@parallel-random:
- shard-skl:  NOTRUN -> [SKIP][20] ([fdo#109271] / [i915#4613])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-skl9/igt@gem_lmem_swapp...@parallel-random.html

  * igt@gem_pread@exhaustion:
- shard-apl:  NOTRUN -> [WARN][21] ([i915#2658])
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-apl6/igt@gem_pr...@exhaustion.html
- shard-kbl:  NOTRUN -> [WARN][22] ([i915#2658])
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-kbl3/igt@gem_pr...@exhaustion.html

  * igt@gen7_exec_parse@basic-offset:
- shard-apl:  NOTRUN -> [SKIP][23] ([fdo#109271]) +73 similar issues
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22044/shard-apl6/igt@gen7_exec_pa...@basic-offset.html

  * 

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/wopcm: Handle pre-programmed WOPCM registers (rev3)

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915/wopcm: Handle pre-programmed WOPCM registers (rev3)
URL   : https://patchwork.freedesktop.org/series/98910/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_4_full -> Patchwork_22046_full


Summary
---

  **SUCCESS**

  No regressions found.

  

Participating hosts (10 -> 10)
--

  No changes in participating hosts

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_ctx_persistence@engines-hang:
- shard-snb:  NOTRUN -> [SKIP][1] ([fdo#109271] / [i915#1099])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-snb7/igt@gem_ctx_persiste...@engines-hang.html

  * igt@gem_eio@kms:
- shard-tglb: [PASS][2] -> [FAIL][3] ([i915#232])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-tglb6/igt@gem_...@kms.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-tglb3/igt@gem_...@kms.html

  * igt@gem_exec_balancer@parallel:
- shard-iclb: [PASS][4] -> [SKIP][5] ([i915#4525]) +1 similar issue
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-iclb1/igt@gem_exec_balan...@parallel.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-iclb6/igt@gem_exec_balan...@parallel.html

  * igt@gem_exec_endless@dispatch@vcs0:
- shard-tglb: [PASS][6] -> [INCOMPLETE][7] ([i915#3778])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-tglb7/igt@gem_exec_endless@dispa...@vcs0.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-tglb7/igt@gem_exec_endless@dispa...@vcs0.html

  * igt@gem_exec_fair@basic-flow@rcs0:
- shard-tglb: [PASS][8] -> [FAIL][9] ([i915#2842])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-tglb1/igt@gem_exec_fair@basic-f...@rcs0.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-tglb6/igt@gem_exec_fair@basic-f...@rcs0.html

  * igt@gem_exec_fair@basic-none@vcs0:
- shard-kbl:  [PASS][10] -> [FAIL][11] ([i915#2842]) +2 similar 
issues
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-kbl1/igt@gem_exec_fair@basic-n...@vcs0.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-kbl6/igt@gem_exec_fair@basic-n...@vcs0.html

  * igt@gem_exec_fair@basic-pace@rcs0:
- shard-glk:  [PASS][12] -> [FAIL][13] ([i915#2842])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-glk2/igt@gem_exec_fair@basic-p...@rcs0.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-glk5/igt@gem_exec_fair@basic-p...@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs0:
- shard-iclb: [PASS][14] -> [FAIL][15] ([i915#2842]) +1 similar 
issue
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-iclb8/igt@gem_exec_fair@basic-p...@vcs0.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-iclb5/igt@gem_exec_fair@basic-p...@vcs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
- shard-iclb: [PASS][16] -> [FAIL][17] ([i915#2849])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-iclb3/igt@gem_exec_fair@basic-throt...@rcs0.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-iclb7/igt@gem_exec_fair@basic-throt...@rcs0.html

  * igt@gem_lmem_swapping@heavy-multi:
- shard-tglb: NOTRUN -> [SKIP][18] ([i915#4613])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-tglb2/igt@gem_lmem_swapp...@heavy-multi.html

  * igt@gem_lmem_swapping@parallel-multi:
- shard-apl:  NOTRUN -> [SKIP][19] ([fdo#109271] / [i915#4613]) +1 
similar issue
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-apl2/igt@gem_lmem_swapp...@parallel-multi.html
- shard-kbl:  NOTRUN -> [SKIP][20] ([fdo#109271] / [i915#4613])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-kbl6/igt@gem_lmem_swapp...@parallel-multi.html

  * igt@gem_lmem_swapping@parallel-random:
- shard-skl:  NOTRUN -> [SKIP][21] ([fdo#109271] / [i915#4613])
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-skl10/igt@gem_lmem_swapp...@parallel-random.html

  * igt@gem_pread@exhaustion:
- shard-apl:  NOTRUN -> [WARN][22] ([i915#2658])
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-apl2/igt@gem_pr...@exhaustion.html
- shard-kbl:  NOTRUN -> [WARN][23] ([i915#2658])
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22046/shard-kbl6/igt@gem_pr...@exhaustion.html

  * igt@gem_workarounds@suspend-resume-fd:
- shard-apl:  NOTRUN -> [DMESG-WARN][24] ([i915#180])
   [24]: 

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Introduce G12 subplatform of DG2

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915: Introduce G12 subplatform of DG2
URL   : https://patchwork.freedesktop.org/series/99129/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5 -> Patchwork_22050


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (42 -> 40)
--

  Additional (1): fi-pnv-d510 
  Missing(3): fi-bsw-cyan fi-bdw-samus fi-kbl-8809g 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_cs_nop@sync-fork-compute0:
- fi-snb-2600:NOTRUN -> [SKIP][1] ([fdo#109271]) +17 similar issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/fi-snb-2600/igt@amdgpu/amd_cs_...@sync-fork-compute0.html

  * igt@i915_selftest@live@execlists:
- fi-bsw-kefka:   [PASS][2] -> [INCOMPLETE][3] ([i915#2940])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-bsw-kefka/igt@i915_selftest@l...@execlists.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/fi-bsw-kefka/igt@i915_selftest@l...@execlists.html

  * igt@i915_selftest@live@gt_pm:
- fi-tgl-1115g4:  [PASS][4] -> [DMESG-FAIL][5] ([i915#3987])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-tgl-1115g4/igt@i915_selftest@live@gt_pm.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/fi-tgl-1115g4/igt@i915_selftest@live@gt_pm.html

  * igt@prime_vgem@basic-userptr:
- fi-pnv-d510:NOTRUN -> [SKIP][6] ([fdo#109271]) +57 similar issues
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/fi-pnv-d510/igt@prime_v...@basic-userptr.html

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

  
 Possible fixes 

  * igt@i915_selftest@live@gtt:
- fi-bdw-5557u:   [DMESG-FAIL][8] -> [PASS][9]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html

  * igt@i915_selftest@live@hangcheck:
- bat-dg1-6:  [DMESG-FAIL][10] ([i915#4494]) -> [PASS][11]
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/bat-dg1-6/igt@i915_selftest@l...@hangcheck.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/bat-dg1-6/igt@i915_selftest@l...@hangcheck.html
- fi-snb-2600:[INCOMPLETE][12] ([i915#3921]) -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-snb-2600/igt@i915_selftest@l...@hangcheck.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22050/fi-snb-2600/igt@i915_selftest@l...@hangcheck.html

  
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
  [i915#2940]: https://gitlab.freedesktop.org/drm/intel/issues/2940
  [i915#3428]: https://gitlab.freedesktop.org/drm/intel/issues/3428
  [i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
  [i915#3987]: https://gitlab.freedesktop.org/drm/intel/issues/3987
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4494]: https://gitlab.freedesktop.org/drm/intel/issues/4494


Build changes
-

  * Linux: CI_DRM_5 -> Patchwork_22050

  CI-20190529: 20190529
  CI_DRM_5: 4e12213687264ffccb45d72fe638f94d3ca666bd @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6329: 38f656fdd61119105ecfa2c4dac157cd7dcad204 @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_22050: 74e47df4a75eeb545686e9fa91839afe29ed91ec @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

74e47df4a75e drm/i915: Introduce G12 subplatform of DG2

== Logs ==

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


[Intel-gfx] ✗ Fi.CI.IGT: failure for Splitting up platform-specific calls

2022-01-20 Thread Patchwork
== Series Details ==

Series: Splitting up platform-specific calls
URL   : https://patchwork.freedesktop.org/series/99126/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5_full -> Patchwork_22048_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_22048_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_22048_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (10 -> 10)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@gem_exec_schedule@smoketest-all:
- shard-tglb: [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-tglb2/igt@gem_exec_sched...@smoketest-all.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/shard-tglb6/igt@gem_exec_sched...@smoketest-all.html

  
 Warnings 

  * igt@runner@aborted:
- shard-apl:  ([FAIL][3], [FAIL][4], [FAIL][5], [FAIL][6], 
[FAIL][7], [FAIL][8]) ([fdo#109271] / [i915#180] / [i915#1814] / [i915#3002] / 
[i915#4312]) -> ([FAIL][9], [FAIL][10], [FAIL][11], [FAIL][12], [FAIL][13], 
[FAIL][14]) ([i915#180] / [i915#1814] / [i915#3002] / [i915#4312])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl2/igt@run...@aborted.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl6/igt@run...@aborted.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl1/igt@run...@aborted.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl1/igt@run...@aborted.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl1/igt@run...@aborted.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl8/igt@run...@aborted.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/shard-apl7/igt@run...@aborted.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/shard-apl7/igt@run...@aborted.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/shard-apl7/igt@run...@aborted.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/shard-apl6/igt@run...@aborted.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/shard-apl8/igt@run...@aborted.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/shard-apl7/igt@run...@aborted.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_ctx_isolation@preservation-s3@rcs0:
- shard-apl:  [PASS][15] -> [DMESG-WARN][16] ([i915#180])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl3/igt@gem_ctx_isolation@preservation...@rcs0.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/shard-apl8/igt@gem_ctx_isolation@preservation...@rcs0.html

  * igt@gem_ctx_persistence@engines-queued:
- shard-snb:  NOTRUN -> [SKIP][17] ([fdo#109271] / [i915#1099])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/shard-snb4/igt@gem_ctx_persiste...@engines-queued.html

  * igt@gem_eio@unwedge-stress:
- shard-iclb: [PASS][18] -> [TIMEOUT][19] ([i915#2481] / 
[i915#3070])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-iclb8/igt@gem_...@unwedge-stress.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/shard-iclb2/igt@gem_...@unwedge-stress.html

  * igt@gem_exec_balancer@parallel-keep-in-fence:
- shard-iclb: [PASS][20] -> [SKIP][21] ([i915#4525])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-iclb1/igt@gem_exec_balan...@parallel-keep-in-fence.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/shard-iclb3/igt@gem_exec_balan...@parallel-keep-in-fence.html

  * igt@gem_exec_fair@basic-deadline:
- shard-glk:  [PASS][22] -> [FAIL][23] ([i915#2846])
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-glk8/igt@gem_exec_f...@basic-deadline.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/shard-glk8/igt@gem_exec_f...@basic-deadline.html

  * igt@gem_exec_fair@basic-flow@rcs0:
- shard-tglb: [PASS][24] -> [FAIL][25] ([i915#2842])
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-tglb3/igt@gem_exec_fair@basic-f...@rcs0.html
   [25]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22048/shard-tglb3/igt@gem_exec_fair@basic-f...@rcs0.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
   

[Intel-gfx] [PATCH] drm/i915/dg2: Add Wa_18018781329

2022-01-20 Thread Matt Roper
A few more MOD registers need to be programmed on DG2.

Signed-off-by: Matt Roper 
---
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 6 ++
 drivers/gpu/drm/i915/i915_reg.h | 4 
 2 files changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c 
b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index 6a4372c3a3c5..748b2daf043f 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -1509,6 +1509,12 @@ dg2_gt_workarounds_init(struct intel_gt *gt, struct 
i915_wa_list *wal)
 */
wa_write_or(wal, XEHP_L3SCQREG7, BLEND_FILL_CACHING_OPT_DIS);
wa_write_or(wal, GEN12_SQCM, EN_32B_ACCESS);
+
+   /* Wa_18018781329:dg2 */
+   wa_write_or(wal, RENDER_MOD_CTRL, FORCE_MISS_FTLB);
+   wa_write_or(wal, COMP_MOD_CTRL, FORCE_MISS_FTLB);
+   wa_write_or(wal, VDBX_MOD_CTRL, FORCE_MISS_FTLB);
+   wa_write_or(wal, VEBX_MOD_CTRL, FORCE_MISS_FTLB);
 }
 
 static void
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 460bce5c544d..d587257f392a 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -339,6 +339,10 @@
 #define   TAG_BLOCK_CLKGATE_DISREG_BIT(7)
 
 #define GEN12_MERT_MOD_CTRL_MMIO(0xcf28)
+#define RENDER_MOD_CTRL_MMIO(0xcf2c)
+#define COMP_MOD_CTRL  _MMIO(0xcf30)
+#define VDBX_MOD_CTRL  _MMIO(0xcf34)
+#define VEBX_MOD_CTRL  _MMIO(0xcf38)
 #define   FORCE_MISS_FTLB  REG_BIT(3)
 
 #define GAB_CTL_MMIO(0x24000)
-- 
2.34.1



[Intel-gfx] [PATCH i-g-t] tests/i915/gem_exec_capture: Fix memory object size in gem_exec_capture

2022-01-20 Thread John . C . Harrison
From: John Harrison 

The capture tests require knowing exactly how big the test allocation
is. Part of the test is to compare the captured size against the
allocated size to make sure they match. That doesn't work if the
allocator creates an object of a different size than was requested
without reporting the larger size.

Fixes: 85a593809 ("tests/i915/gem_exec_capture: Add support for local memory")
Signed-off-by: John Harrison 
---
 tests/i915/gem_exec_capture.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/i915/gem_exec_capture.c b/tests/i915/gem_exec_capture.c
index 5b2482518..60f8df04c 100644
--- a/tests/i915/gem_exec_capture.c
+++ b/tests/i915/gem_exec_capture.c
@@ -387,10 +387,9 @@ static void capture(int fd, int dir, const intel_ctx_t 
*ctx,
const struct intel_execution_engine2 *e, uint32_t region)
 {
uint32_t handle;
-   uint64_t ahnd;
-   int obj_size = 4096;
+   uint64_t ahnd, obj_size = 4096;
 
-   handle = gem_create_in_memory_regions(fd, obj_size, region);
+   igt_assert_eq(__gem_create_in_memory_regions(fd, , _size, 
region), 0);
ahnd = get_reloc_ahnd(fd, ctx->id);
 
__capture1(fd, dir, ahnd, ctx, e, handle, obj_size, region);
-- 
2.25.1



[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Introduce G12 subplatform of DG2

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915: Introduce G12 subplatform of DG2
URL   : https://patchwork.freedesktop.org/series/99129/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.




Re: [Intel-gfx] [PATCH 3/3] drm/i915/guc: Flush G2H handler during a GT reset

2022-01-20 Thread John Harrison

On 1/19/2022 13:24, Matthew Brost wrote:

Now that the error capture is fully decoupled from fence signalling
(request retirement to free memory, which in turn depends on resets) we
can safely flush the G2H handler during a GT reset. This is eliminates

This eliminates

John.


corner cases where GuC generated G2H (e.g. engine resets) race with a GT
reset.

v2:
  (John Harrison)
   - Fix typo in commit message (s/is/in)

Signed-off-by: Matthew Brost 
Reviewed-by: John Harrison 
---
  .../gpu/drm/i915/gt/uc/intel_guc_submission.c  | 18 +-
  1 file changed, 1 insertion(+), 17 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 514b3060b141..406dd2e3f5a9 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -1396,8 +1396,6 @@ static void guc_flush_destroyed_contexts(struct intel_guc 
*guc);
  
  void intel_guc_submission_reset_prepare(struct intel_guc *guc)

  {
-   int i;
-
if (unlikely(!guc_submission_initialized(guc))) {
/* Reset called during driver load? GuC not yet initialised! */
return;
@@ -1414,21 +1412,7 @@ void intel_guc_submission_reset_prepare(struct intel_guc 
*guc)
  
  	guc_flush_submissions(guc);

guc_flush_destroyed_contexts(guc);
-
-   /*
-* Handle any outstanding G2Hs before reset. Call IRQ handler directly
-* each pass as interrupt have been disabled. We always scrub for
-* outstanding G2H as it is possible for outstanding_submission_g2h to
-* be incremented after the context state update.
-*/
-   for (i = 0; i < 4 && atomic_read(>outstanding_submission_g2h); 
++i) {
-   intel_guc_to_host_event_handler(guc);
-#define wait_for_reset(guc, wait_var) \
-   intel_guc_wait_for_pending_msg(guc, wait_var, false, (HZ / 20))
-   do {
-   wait_for_reset(guc, >outstanding_submission_g2h);
-   } while (!list_empty(>ct.requests.incoming));
-   }
+   flush_work(>ct.requests.worker);
  
  	scrub_guc_desc_for_outstanding_g2h(guc);

  }




[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/guc: Update guc shim control programming on newer platforms

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915/guc: Update guc shim control programming on newer platforms
URL   : https://patchwork.freedesktop.org/series/99125/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_4_full -> Patchwork_22047_full


Summary
---

  **SUCCESS**

  No regressions found.

  

Participating hosts (10 -> 10)
--

  No changes in participating hosts

Known issues


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

### CI changes ###

 Issues hit 

  * boot:
- shard-apl:  ([PASS][1], [PASS][2], [PASS][3], [PASS][4], 
[PASS][5], [PASS][6], [PASS][7], [PASS][8], [PASS][9], [PASS][10], [PASS][11], 
[PASS][12], [PASS][13], [PASS][14], [PASS][15], [PASS][16], [PASS][17], 
[PASS][18], [PASS][19], [PASS][20], [PASS][21], [PASS][22], [PASS][23], 
[PASS][24], [PASS][25]) -> ([FAIL][26], [PASS][27], [PASS][28], [PASS][29], 
[PASS][30], [PASS][31], [PASS][32], [PASS][33], [PASS][34], [PASS][35], 
[PASS][36], [PASS][37], [PASS][38], [PASS][39], [PASS][40], [PASS][41], 
[PASS][42], [PASS][43], [PASS][44], [PASS][45], [PASS][46], [PASS][47], 
[PASS][48], [PASS][49], [PASS][50]) ([i915#4386])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl8/boot.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl8/boot.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl8/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl8/boot.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl8/boot.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl7/boot.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl7/boot.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl7/boot.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl6/boot.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl6/boot.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl6/boot.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl6/boot.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl4/boot.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl4/boot.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl4/boot.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl4/boot.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl3/boot.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl3/boot.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl3/boot.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl2/boot.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl2/boot.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl2/boot.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl1/boot.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl1/boot.html
   [25]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4/shard-apl1/boot.html
   [26]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl1/boot.html
   [27]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl1/boot.html
   [28]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl1/boot.html
   [29]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl1/boot.html
   [30]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl2/boot.html
   [31]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl2/boot.html
   [32]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl2/boot.html
   [33]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl3/boot.html
   [34]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl3/boot.html
   [35]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl3/boot.html
   [36]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl4/boot.html
   [37]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl4/boot.html
   [38]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl4/boot.html
   [39]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl4/boot.html
   [40]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl6/boot.html
   [41]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl6/boot.html
   [42]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl6/boot.html
   [43]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22047/shard-apl6/boot.html
   [44]: 

Re: [Intel-gfx] [PATCH] drm/i915/guc: Don't check CT descriptor status before CT write / read

2022-01-20 Thread kernel test robot
Hi Matthew,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip drm-exynos/exynos-drm-next 
drm/drm-next tegra-drm/drm/tegra/for-next v5.16 next-20220121]
[cannot apply to airlied/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Matthew-Brost/drm-i915-guc-Don-t-check-CT-descriptor-status-before-CT-write-read/20220121-023033
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-a005-20220117 
(https://download.01.org/0day-ci/archive/20220121/202201211310.npkld1yy-...@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
f7b7138a62648f4019c55e4671682af1f851f295)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/0311a8b0f99c50ab1a666a5cdbe2b1a0a2c3c71d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Matthew-Brost/drm-i915-guc-Don-t-check-CT-descriptor-status-before-CT-write-read/20220121-023033
git checkout 0311a8b0f99c50ab1a666a5cdbe2b1a0a2c3c71d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 
O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/i915/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c:469:1: error: unused label 
>> 'corrupted' [-Werror,-Wunused-label]
   corrupted:
   ^~
   1 error generated.


vim +/corrupted +469 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c

f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  422  
1d407096002beca drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2018-03-26  423  /*
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  424   * dw0: CT header (including fence)
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  425   * dw1: HXG header (including action code)
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  426   * dw2+: action data
f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  427   */
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  428  header = FIELD_PREP(GUC_CTB_MSG_0_FORMAT, 
GUC_CTB_FORMAT_HXG) |
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  429   FIELD_PREP(GUC_CTB_MSG_0_NUM_DWORDS, len) |
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  430   FIELD_PREP(GUC_CTB_MSG_0_FENCE, fence);
f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  431  
1681924d8bdeb24 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  432  type = (flags & INTEL_GUC_CT_SEND_NB) ? GUC_HXG_TYPE_EVENT 
:
1681924d8bdeb24 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  433  GUC_HXG_TYPE_REQUEST;
1681924d8bdeb24 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  434  hxg = FIELD_PREP(GUC_HXG_MSG_0_TYPE, type) |
1681924d8bdeb24 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  435  FIELD_PREP(GUC_HXG_EVENT_MSG_0_ACTION |
1681924d8bdeb24 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Matthew Brost
2021-07-08  436 GUC_HXG_EVENT_MSG_0_DATA0, action[0]);
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  437  
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  438  CT_DEBUG(ct, "writing (tail %u) %*ph %*ph %*ph\n",
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  439   tail, 4, , 4, , 4 * (len - 1), 
[1]);
0a015ff9730c169 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2018-03-26  440  
f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  441  cmds[tail] = header;
f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  442  tail = (tail + 1) % size;
f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal Wajdeczko 
2017-05-26  443  
572f2a5cd9742c5 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c Michal Wajdeczko 
2021-06-15  444  cmds[tail] = hxg;
f8a58d639dd95b0 drivers/gpu/drm/i915/intel_guc_ct.c   Michal 

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/dg2: Add Wa_18018781329

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915/dg2: Add Wa_18018781329
URL   : https://patchwork.freedesktop.org/series/99128/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.




Re: [Intel-gfx] [PATCH 2/3] drm/i915/guc: Add work queue to trigger a GT reset

2022-01-20 Thread Matthew Brost
On Thu, Jan 20, 2022 at 05:34:54PM -0800, John Harrison wrote:
> On 1/19/2022 13:24, Matthew Brost wrote:
> > The G2H handler needs to be flushed during a GT reset but a G2H
> > indicating engine reset failure can trigger a GT reset. Add a worker to
> > trigger the GT when an engine reset failure is received to break this
> trigger the GT reset?
> 

Yes.

> > circular dependency.
> > 
> > v2:
> >   (John Harrison)
> >- Store engine reset mask
> >- Fix typo in commit message
> > 
> > Signed-off-by: Matthew Brost 
> > ---
> >   drivers/gpu/drm/i915/gt/uc/intel_guc.h|  9 +
> >   .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 37 +--
> >   2 files changed, 42 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.h 
> > b/drivers/gpu/drm/i915/gt/uc/intel_guc.h
> > index 9d26a86fe557..c4a9fc7dd246 100644
> > --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h
> > +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h
> > @@ -119,6 +119,15 @@ struct intel_guc {
> >  * function as it might be in an atomic context (no sleeping)
> >  */
> > struct work_struct destroyed_worker;
> > +   /**
> > +* @reset_worker: worker to trigger a GT reset after an engine
> > +* reset fails
> > +*/
> > +   struct work_struct reset_worker;
> > +   /**
> > +* @reset_mask: mask of engines that failed to reset
> > +*/
> > +   intel_engine_mask_t reset_mask;
> reset_fail_mask might be a less ambiguous name? Same for the worker struct
> and function.
> 

How about:

struct {
worker;
mask;
} engine_reset_fail;

Matt

> John.
> 
> > } submission_state;
> > /**
> > 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 3918f1be114f..514b3060b141 100644
> > --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> > +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> > @@ -1731,6 +1731,7 @@ void intel_guc_submission_reset_finish(struct 
> > intel_guc *guc)
> >   }
> >   static void destroyed_worker_func(struct work_struct *w);
> > +static void reset_worker_func(struct work_struct *w);
> >   /*
> >* Set up the memory resources to be shared with the GuC (via the GGTT)
> > @@ -1761,6 +1762,8 @@ int intel_guc_submission_init(struct intel_guc *guc)
> > INIT_LIST_HEAD(>submission_state.destroyed_contexts);
> > INIT_WORK(>submission_state.destroyed_worker,
> >   destroyed_worker_func);
> > +   INIT_WORK(>submission_state.reset_worker,
> > + reset_worker_func);
> > guc->submission_state.guc_ids_bitmap =
> > bitmap_zalloc(NUMBER_MULTI_LRC_GUC_ID(guc), GFP_KERNEL);
> > @@ -4026,6 +4029,26 @@ guc_lookup_engine(struct intel_guc *guc, u8 
> > guc_class, u8 instance)
> > return gt->engine_class[engine_class][instance];
> >   }
> > +static void reset_worker_func(struct work_struct *w)
> > +{
> > +   struct intel_guc *guc = container_of(w, struct intel_guc,
> > +submission_state.reset_worker);
> > +   struct intel_gt *gt = guc_to_gt(guc);
> > +   intel_engine_mask_t reset_mask;
> > +   unsigned long flags;
> > +
> > +   spin_lock_irqsave(>submission_state.lock, flags);
> > +   reset_mask = guc->submission_state.reset_mask;
> > +   guc->submission_state.reset_mask = 0;
> > +   spin_unlock_irqrestore(>submission_state.lock, flags);
> > +
> > +   if (likely(reset_mask))
> > +   intel_gt_handle_error(gt, reset_mask,
> > + I915_ERROR_CAPTURE,
> > + "GuC failed to reset engine mask=0x%x\n",
> > + reset_mask);
> > +}
> > +
> >   int intel_guc_engine_failure_process_msg(struct intel_guc *guc,
> >  const u32 *msg, u32 len)
> >   {
> > @@ -4033,6 +4056,7 @@ int intel_guc_engine_failure_process_msg(struct 
> > intel_guc *guc,
> > struct intel_gt *gt = guc_to_gt(guc);
> > u8 guc_class, instance;
> > u32 reason;
> > +   unsigned long flags;
> > if (unlikely(len != 3)) {
> > drm_err(>i915->drm, "Invalid length %u", len);
> > @@ -4057,10 +4081,15 @@ int intel_guc_engine_failure_process_msg(struct 
> > intel_guc *guc,
> > drm_err(>i915->drm, "GuC engine reset request failed on %d:%d (%s) 
> > because 0x%08X",
> > guc_class, instance, engine->name, reason);
> > -   intel_gt_handle_error(gt, engine->mask,
> > - I915_ERROR_CAPTURE,
> > - "GuC failed to reset %s (reason=0x%08x)\n",
> > - engine->name, reason);
> > +   spin_lock_irqsave(>submission_state.lock, flags);
> > +   guc->submission_state.reset_mask |= engine->mask;
> > +   spin_unlock_irqrestore(>submission_state.lock, flags);
> > +
> > +   /*
> > +* A GT reset flushes this worker queue 

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/dg2: Add Wa_18018781329

2022-01-20 Thread Matt Roper
On Fri, Jan 21, 2022 at 01:05:07AM +, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915/dg2: Add Wa_18018781329
> URL   : https://patchwork.freedesktop.org/series/99128/
> State : failure
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_5 -> Patchwork_22049
> 
> 
> Summary
> ---
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with Patchwork_22049 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_22049, 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_22049/index.html
> 
> Participating hosts (42 -> 40)
> --
> 
>   Missing(2): fi-bsw-cyan fi-bdw-samus 
> 
> Possible new issues
> ---
> 
>   Here are the unknown changes that may have been introduced in 
> Patchwork_22049:
> 
> ### IGT changes ###
> 
>  Possible regressions 
> 
>   * igt@i915_selftest@live@execlists:
> - fi-glk-j4005:   [PASS][1] -> [INCOMPLETE][2]
>[1]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-glk-j4005/igt@i915_selftest@l...@execlists.html
>[2]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22049/fi-glk-j4005/igt@i915_selftest@l...@execlists.html

Appears to be the same as
https://gitlab.freedesktop.org/drm/intel/-/issues/4920



Matt

> 
>   
> Known issues
> 
> 
>   Here are the changes found in Patchwork_22049 that come from known issues:
> 
> ### IGT changes ###
> 
>  Issues hit 
> 
>   * igt@gem_flink_basic@bad-flink:
> - fi-skl-6600u:   [PASS][3] -> [INCOMPLETE][4] ([i915#4547])
>[3]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-skl-6600u/igt@gem_flink_ba...@bad-flink.html
>[4]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22049/fi-skl-6600u/igt@gem_flink_ba...@bad-flink.html
> 
>   * igt@runner@aborted:
> - fi-skl-6600u:   NOTRUN -> [FAIL][5] ([i915#2722] / [i915#4312])
>[5]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22049/fi-skl-6600u/igt@run...@aborted.html
> - fi-glk-j4005:   NOTRUN -> [FAIL][6] ([i915#2722] / [i915#4312] / 
> [k.org#202321])
>[6]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22049/fi-glk-j4005/igt@run...@aborted.html
> 
>   
>  Possible fixes 
> 
>   * igt@i915_selftest@live@gtt:
> - fi-bdw-5557u:   [DMESG-FAIL][7] -> [PASS][8]
>[7]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html
>[8]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22049/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html
> 
>   
>   {name}: This element is suppressed. This means it is ignored when computing
>   the status of the difference (SUCCESS, WARNING, or FAILURE).
> 
>   [i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
>   [i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
>   [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
>   [i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
>   [k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321
> 
> 
> Build changes
> -
> 
>   * Linux: CI_DRM_5 -> Patchwork_22049
> 
>   CI-20190529: 20190529
>   CI_DRM_5: 4e12213687264ffccb45d72fe638f94d3ca666bd @ 
> git://anongit.freedesktop.org/gfx-ci/linux
>   IGT_6329: 38f656fdd61119105ecfa2c4dac157cd7dcad204 @ 
> https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
>   Patchwork_22049: 3bb57af567ca7c35813b4f945576dbf573308408 @ 
> git://anongit.freedesktop.org/gfx-ci/linux
> 
> 
> == Linux commits ==
> 
> 3bb57af567ca drm/i915/dg2: Add Wa_18018781329
> 
> == Logs ==
> 
> For more details see: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22049/index.html

-- 
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795


Re: [Intel-gfx] [PATCH 1/2] drm/i915/guc: Don't check CT descriptor status before CT write / read

2022-01-20 Thread Jani Nikula
On Thu, 20 Jan 2022, Matthew Brost  wrote:
> Don't check CT descriptor status, unless CONFIG_DRM_I915_DEBUG_GUC is
> set, before CT write / read as this could result in a read across the
> PCIe bus thus adding latency to every CT write / read. On well behavied
> systems this vaue should always read as zero. For some reason it doesn't
> the CT channel is broken and will eventually recover from a GT reset,
> albeit the GT reset will not be triggered immediately by seeing that
> descriptor status is non-zero.
>
> v2:
>  (CI)
>   - Fix build error (hide corrupted label in write function behind
> CONFIG_DRM_I915_DEBUG_GUC)
>
> Signed-off-by: Matthew Brost 
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 6 ++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c 
> b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> index de89d40abd38d..948cf31429412 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> @@ -379,8 +379,10 @@ static int ct_write(struct intel_guc_ct *ct,
>   u32 *cmds = ctb->cmds;
>   unsigned int i;
>  
> +#ifdef CONFIG_DRM_I915_DEBUG_GUC
>   if (unlikely(desc->status))
>   goto corrupted;
> +#endif

Please don't add #ifdefs inline. You can use
IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC) in if statements, but otherwise
the code needs to be split out to a separate function.

BR,
Jani.

>  
>   GEM_BUG_ON(tail > size);
>  
> @@ -445,11 +447,13 @@ static int ct_write(struct intel_guc_ct *ct,
>  
>   return 0;
>  
> +#ifdef CONFIG_DRM_I915_DEBUG_GUC
>  corrupted:
>   CT_ERROR(ct, "Corrupted descriptor head=%u tail=%u status=%#x\n",
>desc->head, desc->tail, desc->status);
>   ctb->broken = true;
>   return -EPIPE;
> +#endif
>  }
>  
>  /**
> @@ -815,8 +819,10 @@ static int ct_read(struct intel_guc_ct *ct, struct 
> ct_incoming_msg **msg)
>   if (unlikely(ctb->broken))
>   return -EPIPE;
>  
> +#ifdef CONFIG_DRM_I915_DEBUG_GUC
>   if (unlikely(desc->status))
>   goto corrupted;
> +#endif
>  
>   GEM_BUG_ON(head > size);

-- 
Jani Nikula, Intel Open Source Graphics Center


[Intel-gfx] ✓ Fi.CI.IGT: success for Flush G2H handler during a GT reset

2022-01-20 Thread Patchwork
== Series Details ==

Series: Flush G2H handler during a GT reset
URL   : https://patchwork.freedesktop.org/series/99136/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5_full -> Patchwork_22051_full


Summary
---

  **SUCCESS**

  No regressions found.

  

Participating hosts (10 -> 10)
--

  No changes in participating hosts

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_ctx_isolation@preservation-s3@bcs0:
- shard-apl:  [PASS][1] -> [DMESG-WARN][2] ([i915#180]) +3 similar 
issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-apl3/igt@gem_ctx_isolation@preservation...@bcs0.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/shard-apl8/igt@gem_ctx_isolation@preservation...@bcs0.html

  * igt@gem_ctx_persistence@engines-queued:
- shard-snb:  NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#1099])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/shard-snb5/igt@gem_ctx_persiste...@engines-queued.html

  * igt@gem_eio@in-flight-suspend:
- shard-kbl:  [PASS][4] -> [INCOMPLETE][5] ([i915#180] / 
[i915#3614])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-kbl3/igt@gem_...@in-flight-suspend.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/shard-kbl1/igt@gem_...@in-flight-suspend.html

  * igt@gem_exec_balancer@parallel-keep-submit-fence:
- shard-iclb: [PASS][6] -> [SKIP][7] ([i915#4525])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-iclb1/igt@gem_exec_balan...@parallel-keep-submit-fence.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/shard-iclb3/igt@gem_exec_balan...@parallel-keep-submit-fence.html

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

  * igt@gem_exec_fair@basic-none@vcs0:
- shard-glk:  [PASS][9] -> [FAIL][10] ([i915#2842]) +1 similar issue
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-glk4/igt@gem_exec_fair@basic-n...@vcs0.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/shard-glk4/igt@gem_exec_fair@basic-n...@vcs0.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-kbl:  [PASS][11] -> [FAIL][12] ([i915#2842]) +1 similar 
issue
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-kbl4/igt@gem_exec_fair@basic-pace-s...@rcs0.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/shard-kbl4/igt@gem_exec_fair@basic-pace-s...@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs1:
- shard-iclb: NOTRUN -> [FAIL][13] ([i915#2842])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/shard-iclb1/igt@gem_exec_fair@basic-p...@vcs1.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
- shard-iclb: [PASS][14] -> [FAIL][15] ([i915#2849])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5/shard-iclb3/igt@gem_exec_fair@basic-throt...@rcs0.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/shard-iclb8/igt@gem_exec_fair@basic-throt...@rcs0.html

  * igt@gem_exec_suspend@basic-s3@smem:
- shard-apl:  NOTRUN -> [DMESG-WARN][16] ([i915#180])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/shard-apl6/igt@gem_exec_suspend@basic...@smem.html

  * igt@gem_lmem_swapping@heavy-random:
- shard-apl:  NOTRUN -> [SKIP][17] ([fdo#109271] / [i915#4613])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/shard-apl1/igt@gem_lmem_swapp...@heavy-random.html

  * igt@gem_userptr_blits@dmabuf-sync:
- shard-kbl:  NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#3323])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/shard-kbl6/igt@gem_userptr_bl...@dmabuf-sync.html

  * igt@i915_pm_dc@dc6-dpms:
- shard-kbl:  NOTRUN -> [FAIL][19] ([i915#454])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/shard-kbl6/igt@i915_pm...@dc6-dpms.html

  * igt@i915_pm_rpm@modeset-lpsp-stress:
- shard-apl:  NOTRUN -> [SKIP][20] ([fdo#109271]) +64 similar issues
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/shard-apl6/igt@i915_pm_...@modeset-lpsp-stress.html

  * igt@i915_pm_rpm@sysfs-read:
- shard-snb:  NOTRUN -> [SKIP][21] ([fdo#109271]) +21 similar issues
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22051/shard-snb5/igt@i915_pm_...@sysfs-read.html

  * igt@i915_selftest@live@hangcheck:
- shard-snb:  [PASS][22] -> [INCOMPLETE][23] ([i915#3921])
   [22]: 

Re: [Intel-gfx] [PATCH 0/3] lib/string_helpers: Add a few string helpers

2022-01-20 Thread Jani Nikula
On Thu, 20 Jan 2022, Petr Mladek  wrote:
> On Wed 2022-01-19 16:16:12, Jani Nikula wrote:
>> On Wed, 19 Jan 2022, Petr Mladek  wrote:
>> > On Tue 2022-01-18 23:24:47, Lucas De Marchi wrote:
>> >> d. This doesn't bring onoff() helper as there are some places in the
>> >>kernel with onoff as variable - another name is probably needed for
>> >>this function in order not to shadow the variable, or those variables
>> >>could be renamed.  Or if people wanting  
>> >>try to find a short one
>> >
>> > I would call it str_on_off().
>> >
>> > And I would actually suggest to use the same style also for
>> > the other helpers.
>> >
>> > The "str_" prefix would make it clear that it is something with
>> > string. There are other _on_off() that affect some
>> > functionality, e.g. mute_led_on_off(), e1000_vlan_filter_on_off().
>> >
>> > The dash '_' would significantly help to parse the name. yesno() and
>> > onoff() are nicely short and kind of acceptable. But "enabledisable()"
>> > is a puzzle.
>> >
>> > IMHO, str_yes_no(), str_on_off(), str_enable_disable() are a good
>> > compromise.
>> >
>> > The main motivation should be code readability. You write the
>> > code once. But many people will read it many times. Open coding
>> > is sometimes better than misleading macro names.
>> >
>> > That said, I do not want to block this patchset. If others like
>> > it... ;-)
>> 
>> I don't mind the names either way. Adding the prefix and dashes is
>> helpful in that it's possible to add the functions first and convert
>> users at leisure, though with a bunch of churn, while using names that
>> collide with existing ones requires the changes to happen in one go.
>
> It is also possible to support both notations at the beginning.
> And convert the existing users in the 2nd step.
>
>> What I do mind is grinding this series to a halt once again. I sent a
>> handful of versions of this three years ago, with inconclusive
>> bikeshedding back and forth, eventually threw my hands up in disgust,
>> and walked away.
>
> Yeah, and I am sorry for bikeshedding. Honestly, I do not know what is
> better. This is why I do not want to block this series when others
> like this.
>
> My main motivation is to point out that:
>
> enabledisable(enable)
>
> might be, for some people, more eye bleeding than
>
> enable ? "enable" : "disable"
>
>
> The problem is not that visible with yesno() and onoff(). But as you said,
> onoff() confliscts with variable names. And enabledisable() sucks.
> As a result, there is a non-trivial risk of two mass changes:

My point is, in the past three years we could have churned through more
than two mass renames just fine, if needed, *if* we had just managed to
merge something for a start!

BR,
Jani.

>
> now:
>
> - contition ? "yes" : "no"
> + yesno(condition)
>
> a few moths later:
>
> - yesno(condition)
> + str_yes_no(condition)
>
>
> Best Regards,
> Petr

-- 
Jani Nikula, Intel Open Source Graphics Center


Re: [Intel-gfx] [PATCH 0/3] lib/string_helpers: Add a few string helpers

2022-01-20 Thread David Laight
...
> Yeah, and I am sorry for bikeshedding. Honestly, I do not know what is
> better. This is why I do not want to block this series when others
> like this.
> 
> My main motivation is to point out that:
> 
> enabledisable(enable)
> 
> might be, for some people, more eye bleeding than
> 
> enable ? "enable" : "disable"

Indeed - you need to look the former up, wasting brain time.

> The problem is not that visible with yesno() and onoff(). But as you said,
> onoff() confliscts with variable names. And enabledisable() sucks.
> As a result, there is a non-trivial risk of two mass changes:
> 
> now:
> 
> - contition ? "yes" : "no"
> + yesno(condition)
> 
> a few moths later:
> 
> - yesno(condition)
> + str_yes_no(condition)

Followed by:
- str_yes_no(x)
+ no_yes_str(x)

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, 
UK
Registration No: 1397386 (Wales)



Re: [Intel-gfx] [PATCH 2/6] drm/i915/perf: Express OA register ranges with i915_range

2022-01-20 Thread Jani Nikula
On Wed, 19 Jan 2022, Matt Roper  wrote:
> Let's use 'struct i915_range' to express sets of b-counter and mux
> registers in the perf code.  This makes the code more similar to how we
> handle things like multicast register ranges, forcewake tables, shadow
> tables, etc. and also lets us avoid needing symbolic register name
> definitions for the various range end points.  With this change, many of
> the OA register definitions are no longer used in the code, so we can
> drop their #define's for simplicity.
>
> Cc: Jani Nikula 
> Cc: Umesh Nerlige Ramappa 
> Cc: Lionel Landwerlin 
> Signed-off-by: Matt Roper 
> ---
>  drivers/gpu/drm/i915/i915_perf.c | 120 +---
>  drivers/gpu/drm/i915/i915_perf_oa_regs.h | 360 ---
>  2 files changed, 77 insertions(+), 403 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_perf.c 
> b/drivers/gpu/drm/i915/i915_perf.c
> index 41cbfb399432..385e17f167ec 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -3864,80 +3864,114 @@ static bool gen8_is_valid_flex_addr(struct i915_perf 
> *perf, u32 addr)
>   return false;
>  }
>  
> -#define ADDR_IN_RANGE(addr, start, end) \
> - ((addr) >= (start) && \
> -  (addr) <= (end))
> +static inline bool reg_in_range_table(u32 addr, const struct i915_range 
> *table) {

Nitpick, please don't add inline in .c files, mainly for two reasons.
First and foremost, just let the compiler decide what's best
here. Second, you won't get warnings for unused static inlines, say if
you refactor this later.

BR,
Jani.

> + while (table->start || table->end) {
> + if (addr >= table->start && addr <= table->end)
> + return true;
> +
> + table++;
> + }
>  
> -#define REG_IN_RANGE(addr, start, end) \
> - ((addr) >= i915_mmio_reg_offset(start) && \
> -  (addr) <= i915_mmio_reg_offset(end))
> + return false;
> +}
>  
>  #define REG_EQUAL(addr, mmio) \
>   ((addr) == i915_mmio_reg_offset(mmio))
>  
> -static bool gen7_is_valid_b_counter_addr(struct i915_perf *perf, u32 addr)
> -{
> - return REG_IN_RANGE(addr, OASTARTTRIG1, OASTARTTRIG8) ||
> -REG_IN_RANGE(addr, OAREPORTTRIG1, OAREPORTTRIG8) ||
> -REG_IN_RANGE(addr, OACEC0_0, OACEC7_1);
> -}
> +static const struct i915_range gen7_oa_b_counters[] = {
> + { .start = 0x2710, .end = 0x272c }, /* OASTARTTRIG[1-8] */
> + { .start = 0x2740, .end = 0x275c }, /* OAREPORTTRIG[1-8] */
> + { .start = 0x2770, .end = 0x27ac }, /* OACEC[0-7][0-1] */
> + {}
> +};
> +
> +static const struct i915_range gen12_oa_b_counters[] = {
> + { .start = 0x2b2c, .end = 0x2b2c }, /* GEN12_OAG_OA_PESS */
> + { .start = 0xd900, .end = 0xd91c }, /* GEN12_OAG_OASTARTTRIG[1-8] */
> + { .start = 0xd920, .end = 0xd93c }, /* GEN12_OAG_OAREPORTTRIG1[1-8] 
> */
> + { .start = 0xd940, .end = 0xd97c }, /* GEN12_OAG_CEC[0-7][0-1] */
> + { .start = 0xdc00, .end = 0xdc3c }, /* GEN12_OAG_SCEC[0-7][0-1] */
> + { .start = 0xdc40, .end = 0xdc40 }, /* GEN12_OAG_SPCTR_CNF */
> + { .start = 0xdc44, .end = 0xdc44 }, /* GEN12_OAA_DBG_REG */
> + {}
> +};
> +
> +static const struct i915_range gen7_oa_mux_regs[] = {
> + { .start = 0x91b8, .end = 0x91cc }, /* OA_PERFCNT[1-2], 
> OA_PERFMATRIX */
> + { .start = 0x9800, .end = 0x9888 }, /* MICRO_BP0_0 - NOA_WRITE */
> + { .start = 0xe180, .end = 0xe180 }, /* HALF_SLICE_CHICKEN2 */
> + {}
> +};
>  
> -static bool gen7_is_valid_mux_addr(struct i915_perf *perf, u32 addr)
> +static const struct i915_range hsw_oa_mux_regs[] = {
> + { .start = 0x09e80, .end = 0x09ea4 }, /* HSW_MBVID2_NOA[0-9] */
> + { .start = 0x09ec0, .end = 0x09ec0 }, /* HSW_MBVID2_MISR0 */
> + { .start = 0x25100, .end = 0x2ff90 },
> + {}
> +};
> +
> +static const struct i915_range chv_oa_mux_regs[] = {
> +   { .start = 0x182300, .end = 0x1823a4 },
> +   {}
> +};
> +
> +static const struct i915_range gen8_oa_mux_regs[] = {
> + { .start = 0x0d00, .end = 0x0d2c }, /* RPM_CONFIG[0-1], 
> NOA_CONFIG[0-8] */
> + { .start = 0x20cc, .end = 0x20cc }, /* WAIT_FOR_RC6_EXIT */
> + {}
> +};
> +
> +static const struct i915_range gen11_oa_mux_regs[] = {
> + { .start = 0x91c8, .end = 0x91dc }, /* OA_PERFCNT[3-4] */
> + {}
> +};
> +
> +static const struct i915_range gen12_oa_mux_regs[] = {
> + { .start = 0x0d00, .end = 0x0d2c }, /* RPM_CONFIG[0-1], 
> NOA_CONFIG[0-8] */
> + { .start = 0x9840, .end = 0x9840 }, /* GDT_CHICKEN_BITS */
> + { .start = 0x9884, .end = 0x9888 }, /* NOA_WRITE */
> + { .start = 0x20cc, .end = 0x20cc }, /* WAIT_FOR_RC6_EXIT */
> + {}
> +};
> +
> +static bool gen7_is_valid_b_counter_addr(struct i915_perf *perf, u32 addr)
>  {
> - return REG_EQUAL(addr, HALF_SLICE_CHICKEN2) ||
> -REG_IN_RANGE(addr, MICRO_BP0_0, NOA_WRITE) ||
> -

Re: [Intel-gfx] [PATCH 2/7] drm/i915/mst: abstract intel_dp_ack_sink_irq_esi()

2022-01-20 Thread Shankar, Uma


> -Original Message-
> From: Nikula, Jani 
> Sent: Thursday, January 20, 2022 4:02 PM
> To: Shankar, Uma ; intel-gfx@lists.freedesktop.org
> Subject: RE: [Intel-gfx] [PATCH 2/7] drm/i915/mst: abstract
> intel_dp_ack_sink_irq_esi()
> 
> On Thu, 20 Jan 2022, "Shankar, Uma"  wrote:
> >> -Original Message-
> >> From: Intel-gfx  On Behalf Of Jani
> Nikula
> >> Sent: Tuesday, January 4, 2022 11:10 PM
> >> To: intel-gfx@lists.freedesktop.org
> >> Cc: Nikula, Jani 
> >> Subject: [Intel-gfx] [PATCH 2/7] drm/i915/mst: abstract
> intel_dp_ack_sink_irq_esi()
> >>
> >> Smaller functions make the thing easier to read. Debug log failures to ack.
> >>
> >> Note: Looks like we have the retry loop simply because of hysterical 
> >> raisins,
> dating
> >
> > Nit: Typo in reasons.
> 
> ;)
> 
> http://www.catb.org/jargon/html/H/hysterical-reasons.html

Oh, didn't knew that . A new phrase in vocabulary 

> >
> > Reviewed-by: Uma Shankar 
> >
> >> back to the original DP MST enabling. Keep it, though I have no idea why 
> >> we have
> it.
> >>
> >> Signed-off-by: Jani Nikula 
> >> ---
> >>  drivers/gpu/drm/i915/display/intel_dp.c | 25 +++--
> >>  1 file changed, 15 insertions(+), 10 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> >> b/drivers/gpu/drm/i915/display/intel_dp.c
> >> index 357c39e09bf6..ebf80a875a41 100644
> >> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> >> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> >> @@ -2820,6 +2820,19 @@ intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp,
> u8
> >> *sink_irq_vector)
> >>DP_DPRX_ESI_LEN;
> >>  }
> >>
> >> +static bool intel_dp_ack_sink_irq_esi(struct intel_dp *intel_dp, u8
> >> +esi[4]) {
> >> +  int retry;
> >> +
> >> +  for (retry = 0; retry < 3; retry++) {
> >> +  if (drm_dp_dpcd_write(_dp->aux, DP_SINK_COUNT_ESI + 1,
> >> +[1], 3) == 3)
> >> +  return true;
> >> +  }
> >> +
> >> +  return false;
> >> +}
> >> +
> >>  bool
> >>  intel_dp_needs_vsc_sdp(const struct intel_crtc_state *crtc_state,
> >>   const struct drm_connector_state *conn_state) @@ -3660,7
> >> +3673,6 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
> >> */
> >>u8 esi[DP_DPRX_ESI_LEN+2] = {};
> >>bool handled;
> >> -  int retry;
> >>
> >>if (!intel_dp_get_sink_irq_esi(intel_dp, esi)) {
> >>drm_dbg_kms(>drm,
> >> @@ -3685,15 +3697,8 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
> >>if (!handled)
> >>break;
> >>
> >> -  for (retry = 0; retry < 3; retry++) {
> >> -  int wret;
> >> -
> >> -  wret = drm_dp_dpcd_write(_dp->aux,
> >> -   DP_SINK_COUNT_ESI+1,
> >> -   [1], 3);
> >> -  if (wret == 3)
> >> -  break;
> >> -  }
> >> +  if (!intel_dp_ack_sink_irq_esi(intel_dp, esi))
> >> +  drm_dbg_kms(>drm, "Failed to ack ESI\n");
> >>}
> >>
> >>return link_ok;
> >> --
> >> 2.30.2
> >
> 
> --
> Jani Nikula, Intel Open Source Graphics Center


Re: [Intel-gfx] [PATCH RESEND 3/7] drm/i915/mst: debug log 4 bytes of ESI right after reading

2022-01-20 Thread Shankar, Uma



> -Original Message-
> From: Intel-gfx  On Behalf Of Jani 
> Nikula
> Sent: Wednesday, January 12, 2022 4:33 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Nikula, Jani 
> Subject: [Intel-gfx] [PATCH RESEND 3/7] drm/i915/mst: debug log 4 bytes of 
> ESI right
> after reading
> 
> For whatever reason, the ESI link service irq vector was missing from the 
> debug
> output. Add the missing byte, clean up the debug message, and do the logging 
> right
> after reading the data.

Looks Good to me.
Reviewed-by: Uma Shankar 

> Signed-off-by: Jani Nikula 
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index a301220ce2ad..6de39056e2f8 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3683,6 +3683,8 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>   break;
>   }
> 
> + drm_dbg_kms(>drm, "DPRX ESI: %4ph\n", esi);
> +
>   /* check link status - esi[10] = 0x200c */
>   if (intel_dp->active_mst_links > 0 && link_ok &&
>   !drm_dp_channel_eq_ok([10], intel_dp->lane_count)) { @@ 
> -
> 3691,8 +3693,6 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>   link_ok = false;
>   }
> 
> - drm_dbg_kms(>drm, "got esi %3ph\n", esi);
> -
>   intel_dp_mst_hpd_irq(intel_dp, esi, );
> 
>   if (!handled)
> --
> 2.30.2



Re: [Intel-gfx] [PATCH RESEND 5/7] drm/i915/mst: read link status only when requested by sink in ESI

2022-01-20 Thread Shankar, Uma



> -Original Message-
> From: Intel-gfx  On Behalf Of Jani 
> Nikula
> Sent: Wednesday, January 12, 2022 4:33 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Nikula, Jani 
> Subject: [Intel-gfx] [PATCH RESEND 5/7] drm/i915/mst: read link status only 
> when
> requested by sink in ESI
> 
> The link service irq vector in DPCD 0x2005 contains the link status changed 
> bit to
> indicate the status should be checked. Only read and check the link status 
> when
> requested by the sink.
> 
> This also reduces the confusion around the buffer size for the combined ESI 
> and link
> status. Alas, we still need to take into account that all link status helpers 
> expect a
> buffer of DP_LINK_STATUS_SIZE (6) while the link status in ESI only has 4 
> bytes.

Looks Good to me.
Reviewed-by: Uma Shankar 

> Signed-off-by: Jani Nikula 
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 41 +++--
>  1 file changed, 18 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 5a7976768b06..d8a0ba3a14b7 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -73,8 +73,6 @@
>  #include "intel_vdsc.h"
>  #include "intel_vrr.h"
> 
> -#define DP_DPRX_ESI_LEN 14
> -
>  /* DP DSC throughput values used for slice count calculations KPixels/s */
>  #define DP_DSC_PEAK_PIXEL_RATE   272
>  #define DP_DSC_MAX_ENC_THROUGHPUT_0  34
> @@ -2814,11 +2812,9 @@ intel_dp_configure_mst(struct intel_dp *intel_dp)  }
> 
>  static bool
> -intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp, u8 *sink_irq_vector)
> +intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp, u8 *esi)
>  {
> - return drm_dp_dpcd_read(_dp->aux, DP_SINK_COUNT_ESI,
> - sink_irq_vector, DP_DPRX_ESI_LEN) ==
> - DP_DPRX_ESI_LEN;
> + return drm_dp_dpcd_read(_dp->aux, DP_SINK_COUNT_ESI, esi, 4) ==
> +4;
>  }
> 
>  static bool intel_dp_ack_sink_irq_esi(struct intel_dp *intel_dp, u8 esi[4]) 
> @@ -
> 3639,12 +3635,22 @@ intel_dp_mst_hpd_irq(struct intel_dp *intel_dp, u8 *esi, 
> bool
> *handled)
>   }
>  }
> 
> -static bool intel_dp_mst_link_status(struct intel_dp *intel_dp, u8 *esi)
> +static bool intel_dp_mst_link_status(struct intel_dp *intel_dp)
>  {
>   struct intel_encoder *encoder = _to_dig_port(intel_dp)->base;
>   struct drm_i915_private *i915 = to_i915(encoder->base.dev);
> + u8 link_status[DP_LINK_STATUS_SIZE] = {};
> + const size_t esi_link_status_size = DP_LINK_STATUS_SIZE - 2;
> +
> + if (drm_dp_dpcd_read(_dp->aux, DP_LANE0_1_STATUS_ESI,
> link_status,
> +  esi_link_status_size) != esi_link_status_size) {
> + drm_err(>drm,
> + "[ENCODER:%d:%s] Failed to read link status\n",
> + encoder->base.base.id, encoder->base.name);
> + return false;
> + }
> 
> - if (!drm_dp_channel_eq_ok([10], intel_dp->lane_count)) {
> + if (!drm_dp_channel_eq_ok(link_status, intel_dp->lane_count)) {
>   drm_dbg_kms(>drm,
>   "[ENCODER:%d:%s] channel EQ not ok, retraining\n",
>   encoder->base.base.id, encoder->base.name); @@ -
> 3676,18 +3682,7 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>   drm_WARN_ON_ONCE(>drm, intel_dp->active_mst_links < 0);
> 
>   for (;;) {
> - /*
> -  * The +2 is because DP_DPRX_ESI_LEN is 14, but we then
> -  * pass in "esi+10" to drm_dp_channel_eq_ok(), which
> -  * takes a 6-byte array. So we actually need 16 bytes
> -  * here.
> -  *
> -  * Somebody who knows what the limits actually are
> -  * should check this, but for now this is at least
> -  * harmless and avoids a valid compiler warning about
> -  * using more of the array than we have allocated.
> -  */
> - u8 esi[DP_DPRX_ESI_LEN+2] = {};
> + u8 esi[4] = {};
>   bool handled;
> 
>   if (!intel_dp_get_sink_irq_esi(intel_dp, esi)) { @@ -3700,9 
> +3695,9
> @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
> 
>   drm_dbg_kms(>drm, "DPRX ESI: %4ph\n", esi);
> 
> - /* check link status - esi[10] = 0x200c */
> - if (intel_dp->active_mst_links > 0 && link_ok) {
> - if (!intel_dp_mst_link_status(intel_dp, esi))
> + if (intel_dp->active_mst_links > 0 && link_ok &&
> + esi[3] & LINK_STATUS_CHANGED) {
> + if (!intel_dp_mst_link_status(intel_dp))
>   link_ok = false;
>   }
> 
> --
> 2.30.2



Re: [Intel-gfx] linux-next: build warning after merge of the drm-misc tree

2022-01-20 Thread Jani Nikula
On Thu, 20 Jan 2022, Stephen Rothwell  wrote:
> Hi all,
>
> On Fri, 15 Oct 2021 21:01:04 +1100 Stephen Rothwell  
> wrote:
>>
>> After merging the drm-misc tree, today's linux-next build (htmldocs)
>> produced this warning:
>> 
>> include/drm/drm_modeset_lock.h:74: warning: Function parameter or member 
>> 'stack_depot' not described in 'drm_modeset_acquire_ctx'
>> 
>> Introduced by commit
>> 
>>   cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks 
>> without backoff")
>
> I am still getting this warning.

Sorry about that, patch on the list [1].

Thanks,
Jani.


[1] 
https://patchwork.freedesktop.org/patch/msgid/20220120094856.3004147-1-jani.nik...@intel.com

-- 
Jani Nikula, Intel Open Source Graphics Center


Re: [Intel-gfx] [PATCH 2/7] drm/i915/mst: abstract intel_dp_ack_sink_irq_esi()

2022-01-20 Thread Shankar, Uma



> -Original Message-
> From: Intel-gfx  On Behalf Of Jani 
> Nikula
> Sent: Tuesday, January 4, 2022 11:10 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Nikula, Jani 
> Subject: [Intel-gfx] [PATCH 2/7] drm/i915/mst: abstract 
> intel_dp_ack_sink_irq_esi()
> 
> Smaller functions make the thing easier to read. Debug log failures to ack.
> 
> Note: Looks like we have the retry loop simply because of hysterical raisins, 
> dating

Nit: Typo in reasons.

Reviewed-by: Uma Shankar 

> back to the original DP MST enabling. Keep it, though I have no idea why we 
> have it.
> 
> Signed-off-by: Jani Nikula 
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 25 +++--
>  1 file changed, 15 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 357c39e09bf6..ebf80a875a41 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2820,6 +2820,19 @@ intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp, u8
> *sink_irq_vector)
>   DP_DPRX_ESI_LEN;
>  }
> 
> +static bool intel_dp_ack_sink_irq_esi(struct intel_dp *intel_dp, u8
> +esi[4]) {
> + int retry;
> +
> + for (retry = 0; retry < 3; retry++) {
> + if (drm_dp_dpcd_write(_dp->aux, DP_SINK_COUNT_ESI + 1,
> +   [1], 3) == 3)
> + return true;
> + }
> +
> + return false;
> +}
> +
>  bool
>  intel_dp_needs_vsc_sdp(const struct intel_crtc_state *crtc_state,
>  const struct drm_connector_state *conn_state) @@ -3660,7
> +3673,6 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>*/
>   u8 esi[DP_DPRX_ESI_LEN+2] = {};
>   bool handled;
> - int retry;
> 
>   if (!intel_dp_get_sink_irq_esi(intel_dp, esi)) {
>   drm_dbg_kms(>drm,
> @@ -3685,15 +3697,8 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>   if (!handled)
>   break;
> 
> - for (retry = 0; retry < 3; retry++) {
> - int wret;
> -
> - wret = drm_dp_dpcd_write(_dp->aux,
> -  DP_SINK_COUNT_ESI+1,
> -  [1], 3);
> - if (wret == 3)
> - break;
> - }
> + if (!intel_dp_ack_sink_irq_esi(intel_dp, esi))
> + drm_dbg_kms(>drm, "Failed to ack ESI\n");
>   }
> 
>   return link_ok;
> --
> 2.30.2



Re: [Intel-gfx] [PATCH 2/7] drm/i915/mst: abstract intel_dp_ack_sink_irq_esi()

2022-01-20 Thread Jani Nikula
On Thu, 20 Jan 2022, "Shankar, Uma"  wrote:
>> -Original Message-
>> From: Intel-gfx  On Behalf Of Jani 
>> Nikula
>> Sent: Tuesday, January 4, 2022 11:10 PM
>> To: intel-gfx@lists.freedesktop.org
>> Cc: Nikula, Jani 
>> Subject: [Intel-gfx] [PATCH 2/7] drm/i915/mst: abstract 
>> intel_dp_ack_sink_irq_esi()
>> 
>> Smaller functions make the thing easier to read. Debug log failures to ack.
>> 
>> Note: Looks like we have the retry loop simply because of hysterical 
>> raisins, dating
>
> Nit: Typo in reasons.

;)

http://www.catb.org/jargon/html/H/hysterical-reasons.html

>
> Reviewed-by: Uma Shankar 
>
>> back to the original DP MST enabling. Keep it, though I have no idea why we 
>> have it.
>> 
>> Signed-off-by: Jani Nikula 
>> ---
>>  drivers/gpu/drm/i915/display/intel_dp.c | 25 +++--
>>  1 file changed, 15 insertions(+), 10 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
>> b/drivers/gpu/drm/i915/display/intel_dp.c
>> index 357c39e09bf6..ebf80a875a41 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>> @@ -2820,6 +2820,19 @@ intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp, 
>> u8
>> *sink_irq_vector)
>>  DP_DPRX_ESI_LEN;
>>  }
>> 
>> +static bool intel_dp_ack_sink_irq_esi(struct intel_dp *intel_dp, u8
>> +esi[4]) {
>> +int retry;
>> +
>> +for (retry = 0; retry < 3; retry++) {
>> +if (drm_dp_dpcd_write(_dp->aux, DP_SINK_COUNT_ESI + 1,
>> +  [1], 3) == 3)
>> +return true;
>> +}
>> +
>> +return false;
>> +}
>> +
>>  bool
>>  intel_dp_needs_vsc_sdp(const struct intel_crtc_state *crtc_state,
>> const struct drm_connector_state *conn_state) @@ -3660,7
>> +3673,6 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>>   */
>>  u8 esi[DP_DPRX_ESI_LEN+2] = {};
>>  bool handled;
>> -int retry;
>> 
>>  if (!intel_dp_get_sink_irq_esi(intel_dp, esi)) {
>>  drm_dbg_kms(>drm,
>> @@ -3685,15 +3697,8 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>>  if (!handled)
>>  break;
>> 
>> -for (retry = 0; retry < 3; retry++) {
>> -int wret;
>> -
>> -wret = drm_dp_dpcd_write(_dp->aux,
>> - DP_SINK_COUNT_ESI+1,
>> - [1], 3);
>> -if (wret == 3)
>> -break;
>> -}
>> +if (!intel_dp_ack_sink_irq_esi(intel_dp, esi))
>> +drm_dbg_kms(>drm, "Failed to ack ESI\n");
>>  }
>> 
>>  return link_ok;
>> --
>> 2.30.2
>

-- 
Jani Nikula, Intel Open Source Graphics Center


Re: [Intel-gfx] [PATCH RESEND 4/7] drm/i915/mst: abstract handling of link status in DP MST

2022-01-20 Thread Shankar, Uma



> -Original Message-
> From: Intel-gfx  On Behalf Of Jani 
> Nikula
> Sent: Wednesday, January 12, 2022 4:33 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Nikula, Jani 
> Subject: [Intel-gfx] [PATCH RESEND 4/7] drm/i915/mst: abstract handling of 
> link
> status in DP MST
> 
> We'll want to expand on this, so abstract it to a separate function first. 
> Improve
> debug logging while at it.

Reviewed-by: Uma Shankar 

> Signed-off-by: Jani Nikula 
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 23 ++-
>  1 file changed, 18 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 6de39056e2f8..5a7976768b06 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3639,6 +3639,21 @@ intel_dp_mst_hpd_irq(struct intel_dp *intel_dp, u8 
> *esi,
> bool *handled)
>   }
>  }
> 
> +static bool intel_dp_mst_link_status(struct intel_dp *intel_dp, u8
> +*esi) {
> + struct intel_encoder *encoder = _to_dig_port(intel_dp)->base;
> + struct drm_i915_private *i915 = to_i915(encoder->base.dev);
> +
> + if (!drm_dp_channel_eq_ok([10], intel_dp->lane_count)) {
> + drm_dbg_kms(>drm,
> + "[ENCODER:%d:%s] channel EQ not ok, retraining\n",
> + encoder->base.base.id, encoder->base.name);
> + return false;
> + }
> +
> + return true;
> +}
> +
>  /**
>   * intel_dp_check_mst_status - service any pending MST interrupts, check 
> link status
>   * @intel_dp: Intel DP struct
> @@ -3686,11 +3701,9 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>   drm_dbg_kms(>drm, "DPRX ESI: %4ph\n", esi);
> 
>   /* check link status - esi[10] = 0x200c */
> - if (intel_dp->active_mst_links > 0 && link_ok &&
> - !drm_dp_channel_eq_ok([10], intel_dp->lane_count)) {
> - drm_dbg_kms(>drm,
> - "channel EQ not ok, retraining\n");
> - link_ok = false;
> + if (intel_dp->active_mst_links > 0 && link_ok) {
> + if (!intel_dp_mst_link_status(intel_dp, esi))
> + link_ok = false;
>   }
> 
>   intel_dp_mst_hpd_irq(intel_dp, esi, );
> --
> 2.30.2



[Intel-gfx] ✓ Fi.CI.BAT: success for drm/locking: fix drm_modeset_acquire_ctx kernel-doc

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/locking: fix drm_modeset_acquire_ctx kernel-doc
URL   : https://patchwork.freedesktop.org/series/99090/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_1 -> Patchwork_22035


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (48 -> 41)
--

  Additional (1): fi-kbl-soraka 
  Missing(8): shard-tglu bat-dg1-5 fi-icl-u2 fi-bsw-cyan fi-pnv-d510 
shard-rkl shard-dg1 fi-bdw-samus 

Possible new issues
---

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

### IGT changes ###

 Suppressed 

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

  * igt@i915_pm_rpm@module-reload:
- {bat-jsl-2}:[PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/bat-jsl-2/igt@i915_pm_...@module-reload.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22035/bat-jsl-2/igt@i915_pm_...@module-reload.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_exec_fence@basic-busy@bcs0:
- fi-kbl-soraka:  NOTRUN -> [SKIP][3] ([fdo#109271]) +8 similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22035/fi-kbl-soraka/igt@gem_exec_fence@basic-b...@bcs0.html

  * igt@gem_exec_suspend@basic-s3@smem:
- fi-tgl-1115g4:  [PASS][4] -> [FAIL][5] ([i915#1888])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/fi-tgl-1115g4/igt@gem_exec_suspend@basic...@smem.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22035/fi-tgl-1115g4/igt@gem_exec_suspend@basic...@smem.html

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

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

  * igt@i915_selftest@live:
- fi-skl-6600u:   NOTRUN -> [INCOMPLETE][8] ([i915#4794])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22035/fi-skl-6600u/igt@i915_selft...@live.html

  * igt@i915_selftest@live@execlists:
- fi-bsw-n3050:   [PASS][9] -> [INCOMPLETE][10] ([i915#2940])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/fi-bsw-n3050/igt@i915_selftest@l...@execlists.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22035/fi-bsw-n3050/igt@i915_selftest@l...@execlists.html

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

  * igt@i915_selftest@live@hangcheck:
- bat-dg1-6:  [PASS][12] -> [DMESG-FAIL][13] ([i915#4494])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/bat-dg1-6/igt@i915_selftest@l...@hangcheck.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22035/bat-dg1-6/igt@i915_selftest@l...@hangcheck.html

  * igt@kms_chamelium@dp-edid-read:
- fi-kbl-soraka:  NOTRUN -> [SKIP][14] ([fdo#109271] / [fdo#111827]) +8 
similar issues
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22035/fi-kbl-soraka/igt@kms_chamel...@dp-edid-read.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- fi-kbl-soraka:  NOTRUN -> [SKIP][15] ([fdo#109271] / [i915#533])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22035/fi-kbl-soraka/igt@kms_pipe_crc_ba...@compare-crc-sanitycheck-pipe-d.html

  * igt@prime_vgem@basic-userptr:
- fi-skl-6600u:   NOTRUN -> [SKIP][16] ([fdo#109271])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22035/fi-skl-6600u/igt@prime_v...@basic-userptr.html

  * igt@runner@aborted:
- fi-bsw-n3050:   NOTRUN -> [FAIL][17] ([fdo#109271] / [i915#1436] / 
[i915#3428] / [i915#4312])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22035/fi-bsw-n3050/igt@run...@aborted.html
- fi-bdw-5557u:   NOTRUN -> [FAIL][18] ([i915#2426] / [i915#4312])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22035/fi-bdw-5557u/igt@run...@aborted.html

  
 Possible fixes 

  * igt@gem_exec_suspend@basic-s0@smem:
- fi-tgl-1115g4:  [FAIL][19] ([i915#1888]) -> [PASS][20]
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/fi-tgl-1115g4/igt@gem_exec_suspend@basic...@smem.html
   [20]: 

Re: [Intel-gfx] [PATCH RESEND 7/7] drm/i915/mst: only ack the ESI we actually handled

2022-01-20 Thread Shankar, Uma



> -Original Message-
> From: Intel-gfx  On Behalf Of Jani 
> Nikula
> Sent: Wednesday, January 12, 2022 4:33 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Nikula, Jani 
> Subject: [Intel-gfx] [PATCH RESEND 7/7] drm/i915/mst: only ack the ESI we 
> actually
> handled
> 
> Seems odd that we clear all event status indicators if we've only handled 
> some. Only
> clear the ones we've handled.

Looks Good to me.
Reviewed-by: Uma Shankar 

> Signed-off-by: Jani Nikula 
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 20 
>  1 file changed, 12 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 95e9f7220ab8..548419a4ead8 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3625,13 +3625,17 @@ static void intel_dp_handle_test_request(struct
> intel_dp *intel_dp)  }
> 
>  static void
> -intel_dp_mst_hpd_irq(struct intel_dp *intel_dp, u8 *esi, bool *handled)
> +intel_dp_mst_hpd_irq(struct intel_dp *intel_dp, u8 *esi, u8 *ack)
>  {
> - drm_dp_mst_hpd_irq(_dp->mst_mgr, esi, handled);
> + bool handled = false;
> +
> + drm_dp_mst_hpd_irq(_dp->mst_mgr, esi, );
> + if (handled)
> + ack[1] |= DP_DOWN_REP_MSG_RDY | DP_UP_REQ_MSG_RDY;
> 
>   if (esi[1] & DP_CP_IRQ) {
>   intel_hdcp_handle_cp_irq(intel_dp->attached_connector);
> - *handled = true;
> + ack[1] |= DP_CP_IRQ;
>   }
>  }
> 
> @@ -3683,7 +3687,7 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
> 
>   for (;;) {
>   u8 esi[4] = {};
> - bool handled;
> + u8 ack[4] = {};
> 
>   if (!intel_dp_get_sink_irq_esi(intel_dp, esi)) {
>   drm_dbg_kms(>drm,
> @@ -3699,15 +3703,15 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>   esi[3] & LINK_STATUS_CHANGED) {
>   if (!intel_dp_mst_link_status(intel_dp))
>   link_ok = false;
> - handled = true;
> + ack[3] |= LINK_STATUS_CHANGED;
>   }
> 
> - intel_dp_mst_hpd_irq(intel_dp, esi, );
> + intel_dp_mst_hpd_irq(intel_dp, esi, ack);
> 
> - if (!handled)
> + if (!memchr_inv(ack, 0, sizeof(ack)))
>   break;
> 
> - if (!intel_dp_ack_sink_irq_esi(intel_dp, esi))
> + if (!intel_dp_ack_sink_irq_esi(intel_dp, ack))
>   drm_dbg_kms(>drm, "Failed to ack ESI\n");
>   }
> 
> --
> 2.30.2



Re: [Intel-gfx] [PATCH 6/6] drm/i915: Only include i915_reg.h from .c files

2022-01-20 Thread Jani Nikula
On Wed, 19 Jan 2022, Matt Roper  wrote:
> Several of our i915 header files, have been including i915_reg.h.  This
> means that any change to i915_reg.h will trigger a full rebuild of
> pretty much every file of the driver, even those that don't have any
> kind of register access.  Let's delete the i915_reg.h include from all
> headers and include an explicit include from the .c files that truly
> need the register definitions; those that need a definition of
> i915_reg_t for a function definition can get it from i915_reg_defs.h
> instead.
>
> We also remove two non-register #define's (VLV_DISPLAY_BASE and
> GEN12_SFC_DONE_MAX) into i915_reg_defs.h to allow us to drop the
> i915_reg.h include from a couple of headers.

I don't think they really belong in i915_reg_defs.h, but it should be
trivial to clean that up afterwards, so meh.

Overall on the series,

Acked-by: Jani Nikula 

I like where this is heading.

>
> There's probably a lot more header dependency optimization possible, but
> the changes here roughly cut the number of files compiled after 'touch
> i915_reg.h' in half --- a good first step.
>
> Cc: Jani Nikula 
> Signed-off-by: Matt Roper 
> ---
>  drivers/gpu/drm/i915/display/g4x_hdmi.h   | 2 +-
>  drivers/gpu/drm/i915/display/intel_atomic.c   | 1 +
>  drivers/gpu/drm/i915/display/intel_bios.c | 1 +
>  drivers/gpu/drm/i915/display/intel_bw.c   | 1 +
>  drivers/gpu/drm/i915/display/intel_crt.h  | 2 +-
>  drivers/gpu/drm/i915/display/intel_ddi.h  | 2 +-
>  drivers/gpu/drm/i915/display/intel_de.h   | 1 -
>  drivers/gpu/drm/i915/display/intel_display_power.h| 1 -
>  drivers/gpu/drm/i915/display/intel_dmc.h  | 2 +-
>  drivers/gpu/drm/i915/display/intel_dp.h   | 2 --
>  drivers/gpu/drm/i915/display/intel_dsb.h  | 2 +-
>  drivers/gpu/drm/i915/display/intel_dsi_vbt.c  | 1 +
>  drivers/gpu/drm/i915/display/intel_dvo_dev.h  | 2 +-
>  drivers/gpu/drm/i915/display/intel_hdmi.h | 2 --
>  drivers/gpu/drm/i915/display/intel_lvds.h | 2 +-
>  drivers/gpu/drm/i915/display/intel_sdvo.h | 2 +-
>  drivers/gpu/drm/i915/display/intel_tc.c   | 1 +
>  drivers/gpu/drm/i915/gem/i915_gem_stolen.c| 1 +
>  drivers/gpu/drm/i915/gem/i915_gem_tiling.c| 1 +
>  drivers/gpu/drm/i915/gt/gen2_engine_cs.c  | 1 +
>  drivers/gpu/drm/i915/gt/intel_engine.h| 1 -
>  drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c  | 1 +
>  drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c| 1 +
>  drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 1 +
>  drivers/gpu/drm/i915/gt/intel_llc.c   | 1 +
>  drivers/gpu/drm/i915/gt/intel_rc6.c   | 1 +
>  drivers/gpu/drm/i915/gt/intel_rc6.h   | 2 +-
>  drivers/gpu/drm/i915/gt/intel_region_lmem.c   | 1 +
>  drivers/gpu/drm/i915/gt/intel_workarounds_types.h | 2 +-
>  drivers/gpu/drm/i915/gt/uc/abi/guc_actions_slpc_abi.h | 1 -
>  drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h| 2 +-
>  drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c   | 1 +
>  drivers/gpu/drm/i915/gt/uc/intel_huc.h| 2 +-
>  drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c  | 1 +
>  drivers/gpu/drm/i915/gvt/aperture_gm.c| 1 +
>  drivers/gpu/drm/i915/gvt/display.c| 1 +
>  drivers/gpu/drm/i915/gvt/dmabuf.c | 1 +
>  drivers/gpu/drm/i915/gvt/edid.c   | 1 +
>  drivers/gpu/drm/i915/gvt/fb_decoder.c | 1 +
>  drivers/gpu/drm/i915/gvt/handlers.c   | 1 +
>  drivers/gpu/drm/i915/gvt/interrupt.c  | 1 +
>  drivers/gpu/drm/i915/gvt/interrupt.h  | 2 +-
>  drivers/gpu/drm/i915/gvt/mmio.c   | 1 +
>  drivers/gpu/drm/i915/gvt/mmio_context.h   | 1 -
>  drivers/gpu/drm/i915/i915_cmd_parser.c| 1 +
>  drivers/gpu/drm/i915/i915_drv.h   | 1 -
>  drivers/gpu/drm/i915/i915_pci.c   | 1 +
>  drivers/gpu/drm/i915/i915_perf_types.h| 2 +-
>  drivers/gpu/drm/i915/i915_reg.h   | 3 ---
>  drivers/gpu/drm/i915/i915_reg_defs.h  | 4 
>  drivers/gpu/drm/i915/intel_dram.c | 1 +
>  drivers/gpu/drm/i915/intel_pcode.c| 1 +
>  drivers/gpu/drm/i915/intel_pm.h   | 1 -
>  drivers/gpu/drm/i915/intel_sbi.c  | 1 +
>  drivers/gpu/drm/i915/intel_uncore.h   | 2 +-
>  drivers/gpu/drm/i915/vlv_sideband.c   | 1 +
>  56 files changed, 49 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/g4x_hdmi.h 
> b/drivers/gpu/drm/i915/display/g4x_hdmi.h
> index 7aca14b602c6..db9a93bc9321 100644
> --- a/drivers/gpu/drm/i915/display/g4x_hdmi.h
> +++ 

Re: [Intel-gfx] [PATCH 0/6] drm/i915: Extend parse_ddi_port() to all g4x+ platforms

2022-01-20 Thread Jani Nikula
On Thu, 20 Jan 2022, Ville Syrjälä  wrote:
> On Fri, Dec 17, 2021 at 05:53:57PM +0200, Ville Syrjala wrote:
>> From: Ville Syrjälä 
>> 
>> Quick attempt at unifying the VBT DDI parsing to all g4x+
>> platforms.
>> 
>> Note that we'll still use the hardware straps as the primary 
>> source of port presence information on old platforms since the
>> device type bits in VBT tend to be often a bit wrong (for DP++
>> ports at least). Hopefully the rest of the information (mainly
>> aux_ch/ddc_pin) are correct.
>> 
>> Only very slightly smoke tested on SNB so far.
>
> Smoked this a bit more on a set of ctg,ilk,snb,ivb and all seems
> good so far.
>
> Pushed to drm-intel-next with fingers and toes crossed.

Mine too! :)




-- 
Jani Nikula, Intel Open Source Graphics Center


[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/locking: fix drm_modeset_acquire_ctx kernel-doc

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/locking: fix drm_modeset_acquire_ctx kernel-doc
URL   : https://patchwork.freedesktop.org/series/99090/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.




[Intel-gfx] [PULL] drm-intel-next-fixes

2022-01-20 Thread Tvrtko Ursulin


Hi Dave and Daniel,

A couple display fixes for the merge window. One for EHL and one for ADL-P,
and both in the are of voltage swing programming.

Regards,

Tvrtko

---

drm-intel-next-fixes-2022-01-20:
- Latest updates for the EHL display voltage swing table (José Roberto de Souza)
- Additional step is required when programming the ADL-P display TC voltage 
swing (José Roberto de Souza)
The following changes since commit 6ef295e34297433c78ea02dfcf1c649a769050bb:

  drm/i915/ttm: ensure we unmap when purging (2022-01-10 14:00:47 +)

are available in the Git repository at:

  git://anongit.freedesktop.org/drm/drm-intel 
tags/drm-intel-next-fixes-2022-01-20

for you to fetch changes up to e26602be4869c74dd8a0f66f718b8a0ce120edb4:

  drm/i915/display/adlp: Implement new step in the TC voltage swing prog 
sequence (2022-01-17 10:19:41 +)


- Latest updates for the EHL display voltage swing table (José Roberto de Souza)
- Additional step is required when programming the ADL-P display TC voltage 
swing (José Roberto de Souza)


José Roberto de Souza (2):
  drm/i915/display/ehl: Update voltage swing table
  drm/i915/display/adlp: Implement new step in the TC voltage swing prog 
sequence

 drivers/gpu/drm/i915/display/intel_ddi.c   | 22 ++
 drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c | 10 +-
 drivers/gpu/drm/i915/i915_reg.h|  8 ++--
 3 files changed, 33 insertions(+), 7 deletions(-)


Re: [Intel-gfx] [PATCH 6/7] drm: Document fdinfo format specification

2022-01-20 Thread Tvrtko Ursulin



On 19/01/2022 15:08, Daniel Vetter wrote:

On Thu, Jan 06, 2022 at 04:55:35PM +, Tvrtko Ursulin wrote:

From: Tvrtko Ursulin 

Proposal to standardise the fdinfo text format as optionally output by DRM
drivers.

Idea is that a simple but, well defined, spec will enable generic
userspace tools to be written while at the same time avoiding a more heavy
handed approach of adding a mid-layer to DRM.

i915 implements a subset of the spec, everything apart from the memory
stats currently, and a matching intel_gpu_top tool exists.

Open is to see if AMD can migrate to using the proposed GPU utilisation
key-value pairs, or if they are not workable to see whether to go
vendor specific, or if a standardised  alternative can be found which is
workable for both drivers.

Same for the memory utilisation key-value pairs proposal.

v2:
  * Update for removal of name and pid.

v3:
  * 'Drm-driver' tag will be obtained from struct drm_driver.name. (Daniel)

Signed-off-by: Tvrtko Ursulin 
Cc: David M Nieto 
Cc: Christian König 
Cc: Daniel Vetter 
Cc: Daniel Stone 
Cc: Chris Healy 
Acked-by: Christian König 


I'm assuming this ack here and later on is a "amdgpu plans to use this
too" kind of affair. Especially also in the lights of eventually using
matching semantics for cgroups and everything else tied to gpu execution
resource management.

If not I'm mildly worried that we're creating fake-standard stuff here
which cannot actually be used by anything resembling driver-agnostic
userspace.


Hard to say how much adoption there would be.

At least on the statement of that the proposed spec cannot be used for 
driver agnostic userspace, do you have concrete concerns with the spec I 
proposed, or are just going by the lack of continuous engagement by any 
third party?


Apart from AMD, during past postings Daniel Stone also had positive 
feedback (along the lines of "works the driver I am familiar with"). I 
don't know if I have missed someone else who provided feedback, hope not.


There is of course the option of dropping the idea of trying to document 
a common spec, or to do anything cross-driver at this point. AFAIR it 
was your push to try this, and I agreed it would be a good thing if it 
worked out. But given AMD already exposes stuff in fdinfo, I don't think 
it would be a blocker for merging the i915 side even if we decided to 
drop the standardisation effort for now. Given I am maintaining this 
i915 code from ~2018 and there is a lot of interest from users it would 
be good to put it in.


Regards,

Tvrtko


[Intel-gfx] [PATCH v2] drm/i915/mst: only ack the ESI we actually handled

2022-01-20 Thread Jani Nikula
Seems odd that we clear all event status indicators if we've only
handled some. Only clear the ones we've handled.

v2: ack DOWN_REP and UP_REQ only if they were set in esi (Ville)

Signed-off-by: Jani Nikula 
---
 drivers/gpu/drm/i915/display/intel_dp.c | 20 
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index 0960e6e3be77..cb726cee9e1d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3625,13 +3625,17 @@ static void intel_dp_handle_test_request(struct 
intel_dp *intel_dp)
 }
 
 static void
-intel_dp_mst_hpd_irq(struct intel_dp *intel_dp, u8 *esi, bool *handled)
+intel_dp_mst_hpd_irq(struct intel_dp *intel_dp, u8 *esi, u8 *ack)
 {
-   drm_dp_mst_hpd_irq(_dp->mst_mgr, esi, handled);
+   bool handled = false;
+
+   drm_dp_mst_hpd_irq(_dp->mst_mgr, esi, );
+   if (handled)
+   ack[1] |= esi[1] & (DP_DOWN_REP_MSG_RDY | DP_UP_REQ_MSG_RDY);
 
if (esi[1] & DP_CP_IRQ) {
intel_hdcp_handle_cp_irq(intel_dp->attached_connector);
-   *handled = true;
+   ack[1] |= DP_CP_IRQ;
}
 }
 
@@ -3683,7 +3687,7 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
 
for (;;) {
u8 esi[4] = {};
-   bool handled;
+   u8 ack[4] = {};
 
if (!intel_dp_get_sink_irq_esi(intel_dp, esi)) {
drm_dbg_kms(>drm,
@@ -3699,15 +3703,15 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
esi[3] & LINK_STATUS_CHANGED) {
if (!intel_dp_mst_link_status(intel_dp))
link_ok = false;
-   handled = true;
+   ack[3] |= LINK_STATUS_CHANGED;
}
 
-   intel_dp_mst_hpd_irq(intel_dp, esi, );
+   intel_dp_mst_hpd_irq(intel_dp, esi, ack);
 
-   if (!handled)
+   if (!memchr_inv(ack, 0, sizeof(ack)))
break;
 
-   if (!intel_dp_ack_sink_irq_esi(intel_dp, esi))
+   if (!intel_dp_ack_sink_irq_esi(intel_dp, ack))
drm_dbg_kms(>drm, "Failed to ack ESI\n");
}
 
-- 
2.30.2



Re: [Intel-gfx] [PATCH 2/2] drm/i915/uncore: rename i915_reg_read_ioctl intel_uncore_reg_read_ioctl

2022-01-20 Thread Tvrtko Ursulin



On 19/01/2022 11:12, Jani Nikula wrote:

On Wed, 05 Jan 2022, Tvrtko Ursulin  wrote:

On 05/01/2022 13:18, Jani Nikula wrote:

On Wed, 05 Jan 2022, Tvrtko Ursulin  wrote:

On 05/01/2022 10:32, Jani Nikula wrote:

On Wed, 05 Jan 2022, Tvrtko Ursulin  wrote:

On 05/01/2022 10:05, Jani Nikula wrote:

Follow the usual naming convention.


But intel_uncore_ prefix usually means functions takes intel_uncore as
the first argument.

Maybe solution here is that i915_reg_read_ioctl does not belong in
intel_uncore.c, it being the UAPI layer thing? I guess arguments could
be made for either way.


My position is that the function and file prefixes go hand in
hand. You'll always know where to place a function, and you'll always
know where the function is to be found.

If you can *also* make the context argument follow the pattern, it's
obviously better, and indicates the division to files is working out
nicely. However, in a lot of cases you'll need to pass struct
drm_i915_private or similar as the first parameter to e.g. init
functions. It can't be the rigid rule.

I'm fine with moving the entire function somewhere else, as long as the
declaration is not in i915_drv.h. There's no longer a i915_drv.c, and
i915_drv.h should not have function declarations at all.


Yes I agree it cannot be a rigid rule. I just that it feels
intel_uncore.[hc] is too low level to me to hold an ioctl
implementation, and header actually feels wrong to have the declaration.
Not least it is about _one_ of the uncores, while the ioctl is not
operating on that level, albeit undefined at the moment how exactly it
would work for multi-tile.

Would it be too early, or unwarranted at this point, to maybe consider
adding i915_ioctls.[hc]?


Then the conversation would be about putting together a ton of unrelated
functions where the only thing in common is that they're an ioctl
implementation. Arguably many of them would have less in common than the
reg read ioctl has with uncore!


I imagined it as a place for ioctls which don't fit anywhere else, like
it this case it is not a family of ioctls but and odd one out. So yes,
first "problem" would be there is only one to put there and no line of
sight for others.


And when is it okay to put an ioctl in the i915_ioctls.c file and when
is it warranted to put it somewhere else? It's just a different set of
problems.


When it does not fit anywhere else?


I like the i915_ prefix of ioctls for consistency.. i915_getparam_ioctl,
i915_query_ioctl, i915_perf_..., i915_gem_


The display ioctls have intel_ prefix anyway. It's the _ioctl suffix
that we use.

Again, my main driver here is cleaning up i915_drv.h. I can shove the
reg read ioctl somewhere other than intel_uncore.[ch] too. But as it
stands, the only alternative that seems better than intel_uncore.[ch] at
the moment is adding a dedicated file for a 60-line function.


I understand your motivation and I wouldn't nack your efforts, but I
also cannot yet make myself ack it. Is 60 lines so bad? Lets see..

$ find . -name "*.c" -print0 | xargs -0 wc -l | sort -nr
...
   59 ./selftests/mock_request.c
   59 ./gt/uc/intel_uc_debugfs.c
   59 ./gem/i915_gemfs.c
   52 ./selftests/igt_mmap.c
   51 ./selftests/igt_reset.c
   49 ./selftests/mock_uncore.c
   47 ./selftests/igt_atomic.c
   36 ./gt/uc/intel_huc_debugfs.c
   36 ./gt/intel_gt_engines_debugfs.c
   35 ./selftests/igt_flush_test.c
   34 ./selftests/librapl.c
   34 ./gvt/trace_points.c
   29 ./gt/selftests/mock_timeline.c
   27 ./gt/selftest_engine.c
   26 ./gt/uc/intel_huc_fw.c
   15 ./i915_config.c
   14 ./i915_trace_points.c
9 ./display/intel_display_trace.c

So kind of meh, wouldn't be first. I'd add a dedicated file just for the
benefit of being able to legitimately keep the i915_reg_read_ioctl name.
Come multi-tile it may get company. Even though at the moment I am not
aware anyone is trying to add multi-tile aware reg read, but I expect
there will be need as long as need for the existing one exists.


So this got stalled a bit, and sidestepped from the main goal of just
cleaning up i915_drv.h from the clutter that absolutely does not belong
there.

Can we just merge patch 1, leave further cleanup to follow-up, and move
on?


Sorry but I don't think the ioctl belongs in gt/intel_uncore.h either so 
I can't make myself ack it. But I am not nacking it either, as said 
before, if you find someone else to support it.


I would add i915_ioctls.[ch] even if they hold just this one.

Regards,

Tvrtko


Re: [Intel-gfx] [PATCH RESEND 6/7] drm/i915/mst: ack sink irq ESI for link status changes

2022-01-20 Thread Shankar, Uma



> -Original Message-
> From: Intel-gfx  On Behalf Of Jani 
> Nikula
> Sent: Wednesday, January 12, 2022 4:33 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Nikula, Jani 
> Subject: [Intel-gfx] [PATCH RESEND 6/7] drm/i915/mst: ack sink irq ESI for 
> link status
> changes
> 
> Only specific event status indicators caused the link status to be acked. Be 
> sure to
> ack the link status change event.
> 
> Arguably we should track which bits to actually clear in ESI instead of the 
> wholesale
> approach.

Reviewed-by: Uma Shankar 

> Signed-off-by: Jani Nikula 
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index d8a0ba3a14b7..95e9f7220ab8 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3699,6 +3699,7 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>   esi[3] & LINK_STATUS_CHANGED) {
>   if (!intel_dp_mst_link_status(intel_dp))
>   link_ok = false;
> + handled = true;
>   }
> 
>   intel_dp_mst_hpd_irq(intel_dp, esi, );
> --
> 2.30.2



[Intel-gfx] ✗ Fi.CI.IGT: failure for Second round of i915_reg.h splitting

2022-01-20 Thread Patchwork
== Series Details ==

Series: Second round of i915_reg.h splitting
URL   : https://patchwork.freedesktop.org/series/99079/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_1_full -> Patchwork_22034_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_22034_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_22034_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (10 -> 10)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@gem_ppgtt@blt-vs-render-ctx0:
- shard-tglb: [PASS][1] -> [DMESG-FAIL][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/shard-tglb7/igt@gem_pp...@blt-vs-render-ctx0.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22034/shard-tglb7/igt@gem_pp...@blt-vs-render-ctx0.html

  * igt@gem_userptr_blits@huge-split:
- shard-apl:  [PASS][3] -> [FAIL][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/shard-apl4/igt@gem_userptr_bl...@huge-split.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22034/shard-apl8/igt@gem_userptr_bl...@huge-split.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_create@create-massive:
- shard-tglb: NOTRUN -> [DMESG-WARN][5] ([i915#3002] / [i915#4856])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22034/shard-tglb2/igt@gem_cre...@create-massive.html
- shard-skl:  NOTRUN -> [DMESG-WARN][6] ([i915#3002])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22034/shard-skl3/igt@gem_cre...@create-massive.html

  * igt@gem_ctx_isolation@preservation-s3@rcs0:
- shard-kbl:  [PASS][7] -> [DMESG-WARN][8] ([i915#180]) +1 similar 
issue
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/shard-kbl6/igt@gem_ctx_isolation@preservation...@rcs0.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22034/shard-kbl4/igt@gem_ctx_isolation@preservation...@rcs0.html

  * igt@gem_ctx_persistence@engines-hang:
- shard-snb:  NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#1099])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22034/shard-snb2/igt@gem_ctx_persiste...@engines-hang.html

  * igt@gem_eio@kms:
- shard-tglb: [PASS][10] -> [FAIL][11] ([i915#232])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/shard-tglb6/igt@gem_...@kms.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22034/shard-tglb5/igt@gem_...@kms.html

  * igt@gem_exec_balancer@parallel:
- shard-iclb: [PASS][12] -> [SKIP][13] ([i915#4525])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/shard-iclb1/igt@gem_exec_balan...@parallel.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22034/shard-iclb3/igt@gem_exec_balan...@parallel.html

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

  * igt@gem_exec_fair@basic-pace@vcs1:
- shard-iclb: NOTRUN -> [FAIL][15] ([i915#2842]) +1 similar issue
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22034/shard-iclb1/igt@gem_exec_fair@basic-p...@vcs1.html

  * igt@gem_exec_params@no-vebox:
- shard-skl:  NOTRUN -> [SKIP][16] ([fdo#109271]) +207 similar 
issues
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22034/shard-skl1/igt@gem_exec_par...@no-vebox.html

  * igt@gem_exec_params@secure-non-root:
- shard-iclb: NOTRUN -> [SKIP][17] ([fdo#112283])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22034/shard-iclb6/igt@gem_exec_par...@secure-non-root.html

  * igt@gem_lmem_swapping@heavy-random:
- shard-kbl:  NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#4613])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22034/shard-kbl6/igt@gem_lmem_swapp...@heavy-random.html

  * igt@gem_lmem_swapping@heavy-verify-multi:
- shard-skl:  NOTRUN -> [SKIP][19] ([fdo#109271] / [i915#4613]) +1 
similar issue
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22034/shard-skl4/igt@gem_lmem_swapp...@heavy-verify-multi.html

  * igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-glk:  [PASS][20] -> [FAIL][21] ([i915#644])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/shard-glk5/igt@gem_pp...@flink-and-close-vma-leak.html
  

[Intel-gfx] [PATCH] drm/locking: fix drm_modeset_acquire_ctx kernel-doc

2022-01-20 Thread Jani Nikula
The stack_depot member was added without kernel-doc, leading to below
warning. Fix it.

./include/drm/drm_modeset_lock.h:74: warning: Function parameter or
member 'stack_depot' not described in 'drm_modeset_acquire_ctx'

Reported-by: Stephen Rothwell 
Fixes: cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks 
without backoff")
Signed-off-by: Jani Nikula 
---
 include/drm/drm_modeset_lock.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/drm/drm_modeset_lock.h b/include/drm/drm_modeset_lock.h
index b84693fbd2b5..ec4f543c3d95 100644
--- a/include/drm/drm_modeset_lock.h
+++ b/include/drm/drm_modeset_lock.h
@@ -34,6 +34,7 @@ struct drm_modeset_lock;
  * struct drm_modeset_acquire_ctx - locking context (see ww_acquire_ctx)
  * @ww_ctx: base acquire ctx
  * @contended: used internally for -EDEADLK handling
+ * @stack_depot: used internally for contention debugging
  * @locked: list of held locks
  * @trylock_only: trylock mode used in atomic contexts/panic notifiers
  * @interruptible: whether interruptible locking should be used.
-- 
2.30.2



Re: [Intel-gfx] [PATCH] drm/i915: Fix vma resource freeing

2022-01-20 Thread Matthew Auld

On 19/01/2022 17:47, Thomas Hellström wrote:

In some cases we use leftover kfree() instead of i915_vma_resource_free().
Fix this.

Fixes: Fixes: 2f6b90da9192 ("drm/i915: Use vma resources for async unbinding")
Reported-by: Robert Beckett 
Cc: Matthew Auld 
Signed-off-by: Thomas Hellström 

Reviewed-by: Matthew Auld 


Re: [Intel-gfx] [PATCH 1/7] drm/i915/mst: fix intel_dp_mst_hpd_irq() indentation

2022-01-20 Thread Shankar, Uma



> -Original Message-
> From: Intel-gfx  On Behalf Of Jani 
> Nikula
> Sent: Tuesday, January 4, 2022 11:10 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Nikula, Jani 
> Subject: [Intel-gfx] [PATCH 1/7] drm/i915/mst: fix intel_dp_mst_hpd_irq()
> indentation
> 
> Remove extra indentation.

Reviewed-by: Uma Shankar 

> Signed-off-by: Jani Nikula 
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index d6d8c9922feb..357c39e09bf6 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3617,12 +3617,12 @@ static void intel_dp_handle_test_request(struct
> intel_dp *intel_dp)  static void  intel_dp_mst_hpd_irq(struct intel_dp 
> *intel_dp, u8
> *esi, bool *handled)  {
> - drm_dp_mst_hpd_irq(_dp->mst_mgr, esi, handled);
> + drm_dp_mst_hpd_irq(_dp->mst_mgr, esi, handled);
> 
> - if (esi[1] & DP_CP_IRQ) {
> - intel_hdcp_handle_cp_irq(intel_dp->attached_connector);
> - *handled = true;
> - }
> + if (esi[1] & DP_CP_IRQ) {
> + intel_hdcp_handle_cp_irq(intel_dp->attached_connector);
> + *handled = true;
> + }
>  }
> 
>  /**
> --
> 2.30.2



Re: [Intel-gfx] [PATCH 5/6] drm/i915: Move GT registers to their own header file

2022-01-20 Thread kernel test robot
Hi Matt,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next v5.16 next-20220120]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Matt-Roper/Second-round-of-i915_reg-h-splitting/20220120-144038
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: x86_64-allmodconfig 
(https://download.01.org/0day-ci/archive/20220120/202201201838.yquqtmji-...@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
f7b7138a62648f4019c55e4671682af1f851f295)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/d7a6d230bd959372cab764baec5407256725e48b
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Matt-Roper/Second-round-of-i915_reg-h-splitting/20220120-144038
git checkout d7a6d230bd959372cab764baec5407256725e48b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 
O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/i915/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/i915/pxp/intel_pxp_irq.c:51:29: error: use of undeclared 
>> identifier 'GEN11_CRYPTO_RSVD_INTR_ENABLE'
   intel_uncore_write(uncore, GEN11_CRYPTO_RSVD_INTR_ENABLE, mask);
  ^
>> drivers/gpu/drm/i915/pxp/intel_pxp_irq.c:52:29: error: use of undeclared 
>> identifier 'GEN11_CRYPTO_RSVD_INTR_MASK'
   intel_uncore_write(uncore, GEN11_CRYPTO_RSVD_INTR_MASK,  ~mask);
  ^
>> drivers/gpu/drm/i915/pxp/intel_pxp_irq.c:58:32: error: use of undeclared 
>> identifier 'GEN11_KCR'
   gen11_gt_reset_one_iir(gt, 0, GEN11_KCR);
 ^
   drivers/gpu/drm/i915/pxp/intel_pxp_irq.c:69:46: error: use of undeclared 
identifier 'GEN11_KCR'
   WARN_ON_ONCE(gen11_gt_reset_one_iir(gt, 0, GEN11_KCR));
  ^
   4 errors generated.


vim +/GEN11_CRYPTO_RSVD_INTR_ENABLE +51 drivers/gpu/drm/i915/pxp/intel_pxp_irq.c

2ae096872a2c61 Huang, Sean Z 2021-09-24  45  
2ae096872a2c61 Huang, Sean Z 2021-09-24  46  static inline void 
__pxp_set_interrupts(struct intel_gt *gt, u32 interrupts)
2ae096872a2c61 Huang, Sean Z 2021-09-24  47  {
2ae096872a2c61 Huang, Sean Z 2021-09-24  48 struct intel_uncore *uncore = 
gt->uncore;
2ae096872a2c61 Huang, Sean Z 2021-09-24  49 const u32 mask = interrupts << 
16;
2ae096872a2c61 Huang, Sean Z 2021-09-24  50  
2ae096872a2c61 Huang, Sean Z 2021-09-24 @51 intel_uncore_write(uncore, 
GEN11_CRYPTO_RSVD_INTR_ENABLE, mask);
2ae096872a2c61 Huang, Sean Z 2021-09-24 @52 intel_uncore_write(uncore, 
GEN11_CRYPTO_RSVD_INTR_MASK,  ~mask);
2ae096872a2c61 Huang, Sean Z 2021-09-24  53  }
2ae096872a2c61 Huang, Sean Z 2021-09-24  54  
2ae096872a2c61 Huang, Sean Z 2021-09-24  55  static inline void 
pxp_irq_reset(struct intel_gt *gt)
2ae096872a2c61 Huang, Sean Z 2021-09-24  56  {
2ae096872a2c61 Huang, Sean Z 2021-09-24  57 spin_lock_irq(>irq_lock);
2ae096872a2c61 Huang, Sean Z 2021-09-24 @58 gen11_gt_reset_one_iir(gt, 0, 
GEN11_KCR);
2ae096872a2c61 Huang, Sean Z 2021-09-24  59 spin_unlock_irq(>irq_lock);
2ae096872a2c61 Huang, Sean Z 2021-09-24  60  }
2ae096872a2c61 Huang, Sean Z 2021-09-24  61  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/mst: DP MST ESI handling improvements (rev2)

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915/mst: DP MST ESI handling improvements (rev2)
URL   : https://patchwork.freedesktop.org/series/98479/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_1 -> Patchwork_22036


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (48 -> 42)
--

  Additional (1): fi-kbl-soraka 
  Missing(7): fi-rkl-11600 shard-tglu fi-bsw-cyan fi-icl-u2 shard-rkl 
shard-dg1 fi-bdw-samus 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_cs_nop@sync-fork-compute0:
- fi-snb-2600:NOTRUN -> [SKIP][1] ([fdo#109271]) +17 similar issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22036/fi-snb-2600/igt@amdgpu/amd_cs_...@sync-fork-compute0.html

  * igt@gem_exec_fence@basic-busy@bcs0:
- fi-kbl-soraka:  NOTRUN -> [SKIP][2] ([fdo#109271]) +8 similar issues
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22036/fi-kbl-soraka/igt@gem_exec_fence@basic-b...@bcs0.html

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

  * igt@gem_lmem_swapping@parallel-random-engines:
- fi-kbl-soraka:  NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#4613]) +3 
similar issues
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22036/fi-kbl-soraka/igt@gem_lmem_swapp...@parallel-random-engines.html

  * igt@i915_selftest@live:
- fi-skl-6600u:   NOTRUN -> [INCOMPLETE][5] ([i915#4794])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22036/fi-skl-6600u/igt@i915_selft...@live.html

  * igt@i915_selftest@live@execlists:
- fi-bsw-nick:[PASS][6] -> [INCOMPLETE][7] ([i915#2940])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/fi-bsw-nick/igt@i915_selftest@l...@execlists.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22036/fi-bsw-nick/igt@i915_selftest@l...@execlists.html

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

  * igt@i915_selftest@live@hangcheck:
- bat-dg1-5:  [PASS][9] -> [DMESG-FAIL][10] ([i915#4494])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/bat-dg1-5/igt@i915_selftest@l...@hangcheck.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22036/bat-dg1-5/igt@i915_selftest@l...@hangcheck.html

  * igt@kms_chamelium@dp-edid-read:
- fi-kbl-soraka:  NOTRUN -> [SKIP][11] ([fdo#109271] / [fdo#111827]) +8 
similar issues
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22036/fi-kbl-soraka/igt@kms_chamel...@dp-edid-read.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- fi-kbl-soraka:  NOTRUN -> [SKIP][12] ([fdo#109271] / [i915#533])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22036/fi-kbl-soraka/igt@kms_pipe_crc_ba...@compare-crc-sanitycheck-pipe-d.html

  * igt@prime_vgem@basic-userptr:
- fi-skl-6600u:   NOTRUN -> [SKIP][13] ([fdo#109271])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22036/fi-skl-6600u/igt@prime_v...@basic-userptr.html

  * igt@runner@aborted:
- fi-bsw-nick:NOTRUN -> [FAIL][14] ([fdo#109271] / [i915#1436] / 
[i915#2722] / [i915#3428] / [i915#4312])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22036/fi-bsw-nick/igt@run...@aborted.html

  
 Possible fixes 

  * igt@i915_selftest@live@hangcheck:
- fi-snb-2600:[INCOMPLETE][15] ([i915#3921]) -> [PASS][16]
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/fi-snb-2600/igt@i915_selftest@l...@hangcheck.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22036/fi-snb-2600/igt@i915_selftest@l...@hangcheck.html

  * igt@kms_frontbuffer_tracking@basic:
- fi-cml-u2:  [DMESG-WARN][17] ([i915#4269]) -> [PASS][18]
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/fi-cml-u2/igt@kms_frontbuffer_track...@basic.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22036/fi-cml-u2/igt@kms_frontbuffer_track...@basic.html

  * igt@kms_psr@primary_page_flip:
- fi-skl-6600u:   [FAIL][19] ([i915#4547]) -> [PASS][20]
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/fi-skl-6600u/igt@kms_psr@primary_page_flip.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22036/fi-skl-6600u/igt@kms_psr@primary_page_flip.html

  
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#111827]: 

Re: [Intel-gfx] [PATCH RESEND 2/7] drm/i915/mst: abstract intel_dp_ack_sink_irq_esi()

2022-01-20 Thread Shankar, Uma



> -Original Message-
> From: Intel-gfx  On Behalf Of Jani 
> Nikula
> Sent: Wednesday, January 12, 2022 4:33 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Nikula, Jani 
> Subject: [Intel-gfx] [PATCH RESEND 2/7] drm/i915/mst: abstract
> intel_dp_ack_sink_irq_esi()
> 
> Smaller functions make the thing easier to read. Debug log failures to ack.
> 
> Note: Looks like we have the retry loop simply because of hysterical raisins, 
> dating
> back to the original DP MST enabling. Keep it, though I have no idea why we 
> have it.

Reviewed-by: Uma Shankar 

> Signed-off-by: Jani Nikula 
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 25 +++--
>  1 file changed, 15 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index e789ecbc69f3..a301220ce2ad 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2821,6 +2821,19 @@ intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp, u8
> *sink_irq_vector)
>   DP_DPRX_ESI_LEN;
>  }
> 
> +static bool intel_dp_ack_sink_irq_esi(struct intel_dp *intel_dp, u8
> +esi[4]) {
> + int retry;
> +
> + for (retry = 0; retry < 3; retry++) {
> + if (drm_dp_dpcd_write(_dp->aux, DP_SINK_COUNT_ESI + 1,
> +   [1], 3) == 3)
> + return true;
> + }
> +
> + return false;
> +}
> +
>  bool
>  intel_dp_needs_vsc_sdp(const struct intel_crtc_state *crtc_state,
>  const struct drm_connector_state *conn_state) @@ -3661,7
> +3674,6 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>*/
>   u8 esi[DP_DPRX_ESI_LEN+2] = {};
>   bool handled;
> - int retry;
> 
>   if (!intel_dp_get_sink_irq_esi(intel_dp, esi)) {
>   drm_dbg_kms(>drm,
> @@ -3686,15 +3698,8 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>   if (!handled)
>   break;
> 
> - for (retry = 0; retry < 3; retry++) {
> - int wret;
> -
> - wret = drm_dp_dpcd_write(_dp->aux,
> -  DP_SINK_COUNT_ESI+1,
> -  [1], 3);
> - if (wret == 3)
> - break;
> - }
> + if (!intel_dp_ack_sink_irq_esi(intel_dp, esi))
> + drm_dbg_kms(>drm, "Failed to ack ESI\n");
>   }
> 
>   return link_ok;
> --
> 2.30.2



Re: [Intel-gfx] [PATCH RESEND 1/7] drm/i915/mst: fix intel_dp_mst_hpd_irq() indentation

2022-01-20 Thread Shankar, Uma



> -Original Message-
> From: Intel-gfx  On Behalf Of Jani 
> Nikula
> Sent: Wednesday, January 12, 2022 4:33 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Nikula, Jani 
> Subject: [Intel-gfx] [PATCH RESEND 1/7] drm/i915/mst: fix 
> intel_dp_mst_hpd_irq()
> indentation
> 
> Remove extra indentation.

Reviewed-by: Uma Shankar 

> Signed-off-by: Jani Nikula 
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 942a755a0c48..e789ecbc69f3 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3618,12 +3618,12 @@ static void intel_dp_handle_test_request(struct
> intel_dp *intel_dp)  static void  intel_dp_mst_hpd_irq(struct intel_dp 
> *intel_dp, u8
> *esi, bool *handled)  {
> - drm_dp_mst_hpd_irq(_dp->mst_mgr, esi, handled);
> + drm_dp_mst_hpd_irq(_dp->mst_mgr, esi, handled);
> 
> - if (esi[1] & DP_CP_IRQ) {
> - intel_hdcp_handle_cp_irq(intel_dp->attached_connector);
> - *handled = true;
> - }
> + if (esi[1] & DP_CP_IRQ) {
> + intel_hdcp_handle_cp_irq(intel_dp->attached_connector);
> + *handled = true;
> + }
>  }
> 
>  /**
> --
> 2.30.2



Re: [Intel-gfx] [PATCH] drm/locking: fix drm_modeset_acquire_ctx kernel-doc

2022-01-20 Thread Jani Nikula
On Thu, 20 Jan 2022, Daniel Vetter  wrote:
> On Thu, Jan 20, 2022 at 10:49 AM Jani Nikula  wrote:
>>
>> The stack_depot member was added without kernel-doc, leading to below
>> warning. Fix it.
>>
>> ./include/drm/drm_modeset_lock.h:74: warning: Function parameter or
>> member 'stack_depot' not described in 'drm_modeset_acquire_ctx'
>>
>> Reported-by: Stephen Rothwell 
>> Fixes: cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks 
>> without backoff")
>> Signed-off-by: Jani Nikula 
>> ---
>>  include/drm/drm_modeset_lock.h | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/include/drm/drm_modeset_lock.h b/include/drm/drm_modeset_lock.h
>> index b84693fbd2b5..ec4f543c3d95 100644
>> --- a/include/drm/drm_modeset_lock.h
>> +++ b/include/drm/drm_modeset_lock.h
>> @@ -34,6 +34,7 @@ struct drm_modeset_lock;
>>   * struct drm_modeset_acquire_ctx - locking context (see ww_acquire_ctx)
>>   * @ww_ctx: base acquire ctx
>>   * @contended: used internally for -EDEADLK handling
>> + * @stack_depot: used internally for contention debugging
>
> Uh would be nice to switch to the inline style, since we already have
> inline comments (just not kerneldoc). Either way:

Considered that, but looks like it's been intentionally split to
kernel-doc documentation and internal comments, and just wanted to get
this quick fix out of the way.

>
> Reviewed-by: Daniel Vetter 

Thanks!

>
>
>>   * @locked: list of held locks
>>   * @trylock_only: trylock mode used in atomic contexts/panic notifiers
>>   * @interruptible: whether interruptible locking should be used.
>> --
>> 2.30.2
>>

-- 
Jani Nikula, Intel Open Source Graphics Center


[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: split out i915_reg_read_ioctl() to i915_ioctl.[ch]

2022-01-20 Thread Patchwork
== Series Details ==

Series: drm/i915: split out i915_reg_read_ioctl() to i915_ioctl.[ch]
URL   : https://patchwork.freedesktop.org/series/99096/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_1 -> Patchwork_22039


Summary
---

  **FAILURE**

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

Participating hosts (48 -> 43)
--

  Additional (2): fi-kbl-soraka bat-adlp-4 
  Missing(7): shard-tglu fi-bsw-cyan fi-icl-u2 fi-pnv-d510 shard-rkl 
shard-dg1 fi-bdw-samus 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@kms_addfb_basic@addfb25-framebuffer-vs-set-tiling:
- bat-adlp-4: NOTRUN -> [DMESG-WARN][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22039/bat-adlp-4/igt@kms_addfb_ba...@addfb25-framebuffer-vs-set-tiling.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_exec_fence@basic-busy@bcs0:
- fi-kbl-soraka:  NOTRUN -> [SKIP][2] ([fdo#109271]) +8 similar issues
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22039/fi-kbl-soraka/igt@gem_exec_fence@basic-b...@bcs0.html

  * igt@gem_exec_suspend@basic-s3@smem:
- fi-skl-6600u:   [PASS][3] -> [INCOMPLETE][4] ([i915#4547])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/fi-skl-6600u/igt@gem_exec_suspend@basic...@smem.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22039/fi-skl-6600u/igt@gem_exec_suspend@basic...@smem.html
- fi-tgl-1115g4:  [PASS][5] -> [FAIL][6] ([i915#1888])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/fi-tgl-1115g4/igt@gem_exec_suspend@basic...@smem.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22039/fi-tgl-1115g4/igt@gem_exec_suspend@basic...@smem.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_22039/fi-kbl-soraka/igt@gem_huc_c...@huc-copy.html

  * igt@gem_lmem_swapping@basic:
- bat-adlp-4: NOTRUN -> [SKIP][8] ([i915#4613]) +3 similar issues
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22039/bat-adlp-4/igt@gem_lmem_swapp...@basic.html

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

  * igt@gem_tiled_pread_basic:
- bat-adlp-4: NOTRUN -> [SKIP][10] ([i915#3282])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22039/bat-adlp-4/igt@gem_tiled_pread_basic.html

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

  * igt@i915_selftest@live@hangcheck:
- bat-dg1-6:  [PASS][12] -> [DMESG-FAIL][13] ([i915#4494])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/bat-dg1-6/igt@i915_selftest@l...@hangcheck.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22039/bat-dg1-6/igt@i915_selftest@l...@hangcheck.html
- fi-ivb-3770:[PASS][14] -> [INCOMPLETE][15] ([i915#3303])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/fi-ivb-3770/igt@i915_selftest@l...@hangcheck.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22039/fi-ivb-3770/igt@i915_selftest@l...@hangcheck.html
- bat-dg1-5:  [PASS][16] -> [DMESG-FAIL][17] ([i915#4494])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1/bat-dg1-5/igt@i915_selftest@l...@hangcheck.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22039/bat-dg1-5/igt@i915_selftest@l...@hangcheck.html

  * igt@kms_chamelium@dp-edid-read:
- fi-kbl-soraka:  NOTRUN -> [SKIP][18] ([fdo#109271] / [fdo#111827]) +8 
similar issues
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22039/fi-kbl-soraka/igt@kms_chamel...@dp-edid-read.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- fi-kbl-soraka:  NOTRUN -> [SKIP][19] ([fdo#109271] / [i915#533])
   [19]: 

Re: [Intel-gfx] [PATCH] drm/locking: fix drm_modeset_acquire_ctx kernel-doc

2022-01-20 Thread Daniel Vetter
On Thu, Jan 20, 2022 at 10:49 AM Jani Nikula  wrote:
>
> The stack_depot member was added without kernel-doc, leading to below
> warning. Fix it.
>
> ./include/drm/drm_modeset_lock.h:74: warning: Function parameter or
> member 'stack_depot' not described in 'drm_modeset_acquire_ctx'
>
> Reported-by: Stephen Rothwell 
> Fixes: cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks 
> without backoff")
> Signed-off-by: Jani Nikula 
> ---
>  include/drm/drm_modeset_lock.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/include/drm/drm_modeset_lock.h b/include/drm/drm_modeset_lock.h
> index b84693fbd2b5..ec4f543c3d95 100644
> --- a/include/drm/drm_modeset_lock.h
> +++ b/include/drm/drm_modeset_lock.h
> @@ -34,6 +34,7 @@ struct drm_modeset_lock;
>   * struct drm_modeset_acquire_ctx - locking context (see ww_acquire_ctx)
>   * @ww_ctx: base acquire ctx
>   * @contended: used internally for -EDEADLK handling
> + * @stack_depot: used internally for contention debugging

Uh would be nice to switch to the inline style, since we already have
inline comments (just not kerneldoc). Either way:

Reviewed-by: Daniel Vetter 


>   * @locked: list of held locks
>   * @trylock_only: trylock mode used in atomic contexts/panic notifiers
>   * @interruptible: whether interruptible locking should be used.
> --
> 2.30.2
>


-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


Re: [Intel-gfx] [PATCH RESEND 7/7] drm/i915/mst: only ack the ESI we actually handled

2022-01-20 Thread Shankar, Uma



> -Original Message-
> From: Nikula, Jani 
> Sent: Thursday, January 20, 2022 4:32 PM
> To: Shankar, Uma ; intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH RESEND 7/7] drm/i915/mst: only ack the ESI we
> actually handled
> 
> On Thu, 20 Jan 2022, "Shankar, Uma"  wrote:
> >> -Original Message-
> >> From: Intel-gfx  On Behalf
> >> Of Jani Nikula
> >> Sent: Wednesday, January 12, 2022 4:33 PM
> >> To: intel-gfx@lists.freedesktop.org
> >> Cc: Nikula, Jani 
> >> Subject: [Intel-gfx] [PATCH RESEND 7/7] drm/i915/mst: only ack the
> >> ESI we actually handled
> >>
> >> Seems odd that we clear all event status indicators if we've only
> >> handled some. Only clear the ones we've handled.
> >
> > Looks Good to me.
> > Reviewed-by: Uma Shankar 
> 
> Thanks, please also see v2 of this patch I accidentally posted to the old 
> thread first. I
> guess you were replying to two threads too. :)

Yeah seems reply got mixed up. I have replied on correct versions now.

Regards,
Uma Shankar

> BR,
> Jani
> 
> >
> >> Signed-off-by: Jani Nikula 
> >> ---
> >>  drivers/gpu/drm/i915/display/intel_dp.c | 20 
> >>  1 file changed, 12 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> >> b/drivers/gpu/drm/i915/display/intel_dp.c
> >> index 95e9f7220ab8..548419a4ead8 100644
> >> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> >> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> >> @@ -3625,13 +3625,17 @@ static void
> >> intel_dp_handle_test_request(struct
> >> intel_dp *intel_dp)  }
> >>
> >>  static void
> >> -intel_dp_mst_hpd_irq(struct intel_dp *intel_dp, u8 *esi, bool
> >> *handled)
> >> +intel_dp_mst_hpd_irq(struct intel_dp *intel_dp, u8 *esi, u8 *ack)
> >>  {
> >> -  drm_dp_mst_hpd_irq(_dp->mst_mgr, esi, handled);
> >> +  bool handled = false;
> >> +
> >> +  drm_dp_mst_hpd_irq(_dp->mst_mgr, esi, );
> >> +  if (handled)
> >> +  ack[1] |= DP_DOWN_REP_MSG_RDY | DP_UP_REQ_MSG_RDY;
> >>
> >>if (esi[1] & DP_CP_IRQ) {
> >>intel_hdcp_handle_cp_irq(intel_dp->attached_connector);
> >> -  *handled = true;
> >> +  ack[1] |= DP_CP_IRQ;
> >>}
> >>  }
> >>
> >> @@ -3683,7 +3687,7 @@ intel_dp_check_mst_status(struct intel_dp
> >> *intel_dp)
> >>
> >>for (;;) {
> >>u8 esi[4] = {};
> >> -  bool handled;
> >> +  u8 ack[4] = {};
> >>
> >>if (!intel_dp_get_sink_irq_esi(intel_dp, esi)) {
> >>drm_dbg_kms(>drm,
> >> @@ -3699,15 +3703,15 @@ intel_dp_check_mst_status(struct intel_dp
> *intel_dp)
> >>esi[3] & LINK_STATUS_CHANGED) {
> >>if (!intel_dp_mst_link_status(intel_dp))
> >>link_ok = false;
> >> -  handled = true;
> >> +  ack[3] |= LINK_STATUS_CHANGED;
> >>}
> >>
> >> -  intel_dp_mst_hpd_irq(intel_dp, esi, );
> >> +  intel_dp_mst_hpd_irq(intel_dp, esi, ack);
> >>
> >> -  if (!handled)
> >> +  if (!memchr_inv(ack, 0, sizeof(ack)))
> >>break;
> >>
> >> -  if (!intel_dp_ack_sink_irq_esi(intel_dp, esi))
> >> +  if (!intel_dp_ack_sink_irq_esi(intel_dp, ack))
> >>drm_dbg_kms(>drm, "Failed to ack ESI\n");
> >>}
> >>
> >> --
> >> 2.30.2
> >
> 
> --
> Jani Nikula, Intel Open Source Graphics Center


Re: [Intel-gfx] [PATCH v2 4/4] drm/i915/uapi: document behaviour for DG2 64K support

2022-01-20 Thread Ramalingam C
On 2022-01-18 at 17:50:37 +, Robert Beckett wrote:
> From: Matthew Auld 
> 
> On discrete platforms like DG2, we need to support a minimum page size
> of 64K when dealing with device local-memory. This is quite tricky for
> various reasons, so try to document the new implicit uapi for this.
> 
> v2: Fixed suggestions on formatting [Daniel]
> 
> Signed-off-by: Matthew Auld 
> Signed-off-by: Ramalingam C 
> Signed-off-by: Robert Beckett 
> cc: Simon Ser 
> cc: Pekka Paalanen 
> Cc: Jordan Justen 
> Cc: Kenneth Graunke 
> Cc: mesa-...@lists.freedesktop.org
> Cc: Tony Ye 
> Cc: Slawomir Milczarek 
> ---
>  include/uapi/drm/i915_drm.h | 44 -
>  1 file changed, 39 insertions(+), 5 deletions(-)
> 
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index 5e678917da70..486b7b96291e 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
> @@ -1118,10 +1118,16 @@ struct drm_i915_gem_exec_object2 {
>   /**
>* When the EXEC_OBJECT_PINNED flag is specified this is populated by
>* the user with the GTT offset at which this object will be pinned.
> +  *
>* When the I915_EXEC_NO_RELOC flag is specified this must contain the
>* presumed_offset of the object.
> +  *
>* During execbuffer2 the kernel populates it with the value of the
>* current GTT offset of the object, for future presumed_offset writes.
> +  *
> +  * See struct drm_i915_gem_create_ext for the rules when dealing with
> +  * alignment restrictions with I915_MEMORY_CLASS_DEVICE, on devices with
> +  * minimum page sizes, like DG2.
>*/
>   __u64 offset;
>  
> @@ -3145,11 +3151,39 @@ struct drm_i915_gem_create_ext {
>*
>* The (page-aligned) allocated size for the object will be returned.
>*
> -  * Note that for some devices we have might have further minimum
> -  * page-size restrictions(larger than 4K), like for device local-memory.
> -  * However in general the final size here should always reflect any
> -  * rounding up, if for example using the 
> I915_GEM_CREATE_EXT_MEMORY_REGIONS
> -  * extension to place the object in device local-memory.
> +  *
> +  * **DG2 64K min page size implications:**
> +  *
> +  * On discrete platforms, starting from DG2, we have to contend with GTT
> +  * page size restrictions when dealing with I915_MEMORY_CLASS_DEVICE
> +  * objects.  Specifically the hardware only supports 64K or larger GTT
> +  * page sizes for such memory. The kernel will already ensure that all
> +  * I915_MEMORY_CLASS_DEVICE memory is allocated using 64K or larger page
> +  * sizes underneath.
> +  *
> +  * Note that the returned size here will always reflect any required
> +  * rounding up done by the kernel, i.e 4K will now become 64K on devices
> +  * such as DG2.
> +  *
> +  * **Special DG2 GTT address alignment requirement:**
> +  *
> +  * The GTT alignment will also need be at least 2M for  such objects.
> +  *
> +  * Note that due to how the hardware implements 64K GTT page support, we
> +  * have some further complications:
> +  *
> +  *   1) The entire PDE(which covers a 2MB virtual address range), must
> +  *   contain only 64K PTEs, i.e mixing 4K and 64K PTEs in the same
> +  *   PDE is forbidden by the hardware.
> +  *
> +  *   2) We still need to support 4K PTEs for I915_MEMORY_CLASS_SYSTEM
> +  *   objects.
> +  *
> +  * To keep things simple for userland, we mandate that any GTT mappings
> +  * must be aligned to and rounded up to 2MB. As this only wastes virtual
> +  * address space and avoids userland having to copy any needlessly
> +  * complicated PDE sharing scheme (coloring) and only affects GD2, this
> +  * id deemed to be a good compromise.
"only affects DG2, this is" 

Except these typos, patch looks good to me

Reviewed-by: Ramalingam C 
>*/
>   __u64 size;
>   /**
> -- 
> 2.25.1
> 


  1   2   >