[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/debugfs: Do not return '0' if there is nothing to return

2021-11-26 Thread Patchwork
== Series Details ==

Series: drm/i915/debugfs: Do not return '0' if there is nothing to return
URL   : https://patchwork.freedesktop.org/series/97340/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10932_full -> Patchwork_21689_full


Summary
---

  **FAILURE**

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

  

Participating hosts (11 -> 11)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@kms_selftest@all@check_plane_state:
- shard-tglb: NOTRUN -> [INCOMPLETE][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/shard-tglb1/igt@kms_selftest@all@check_plane_state.html
- shard-kbl:  NOTRUN -> [INCOMPLETE][2]
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/shard-kbl2/igt@kms_selftest@all@check_plane_state.html
- shard-apl:  NOTRUN -> [INCOMPLETE][3]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/shard-apl6/igt@kms_selftest@all@check_plane_state.html

  
Known issues


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

### CI changes ###

 Possible fixes 

  * boot:
- shard-glk:  ([PASS][4], [PASS][5], [PASS][6], [PASS][7], 
[PASS][8], [PASS][9], [PASS][10], [PASS][11], [PASS][12], [PASS][13], 
[PASS][14], [PASS][15], [PASS][16], [PASS][17], [PASS][18], [PASS][19], 
[PASS][20], [PASS][21], [PASS][22], [PASS][23], [PASS][24], [PASS][25], 
[PASS][26], [FAIL][27], [PASS][28]) ([i915#4392]) -> ([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], [PASS][51], [PASS][52], [PASS][53])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk9/boot.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk9/boot.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk9/boot.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk8/boot.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk8/boot.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk8/boot.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk7/boot.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk7/boot.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk7/boot.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk6/boot.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk6/boot.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk6/boot.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk5/boot.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk5/boot.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk5/boot.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk4/boot.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk4/boot.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk3/boot.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk3/boot.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk2/boot.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk2/boot.html
   [25]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk2/boot.html
   [26]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk1/boot.html
   [27]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk1/boot.html
   [28]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/shard-glk1/boot.html
   [29]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/shard-glk1/boot.html
   [30]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/shard-glk1/boot.html
   [31]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/shard-glk2/boot.html
   [32]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/shard-glk2/boot.html
   [33]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/shard-glk2/boot.html
   [34]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/shard-glk3/boot.html
   [35]: 

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/debugfs: Do not return '0' if there is nothing to return

2021-11-26 Thread Patchwork
== Series Details ==

Series: drm/i915/debugfs: Do not return '0' if there is nothing to return
URL   : https://patchwork.freedesktop.org/series/97340/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10932 -> Patchwork_21689


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (35 -> 34)
--

  Missing(1): bat-adlp-6 

Known issues


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

### IGT changes ###

 Issues hit 

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

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

  * igt@gem_lmem_swapping@verify-random:
- fi-skl-6600u:   NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#4613]) +3 
similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/fi-skl-6600u/igt@gem_lmem_swapp...@verify-random.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_10932/fi-tgl-1115g4/igt@i915_selftest@live@gt_pm.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/fi-tgl-1115g4/igt@i915_selftest@live@gt_pm.html

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

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

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

  * igt@runner@aborted:
- fi-bxt-dsi: NOTRUN -> [FAIL][10] ([i915#2426] / [i915#3363])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/fi-bxt-dsi/igt@run...@aborted.html

  
 Possible fixes 

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

  * igt@i915_selftest@live@perf:
- {fi-tgl-dsi}:   [DMESG-WARN][13] ([i915#2867]) -> [PASS][14] +17 
similar issues
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/fi-tgl-dsi/igt@i915_selftest@l...@perf.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/fi-tgl-dsi/igt@i915_selftest@l...@perf.html

  * igt@kms_force_connector_basic@force-connector-state:
- fi-cfl-8109u:   [DMESG-WARN][15] ([i915#165]) -> [PASS][16] +1 
similar issue
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/fi-cfl-8109u/igt@kms_force_connector_ba...@force-connector-state.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/fi-cfl-8109u/igt@kms_force_connector_ba...@force-connector-state.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b:
- fi-cfl-8109u:   [DMESG-WARN][17] ([i915#165] / [i915#295]) -> 
[PASS][18] +13 similar issues
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/fi-cfl-8109u/igt@kms_pipe_crc_ba...@compare-crc-sanitycheck-pipe-b.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/fi-cfl-8109u/igt@kms_pipe_crc_ba...@compare-crc-sanitycheck-pipe-b.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-cml-u2:  [FAIL][19] ([fdo#103375]) -> [PASS][20]
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10932/fi-cml-u2/igt@kms_pipe_crc_ba...@suspend-read-crc-pipe-a.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21689/fi-cml-u2/igt@kms_pipe_crc_ba...@suspend-read-crc-pipe-a.html

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

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

[Intel-gfx] [PATCH] drm/i915/debugfs: Do not return '0' if there is nothing to return

2021-11-26 Thread Andi Shyti
Change functions that always return '0' to be void type.

Signed-off-by: Andi Shyti 
Cc: Maciej Patelczyk 
---
 drivers/gpu/drm/i915/gt/intel_gt_debugfs.c|  7 ---
 drivers/gpu/drm/i915/gt/intel_gt_debugfs.h|  2 +-
 drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 16 
 drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.h |  4 ++--
 drivers/gpu/drm/i915/i915_debugfs.c   | 12 +---
 5 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_debugfs.c 
b/drivers/gpu/drm/i915/gt/intel_gt_debugfs.c
index f103664b71d4..53b90b4f73d7 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_debugfs.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_debugfs.c
@@ -29,7 +29,7 @@ int intel_gt_debugfs_reset_show(struct intel_gt *gt, u64 *val)
}
 }
 
-int intel_gt_debugfs_reset_store(struct intel_gt *gt, u64 val)
+void intel_gt_debugfs_reset_store(struct intel_gt *gt, u64 val)
 {
/* Flush any previous reset before applying for a new one */
wait_event(gt->reset.queue,
@@ -37,7 +37,6 @@ int intel_gt_debugfs_reset_store(struct intel_gt *gt, u64 val)
 
intel_gt_handle_error(gt, val, I915_ERROR_CAPTURE,
  "Manually reset engine mask to %llx", val);
-   return 0;
 }
 
 /*
@@ -51,7 +50,9 @@ static int __intel_gt_debugfs_reset_show(void *data, u64 *val)
 
 static int __intel_gt_debugfs_reset_store(void *data, u64 val)
 {
-   return intel_gt_debugfs_reset_store(data, val);
+   intel_gt_debugfs_reset_store(data, val);
+
+   return 0;
 }
 
 DEFINE_SIMPLE_ATTRIBUTE(reset_fops, __intel_gt_debugfs_reset_show,
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_debugfs.h 
b/drivers/gpu/drm/i915/gt/intel_gt_debugfs.h
index e307ceb99031..a4baf8e7f068 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_debugfs.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_debugfs.h
@@ -37,6 +37,6 @@ void intel_gt_debugfs_register_files(struct dentry *root,
 
 /* functions that need to be accessed by the upper level non-gt interfaces */
 int intel_gt_debugfs_reset_show(struct intel_gt *gt, u64 *val);
-int intel_gt_debugfs_reset_store(struct intel_gt *gt, u64 val);
+void intel_gt_debugfs_reset_store(struct intel_gt *gt, u64 val);
 
 #endif /* INTEL_GT_DEBUGFS_H */
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c 
b/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
index 404dfa7673c6..7a30157aa9d3 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
@@ -20,38 +20,38 @@
 #include "intel_uncore.h"
 #include "vlv_sideband.h"
 
-int intel_gt_pm_debugfs_forcewake_user_open(struct intel_gt *gt)
+void intel_gt_pm_debugfs_forcewake_user_open(struct intel_gt *gt)
 {
atomic_inc(>->user_wakeref);
intel_gt_pm_get(gt);
if (GRAPHICS_VER(gt->i915) >= 6)
intel_uncore_forcewake_user_get(gt->uncore);
-
-   return 0;
 }
 
-int intel_gt_pm_debugfs_forcewake_user_release(struct intel_gt *gt)
+void intel_gt_pm_debugfs_forcewake_user_release(struct intel_gt *gt)
 {
if (GRAPHICS_VER(gt->i915) >= 6)
intel_uncore_forcewake_user_put(gt->uncore);
intel_gt_pm_put(gt);
atomic_dec(>->user_wakeref);
-
-   return 0;
 }
 
 static int forcewake_user_open(struct inode *inode, struct file *file)
 {
struct intel_gt *gt = inode->i_private;
 
-   return intel_gt_pm_debugfs_forcewake_user_open(gt);
+   intel_gt_pm_debugfs_forcewake_user_open(gt);
+
+   return 0;
 }
 
 static int forcewake_user_release(struct inode *inode, struct file *file)
 {
struct intel_gt *gt = inode->i_private;
 
-   return intel_gt_pm_debugfs_forcewake_user_release(gt);
+   intel_gt_pm_debugfs_forcewake_user_release(gt);
+
+   return 0;
 }
 
 static const struct file_operations forcewake_user_fops = {
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.h 
b/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.h
index a8457887ec65..0ace8c2da0ac 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.h
@@ -14,7 +14,7 @@ void intel_gt_pm_debugfs_register(struct intel_gt *gt, struct 
dentry *root);
 void intel_gt_pm_frequency_dump(struct intel_gt *gt, struct drm_printer *m);
 
 /* functions that need to be accessed by the upper level non-gt interfaces */
-int intel_gt_pm_debugfs_forcewake_user_open(struct intel_gt *gt);
-int intel_gt_pm_debugfs_forcewake_user_release(struct intel_gt *gt);
+void intel_gt_pm_debugfs_forcewake_user_open(struct intel_gt *gt);
+void intel_gt_pm_debugfs_forcewake_user_release(struct intel_gt *gt);
 
 #endif /* INTEL_GT_PM_DEBUGFS_H */
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
b/drivers/gpu/drm/i915/i915_debugfs.c
index fe638b5da7c0..88ef63f05ead 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -565,7 +565,9 @@ static int i915_wedged_set(void *data, u64 val)
 {
struct drm_i915_private *i915 = data;

Re: [Intel-gfx] [PATCH v3 1/2] i915/gvt: Introduce the mmio_info_table.c to support VFIO new mdev API

2021-11-26 Thread kernel test robot
Hi Zhi,

I love your 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/drm-next 
tegra-drm/drm/tegra/for-next v5.16-rc2 next-20211126]
[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/Zhi-Wang/i915-gvt-Introduce-the-mmio_info_table-c-to-support-VFIO-new-mdev-API/20211126-194800
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-rhel-8.3 
(https://download.01.org/0day-ci/archive/20211127/202111270654.ibld57di-...@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/82dadc38be63d9271031336db366cd71104df3a0
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Zhi-Wang/i915-gvt-Introduce-the-mmio_info_table-c-to-support-VFIO-new-mdev-API/20211126-194800
git checkout 82dadc38be63d9271031336db366cd71104df3a0
# save the config file to linux build tree
mkdir build_dir
make 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 warnings (new ones prefixed by >>):

>> drivers/gpu/drm/i915/gvt/mmio_info_table.c:1414: warning: expecting 
>> prototype for intel_gvt_setup_mmio_table(). Prototype was for 
>> intel_gvt_setup_mmio_info() instead


vim +1414 drivers/gpu/drm/i915/gvt/mmio_info_table.c

  1402  
  1403  /**
  1404   * intel_gvt_setup_mmio_table - setup MMIO information table for GVT 
device
  1405   * @gvt: GVT device
  1406   *
  1407   * This function is called at the initialization stage, to setup the 
MMIO
  1408   * information table for GVT device
  1409   *
  1410   * Returns:
  1411   * zero on success, negative if failed.
  1412   */
  1413  int intel_gvt_setup_mmio_info(struct intel_gvt *gvt)
> 1414  {

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


[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Use per device iommu check (rev4)

2021-11-26 Thread Patchwork
== Series Details ==

Series: drm/i915: Use per device iommu check (rev4)
URL   : https://patchwork.freedesktop.org/series/96715/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10931_full -> Patchwork_21687_full


Summary
---

  **FAILURE**

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

  

Participating hosts (11 -> 11)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@gem_exec_schedule@reorder-wide@bcs0:
- shard-skl:  [PASS][1] -> [FAIL][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10931/shard-skl4/igt@gem_exec_schedule@reorder-w...@bcs0.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/shard-skl4/igt@gem_exec_schedule@reorder-w...@bcs0.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_create@create-massive:
- shard-apl:  NOTRUN -> [DMESG-WARN][3] ([i915#3002])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/shard-apl1/igt@gem_cre...@create-massive.html

  * igt@gem_ctx_isolation@preservation-s3@vcs0:
- shard-kbl:  [PASS][4] -> [DMESG-WARN][5] ([i915#180]) +7 similar 
issues
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10931/shard-kbl2/igt@gem_ctx_isolation@preservation...@vcs0.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/shard-kbl1/igt@gem_ctx_isolation@preservation...@vcs0.html

  * igt@gem_exec_capture@pi@rcs0:
- shard-skl:  NOTRUN -> [INCOMPLETE][6] ([i915#4547])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/shard-skl1/igt@gem_exec_capture@p...@rcs0.html

  * igt@gem_exec_fair@basic-flow@rcs0:
- shard-skl:  NOTRUN -> [SKIP][7] ([fdo#109271]) +81 similar issues
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/shard-skl7/igt@gem_exec_fair@basic-f...@rcs0.html

  * igt@gem_exec_fair@basic-none-rrul@rcs0:
- shard-glk:  [PASS][8] -> [FAIL][9] ([i915#2842]) +1 similar issue
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10931/shard-glk5/igt@gem_exec_fair@basic-none-r...@rcs0.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/shard-glk9/igt@gem_exec_fair@basic-none-r...@rcs0.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
- shard-iclb: [PASS][10] -> [FAIL][11] ([i915#2842]) +1 similar 
issue
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10931/shard-iclb5/igt@gem_exec_fair@basic-none-sh...@rcs0.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/shard-iclb3/igt@gem_exec_fair@basic-none-sh...@rcs0.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-kbl:  [PASS][12] -> [FAIL][13] ([i915#2842])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10931/shard-kbl7/igt@gem_exec_fair@basic-pace-s...@rcs0.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/shard-kbl4/igt@gem_exec_fair@basic-pace-s...@rcs0.html

  * igt@gem_exec_fair@basic-pace@bcs0:
- shard-tglb: [PASS][14] -> [FAIL][15] ([i915#2842]) +2 similar 
issues
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10931/shard-tglb8/igt@gem_exec_fair@basic-p...@bcs0.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/shard-tglb3/igt@gem_exec_fair@basic-p...@bcs0.html

  * igt@gem_exec_fair@basic-pace@vcs1:
- shard-kbl:  [PASS][16] -> [SKIP][17] ([fdo#109271])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10931/shard-kbl6/igt@gem_exec_fair@basic-p...@vcs1.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/shard-kbl3/igt@gem_exec_fair@basic-p...@vcs1.html

  * igt@gem_exec_suspend@basic-s0:
- shard-iclb: [PASS][18] -> [DMESG-WARN][19] ([i915#2867])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10931/shard-iclb8/igt@gem_exec_susp...@basic-s0.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/shard-iclb5/igt@gem_exec_susp...@basic-s0.html

  * igt@gem_lmem_swapping@heavy-verify-random:
- shard-skl:  NOTRUN -> [SKIP][20] ([fdo#109271] / [i915#4613])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/shard-skl1/igt@gem_lmem_swapp...@heavy-verify-random.html
- shard-apl:  NOTRUN -> [SKIP][21] ([fdo#109271] / [i915#4613])
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/shard-apl2/igt@

[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gen11: Moving WAs to icl_gt_workarounds_init() (rev2)

2021-11-26 Thread Patchwork
== Series Details ==

Series: drm/i915/gen11: Moving WAs to icl_gt_workarounds_init() (rev2)
URL   : https://patchwork.freedesktop.org/series/97208/
State : failure

== Summary ==

Applying: drm/i915/gen11: Moving WAs to icl_gt_workarounds_init()
error: patch failed: drivers/gpu/drm/i915/gt/intel_workarounds.c:1231
error: drivers/gpu/drm/i915/gt/intel_workarounds.c: patch does not apply
error: Did you hand edit your patch?
It does not apply to blobs recorded in its index.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Using index info to reconstruct a base tree...
Patch failed at 0001 drm/i915/gen11: Moving WAs to icl_gt_workarounds_init()
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".




[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Use per device iommu check (rev4)

2021-11-26 Thread Patchwork
== Series Details ==

Series: drm/i915: Use per device iommu check (rev4)
URL   : https://patchwork.freedesktop.org/series/96715/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10931 -> Patchwork_21687


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (33 -> 35)
--

  Additional (3): fi-kbl-soraka fi-icl-u2 fi-tgl-u2 
  Missing(1): fi-bdw-samus 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_cs_nop@fork-gfx0:
- fi-icl-u2:  NOTRUN -> [SKIP][1] ([fdo#109315]) +17 similar issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/fi-icl-u2/igt@amdgpu/amd_cs_...@fork-gfx0.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_21687/fi-kbl-soraka/igt@gem_exec_fence@basic-b...@bcs0.html

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

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

  * igt@gem_lmem_swapping@parallel-random-engines:
- fi-icl-u2:  NOTRUN -> [SKIP][8] ([i915#4613]) +3 similar issues
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/fi-icl-u2/igt@gem_lmem_swapp...@parallel-random-engines.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_21687/fi-kbl-soraka/igt@gem_lmem_swapp...@parallel-random-engines.html

  * igt@gem_lmem_swapping@verify-random:
- fi-tgl-u2:  NOTRUN -> [SKIP][10] ([i915#4613]) +3 similar issues
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/fi-tgl-u2/igt@gem_lmem_swapp...@verify-random.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_21687/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-tgl-u2:  NOTRUN -> [SKIP][12] ([fdo#109284] / [fdo#111827]) +8 
similar issues
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/fi-tgl-u2/igt@kms_chamel...@common-hpd-after-suspend.html

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

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

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-tgl-u2:  NOTRUN -> [SKIP][15] ([i915#4103]) +1 similar issue
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/fi-tgl-u2/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-atomic.html
- fi-icl-u2:  NOTRUN -> [SKIP][16] ([fdo#109278]) +2 similar issues
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/fi-icl-u2/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_force_connector_basic@force-load-detect:
- fi-tgl-u2:  NOTRUN -> [SKIP][17] ([fdo#109285])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/fi-tgl-u2/igt@kms_force_connector_ba...@force-load-detect.html
- fi-icl-u2:  NOTRUN -> [SKIP][18] ([fdo#109285])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21687/fi-icl-u2/igt@kms_force_connector_ba...@force-load-detect.html

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

  * igt@prime_

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Use per device iommu check (rev4)

2021-11-26 Thread Patchwork
== Series Details ==

Series: drm/i915: Use per device iommu check (rev4)
URL   : https://patchwork.freedesktop.org/series/96715/
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/gen11: Moving WAs to icl_gt_workarounds_init()

2021-11-26 Thread Talla, RavitejaX Goud
Hi Harrison,
This patch will fix guc enabling error which is tested on local setup, please 
make your comments.

Thanks,
Raviteja 

-Original Message-
From: Talla, RavitejaX Goud  
Sent: Tuesday, November 23, 2021 8:16 PM
To: intel-gfx@lists.freedesktop.org; Surendrakumar Upadhyay, TejaskumarX 
; Pandey, Hariom 
; Harrison, John C 
Cc: Talla, RavitejaX Goud 
Subject: [PATCH] drm/i915/gen11: Moving WAs to icl_gt_workarounds_init()

From: raviteja goud talla 

Bspec page says "Reset: BUS", Accordingly moving w/a's:
Wa_1407352427,Wa_1406680159 to proper function icl_gt_workarounds_init() Which 
will resolve guc enabling error

Cc: John Harrison 
Signed-off-by: raviteja goud talla 
---
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c 
b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index a9727447c037..4f7b598d21b1 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -1231,6 +1231,15 @@ icl_gt_workarounds_init(struct intel_gt *gt, struct 
i915_wa_list *wal)
GAMT_CHKN_BIT_REG,
GAMT_CHKN_DISABLE_L3_COH_PIPE);
 
+   /* Wa_1407352427:icl,ehl */
+   wa_write_or(wal, UNSLICE_UNIT_LEVEL_CLKGATE2,
+   PSDUNIT_CLKGATE_DIS);
+
+   /* Wa_1406680159:icl,ehl */
+   wa_write_or(wal,
+   SUBSLICE_UNIT_LEVEL_CLKGATE,
+   GWUNIT_CLKGATE_DIS);
+
/* Wa_1607087056:icl,ehl,jsl */
if (IS_ICELAKE(i915) ||
IS_JSL_EHL_GRAPHICS_STEP(i915, STEP_A0, STEP_B0)) @@ -2272,15 
+2281,6 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct 
i915_wa_list *wal)
wa_write_or(wal, UNSLICE_UNIT_LEVEL_CLKGATE,
VSUNIT_CLKGATE_DIS | HSUNIT_CLKGATE_DIS);
 
-   /* Wa_1407352427:icl,ehl */
-   wa_write_or(wal, UNSLICE_UNIT_LEVEL_CLKGATE2,
-   PSDUNIT_CLKGATE_DIS);
-
-   /* Wa_1406680159:icl,ehl */
-   wa_write_or(wal,
-   SUBSLICE_UNIT_LEVEL_CLKGATE,
-   GWUNIT_CLKGATE_DIS);
-
/*
 * Wa_1408767742:icl[a2..forever],ehl[all]
 * Wa_1605460711:icl[a0..c0]
--
2.30.2



[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [v3,1/2] i915/gvt: Introduce the mmio_info_table.c to support VFIO new mdev API

2021-11-26 Thread Patchwork
== Series Details ==

Series: series starting with [v3,1/2] i915/gvt: Introduce the mmio_info_table.c 
to support VFIO new mdev API
URL   : https://patchwork.freedesktop.org/series/97323/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10930_full -> Patchwork_21686_full


Summary
---

  **SUCCESS**

  No regressions found.

  

Participating hosts (11 -> 11)
--

  No changes in participating hosts

Known issues


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

### CI changes ###

 Possible fixes 

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

[Intel-gfx] [PATCH i-g-t] tests/i915/gem_exec_balancer: Make sure some tests are run to declare success

2021-11-26 Thread Tvrtko Ursulin
From: Tvrtko Ursulin 

I accidentally noticed a bunch of tests need two engines of the same class
to do anything meanigful but they report success even if they can't run.

Half way through making them skip instead, I realised it was possibly a
design choice to avoid flip-flopping on the CI (shards). Sigh. It is still
very unfortunate to have tests declaring success when they did not
actually do anything due machine requirements not being met. How much of a
a hostage to CI reporting limitations should the IGT suite be? Discuss.

Signed-off-by: Tvrtko Ursulin 
---
 tests/i915/gem_exec_balancer.c | 90 --
 1 file changed, 85 insertions(+), 5 deletions(-)

diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index cc07a5a992c7..a13d4cdc930e 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -747,6 +747,8 @@ static void __bonded_chain_inv(int i915,
 
 static void bonded_chain(int i915)
 {
+   unsigned int tested = 0;
+
/*
 * Given batches A, B and B', where B and B' are a bonded pair, with
 * B' depending on B with a submit fence and B depending on A as
@@ -759,11 +761,14 @@ static void bonded_chain(int i915)
 
siblings = list_engines(i915, 1u << class, &count);
if (count > 1) {
+   tested++;
__bonded_chain(i915, siblings, count);
__bonded_chain_inv(i915, siblings, count);
}
free(siblings);
}
+
+   igt_require(tested > 0);
 }
 
 static void __bonded_sema(int i915,
@@ -849,6 +854,8 @@ static void __bonded_sema(int i915,
 
 static void bonded_semaphore(int i915)
 {
+   unsigned int tested = 0;
+
/*
 * Given batches A, B and B', where B and B' are a bonded pair, with
 * B' depending on B with a submit fence and B depending on A as
@@ -863,10 +870,14 @@ static void bonded_semaphore(int i915)
unsigned int count;
 
siblings = list_engines(i915, 1u << class, &count);
-   if (count > 1)
+   if (count > 1) {
+   tested++;
__bonded_sema(i915, siblings, count);
+   }
free(siblings);
}
+
+   igt_require(tested > 0);
 }
 
 static void __bonded_pair(int i915,
@@ -1278,6 +1289,7 @@ bonded_runner(int i915,
B_HOSTILE | B_FENCE,
B_HOSTILE | B_DELAY,
};
+   unsigned int tested = 0;
unsigned long *cycles;
 
/*
@@ -1295,6 +1307,7 @@ bonded_runner(int i915,
 
siblings = list_engines(i915, 1u << class, &count);
if (count > 1) {
+   tested++;
igt_info("Class %u, 1 thread\n", class);
for (int i = 0; i < ARRAY_SIZE(phases); i++) {
cycles[0] = 0;
@@ -1342,6 +1355,8 @@ bonded_runner(int i915,
}
 
munmap(cycles, 4096);
+
+   igt_require(tested > 0);
 }
 
 static void __bonded_nohang(int i915, const intel_ctx_t *ctx,
@@ -1414,6 +1429,7 @@ static void __bonded_nohang(int i915, const intel_ctx_t 
*ctx,
 
 static void bonded_nohang(int i915, unsigned int flags)
 {
+   unsigned int tested = 0;
const intel_ctx_t *ctx;
 
/*
@@ -1430,12 +1446,16 @@ static void bonded_nohang(int i915, unsigned int flags)
unsigned int count;
 
siblings = list_engines(i915, 1u << class, &count);
-   if (count > 1)
+   if (count > 1) {
+   tested++;
__bonded_nohang(i915, ctx, siblings, count, flags);
+   }
free(siblings);
}
 
intel_ctx_destroy(i915, ctx);
+
+   igt_require(tested > 0);
 }
 
 static void indices(int i915)
@@ -1741,6 +1761,8 @@ static void __sliced(int i915, uint64_t ahnd,
 
 static void sliced(int i915)
 {
+   unsigned int tested = 0;
+
/*
 * Let's investigate what happens when the virtual request is
 * timesliced away.
@@ -1771,6 +1793,8 @@ static void sliced(int i915)
continue;
}
 
+   tested++;
+
igt_fork(child, count) {
const intel_ctx_t *ctx;
uint64_t ahnd;
@@ -1793,6 +1817,8 @@ static void sliced(int i915)
}
 
gem_quiescent_gpu(i915);
+
+   igt_require(tested > 0);
 }
 
 static void __hog(int i915, const intel_ctx_t *ctx, unsigned int count)
@@ -1830,6 +1856,8 @@ static void __hog(int i915, const intel_ctx_t *ctx, 
unsigned int count)
 
 static void hog(int i915)
 {
+   unsigned int tested = 0;
+
/*
 * Suppose there we are, happily using an engine, minding our
 * own business, when all of a sudden a very important process
@@ -1854,6 +1882,8 @@ static void hog(int i9

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/gemfs: don't mark huge_opt as static

2021-11-26 Thread Patchwork
== Series Details ==

Series: drm/i915/gemfs: don't mark huge_opt as static
URL   : https://patchwork.freedesktop.org/series/97320/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10930_full -> Patchwork_21685_full


Summary
---

  **SUCCESS**

  No regressions found.

  

Participating hosts (11 -> 11)
--

  No changes in participating hosts

Known issues


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

### CI changes ###

 Possible fixes 

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

[Intel-gfx] [CI i-g-t 2/2] intel_gpu_top: Remove clients support

2021-11-26 Thread Tvrtko Ursulin
From: Tvrtko Ursulin 

When kernel feature was removed the intel_gpu_top part was forgotten.

Signed-off-by: Tvrtko Ursulin 
Cc: Daniel Vetter 
Acked-by: Petri Latvala 
---
 man/intel_gpu_top.rst |   4 -
 tools/intel_gpu_top.c | 810 +-
 2 files changed, 1 insertion(+), 813 deletions(-)

diff --git a/man/intel_gpu_top.rst b/man/intel_gpu_top.rst
index f4dbfc5b44d9..b3b765b05feb 100644
--- a/man/intel_gpu_top.rst
+++ b/man/intel_gpu_top.rst
@@ -56,10 +56,6 @@ Supported keys:
 'q'Exit from the tool.
 'h'Show interactive help.
 '1'Toggle between aggregated engine class and physical engine mode.
-'n'Toggle display of numeric client busyness overlay.
-'s'Toggle between sort modes (runtime, total runtime, pid, client id).
-'i'Toggle display of clients which used no GPU time.
-'H'Toggle between per PID aggregation and individual clients.
 
 DEVICE SELECTION
 
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 7311038a39f4..41c59a72c09d 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -627,562 +627,6 @@ static void pmu_sample(struct engines *engines)
}
 }
 
-enum client_status {
-   FREE = 0, /* mbz */
-   ALIVE,
-   PROBE
-};
-
-struct clients;
-
-struct client {
-   struct clients *clients;
-
-   enum client_status status;
-   int sysfs_root;
-   int busy_root;
-   unsigned int id;
-   unsigned int pid;
-   char name[24];
-   char print_name[24];
-   unsigned int samples;
-   unsigned long total_runtime;
-   unsigned long last_runtime;
-   struct engines *engines;
-   unsigned long *val;
-   uint64_t *last;
-};
-
-struct clients {
-   unsigned int num_clients;
-   unsigned int active_clients;
-
-   unsigned int num_classes;
-   struct engine_class *class;
-
-   char sysfs_root[128];
-
-   struct client *client;
-};
-
-#define for_each_client(clients, c, tmp) \
-   for ((tmp) = (clients)->num_clients, c = (clients)->client; \
-(tmp > 0); (tmp)--, (c)++)
-
-static struct clients *init_clients(const char *drm_card)
-{
-   struct clients *clients;
-   const char *slash;
-   ssize_t ret;
-   int dir;
-
-   clients = malloc(sizeof(*clients));
-   if (!clients)
-   return NULL;
-
-   memset(clients, 0, sizeof(*clients));
-
-   if (drm_card) {
-   slash = rindex(drm_card, '/');
-   assert(slash);
-   } else {
-   slash = "card0";
-   }
-
-   ret = snprintf(clients->sysfs_root, sizeof(clients->sysfs_root),
-  "/sys/class/drm/%s/clients/", slash);
-   assert(ret > 0 && ret < sizeof(clients->sysfs_root));
-
-   dir = open(clients->sysfs_root, O_DIRECTORY | O_RDONLY);
-   if (dir < 0) {
-   free(clients);
-   clients = NULL;
-   } else {
-   close(dir);
-   }
-
-   return clients;
-}
-
-static int __read_to_buf(int fd, char *buf, unsigned int bufsize)
-{
-   ssize_t ret;
-   int err;
-
-   ret = read(fd, buf, bufsize - 1);
-   err = errno;
-   if (ret < 1) {
-   errno = ret < 0 ? err : ENOMSG;
-
-   return -1;
-   }
-
-   if (ret > 1 && buf[ret - 1] == '\n')
-   buf[ret - 1] = '\0';
-   else
-   buf[ret] = '\0';
-
-   return 0;
-}
-
-static int
-__read_client_field(int root, const char *field, char *buf, unsigned int 
bufsize)
-{
-   int fd, ret;
-
-   fd = openat(root, field, O_RDONLY);
-   if (fd < 0)
-   return -1;
-
-   ret = __read_to_buf(fd, buf, bufsize);
-
-   close(fd);
-
-   return ret;
-}
-
-static uint64_t
-read_client_busy(struct client *client, unsigned int class)
-{
-   const char *class_str[] = { "0", "1", "2", "3", "4", "5", "6", "7" };
-   char buf[256], *b;
-   int ret;
-
-   assert(class < ARRAY_SIZE(class_str));
-   if (class >= ARRAY_SIZE(class_str))
-   return 0;
-
-   assert(client->sysfs_root >= 0);
-   if (client->sysfs_root < 0)
-   return 0;
-
-   if (client->busy_root < 0)
-   client->busy_root = openat(client->sysfs_root, "busy",
-  O_RDONLY | O_DIRECTORY);
-
-   assert(client->busy_root);
-   if (client->busy_root < 0)
-   return 0;
-
-   ret = __read_client_field(client->busy_root, class_str[class], buf,
- sizeof(buf));
-   if (ret) {
-   close(client->busy_root);
-   client->busy_root = -1;
-   return 0;
-   }
-
-   /*
-* Handle both single integer and key=value formats by skipping
-* leading non-digits.
-*/
-   b = buf;
-   while (*b && !isdigit(*b))
-   b++;
-
-   return strtoull(b, NULL, 10);
-

[Intel-gfx] [CI i-g-t 1/2] tests/api_intel_allocator: Fix build warning

2021-11-26 Thread Tvrtko Ursulin
From: Tvrtko Ursulin 

.../tests/i915/api_intel_allocator.c: In function ‘basic_alloc’:
.../tests/i915/api_intel_allocator.c:158:25: warning: this ‘if’ clause does not 
guard... [-Wmisleading-indentation]
  158 | if (j == i)
  | ^~

Signed-off-by: Tvrtko Ursulin 
Cc: Zbigniew Kempczyński 
Reviewed-by: Zbigniew Kempczyński 
---
 tests/i915/api_intel_allocator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/api_intel_allocator.c b/tests/i915/api_intel_allocator.c
index 4b74317ed3d0..6d7764ca3f51 100644
--- a/tests/i915/api_intel_allocator.c
+++ b/tests/i915/api_intel_allocator.c
@@ -157,7 +157,7 @@ static void basic_alloc(int fd, int cnt, uint8_t type)
for (j = 0; j < cnt; j++) {
if (j == i)
continue;
-   igt_assert(!overlaps(&obj[i], &obj[j]));
+   igt_assert(!overlaps(&obj[i], &obj[j]));
}
}
 
-- 
2.32.0



Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 5/6] intel_gpu_top: Remove clients support

2021-11-26 Thread Tvrtko Ursulin



On 26/11/2021 14:01, Petri Latvala wrote:

On Fri, Nov 26, 2021 at 01:07:24PM +, Tvrtko Ursulin wrote:


On 19/11/2021 12:59, Tvrtko Ursulin wrote:

From: Tvrtko Ursulin 

When kernel feature was removed the intel_gpu_top part was forgotten.

Signed-off-by: Tvrtko Ursulin 
Cc: Daniel Vetter 


Will someone ack this or we carry this code until it ships, if it hasn't
already?


Does that question mean client busyness will some day return?


No, question meant I was pinging to ack the removal ever since the i915 
code was removed months ago. "Until it ships" was referring to IGT 
codebase containing defunct code potentially shipping to distros.


Regarding the return of per client busyness - I certainly hope so. i915 
and intel_gpu_top code exposing it via /proc fdinfo is available and 
given positive noises from the community we could probably merge it with 
some reviews. A couple of userspace clients are interested as well, like 
Chromium and KDE, although I think intel_gpu_top is enough really given 
AMD already has this exposed via fdinfo and they are supportive of 
documenting the shared spec.



Either way,
Acked-by: Petri Latvala 


Thanks!

Regards,

Tvrtko






Regards,

Tvrtko


---
   man/intel_gpu_top.rst |   4 -
   tools/intel_gpu_top.c | 810 +-
   2 files changed, 1 insertion(+), 813 deletions(-)

diff --git a/man/intel_gpu_top.rst b/man/intel_gpu_top.rst
index f4dbfc5b44d9..b3b765b05feb 100644
--- a/man/intel_gpu_top.rst
+++ b/man/intel_gpu_top.rst
@@ -56,10 +56,6 @@ Supported keys:
   'q'Exit from the tool.
   'h'Show interactive help.
   '1'Toggle between aggregated engine class and physical engine mode.
-'n'Toggle display of numeric client busyness overlay.
-'s'Toggle between sort modes (runtime, total runtime, pid, client id).
-'i'Toggle display of clients which used no GPU time.
-'H'Toggle between per PID aggregation and individual clients.
   DEVICE SELECTION
   
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 7311038a39f4..41c59a72c09d 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -627,562 +627,6 @@ static void pmu_sample(struct engines *engines)
}
   }
-enum client_status {
-   FREE = 0, /* mbz */
-   ALIVE,
-   PROBE
-};
-
-struct clients;
-
-struct client {
-   struct clients *clients;
-
-   enum client_status status;
-   int sysfs_root;
-   int busy_root;
-   unsigned int id;
-   unsigned int pid;
-   char name[24];
-   char print_name[24];
-   unsigned int samples;
-   unsigned long total_runtime;
-   unsigned long last_runtime;
-   struct engines *engines;
-   unsigned long *val;
-   uint64_t *last;
-};
-
-struct clients {
-   unsigned int num_clients;
-   unsigned int active_clients;
-
-   unsigned int num_classes;
-   struct engine_class *class;
-
-   char sysfs_root[128];
-
-   struct client *client;
-};
-
-#define for_each_client(clients, c, tmp) \
-   for ((tmp) = (clients)->num_clients, c = (clients)->client; \
-(tmp > 0); (tmp)--, (c)++)
-
-static struct clients *init_clients(const char *drm_card)
-{
-   struct clients *clients;
-   const char *slash;
-   ssize_t ret;
-   int dir;
-
-   clients = malloc(sizeof(*clients));
-   if (!clients)
-   return NULL;
-
-   memset(clients, 0, sizeof(*clients));
-
-   if (drm_card) {
-   slash = rindex(drm_card, '/');
-   assert(slash);
-   } else {
-   slash = "card0";
-   }
-
-   ret = snprintf(clients->sysfs_root, sizeof(clients->sysfs_root),
-  "/sys/class/drm/%s/clients/", slash);
-   assert(ret > 0 && ret < sizeof(clients->sysfs_root));
-
-   dir = open(clients->sysfs_root, O_DIRECTORY | O_RDONLY);
-   if (dir < 0) {
-   free(clients);
-   clients = NULL;
-   } else {
-   close(dir);
-   }
-
-   return clients;
-}
-
-static int __read_to_buf(int fd, char *buf, unsigned int bufsize)
-{
-   ssize_t ret;
-   int err;
-
-   ret = read(fd, buf, bufsize - 1);
-   err = errno;
-   if (ret < 1) {
-   errno = ret < 0 ? err : ENOMSG;
-
-   return -1;
-   }
-
-   if (ret > 1 && buf[ret - 1] == '\n')
-   buf[ret - 1] = '\0';
-   else
-   buf[ret] = '\0';
-
-   return 0;
-}
-
-static int
-__read_client_field(int root, const char *field, char *buf, unsigned int 
bufsize)
-{
-   int fd, ret;
-
-   fd = openat(root, field, O_RDONLY);
-   if (fd < 0)
-   return -1;
-
-   ret = __read_to_buf(fd, buf, bufsize);
-
-   close(fd);
-
-   return ret;
-}
-
-static uint64_t
-read_client_busy(struct client *client, unsigned int class)
-{
-   const char *class_str[] = { "0", "1", "2", "3", "4", "5", "

[Intel-gfx] [PATCH v4] drm/i915: Use per device iommu check

2021-11-26 Thread Tvrtko Ursulin
From: Tvrtko Ursulin 

With both integrated and discrete Intel GPUs in a system, the current
global check of intel_iommu_gfx_mapped, as done from intel_vtd_active()
may not be completely accurate.

In this patch we add i915 parameter to intel_vtd_active() in order to
prepare it for multiple GPUs and we also change the check away from Intel
specific intel_iommu_gfx_mapped (global exported by the Intel IOMMU
driver) to probing the presence of IOMMU on a specific device using
device_iommu_mapped().

This will return true both for IOMMU pass-through and address translation
modes which matches the current behaviour. If in the future we wanted to
distinguish between these two modes we could either use
iommu_get_domain_for_dev() and check for __IOMMU_DOMAIN_PAGING bit
indicating address translation, or ask for a new API to be exported from
the IOMMU core code.

v2:
  * Check for dmar translation specifically, not just iommu domain. (Baolu)

v3:
 * Go back to plain "any domain" check for now, rewrite commit message.

v4:
 * Use device_iommu_mapped. (Robin, Baolu)

Signed-off-by: Tvrtko Ursulin 
Cc: Lu Baolu 
Cc: Lucas De Marchi 
Cc: Robin Murphy 
Acked-by: Robin Murphy 
Reviewed-by: Lu Baolu 
---
 drivers/gpu/drm/i915/display/intel_bw.c  |  2 +-
 drivers/gpu/drm/i915/display/intel_display.c |  2 +-
 drivers/gpu/drm/i915/display/intel_fbc.c |  2 +-
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c   |  2 +-
 drivers/gpu/drm/i915/gem/i915_gemfs.c|  2 +-
 drivers/gpu/drm/i915/gt/intel_ggtt.c |  4 ++--
 drivers/gpu/drm/i915/i915_debugfs.c  |  1 +
 drivers/gpu/drm/i915/i915_driver.c   |  7 +++
 drivers/gpu/drm/i915/i915_drv.h  | 13 +++--
 drivers/gpu/drm/i915/i915_gpu_error.c|  5 +
 drivers/gpu/drm/i915/intel_device_info.c | 14 +-
 drivers/gpu/drm/i915/intel_pm.c  |  2 +-
 12 files changed, 25 insertions(+), 31 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bw.c 
b/drivers/gpu/drm/i915/display/intel_bw.c
index abec394f6869..2da4aacc956b 100644
--- a/drivers/gpu/drm/i915/display/intel_bw.c
+++ b/drivers/gpu/drm/i915/display/intel_bw.c
@@ -634,7 +634,7 @@ static unsigned int intel_bw_data_rate(struct 
drm_i915_private *dev_priv,
for_each_pipe(dev_priv, pipe)
data_rate += bw_state->data_rate[pipe];
 
-   if (DISPLAY_VER(dev_priv) >= 13 && intel_vtd_active())
+   if (DISPLAY_VER(dev_priv) >= 13 && intel_vtd_active(dev_priv))
data_rate = data_rate * 105 / 100;
 
return data_rate;
diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index b2d51cd79d6c..1ef77ba7f645 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1293,7 +1293,7 @@ static bool needs_async_flip_vtd_wa(const struct 
intel_crtc_state *crtc_state)
 {
struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
 
-   return crtc_state->uapi.async_flip && intel_vtd_active() &&
+   return crtc_state->uapi.async_flip && intel_vtd_active(i915) &&
(DISPLAY_VER(i915) == 9 || IS_BROADWELL(i915) || 
IS_HASWELL(i915));
 }
 
diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c 
b/drivers/gpu/drm/i915/display/intel_fbc.c
index d0c34bc3af6c..614e8697c068 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -1677,7 +1677,7 @@ static int intel_sanitize_fbc_option(struct 
drm_i915_private *i915)
 static bool need_fbc_vtd_wa(struct drm_i915_private *i915)
 {
/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt */
-   if (intel_vtd_active() &&
+   if (intel_vtd_active(i915) &&
(IS_SKYLAKE(i915) || IS_BROXTON(i915))) {
drm_info(&i915->drm,
 "Disabling framebuffer compression (FBC) to prevent 
screen flicker with VT-d enabled\n");
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c 
b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index 80680395bb3b..bce03d74a0b4 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -399,7 +399,7 @@ static int i915_gem_init_stolen(struct intel_memory_region 
*mem)
return 0;
}
 
-   if (intel_vtd_active() && GRAPHICS_VER(i915) < 8) {
+   if (intel_vtd_active(i915) && GRAPHICS_VER(i915) < 8) {
drm_notice(&i915->drm,
   "%s, disabling use of stolen memory\n",
   "DMAR active");
diff --git a/drivers/gpu/drm/i915/gem/i915_gemfs.c 
b/drivers/gpu/drm/i915/gem/i915_gemfs.c
index dbdbdc344d87..11cd66d183e6 100644
--- a/drivers/gpu/drm/i915/gem/i915_gemfs.c
+++ b/drivers/gpu/drm/i915/gem/i915_gemfs.c
@@ -31,7 +31,7 @@ int i915_gemfs_init(struct drm_i915_private *i915)
 */
 
opts = NULL;
-   if (intel_vtd_active()) {
+   if (intel_vtd_active(i915)) {
   

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 5/6] intel_gpu_top: Remove clients support

2021-11-26 Thread Petri Latvala
On Fri, Nov 26, 2021 at 01:07:24PM +, Tvrtko Ursulin wrote:
> 
> On 19/11/2021 12:59, Tvrtko Ursulin wrote:
> > From: Tvrtko Ursulin 
> > 
> > When kernel feature was removed the intel_gpu_top part was forgotten.
> > 
> > Signed-off-by: Tvrtko Ursulin 
> > Cc: Daniel Vetter 
> 
> Will someone ack this or we carry this code until it ships, if it hasn't
> already?

Does that question mean client busyness will some day return?

Either way,
Acked-by: Petri Latvala 


> 
> Regards,
> 
> Tvrtko
> 
> > ---
> >   man/intel_gpu_top.rst |   4 -
> >   tools/intel_gpu_top.c | 810 +-
> >   2 files changed, 1 insertion(+), 813 deletions(-)
> > 
> > diff --git a/man/intel_gpu_top.rst b/man/intel_gpu_top.rst
> > index f4dbfc5b44d9..b3b765b05feb 100644
> > --- a/man/intel_gpu_top.rst
> > +++ b/man/intel_gpu_top.rst
> > @@ -56,10 +56,6 @@ Supported keys:
> >   'q'Exit from the tool.
> >   'h'Show interactive help.
> >   '1'Toggle between aggregated engine class and physical engine 
> > mode.
> > -'n'Toggle display of numeric client busyness overlay.
> > -'s'Toggle between sort modes (runtime, total runtime, pid, client 
> > id).
> > -'i'Toggle display of clients which used no GPU time.
> > -'H'Toggle between per PID aggregation and individual clients.
> >   DEVICE SELECTION
> >   
> > diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
> > index 7311038a39f4..41c59a72c09d 100644
> > --- a/tools/intel_gpu_top.c
> > +++ b/tools/intel_gpu_top.c
> > @@ -627,562 +627,6 @@ static void pmu_sample(struct engines *engines)
> > }
> >   }
> > -enum client_status {
> > -   FREE = 0, /* mbz */
> > -   ALIVE,
> > -   PROBE
> > -};
> > -
> > -struct clients;
> > -
> > -struct client {
> > -   struct clients *clients;
> > -
> > -   enum client_status status;
> > -   int sysfs_root;
> > -   int busy_root;
> > -   unsigned int id;
> > -   unsigned int pid;
> > -   char name[24];
> > -   char print_name[24];
> > -   unsigned int samples;
> > -   unsigned long total_runtime;
> > -   unsigned long last_runtime;
> > -   struct engines *engines;
> > -   unsigned long *val;
> > -   uint64_t *last;
> > -};
> > -
> > -struct clients {
> > -   unsigned int num_clients;
> > -   unsigned int active_clients;
> > -
> > -   unsigned int num_classes;
> > -   struct engine_class *class;
> > -
> > -   char sysfs_root[128];
> > -
> > -   struct client *client;
> > -};
> > -
> > -#define for_each_client(clients, c, tmp) \
> > -   for ((tmp) = (clients)->num_clients, c = (clients)->client; \
> > -(tmp > 0); (tmp)--, (c)++)
> > -
> > -static struct clients *init_clients(const char *drm_card)
> > -{
> > -   struct clients *clients;
> > -   const char *slash;
> > -   ssize_t ret;
> > -   int dir;
> > -
> > -   clients = malloc(sizeof(*clients));
> > -   if (!clients)
> > -   return NULL;
> > -
> > -   memset(clients, 0, sizeof(*clients));
> > -
> > -   if (drm_card) {
> > -   slash = rindex(drm_card, '/');
> > -   assert(slash);
> > -   } else {
> > -   slash = "card0";
> > -   }
> > -
> > -   ret = snprintf(clients->sysfs_root, sizeof(clients->sysfs_root),
> > -  "/sys/class/drm/%s/clients/", slash);
> > -   assert(ret > 0 && ret < sizeof(clients->sysfs_root));
> > -
> > -   dir = open(clients->sysfs_root, O_DIRECTORY | O_RDONLY);
> > -   if (dir < 0) {
> > -   free(clients);
> > -   clients = NULL;
> > -   } else {
> > -   close(dir);
> > -   }
> > -
> > -   return clients;
> > -}
> > -
> > -static int __read_to_buf(int fd, char *buf, unsigned int bufsize)
> > -{
> > -   ssize_t ret;
> > -   int err;
> > -
> > -   ret = read(fd, buf, bufsize - 1);
> > -   err = errno;
> > -   if (ret < 1) {
> > -   errno = ret < 0 ? err : ENOMSG;
> > -
> > -   return -1;
> > -   }
> > -
> > -   if (ret > 1 && buf[ret - 1] == '\n')
> > -   buf[ret - 1] = '\0';
> > -   else
> > -   buf[ret] = '\0';
> > -
> > -   return 0;
> > -}
> > -
> > -static int
> > -__read_client_field(int root, const char *field, char *buf, unsigned int 
> > bufsize)
> > -{
> > -   int fd, ret;
> > -
> > -   fd = openat(root, field, O_RDONLY);
> > -   if (fd < 0)
> > -   return -1;
> > -
> > -   ret = __read_to_buf(fd, buf, bufsize);
> > -
> > -   close(fd);
> > -
> > -   return ret;
> > -}
> > -
> > -static uint64_t
> > -read_client_busy(struct client *client, unsigned int class)
> > -{
> > -   const char *class_str[] = { "0", "1", "2", "3", "4", "5", "6", "7" };
> > -   char buf[256], *b;
> > -   int ret;
> > -
> > -   assert(class < ARRAY_SIZE(class_str));
> > -   if (class >= ARRAY_SIZE(class_str))
> > -   return 0;
> > -
> > -   assert(client->sysfs_root >= 0);
> > -   if (client->sysfs_root < 0)
> > -   return 0;
> > -
> > -   if (client->busy_root < 0)
> > -   client->busy_root = openat(client->sysfs_root, "busy",
> > -   

Re: [Intel-gfx] [PATCH] drm/i915: Use per device iommu check

2021-11-26 Thread Tvrtko Ursulin



On 26/11/2021 08:26, Lu Baolu wrote:

On 2021/11/25 19:47, Robin Murphy wrote:

On 2021-11-25 10:42, Tvrtko Ursulin wrote:

From: Tvrtko Ursulin 

With both integrated and discrete Intel GPUs in a system, the current
global check of intel_iommu_gfx_mapped, as done from intel_vtd_active()
may not be completely accurate.

In this patch we add i915 parameter to intel_vtd_active() in order to
prepare it for multiple GPUs and we also change the check away from 
Intel

specific intel_iommu_gfx_mapped (global exported by the Intel IOMMU
driver) to probing the presence of IOMMU domain on a specific device
using iommu_get_domain_for_dev().


FWIW the way you have it now is functionally equivalent to using 
device_iommu_mapped(), which I think might be slightly clearer for the 
current intent, but I don't have a significantly strong preference 
(after all, this *was* the de-facto way of checking before 
device_iommu_mapped() was introduced, and there are still other 
examples of it around). So from the IOMMU perspective,


Acked-by: Robin Murphy 

Perhaps the AGP driver could also be tweaked and 
intel_iommu_gfx_mapped cleaned away entirely, but I'll leave that for 
Baolu to think about :)


I fully agreed with Robin.

I prefer device_iommu_mapped() more than iommu_get_domain_for_dev().

"iommu_get_domain_for_dev(dev) == NULL" simply means that the device
does not have any domain attached. Although at present, it is equivalent
to device DMAing without IOMMU translation. But I'm sure it will change
in the future.

With device_iommu_mapped() replaced,

Reviewed-by: Lu Baolu 


I have empirically established device_iommu_mapped() matches 1:1 with 
intel_iommu_gfx_mapped and a simple non-NULL check against 
iommu_get_domain_for_dev(), so okay, I will respin with that change.


We leave the problem of being able to distinguish between pass-through 
and address translation from the drivers for later. Thanks both!


Regards,

Tvrtko


Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Fix DPT suspend/resume on !HAS_DISPLAY platforms

2021-11-26 Thread Imre Deak
On Fri, Nov 26, 2021 at 03:06:15PM +0200, Sarvela, Tomi P wrote:
> The trace is full of ext4, so I'm siding on -rc2 issue.

I can see lots of instances of the same stacktrace on

fi-skl-6600u

and one instance on

shard-tglb7

at least since -rc1 (we don't have logs from before), but none on any of
the other machines, except for this test run on shard-kbl6.

> You can try re-testing the series to see if same failure happens again.

I don't see a point in retesting, since I'm confident that the change
has no effect on KBL. Looks like there's already

https://gitlab.freedesktop.org/drm/intel/-/issues/4428

from 5.15.0 on the same shard-tglb7 as the above -rc1 failure
and

https://gitlab.freedesktop.org/drm/intel/-/issues/4547

on the same fi-skl-6600u as above. Imo KBL should be also added to the
latter ticket.

> 
> Tomi
> 
> > From: Deak, Imre 
> >
> > Hi,
> >
> > On Thu, Nov 25, 2021 at 10:38:35PM +, Patchwork wrote:
> > > == Series Details ==
> > >
> > > Series: drm/i915: Fix DPT suspend/resume on !HAS_DISPLAY platforms
> > > URL   : https://patchwork.freedesktop.org/series/97291/
> > > State : failure
> > >
> > > == Summary ==
> > >
> > > CI Bug Log - changes from CI_DRM_10928_full -> Patchwork_21682_full
> > > 
> > >
> > > Summary
> > > ---
> > >
> > >   **FAILURE**
> > >
> > >   Serious unknown changes coming with Patchwork_21682_full absolutely
> > need to be
> > >   verified manually.
> > >
> > >   If you think the reported changes have nothing to do with the changes
> > >   introduced in Patchwork_21682_full, please notify your bug team to allow
> > them
> > >   to document this new failure mode, which will reduce false positives in 
> > > CI.
> > >
> > >
> > >
> > > Participating hosts (11 -> 11)
> > > --
> > >
> > >   No changes in participating hosts
> > >
> > > Possible new issues
> > > ---
> > >
> > >   Here are the unknown changes that may have been introduced in
> > Patchwork_21682_full:
> > >
> > > ### IGT changes ###
> > >
> > >  Possible regressions 
> > >
> > >   * igt@kms_flip@flip-vs-suspend@b-dp1:
> > > - shard-kbl:  [PASS][1] -> [INCOMPLETE][2]
> > >[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-
> > kbl4/igt@kms_flip@flip-vs-susp...@b-dp1.html
> > >[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21682/shard-
> > kbl6/igt@kms_flip@flip-vs-susp...@b-dp1.html
> >
> > This is (happy that we have pstore logs!):
> >
> > <3>[  121.347224] INFO: task kworker/u8:17:1044 blocked for more than 30
> > seconds.
> > <3>[  121.347231]   Tainted: GW 
> > 5.16.0-rc2-CI-Patchwork_21682+ #1
> > <3>[  121.347236] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
> > disables this message.
> > <6>[  121.347241] task:kworker/u8:17   state:D stack:13456 pid: 1044 ppid:  
> >2
> > flags:0x4000
> > <6>[  121.347250] Workqueue: writeback wb_workfn (flush-259:0)
> > <6>[  121.346993]  schedule+0x3f/0xc0
> > <6>[  121.346998]  __bio_queue_enter+0x3a4/0x450
> > <6>[  121.347006]  ? finish_wait+0x80/0x80
> > <6>[  121.347018]  blk_mq_submit_bio+0x171/0xa30
> > <6>[  121.347025]  ? mpage_release_unused_pages+0x27b/0x290
> > <6>[  121.347036]  ? do_writepages+0xd3/0x1a0
> > <6>[  121.347043]  submit_bio_noacct+0x254/0x2a0
> > <6>[  121.347055]  ext4_io_submit+0x44/0x50
> > <6>[  121.347060]  ext4_writepages+0x32c/0x1070
> > <6>[  121.347070]  ? __lock_acquire+0x5c0/0xb70
> > <6>[  121.347099]  do_writepages+0xd3/0x1a0
> > <6>[  121.347103]  ? filemap_fdatawrite_wbc+0x4b/0x80
> > <6>[  121.347117]  filemap_fdatawrite_wbc+0x56/0x80
> > <6>[  121.347124]  file_write_and_wait_range+0x97/0xd0
> > <6>[  121.347144]  ext4_sync_file+0x166/0x460
> >
> > Any idea if this could be an -rc2 related problem, fs corruption or
> > related to the storage device on shard-kbl4 (if you've seen already
> > similar reports)?
> >
> > In any case the issue is not related, since on KBL the change doesn't
> > have any effect.
> >
> > >
> > > Known issues
> > > 
> > >
> > >   Here are the changes found in Patchwork_21682_full that come from
> > known issues:
> > >
> > > ### CI changes ###
> > >
> > >  Possible fixes 
> > >
> > >   * boot:
> > > - shard-apl:  ([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], [FAIL][22], [PASS][23], [PASS][24], [PASS][25],
> > [PASS][26], [PASS][27]) ([i915#4386]) -> ([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], [PASS][51], [PASS][52])
> > >[3]: https://in

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 5/6] intel_gpu_top: Remove clients support

2021-11-26 Thread Tvrtko Ursulin



On 19/11/2021 12:59, Tvrtko Ursulin wrote:

From: Tvrtko Ursulin 

When kernel feature was removed the intel_gpu_top part was forgotten.

Signed-off-by: Tvrtko Ursulin 
Cc: Daniel Vetter 


Will someone ack this or we carry this code until it ships, if it hasn't 
already?


Regards,

Tvrtko


---
  man/intel_gpu_top.rst |   4 -
  tools/intel_gpu_top.c | 810 +-
  2 files changed, 1 insertion(+), 813 deletions(-)

diff --git a/man/intel_gpu_top.rst b/man/intel_gpu_top.rst
index f4dbfc5b44d9..b3b765b05feb 100644
--- a/man/intel_gpu_top.rst
+++ b/man/intel_gpu_top.rst
@@ -56,10 +56,6 @@ Supported keys:
  'q'Exit from the tool.
  'h'Show interactive help.
  '1'Toggle between aggregated engine class and physical engine mode.
-'n'Toggle display of numeric client busyness overlay.
-'s'Toggle between sort modes (runtime, total runtime, pid, client id).
-'i'Toggle display of clients which used no GPU time.
-'H'Toggle between per PID aggregation and individual clients.
  
  DEVICE SELECTION

  
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 7311038a39f4..41c59a72c09d 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -627,562 +627,6 @@ static void pmu_sample(struct engines *engines)
}
  }
  
-enum client_status {

-   FREE = 0, /* mbz */
-   ALIVE,
-   PROBE
-};
-
-struct clients;
-
-struct client {
-   struct clients *clients;
-
-   enum client_status status;
-   int sysfs_root;
-   int busy_root;
-   unsigned int id;
-   unsigned int pid;
-   char name[24];
-   char print_name[24];
-   unsigned int samples;
-   unsigned long total_runtime;
-   unsigned long last_runtime;
-   struct engines *engines;
-   unsigned long *val;
-   uint64_t *last;
-};
-
-struct clients {
-   unsigned int num_clients;
-   unsigned int active_clients;
-
-   unsigned int num_classes;
-   struct engine_class *class;
-
-   char sysfs_root[128];
-
-   struct client *client;
-};
-
-#define for_each_client(clients, c, tmp) \
-   for ((tmp) = (clients)->num_clients, c = (clients)->client; \
-(tmp > 0); (tmp)--, (c)++)
-
-static struct clients *init_clients(const char *drm_card)
-{
-   struct clients *clients;
-   const char *slash;
-   ssize_t ret;
-   int dir;
-
-   clients = malloc(sizeof(*clients));
-   if (!clients)
-   return NULL;
-
-   memset(clients, 0, sizeof(*clients));
-
-   if (drm_card) {
-   slash = rindex(drm_card, '/');
-   assert(slash);
-   } else {
-   slash = "card0";
-   }
-
-   ret = snprintf(clients->sysfs_root, sizeof(clients->sysfs_root),
-  "/sys/class/drm/%s/clients/", slash);
-   assert(ret > 0 && ret < sizeof(clients->sysfs_root));
-
-   dir = open(clients->sysfs_root, O_DIRECTORY | O_RDONLY);
-   if (dir < 0) {
-   free(clients);
-   clients = NULL;
-   } else {
-   close(dir);
-   }
-
-   return clients;
-}
-
-static int __read_to_buf(int fd, char *buf, unsigned int bufsize)
-{
-   ssize_t ret;
-   int err;
-
-   ret = read(fd, buf, bufsize - 1);
-   err = errno;
-   if (ret < 1) {
-   errno = ret < 0 ? err : ENOMSG;
-
-   return -1;
-   }
-
-   if (ret > 1 && buf[ret - 1] == '\n')
-   buf[ret - 1] = '\0';
-   else
-   buf[ret] = '\0';
-
-   return 0;
-}
-
-static int
-__read_client_field(int root, const char *field, char *buf, unsigned int 
bufsize)
-{
-   int fd, ret;
-
-   fd = openat(root, field, O_RDONLY);
-   if (fd < 0)
-   return -1;
-
-   ret = __read_to_buf(fd, buf, bufsize);
-
-   close(fd);
-
-   return ret;
-}
-
-static uint64_t
-read_client_busy(struct client *client, unsigned int class)
-{
-   const char *class_str[] = { "0", "1", "2", "3", "4", "5", "6", "7" };
-   char buf[256], *b;
-   int ret;
-
-   assert(class < ARRAY_SIZE(class_str));
-   if (class >= ARRAY_SIZE(class_str))
-   return 0;
-
-   assert(client->sysfs_root >= 0);
-   if (client->sysfs_root < 0)
-   return 0;
-
-   if (client->busy_root < 0)
-   client->busy_root = openat(client->sysfs_root, "busy",
-  O_RDONLY | O_DIRECTORY);
-
-   assert(client->busy_root);
-   if (client->busy_root < 0)
-   return 0;
-
-   ret = __read_client_field(client->busy_root, class_str[class], buf,
- sizeof(buf));
-   if (ret) {
-   close(client->busy_root);
-   client->busy_root = -1;
-   return 0;
-   }
-
-   /*
-* Handle both single integer and key=value formats by skipping
-* leadi

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Fix DPT suspend/resume on !HAS_DISPLAY platforms

2021-11-26 Thread Sarvela, Tomi P
The trace is full of ext4, so I'm siding on -rc2 issue.

You can try re-testing the series to see if same failure happens again.

Tomi

> From: Deak, Imre 
> 
> Hi,
> 
> On Thu, Nov 25, 2021 at 10:38:35PM +, Patchwork wrote:
> > == Series Details ==
> >
> > Series: drm/i915: Fix DPT suspend/resume on !HAS_DISPLAY platforms
> > URL   : https://patchwork.freedesktop.org/series/97291/
> > State : failure
> >
> > == Summary ==
> >
> > CI Bug Log - changes from CI_DRM_10928_full -> Patchwork_21682_full
> > 
> >
> > Summary
> > ---
> >
> >   **FAILURE**
> >
> >   Serious unknown changes coming with Patchwork_21682_full absolutely
> need to be
> >   verified manually.
> >
> >   If you think the reported changes have nothing to do with the changes
> >   introduced in Patchwork_21682_full, please notify your bug team to allow
> them
> >   to document this new failure mode, which will reduce false positives in 
> > CI.
> >
> >
> >
> > Participating hosts (11 -> 11)
> > --
> >
> >   No changes in participating hosts
> >
> > Possible new issues
> > ---
> >
> >   Here are the unknown changes that may have been introduced in
> Patchwork_21682_full:
> >
> > ### IGT changes ###
> >
> >  Possible regressions 
> >
> >   * igt@kms_flip@flip-vs-suspend@b-dp1:
> > - shard-kbl:  [PASS][1] -> [INCOMPLETE][2]
> >[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-
> kbl4/igt@kms_flip@flip-vs-susp...@b-dp1.html
> >[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21682/shard-
> kbl6/igt@kms_flip@flip-vs-susp...@b-dp1.html
> 
> This is (happy that we have pstore logs!):
> 
> <3>[  121.347224] INFO: task kworker/u8:17:1044 blocked for more than 30
> seconds.
> <3>[  121.347231]   Tainted: GW 
> 5.16.0-rc2-CI-Patchwork_21682+ #1
> <3>[  121.347236] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
> disables this message.
> <6>[  121.347241] task:kworker/u8:17   state:D stack:13456 pid: 1044 ppid:
>  2
> flags:0x4000
> <6>[  121.347250] Workqueue: writeback wb_workfn (flush-259:0)
> <6>[  121.346993]  schedule+0x3f/0xc0
> <6>[  121.346998]  __bio_queue_enter+0x3a4/0x450
> <6>[  121.347006]  ? finish_wait+0x80/0x80
> <6>[  121.347018]  blk_mq_submit_bio+0x171/0xa30
> <6>[  121.347025]  ? mpage_release_unused_pages+0x27b/0x290
> <6>[  121.347036]  ? do_writepages+0xd3/0x1a0
> <6>[  121.347043]  submit_bio_noacct+0x254/0x2a0
> <6>[  121.347055]  ext4_io_submit+0x44/0x50
> <6>[  121.347060]  ext4_writepages+0x32c/0x1070
> <6>[  121.347070]  ? __lock_acquire+0x5c0/0xb70
> <6>[  121.347099]  do_writepages+0xd3/0x1a0
> <6>[  121.347103]  ? filemap_fdatawrite_wbc+0x4b/0x80
> <6>[  121.347117]  filemap_fdatawrite_wbc+0x56/0x80
> <6>[  121.347124]  file_write_and_wait_range+0x97/0xd0
> <6>[  121.347144]  ext4_sync_file+0x166/0x460
> 
> Any idea if this could be an -rc2 related problem, fs corruption or
> related to the storage device on shard-kbl4 (if you've seen already
> similar reports)?
> 
> In any case the issue is not related, since on KBL the change doesn't
> have any effect.
> 
> >
> > Known issues
> > 
> >
> >   Here are the changes found in Patchwork_21682_full that come from
> known issues:
> >
> > ### CI changes ###
> >
> >  Possible fixes 
> >
> >   * boot:
> > - shard-apl:  ([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], [FAIL][22], [PASS][23], [PASS][24], [PASS][25],
> [PASS][26], [PASS][27]) ([i915#4386]) -> ([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], [PASS][51], [PASS][52])
> >[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-
> apl8/boot.html
> >[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-
> apl8/boot.html
> >[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-
> apl8/boot.html
> >[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-
> apl8/boot.html
> >[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-
> apl8/boot.html
> >[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-
> apl7/boot.html
> >[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-
> apl7/boot.html
> >[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-
> apl7/boot.html
> >[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-
> apl6/boot.html
> >[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-
> apl6/boot.html
> >[13]: https://intel-gfx-ci.01.org/t

Re: [Intel-gfx] [PATCH] drm/i915: Disable bonding on gen12+ platforms

2021-11-26 Thread Tvrtko Ursulin



On 07/08/2021 06:02, Matt Roper wrote:

On Fri, Aug 06, 2021 at 08:54:59PM +0200, Daniel Vetter wrote:

On Fri, Aug 6, 2021 at 8:25 PM John Harrison  wrote:

On 7/28/2021 12:21, Matthew Brost wrote:

Disable bonding on gen12+ platforms aside from ones already supported by
the i915 - TGL, RKL, and ADL-S.


Does this needs adjusting for the change in ADL-P plans?

Regards,

Tvrtko



Signed-off-by: Matthew Brost 
---
   drivers/gpu/drm/i915/gem/i915_gem_context.c | 7 +++
   1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c 
b/drivers/gpu/drm/i915/gem/i915_gem_context.c
index 05c3ee191710..9c3672bac0e2 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
@@ -446,6 +446,13 @@ set_proto_ctx_engines_bond(struct i915_user_extension 
__user *base, void *data)
   u16 idx, num_bonds;
   int err, n;

+ if (GRAPHICS_VER(i915) >= 12 && !IS_TIGERLAKE(i915) &&
+ !IS_ROCKETLAKE(i915) && !IS_ALDERLAKE_S(i915)) {
+ drm_dbg(&i915->drm,
+ "Bonding on gen12+ aside from TGL, RKL, and ADL_S not 
allowed\n");

I would have said not supported rather than not allowed. Either way:
Reviewed-by: John Harrison 


Either is fine with me.

Acked-by: Daniel Vetter 



Applied to drm-intel-gt-next (with the suggested debug message wording
tweak).  Thanks for the patch and reviews.


Matt




+ return -ENODEV;
+ }
+
   if (get_user(idx, &ext->virtual_index))
   return -EFAULT;






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




Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Fix DPT suspend/resume on !HAS_DISPLAY platforms

2021-11-26 Thread Imre Deak
Hi,

On Thu, Nov 25, 2021 at 10:38:35PM +, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915: Fix DPT suspend/resume on !HAS_DISPLAY platforms
> URL   : https://patchwork.freedesktop.org/series/97291/
> State : failure
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_10928_full -> Patchwork_21682_full
> 
> 
> Summary
> ---
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with Patchwork_21682_full absolutely need to 
> be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_21682_full, please notify your bug team to allow 
> them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   
> 
> Participating hosts (11 -> 11)
> --
> 
>   No changes in participating hosts
> 
> Possible new issues
> ---
> 
>   Here are the unknown changes that may have been introduced in 
> Patchwork_21682_full:
> 
> ### IGT changes ###
> 
>  Possible regressions 
> 
>   * igt@kms_flip@flip-vs-suspend@b-dp1:
> - shard-kbl:  [PASS][1] -> [INCOMPLETE][2]
>[1]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-kbl4/igt@kms_flip@flip-vs-susp...@b-dp1.html
>[2]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21682/shard-kbl6/igt@kms_flip@flip-vs-susp...@b-dp1.html

This is (happy that we have pstore logs!):

<3>[  121.347224] INFO: task kworker/u8:17:1044 blocked for more than 30 
seconds.
<3>[  121.347231]   Tainted: GW 
5.16.0-rc2-CI-Patchwork_21682+ #1
<3>[  121.347236] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables 
this message.
<6>[  121.347241] task:kworker/u8:17   state:D stack:13456 pid: 1044 ppid: 
2 flags:0x4000
<6>[  121.347250] Workqueue: writeback wb_workfn (flush-259:0)
<6>[  121.346993]  schedule+0x3f/0xc0
<6>[  121.346998]  __bio_queue_enter+0x3a4/0x450
<6>[  121.347006]  ? finish_wait+0x80/0x80
<6>[  121.347018]  blk_mq_submit_bio+0x171/0xa30
<6>[  121.347025]  ? mpage_release_unused_pages+0x27b/0x290
<6>[  121.347036]  ? do_writepages+0xd3/0x1a0
<6>[  121.347043]  submit_bio_noacct+0x254/0x2a0
<6>[  121.347055]  ext4_io_submit+0x44/0x50
<6>[  121.347060]  ext4_writepages+0x32c/0x1070
<6>[  121.347070]  ? __lock_acquire+0x5c0/0xb70
<6>[  121.347099]  do_writepages+0xd3/0x1a0
<6>[  121.347103]  ? filemap_fdatawrite_wbc+0x4b/0x80
<6>[  121.347117]  filemap_fdatawrite_wbc+0x56/0x80
<6>[  121.347124]  file_write_and_wait_range+0x97/0xd0
<6>[  121.347144]  ext4_sync_file+0x166/0x460

Any idea if this could be an -rc2 related problem, fs corruption or
related to the storage device on shard-kbl4 (if you've seen already
similar reports)?

In any case the issue is not related, since on KBL the change doesn't
have any effect.

>   
> Known issues
> 
> 
>   Here are the changes found in Patchwork_21682_full that come from known 
> issues:
> 
> ### CI changes ###
> 
>  Possible fixes 
> 
>   * boot:
> - shard-apl:  ([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], [FAIL][22], [PASS][23], [PASS][24], 
> [PASS][25], [PASS][26], [PASS][27]) ([i915#4386]) -> ([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], [PASS][51], [PASS][52])
>[3]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-apl8/boot.html
>[4]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-apl8/boot.html
>[5]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-apl8/boot.html
>[6]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-apl8/boot.html
>[7]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-apl8/boot.html
>[8]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-apl7/boot.html
>[9]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-apl7/boot.html
>[10]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-apl7/boot.html
>[11]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-apl6/boot.html
>[12]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-apl6/boot.html
>[13]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-apl6/boot.html
>[14]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-apl4/boot.html
>[15]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-apl4/boot.html
>[16]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10928/shard-apl4/boot.html
>[17]: 
> https://

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v3,1/2] i915/gvt: Introduce the mmio_info_table.c to support VFIO new mdev API

2021-11-26 Thread Patchwork
== Series Details ==

Series: series starting with [v3,1/2] i915/gvt: Introduce the mmio_info_table.c 
to support VFIO new mdev API
URL   : https://patchwork.freedesktop.org/series/97323/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10930 -> Patchwork_21686


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (39 -> 34)
--

  Additional (2): fi-kbl-soraka fi-tgl-u2 
  Missing(7): bat-dg1-6 bat-dg1-5 bat-adlp-6 bat-adlp-4 fi-bdw-samus 
bat-jsl-2 bat-jsl-1 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@core_hotunplug@unbind-rebind:
- fi-tgl-u2:  NOTRUN -> [INCOMPLETE][1] ([i915#4006])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21686/fi-tgl-u2/igt@core_hotunp...@unbind-rebind.html

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

  * igt@gem_exec_suspend@basic-s0:
- fi-kbl-soraka:  NOTRUN -> [INCOMPLETE][3] ([i915#4221])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21686/fi-kbl-soraka/igt@gem_exec_susp...@basic-s0.html
- fi-tgl-u2:  NOTRUN -> [FAIL][4] ([i915#1888])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21686/fi-tgl-u2/igt@gem_exec_susp...@basic-s0.html

  * igt@gem_exec_suspend@basic-s3:
- fi-bdw-5557u:   [PASS][5] -> [INCOMPLETE][6] ([i915#146])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10930/fi-bdw-5557u/igt@gem_exec_susp...@basic-s3.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21686/fi-bdw-5557u/igt@gem_exec_susp...@basic-s3.html
- fi-tgl-1115g4:  [PASS][7] -> [FAIL][8] ([i915#1888])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10930/fi-tgl-1115g4/igt@gem_exec_susp...@basic-s3.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21686/fi-tgl-1115g4/igt@gem_exec_susp...@basic-s3.html

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

  * igt@gem_lmem_swapping@verify-random:
- fi-tgl-u2:  NOTRUN -> [SKIP][10] ([i915#4613]) +3 similar issues
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21686/fi-tgl-u2/igt@gem_lmem_swapp...@verify-random.html

  * igt@i915_selftest@live@gt_lrc:
- fi-bsw-n3050:   [PASS][11] -> [DMESG-FAIL][12] ([i915#2373])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10930/fi-bsw-n3050/igt@i915_selftest@live@gt_lrc.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21686/fi-bsw-n3050/igt@i915_selftest@live@gt_lrc.html

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

  * igt@kms_chamelium@dp-hpd-fast:
- fi-tgl-u2:  NOTRUN -> [SKIP][15] ([fdo#109284] / [fdo#111827]) +8 
similar issues
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21686/fi-tgl-u2/igt@kms_chamel...@dp-hpd-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-tgl-u2:  NOTRUN -> [SKIP][16] ([i915#4103]) +1 similar issue
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21686/fi-tgl-u2/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-atomic.html

  * igt@kms_force_connector_basic@force-load-detect:
- fi-tgl-u2:  NOTRUN -> [SKIP][17] ([fdo#109285])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21686/fi-tgl-u2/igt@kms_force_connector_ba...@force-load-detect.html

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

  * igt@prime_vgem@basic-userptr:
- fi-tgl-u2:  NOTRUN -> [SKIP][20] ([i915#3301])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21686/fi-tgl-u2/igt@prime_v...@basic-userptr.html

  * igt@runner@aborted:
- fi-skl-6600u:   NOTRUN -> [FAIL][21] ([i915#3363] / [i915#4312])
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21686/fi-skl-6600u/igt@run...@aborted.html
- fi-tgl-u2:  NOTRUN -> [FAIL][22] ([i915#1602] / [i915#2722] / 
[i915#

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v3,1/2] i915/gvt: Introduce the mmio_info_table.c to support VFIO new mdev API

2021-11-26 Thread Patchwork
== Series Details ==

Series: series starting with [v3,1/2] i915/gvt: Introduce the mmio_info_table.c 
to support VFIO new mdev API
URL   : https://patchwork.freedesktop.org/series/97323/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
cc176fe57a84 i915/gvt: Introduce the mmio_info_table.c to support VFIO new mdev 
API
-:9: WARNING:TYPO_SPELLING: 'seperated' may be misspelled - perhaps 'separated'?
#9: 
initialization path has to be seperated into two phases:
  ^

-:14: WARNING:TYPO_SPELLING: 'inital' may be misspelled - perhaps 'initial'?
#14: 
Mostly it's because the inital clean HW state needs to be saved before
^^

-:215: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#215: FILE: drivers/gpu/drm/i915/gvt/handlers.c:57:
+static int setup_mmio_handler(struct intel_gvt *gvt,
+   u32 offset, u32 size, u32 device,

-:246: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#246: FILE: drivers/gpu/drm/i915/gvt/handlers.c:76:
+   WARN(1, "assign a handler to a non-tracked mmio %x\n",
+   i);

-:270: WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements 
should be avoided
#270: FILE: drivers/gpu/drm/i915/gvt/handlers.c:2072:
+#define MMIO_F(reg, s, d, r, w) do { \
+   ret = setup_mmio_handler(gvt, i915_mmio_reg_offset(reg), \
+   s, d, r, w); \
if (ret) \
return ret; \
 } while (0)

-:302: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'prefix' - possible 
side-effects?
#302: FILE: drivers/gpu/drm/i915/gvt/handlers.c:2082:
+#define MMIO_RING_F(prefix, s, d, r, w) do { \
+   MMIO_F(prefix(RENDER_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(BLT_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(GEN6_BSD_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(VEBOX_RING_BASE), s, d, r, w); \
if (HAS_ENGINE(gvt->gt, VCS1)) \
+   MMIO_F(prefix(GEN8_BSD2_RING_BASE), s, d, r, w); \
 } while (0)

-:302: CHECK:MACRO_ARG_REUSE: Macro argument reuse 's' - possible side-effects?
#302: FILE: drivers/gpu/drm/i915/gvt/handlers.c:2082:
+#define MMIO_RING_F(prefix, s, d, r, w) do { \
+   MMIO_F(prefix(RENDER_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(BLT_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(GEN6_BSD_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(VEBOX_RING_BASE), s, d, r, w); \
if (HAS_ENGINE(gvt->gt, VCS1)) \
+   MMIO_F(prefix(GEN8_BSD2_RING_BASE), s, d, r, w); \
 } while (0)

-:302: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'd' - possible side-effects?
#302: FILE: drivers/gpu/drm/i915/gvt/handlers.c:2082:
+#define MMIO_RING_F(prefix, s, d, r, w) do { \
+   MMIO_F(prefix(RENDER_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(BLT_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(GEN6_BSD_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(VEBOX_RING_BASE), s, d, r, w); \
if (HAS_ENGINE(gvt->gt, VCS1)) \
+   MMIO_F(prefix(GEN8_BSD2_RING_BASE), s, d, r, w); \
 } while (0)

-:302: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'r' - possible side-effects?
#302: FILE: drivers/gpu/drm/i915/gvt/handlers.c:2082:
+#define MMIO_RING_F(prefix, s, d, r, w) do { \
+   MMIO_F(prefix(RENDER_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(BLT_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(GEN6_BSD_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(VEBOX_RING_BASE), s, d, r, w); \
if (HAS_ENGINE(gvt->gt, VCS1)) \
+   MMIO_F(prefix(GEN8_BSD2_RING_BASE), s, d, r, w); \
 } while (0)

-:302: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'w' - possible side-effects?
#302: FILE: drivers/gpu/drm/i915/gvt/handlers.c:2082:
+#define MMIO_RING_F(prefix, s, d, r, w) do { \
+   MMIO_F(prefix(RENDER_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(BLT_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(GEN6_BSD_RING_BASE), s, d, r, w); \
+   MMIO_F(prefix(VEBOX_RING_BASE), s, d, r, w); \
if (HAS_ENGINE(gvt->gt, VCS1)) \
+   MMIO_F(prefix(GEN8_BSD2_RING_BASE), s, d, r, w); \
 } while (0)

-:2091: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does 
MAINTAINERS need updating?
#2091: 
new file mode 100644

-:2096: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier 
tag in line 1
#2096: FILE: drivers/gpu/drm/i915/gvt/mmio_info_table.c:1:
+/*

-:2158: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#2158: FILE: drivers/gpu/drm/i915/gvt/mmio_info_table.c:63:
+bool intel_gvt_match_device(struct intel_gvt *gvt,
+   unsigned long device)

-:2175: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#2175: FILE: drivers/gpu/drm/i915/gvt/mmio_info_table.c:80:
+struct intel_gvt_mmio_info *intel_gvt_find_mmio_info(struct intel_gvt *gvt,
+ unsigned int offset)

-:2187: CHECK:PARENTHESIS_

Re: [Intel-gfx] [PATCH] drm/i915/gemfs: don't mark huge_opt as static

2021-11-26 Thread Tvrtko Ursulin



On 26/11/2021 11:08, Matthew Auld wrote:

vfs_kernel_mount() modifies the passed in mount options, leaving us with
"huge", instead of "huge=within_size". Normally this shouldn't matter
with the usual module load/unload flow, however with the core_hotunplug
IGT we are hitting the following, when re-probing the memory regions:


Doh and thanks for fixing it. I obviously figured out it changes the 
string but did not grasp all the consequences.


Reviewed-by: Tvrtko Ursulin 

Regards,

Tvrtko


i915 :00:02.0: [drm] Transparent Hugepage mode 'huge'
tmpfs: Bad value for 'huge'
[drm] Unable to create a private tmpfs mount, hugepage support will be 
disabled(-22).

References: https://gitlab.freedesktop.org/drm/intel/-/issues/4651
Signed-off-by: Matthew Auld 
Cc: Tvrtko Ursulin 
---
  drivers/gpu/drm/i915/gem/i915_gemfs.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gemfs.c 
b/drivers/gpu/drm/i915/gem/i915_gemfs.c
index dbdbdc344d87..182da3c04771 100644
--- a/drivers/gpu/drm/i915/gem/i915_gemfs.c
+++ b/drivers/gpu/drm/i915/gem/i915_gemfs.c
@@ -12,6 +12,7 @@
  
  int i915_gemfs_init(struct drm_i915_private *i915)

  {
+   char huge_opt[] = "huge=within_size"; /* r/w */
struct file_system_type *type;
struct vfsmount *gemfs;
char *opts;
@@ -33,8 +34,6 @@ int i915_gemfs_init(struct drm_i915_private *i915)
opts = NULL;
if (intel_vtd_active()) {
if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) {
-   static char huge_opt[] = "huge=within_size"; /* r/w */
-
opts = huge_opt;
drm_info(&i915->drm,
 "Transparent Hugepage mode '%s'\n",



[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gemfs: don't mark huge_opt as static

2021-11-26 Thread Patchwork
== Series Details ==

Series: drm/i915/gemfs: don't mark huge_opt as static
URL   : https://patchwork.freedesktop.org/series/97320/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10930 -> Patchwork_21685


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (39 -> 33)
--

  Additional (1): fi-kbl-soraka 
  Missing(7): bat-dg1-6 bat-dg1-5 bat-adlp-6 bat-adlp-4 fi-bdw-samus 
bat-jsl-2 bat-jsl-1 

Known issues


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

### IGT changes ###

 Issues hit 

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

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

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

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

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

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

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

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

  * igt@runner@aborted:
- fi-skl-6600u:   NOTRUN -> [FAIL][11] ([i915#3363] / [i915#4312])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21685/fi-skl-6600u/igt@run...@aborted.html
- fi-bdw-5557u:   NOTRUN -> [FAIL][12] ([i915#1602] / [i915#2426] / 
[i915#4312])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21685/fi-bdw-5557u/igt@run...@aborted.html

  
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1602]: https://gitlab.freedesktop.org/drm/intel/issues/1602
  [i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2291]: https://gitlab.freedesktop.org/drm/intel/issues/2291
  [i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
  [i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
  [i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
  [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#533]: https://gitlab.freedesktop.org/drm/intel/issues/533


Build changes
-

  * Linux: CI_DRM_10930 -> Patchwork_21685

  CI-20190529: 20190529
  CI_DRM_10930: 2c9ba65f2befe9febd864f0795227b351bd62dba @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6291: 9ff3844d8c1fee8d8736d888f16223c4789fb69f @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_21685: 881e20f9f4a0b93acd85544c1a19acf1212a9cfc @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

881e20f9f4a0 drm/i915/gemfs: don't mark huge_opt as static

== Logs ==

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


[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gemfs: don't mark huge_opt as static

2021-11-26 Thread Patchwork
== Series Details ==

Series: drm/i915/gemfs: don't mark huge_opt as static
URL   : https://patchwork.freedesktop.org/series/97320/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
881e20f9f4a0 drm/i915/gemfs: don't mark huge_opt as static
-:13: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description 
(prefer a maximum 75 chars per line)
#13: 
[drm] Unable to create a private tmpfs mount, hugepage support will be 
disabled(-22).

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




[Intel-gfx] [PATCH v3 1/2] i915/gvt: Introduce the mmio_info_table.c to support VFIO new mdev API

2021-11-26 Thread Zhi Wang
From: Zhi Wang 

To support the new mdev interfaces and the re-factor patches from
Christoph, which moves the GVT-g code into a dedicated module, the GVT-g
initialization path has to be seperated into two phases:

a) Early initialization.

The early initialization of GVT requires to be done when loading i915.
Mostly it's because the inital clean HW state needs to be saved before
i915 touches the HW.

b) Late initalization.

This phases of initalization will setup the rest components of GVT-g,
which can be done later when the dedicated module is being loaded.

v3:

- Fix the errors when CONFIG_DRM_I915_WERROR is turned on. (Jani)

v2:

- Implement a mmio table instead of generating it by marco in i915. (Jani)

Cc: Christoph Hellwig 
Cc: Jason Gunthorpe 
Cc: Jani Nikula 
Cc: Joonas Lahtinen 
Cc: Vivi Rodrigo 
Cc: Zhenyu Wang 
Cc: Zhi Wang 
Tested-by: Terrence Xu 
Signed-off-by: Zhi Wang 
---
 drivers/gpu/drm/i915/Makefile  |2 +-
 drivers/gpu/drm/i915/gvt/gvt.c |   38 +-
 drivers/gpu/drm/i915/gvt/gvt.h |1 +
 drivers/gpu/drm/i915/gvt/handlers.c| 1780 +++-
 drivers/gpu/drm/i915/gvt/mmio.h|5 +-
 drivers/gpu/drm/i915/gvt/mmio_info_table.c | 1461 
 drivers/gpu/drm/i915/gvt/mmio_info_table.h |   37 +
 drivers/gpu/drm/i915/gvt/reg.h |9 +-
 drivers/gpu/drm/i915/intel_gvt.c   |   42 +-
 9 files changed, 1777 insertions(+), 1598 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/gvt/mmio_info_table.c
 create mode 100644 drivers/gpu/drm/i915/gvt/mmio_info_table.h

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index cdc244bbbfc1..55603aebe3e4 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -309,7 +309,7 @@ i915-$(CONFIG_DRM_I915_SELFTEST) += \
 i915-y += i915_vgpu.o
 
 ifeq ($(CONFIG_DRM_I915_GVT),y)
-i915-y += intel_gvt.o
+i915-y += intel_gvt.o gvt/mmio_info_table.o
 include $(src)/gvt/Makefile
 endif
 
diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c
index cbac409f6c8a..c7580db355c0 100644
--- a/drivers/gpu/drm/i915/gvt/gvt.c
+++ b/drivers/gpu/drm/i915/gvt/gvt.c
@@ -63,23 +63,6 @@ static const struct intel_gvt_ops intel_gvt_ops = {
.emulate_hotplug = intel_vgpu_emulate_hotplug,
 };
 
-static void init_device_info(struct intel_gvt *gvt)
-{
-   struct intel_gvt_device_info *info = &gvt->device_info;
-   struct pci_dev *pdev = to_pci_dev(gvt->gt->i915->drm.dev);
-
-   info->max_support_vgpus = 8;
-   info->cfg_space_size = PCI_CFG_SPACE_EXP_SIZE;
-   info->mmio_size = 2 * 1024 * 1024;
-   info->mmio_bar = 0;
-   info->gtt_start_offset = 8 * 1024 * 1024;
-   info->gtt_entry_size = 8;
-   info->gtt_entry_size_shift = 3;
-   info->gmadr_bytes_in_cmd = 8;
-   info->max_surface_size = 36 * 1024 * 1024;
-   info->msi_cap_offset = pdev->msi_cap;
-}
-
 static void intel_gvt_test_and_emulate_vblank(struct intel_gvt *gvt)
 {
struct intel_vgpu *vgpu;
@@ -169,7 +152,6 @@ void intel_gvt_clean_device(struct drm_i915_private *i915)
intel_gvt_clean_workload_scheduler(gvt);
intel_gvt_clean_gtt(gvt);
intel_gvt_free_firmware(gvt);
-   intel_gvt_clean_mmio_info(gvt);
idr_destroy(&gvt->vgpu_idr);
 
kfree(i915->gvt);
@@ -188,16 +170,12 @@ void intel_gvt_clean_device(struct drm_i915_private *i915)
  */
 int intel_gvt_init_device(struct drm_i915_private *i915)
 {
-   struct intel_gvt *gvt;
+   struct intel_gvt *gvt = i915->gvt;
struct intel_vgpu *vgpu;
int ret;
 
-   if (drm_WARN_ON(&i915->drm, i915->gvt))
-   return -EEXIST;
-
-   gvt = kzalloc(sizeof(struct intel_gvt), GFP_KERNEL);
-   if (!gvt)
-   return -ENOMEM;
+   if (drm_WARN_ON(&i915->drm, !i915->gvt))
+   return -ENODEV;
 
gvt_dbg_core("init gvt device\n");
 
@@ -205,12 +183,8 @@ int intel_gvt_init_device(struct drm_i915_private *i915)
spin_lock_init(&gvt->scheduler.mmio_context_lock);
mutex_init(&gvt->lock);
mutex_init(&gvt->sched_lock);
-   gvt->gt = &i915->gt;
-   i915->gvt = gvt;
-
-   init_device_info(gvt);
 
-   ret = intel_gvt_setup_mmio_info(gvt);
+   ret = intel_gvt_setup_mmio_handlers(gvt);
if (ret)
goto out_clean_idr;
 
@@ -218,7 +192,7 @@ int intel_gvt_init_device(struct drm_i915_private *i915)
 
ret = intel_gvt_load_firmware(gvt);
if (ret)
-   goto out_clean_mmio_info;
+   goto out_clean_idr;
 
ret = intel_gvt_init_irq(gvt);
if (ret)
@@ -277,8 +251,6 @@ int intel_gvt_init_device(struct drm_i915_private *i915)
intel_gvt_clean_gtt(gvt);
 out_free_firmware:
intel_gvt_free_firmware(gvt);
-out_clean_mmio_info:
-   intel_gvt_clean_mmio_info(gvt);
 out_clean_idr:
idr_destroy(&gvt->vgpu_idr);
kfree(gvt);
diff --git a/driv

[Intel-gfx] [PATCH v3 2/2] i915/gvt: save the MMIO snapshot in the early init of GVT-g

2021-11-26 Thread Zhi Wang
From: Zhi Wang 

To support the early init of GVT-g, which will be put in i915, after the
GVT-g is moved into a dedicated module, we need to save the MMIO snapshot
in the early init of GVT-g, when the HW hasn't been touched.

v3:

- Fix errors when CONFIG_DRM_I915_WERROR is turned on. (Jani)

Cc: Christoph Hellwig 
Cc: Jason Gunthorpe 
Cc: Jani Nikula 
Cc: Joonas Lahtinen 
Cc: Vivi Rodrigo 
Cc: Zhenyu Wang 
Cc: Zhi Wang 
Tested-by: Terrence Xu 
Signed-off-by: Zhi Wang 
---
 drivers/gpu/drm/i915/gvt/firmware.c| 40 +---
 drivers/gpu/drm/i915/gvt/handlers.c| 39 
 drivers/gpu/drm/i915/gvt/mmio_info_table.c | 72 +-
 drivers/gpu/drm/i915/gvt/mmio_info_table.h |  3 +
 4 files changed, 77 insertions(+), 77 deletions(-)

diff --git a/drivers/gpu/drm/i915/gvt/firmware.c 
b/drivers/gpu/drm/i915/gvt/firmware.c
index 1a8274a3f4b1..28719c2f253f 100644
--- a/drivers/gpu/drm/i915/gvt/firmware.c
+++ b/drivers/gpu/drm/i915/gvt/firmware.c
@@ -66,12 +66,6 @@ static struct bin_attribute firmware_attr = {
.mmap = NULL,
 };
 
-static int mmio_snapshot_handler(struct intel_gvt *gvt, u32 offset, void *data)
-{
-   *(u32 *)(data + offset) = intel_uncore_read_notrace(gvt->gt->uncore,
-   _MMIO(offset));
-   return 0;
-}
 
 static int expose_firmware_sysfs(struct intel_gvt *gvt)
 {
@@ -81,7 +75,7 @@ static int expose_firmware_sysfs(struct intel_gvt *gvt)
void *firmware;
void *p;
unsigned long size, crc32_start;
-   int i, ret;
+   int ret;
 
size = sizeof(*h) + info->mmio_size + info->cfg_space_size;
firmware = vzalloc(size);
@@ -99,17 +93,11 @@ static int expose_firmware_sysfs(struct intel_gvt *gvt)
 
p = firmware + h->cfg_space_offset;
 
-   for (i = 0; i < h->cfg_space_size; i += 4)
-   pci_read_config_dword(pdev, i, p + i);
-
-   memcpy(gvt->firmware.cfg_space, p, info->cfg_space_size);
+   memcpy(p, gvt->firmware.cfg_space, info->cfg_space_size);
 
p = firmware + h->mmio_offset;
 
-   /* Take a snapshot of hw mmio registers. */
-   intel_gvt_for_each_tracked_mmio(gvt, mmio_snapshot_handler, p);
-
-   memcpy(gvt->firmware.mmio, p, info->mmio_size);
+   memcpy(p, gvt->firmware.mmio, info->mmio_size);
 
crc32_start = offsetof(struct gvt_firmware_header, crc32) + 4;
h->crc32 = crc32_le(0, firmware + crc32_start, size - crc32_start);
@@ -142,9 +130,6 @@ void intel_gvt_free_firmware(struct intel_gvt *gvt)
 {
if (!gvt->firmware.firmware_loaded)
clean_firmware_sysfs(gvt);
-
-   kfree(gvt->firmware.cfg_space);
-   vfree(gvt->firmware.mmio);
 }
 
 static int verify_firmware(struct intel_gvt *gvt,
@@ -204,36 +189,17 @@ static int verify_firmware(struct intel_gvt *gvt,
  */
 int intel_gvt_load_firmware(struct intel_gvt *gvt)
 {
-   struct intel_gvt_device_info *info = &gvt->device_info;
struct pci_dev *pdev = to_pci_dev(gvt->gt->i915->drm.dev);
struct intel_gvt_firmware *firmware = &gvt->firmware;
struct gvt_firmware_header *h;
const struct firmware *fw;
char *path;
-   void *mem;
int ret;
 
path = kmalloc(PATH_MAX, GFP_KERNEL);
if (!path)
return -ENOMEM;
 
-   mem = kmalloc(info->cfg_space_size, GFP_KERNEL);
-   if (!mem) {
-   kfree(path);
-   return -ENOMEM;
-   }
-
-   firmware->cfg_space = mem;
-
-   mem = vmalloc(info->mmio_size);
-   if (!mem) {
-   kfree(path);
-   kfree(firmware->cfg_space);
-   return -ENOMEM;
-   }
-
-   firmware->mmio = mem;
-
sprintf(path, "%s/vid_0x%04x_did_0x%04x_rid_0x%02x.golden_hw_state",
 GVT_FIRMWARE_PATH, pdev->vendor, pdev->device,
 pdev->revision);
diff --git a/drivers/gpu/drm/i915/gvt/handlers.c 
b/drivers/gpu/drm/i915/gvt/handlers.c
index 2c064da3db6d..ba7b330a2c71 100644
--- a/drivers/gpu/drm/i915/gvt/handlers.c
+++ b/drivers/gpu/drm/i915/gvt/handlers.c
@@ -2406,45 +2406,6 @@ int intel_gvt_setup_mmio_handlers(struct intel_gvt *gvt)
return ret;
 }
 
-/**
- * intel_gvt_for_each_tracked_mmio - iterate each tracked mmio
- * @gvt: a GVT device
- * @handler: the handler
- * @data: private data given to handler
- *
- * Returns:
- * Zero on success, negative error code if failed.
- */
-int intel_gvt_for_each_tracked_mmio(struct intel_gvt *gvt,
-   int (*handler)(struct intel_gvt *gvt, u32 offset, void *data),
-   void *data)
-{
-   struct gvt_mmio_block *block = gvt->mmio.mmio_block;
-   struct intel_gvt_mmio_info *e;
-   int i, j, ret;
-
-   hash_for_each(gvt->mmio.mmio_info_table, i, e, node) {
-   ret = handler(gvt, e->offset, data);
-   if (ret)
-   return ret;
-   }
-
-   for (i = 0; i < gvt->mmio.num_mmio_block; i++, block++) {

Re: [Intel-gfx] [PATCH] drm/i915: Fix DPT suspend/resume on !HAS_DISPLAY platforms

2021-11-26 Thread Ville Syrjälä
On Thu, Nov 25, 2021 at 07:16:03PM +0200, Imre Deak wrote:
> The drm.mode_config state is not initialized in case of !HAS_DISPLAY
> so taking the fb_lock and iterating the fb list won't work on those
> platforms. Skip the suspend/resume with an explicit check for this.
> 
> Fixes: 9755f055f512 ("drm/i915: Restore memory mapping for DPT FBs across 
> system suspend/resume")
> Cc: Chris Wilson 
> Cc: Ville Syrjala 
> Cc: Jani Nikula 
> Signed-off-by: Imre Deak 

Reviewed-by: Ville Syrjälä 

> ---
>  drivers/gpu/drm/i915/display/intel_dpt.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dpt.c 
> b/drivers/gpu/drm/i915/display/intel_dpt.c
> index 56755788547d2..963ca7155b064 100644
> --- a/drivers/gpu/drm/i915/display/intel_dpt.c
> +++ b/drivers/gpu/drm/i915/display/intel_dpt.c
> @@ -183,6 +183,9 @@ void intel_dpt_resume(struct drm_i915_private *i915)
>  {
>   struct drm_framebuffer *drm_fb;
>  
> + if (!HAS_DISPLAY(i915))
> + return;
> +
>   mutex_lock(&i915->drm.mode_config.fb_lock);
>   drm_for_each_fb(drm_fb, &i915->drm) {
>   struct intel_framebuffer *fb = to_intel_framebuffer(drm_fb);
> @@ -207,6 +210,9 @@ void intel_dpt_suspend(struct drm_i915_private *i915)
>  {
>   struct drm_framebuffer *drm_fb;
>  
> + if (!HAS_DISPLAY(i915))
> + return;
> +
>   mutex_lock(&i915->drm.mode_config.fb_lock);
>  
>   drm_for_each_fb(drm_fb, &i915->drm) {
> -- 
> 2.27.0

-- 
Ville Syrjälä
Intel


[Intel-gfx] [PATCH] drm/i915/gemfs: don't mark huge_opt as static

2021-11-26 Thread Matthew Auld
vfs_kernel_mount() modifies the passed in mount options, leaving us with
"huge", instead of "huge=within_size". Normally this shouldn't matter
with the usual module load/unload flow, however with the core_hotunplug
IGT we are hitting the following, when re-probing the memory regions:

i915 :00:02.0: [drm] Transparent Hugepage mode 'huge'
tmpfs: Bad value for 'huge'
[drm] Unable to create a private tmpfs mount, hugepage support will be 
disabled(-22).

References: https://gitlab.freedesktop.org/drm/intel/-/issues/4651
Signed-off-by: Matthew Auld 
Cc: Tvrtko Ursulin 
---
 drivers/gpu/drm/i915/gem/i915_gemfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gemfs.c 
b/drivers/gpu/drm/i915/gem/i915_gemfs.c
index dbdbdc344d87..182da3c04771 100644
--- a/drivers/gpu/drm/i915/gem/i915_gemfs.c
+++ b/drivers/gpu/drm/i915/gem/i915_gemfs.c
@@ -12,6 +12,7 @@
 
 int i915_gemfs_init(struct drm_i915_private *i915)
 {
+   char huge_opt[] = "huge=within_size"; /* r/w */
struct file_system_type *type;
struct vfsmount *gemfs;
char *opts;
@@ -33,8 +34,6 @@ int i915_gemfs_init(struct drm_i915_private *i915)
opts = NULL;
if (intel_vtd_active()) {
if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) {
-   static char huge_opt[] = "huge=within_size"; /* r/w */
-
opts = huge_opt;
drm_info(&i915->drm,
 "Transparent Hugepage mode '%s'\n",
-- 
2.31.1



Re: [Intel-gfx] [PATCH i-g-t] tests/core_hotunplug: Show device PCI bus address on errors

2021-11-26 Thread Janusz Krzysztofik
On Friday, 26 November 2021 09:00:06 CET Bernatowicz, Marcin wrote:
> 
> On 11/18/2021 9:41 AM, Janusz Krzysztofik wrote:
> > Strange -ENODEV responses from the kernel to i915 driver rebind attempts
> > have been sporadically observed.  After successfully unbinding the driver
> > from a device by writing a string representing its PCI bus address to
> > /sys/bus/pci/driver/i915/unbind, the test then fails while writing the
> > same device PCI bus address string to /sys/bus/pci/drivers/i915/bind.  It
> > is unlikely that the device disappears from the bus when this happens --
> > the test would attempt to rescan the bus in such cases while it doesn't.
> > 
> > To shed more light on what may be going on, extend error messages emitted
> > by the test with the device PCI bus address string it uses also printed.
> > 
> > Signed-off-by: Janusz Krzysztofik 
> > ---
> >   tests/core_hotunplug.c | 12 ++--
> >   1 file changed, 6 insertions(+), 6 deletions(-)
> > 
> > diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
> > index b36616688..2f2fb7ac1 100644
> > --- a/tests/core_hotunplug.c
> > +++ b/tests/core_hotunplug.c
> > @@ -174,11 +174,11 @@ static void driver_unbind(struct hotunplug *priv, 
> > const char *prefix,
> > igt_set_timeout(timeout, "Driver unbind timeout!");
> > igt_assert_f(igt_sysfs_set(priv->fd.sysfs_drv, "unbind",
> >priv->dev_bus_addr),
> > -"Driver unbind failure!\n");
> > +"Driver unbind failure (%s)!\n", priv->dev_bus_addr);
> > igt_reset_timeout();
> >   
> > igt_assert_f(faccessat(priv->fd.sysfs_drv, priv->dev_bus_addr, F_OK, 0),
> > -"Unbound device still present\n");
> > +"Unbound device still present (%s)\n", priv->dev_bus_addr);
> >   }
> >   
> >   /* Re-bind the driver to the device */
> > @@ -190,12 +190,12 @@ static void driver_bind(struct hotunplug *priv, int 
> > timeout)
> > igt_set_timeout(timeout, "Driver re-bind timeout!");
> > igt_assert_f(igt_sysfs_set(priv->fd.sysfs_drv, "bind",
> >priv->dev_bus_addr),
> > -"Driver re-bind failure\n!");
> > +"Driver re-bind failure (%s)!\n", priv->dev_bus_addr);
> > igt_reset_timeout();
> >   
> > igt_fail_on_f(faccessat(priv->fd.sysfs_drv, priv->dev_bus_addr,
> > F_OK, 0),
> > - "Rebound device not present!\n");
> > + "Rebound device not present (%s)!\n", priv->dev_bus_addr);
> >   
> > if (priv->snd_unload)
> > igt_kmod_load("snd_hda_intel", NULL);
> > @@ -223,7 +223,7 @@ static void device_unplug(struct hotunplug *priv, const 
> > char *prefix,
> > igt_assert_eq(priv->fd.sysfs_dev, -1);
> >   
> > igt_assert_f(faccessat(priv->fd.sysfs_bus, priv->dev_bus_addr, F_OK, 0),
> > -"Unplugged device still present\n");
> > +"Unplugged device still present (%s)\n", 
> > priv->dev_bus_addr);
> >   }
> >   
> >   /* Re-discover the device by rescanning its bus */
> > @@ -239,7 +239,7 @@ static void bus_rescan(struct hotunplug *priv, int 
> > timeout)
> >   
> > igt_fail_on_f(faccessat(priv->fd.sysfs_bus, priv->dev_bus_addr,
> > F_OK, 0),
> > - "Fakely unplugged device not rediscovered!\n");
> > + "Fakely unplugged device not rediscovered (%s)!\n", 
> > priv->dev_bus_addr);
> >   }
> >   
> >   static void cleanup(struct hotunplug *priv)
> > 
> LGTM,
> Reviewed-by: Marcin Bernatowicz 

Thanks Marcin, pushed.

Janusz





[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/fbc: More FBC refactoring (rev2)

2021-11-26 Thread Patchwork
== Series Details ==

Series: drm/i915/fbc: More FBC refactoring (rev2)
URL   : https://patchwork.freedesktop.org/series/97239/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10929_full -> Patchwork_21684_full


Summary
---

  **FAILURE**

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

  

Participating hosts (11 -> 11)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-indfb-msflip-blt:
- shard-tglb: [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10929/shard-tglb5/igt@kms_frontbuffer_track...@psr-1p-primscrn-indfb-msflip-blt.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21684/shard-tglb8/igt@kms_frontbuffer_track...@psr-1p-primscrn-indfb-msflip-blt.html

  
Known issues


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

### IGT changes ###

 Issues hit 

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

  * igt@gem_eio@unwedge-stress:
- shard-tglb: [PASS][4] -> [TIMEOUT][5] ([i915#3063] / [i915#3648])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10929/shard-tglb3/igt@gem_...@unwedge-stress.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21684/shard-tglb1/igt@gem_...@unwedge-stress.html

  * igt@gem_exec_fair@basic-flow@rcs0:
- shard-tglb: [PASS][6] -> [FAIL][7] ([i915#2842])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10929/shard-tglb2/igt@gem_exec_fair@basic-f...@rcs0.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21684/shard-tglb5/igt@gem_exec_fair@basic-f...@rcs0.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
- shard-apl:  [PASS][8] -> [SKIP][9] ([fdo#109271])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10929/shard-apl4/igt@gem_exec_fair@basic-none-sh...@rcs0.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21684/shard-apl7/igt@gem_exec_fair@basic-none-sh...@rcs0.html

  * igt@gem_exec_fair@basic-none-vip@rcs0:
- shard-iclb: NOTRUN -> [FAIL][10] ([i915#2842])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21684/shard-iclb8/igt@gem_exec_fair@basic-none-...@rcs0.html

  * igt@gem_exec_fair@basic-pace@rcs0:
- shard-kbl:  [PASS][11] -> [SKIP][12] ([fdo#109271])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10929/shard-kbl7/igt@gem_exec_fair@basic-p...@rcs0.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21684/shard-kbl4/igt@gem_exec_fair@basic-p...@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs0:
- shard-kbl:  [PASS][13] -> [FAIL][14] ([i915#2842])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10929/shard-kbl7/igt@gem_exec_fair@basic-p...@vcs0.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21684/shard-kbl4/igt@gem_exec_fair@basic-p...@vcs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
- shard-glk:  [PASS][15] -> [FAIL][16] ([i915#2842]) +2 similar 
issues
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10929/shard-glk8/igt@gem_exec_fair@basic-throt...@rcs0.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21684/shard-glk9/igt@gem_exec_fair@basic-throt...@rcs0.html

  * igt@gem_huc_copy@huc-copy:
- shard-tglb: [PASS][17] -> [SKIP][18] ([i915#2190])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10929/shard-tglb3/igt@gem_huc_c...@huc-copy.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21684/shard-tglb6/igt@gem_huc_c...@huc-copy.html

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

  * igt@gem_pread@exhaustion:
- shard-snb:  NOTRUN -> [WARN][21] ([i915#2658])
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21684/shard-snb7/igt@gem_pr...@e

Re: [Intel-gfx] [PATCH] drm/i915: Use per device iommu check

2021-11-26 Thread Lu Baolu

On 2021/11/25 19:47, Robin Murphy wrote:

On 2021-11-25 10:42, Tvrtko Ursulin wrote:

From: Tvrtko Ursulin 

With both integrated and discrete Intel GPUs in a system, the current
global check of intel_iommu_gfx_mapped, as done from intel_vtd_active()
may not be completely accurate.

In this patch we add i915 parameter to intel_vtd_active() in order to
prepare it for multiple GPUs and we also change the check away from Intel
specific intel_iommu_gfx_mapped (global exported by the Intel IOMMU
driver) to probing the presence of IOMMU domain on a specific device
using iommu_get_domain_for_dev().


FWIW the way you have it now is functionally equivalent to using 
device_iommu_mapped(), which I think might be slightly clearer for the 
current intent, but I don't have a significantly strong preference 
(after all, this *was* the de-facto way of checking before 
device_iommu_mapped() was introduced, and there are still other examples 
of it around). So from the IOMMU perspective,


Acked-by: Robin Murphy 

Perhaps the AGP driver could also be tweaked and intel_iommu_gfx_mapped 
cleaned away entirely, but I'll leave that for Baolu to think about :)


I fully agreed with Robin.

I prefer device_iommu_mapped() more than iommu_get_domain_for_dev().

"iommu_get_domain_for_dev(dev) == NULL" simply means that the device
does not have any domain attached. Although at present, it is equivalent
to device DMAing without IOMMU translation. But I'm sure it will change
in the future.

With device_iommu_mapped() replaced,

Reviewed-by: Lu Baolu 

Best regards,
baolu


Re: [Intel-gfx] [RFC v2 01/22] drm: RFC for Plane Color Hardware Pipeline

2021-11-26 Thread Pekka Paalanen
On Thu, 25 Nov 2021 20:43:19 +
"Shankar, Uma"  wrote:

> > -Original Message-
> > From: Harry Wentland 
> > Sent: Tuesday, November 23, 2021 8:35 PM
> > To: Shankar, Uma ; intel-gfx@lists.freedesktop.org; 
> > dri-
> > de...@lists.freedesktop.org
> > Cc: ville.syrj...@linux.intel.com; ppaala...@gmail.com; 
> > brian.star...@arm.com;
> > sebast...@sebastianwick.net; shashank.sha...@amd.com
> > Subject: Re: [RFC v2 01/22] drm: RFC for Plane Color Hardware Pipeline
> > 
> > 
> > 
> > On 2021-09-06 17:38, Uma Shankar wrote:  
> > > This is a RFC proposal for plane color hardware blocks.
> > > It exposes the property interface to userspace and calls out the
> > > details or interfaces created and the intended purpose.
> > >
> > > Credits: Ville Syrjälä 
> > > Signed-off-by: Uma Shankar 
> > > ---
> > >  Documentation/gpu/rfc/drm_color_pipeline.rst | 167
> > > +++
> > >  1 file changed, 167 insertions(+)
> > >  create mode 100644 Documentation/gpu/rfc/drm_color_pipeline.rst
> > >
> > > diff --git a/Documentation/gpu/rfc/drm_color_pipeline.rst
> > > b/Documentation/gpu/rfc/drm_color_pipeline.rst
> > > new file mode 100644
> > > index ..0d1ca858783b
> > > --- /dev/null
> > > +++ b/Documentation/gpu/rfc/drm_color_pipeline.rst
> > > @@ -0,0 +1,167 @@
> > > +==
> > > +Display Color Pipeline: Proposed DRM Properties
> > > +==
> > > +
> > > +This is how a typical display color hardware pipeline looks like:
> > > + +---+
> > > + |RAM|
> > > + |  +--++-++-+   |
> > > + |  | FB 1 ||  FB 2   || FB N|   |
> > > + |  +--++-++-+   |
> > > + +---+
> > > +   |  Plane Color Hardware Block |
> > > + ++
> > > + | +---v-+   +---v---+   +---v--+ |
> > > + | | Plane A |   | Plane B   |   | Plane N  | |
> > > + | | DeGamma |   | Degamma   |   | Degamma  | |
> > > + | +---+-+   +---+---+   +---+--+ |
> > > + | | |   ||
> > > + | +---v-+   +---v---+   +---v--+ |
> > > + | |Plane A  |   | Plane B   |   | Plane N  | |
> > > + | |CSC/CTM  |   | CSC/CTM   |   | CSC/CTM  | |
> > > + | +---+-+   ++--+   ++-+ |
> > > + | |  |   |   |
> > > + | +---v-+   +v--+   +v-+ |
> > > + | | Plane A |   | Plane B   |   | Plane N  | |
> > > + | | Gamma   |   | Gamma |   | Gamma| |
> > > + | +---+-+   ++--+   ++-+ |
> > > + | |  |   |   |
> > > + ++
> > > ++--v--v---v---|
> > > +||   ||
> > > +||   Pipe Blender||
> > > ++++
> > > +|||
> > > +|+---v--+ |
> > > +||  Pipe DeGamma| |
> > > +||  | |
> > > +|+---+--+ |
> > > +||Pipe Color  |
> > > +|+---v--+ Hardware|
> > > +||  Pipe CSC/CTM| |
> > > +||  | |
> > > +|+---+--+ |
> > > +|||
> > > +|+---v--+ |
> > > +||  Pipe Gamma  | |
> > > +||  | |
> > > +|+---+--+ |
> > > +|||
> > > ++-+
> > > + |
> > > + v
> > > +   Pipe Output
> > > +  
> > 
> > This diagram defines what happens before and after the blending space but 
> > did
> > where does scaling fit into it? Scaling can look different when performed 
> > in linear or
> > non-linear space so I think it is important to define where in the pipeline 
> > it sits.
> > 
> > In my view scaling would happen between plane degamma and plane CSC.  
> 
> Yeah we can add scaling as well to make it clear. Scaling ideally should 
> happen after
> Degamma. In intel's case it is after the CSC.

Btw. are you aware that if a plane has an alpha channel which is used
for pixel coverage (i.e. shape anti-aliasing), then non-nearest
sampling and therefore also scaling must operate on alpha
pre-multiplied optical (linear) values?

For the best results, of course.

So after degamma indeed, but you cannot degamma with pre-multiplied
alpha, yet scaling should use pre-multipli

Re: [Intel-gfx] [PATCH i-g-t] tests/core_hotunplug: Show device PCI bus address on errors

2021-11-26 Thread Bernatowicz, Marcin




On 11/18/2021 9:41 AM, Janusz Krzysztofik wrote:

Strange -ENODEV responses from the kernel to i915 driver rebind attempts
have been sporadically observed.  After successfully unbinding the driver
from a device by writing a string representing its PCI bus address to
/sys/bus/pci/driver/i915/unbind, the test then fails while writing the
same device PCI bus address string to /sys/bus/pci/drivers/i915/bind.  It
is unlikely that the device disappears from the bus when this happens --
the test would attempt to rescan the bus in such cases while it doesn't.

To shed more light on what may be going on, extend error messages emitted
by the test with the device PCI bus address string it uses also printed.

Signed-off-by: Janusz Krzysztofik 
---
  tests/core_hotunplug.c | 12 ++--
  1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
index b36616688..2f2fb7ac1 100644
--- a/tests/core_hotunplug.c
+++ b/tests/core_hotunplug.c
@@ -174,11 +174,11 @@ static void driver_unbind(struct hotunplug *priv, const 
char *prefix,
igt_set_timeout(timeout, "Driver unbind timeout!");
igt_assert_f(igt_sysfs_set(priv->fd.sysfs_drv, "unbind",
   priv->dev_bus_addr),
-"Driver unbind failure!\n");
+"Driver unbind failure (%s)!\n", priv->dev_bus_addr);
igt_reset_timeout();
  
  	igt_assert_f(faccessat(priv->fd.sysfs_drv, priv->dev_bus_addr, F_OK, 0),

-"Unbound device still present\n");
+"Unbound device still present (%s)\n", priv->dev_bus_addr);
  }
  
  /* Re-bind the driver to the device */

@@ -190,12 +190,12 @@ static void driver_bind(struct hotunplug *priv, int 
timeout)
igt_set_timeout(timeout, "Driver re-bind timeout!");
igt_assert_f(igt_sysfs_set(priv->fd.sysfs_drv, "bind",
   priv->dev_bus_addr),
-"Driver re-bind failure\n!");
+"Driver re-bind failure (%s)!\n", priv->dev_bus_addr);
igt_reset_timeout();
  
  	igt_fail_on_f(faccessat(priv->fd.sysfs_drv, priv->dev_bus_addr,

F_OK, 0),
- "Rebound device not present!\n");
+ "Rebound device not present (%s)!\n", priv->dev_bus_addr);
  
  	if (priv->snd_unload)

igt_kmod_load("snd_hda_intel", NULL);
@@ -223,7 +223,7 @@ static void device_unplug(struct hotunplug *priv, const 
char *prefix,
igt_assert_eq(priv->fd.sysfs_dev, -1);
  
  	igt_assert_f(faccessat(priv->fd.sysfs_bus, priv->dev_bus_addr, F_OK, 0),

-"Unplugged device still present\n");
+"Unplugged device still present (%s)\n", 
priv->dev_bus_addr);
  }
  
  /* Re-discover the device by rescanning its bus */

@@ -239,7 +239,7 @@ static void bus_rescan(struct hotunplug *priv, int timeout)
  
  	igt_fail_on_f(faccessat(priv->fd.sysfs_bus, priv->dev_bus_addr,

F_OK, 0),
- "Fakely unplugged device not rediscovered!\n");
+ "Fakely unplugged device not rediscovered (%s)!\n", 
priv->dev_bus_addr);
  }
  
  static void cleanup(struct hotunplug *priv)



LGTM,
Reviewed-by: Marcin Bernatowicz