Skip to contentSkip to conversation

drm/i915: Disable pread/pwrite ioctl's for IGT testing

PATCH New Ashutosh Dixit 2 participants 4 messages Mar 16, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover drm/i915: Disable pread/pwrite ioctl's for IGT testing

FOR CI ONLY. PLEASE DON'T REVIEW.

The upstream guidance at this time is to start phasing out pread/pwrite ioctl's, the rationale being (a) the functionality can be done entirely in userspace with a combination of mmap + memcpy, and
(b) no existing user mode clients actually use the pread/pwrite interface.

The plan is to phase out these ioctls for _new_ Gen12+ platforms. However, since this patch is actually for CI and the real changes which need to be validated are in IGT, in this patch we are disabling pread/pwrite for existing Gen11 and Gen12 platforms. This will be changed once IGT changes are validated and finalized.

Test-with: [email protected]

Ashutosh Dixit (1):
drm/i915: Disable pread/pwrite ioctl's for IGT testing

 drivers/gpu/drm/i915/i915_gem.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
Signature · 6 lines
2.29.2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 1/1 drm/i915: Disable pread/pwrite ioctl's for IGT testing

FOR CI ONLY. PLEASE DON'T REVIEW.

The upstream guidance at this time is to start phasing out pread/pwrite ioctl's, the rationale being (a) the functionality can be done entirely in userspace with a combination of mmap + memcpy, and
(b) no existing user mode clients actually use the pread/pwrite interface.

The plan is to phase out these ioctls for _new_ Gen12+ platforms. However, since this patch is actually for CI and the real changes which need to be validated are in IGT, in this patch we are disabling pread/pwrite for existing Gen11 and Gen12 platforms. This will be changed once IGT changes are validated and finalized.

---
 drivers/gpu/drm/i915/i915_gem.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
drivers/gpu/drm/i915/i915_gem.c +18 -0
index b2e3b5cfccb4..fde3bfa8c509 100644
@@ -362,6 +362,18 @@ i915_gem_gtt_pread(struct drm_i915_gem_object *obj,
 	return ret;
 }
 
+static bool gem_has_pread_pwrite(struct drm_device *dev)
+{
+	/*
+	 * FIXME: Finally we only want to enable this for _new_ Gen12+
+	 * platforms but for now for CI purposes declare pread/pwrite are
+	 * unavailable for all Gen11 and Gen12 platforms so that the IGT
+	 * changes which handle absence of pread/pwrite ioctl's can be
+	 * validated.
+	*/
+	return INTEL_GEN(to_i915(dev)) < 11;
+}
+
 /**
  * Reads data from the object referenced by handle.
  * @dev: drm device pointer
@@ -378,6 +390,9 @@ i915_gem_pread_ioctl(struct drm_device *dev, void *data,
 	struct drm_i915_gem_object *obj;
 	int ret;
 
+	if (!gem_has_pread_pwrite(dev))
+		return -EOPNOTSUPP;
+
 	if (args->size == 0)
 		return 0;
 
@@ -679,6 +694,9 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
 	struct drm_i915_gem_object *obj;
 	int ret;
 
+	if (!gem_has_pread_pwrite(dev))
+		return -EOPNOTSUPP;
+
 	if (args->size == 0)
 		return 0;
 
Signature · 6 lines
2.29.2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Disable pread/pwrite ioctl's for IGT testing (rev4)

In reply to Ashutosh Dixit
== Series Details ==

== Series Details ==

Series: drm/i915: Disable pread/pwrite ioctl's for IGT testing (rev4)
URL : https://patchwork.freedesktop.org/series/86155/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
d6bba833913f drm/i915: Disable pread/pwrite ioctl's for IGT testing
-:38: WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#38: FILE: drivers/gpu/drm/i915/i915_gem.c:373:
+	 * validated.
+	*/

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

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Disable pread/pwrite ioctl's for IGT testing (rev4)

In reply to Ashutosh Dixit
== Series Details ==

== Series Details ==

Series: drm/i915: Disable pread/pwrite ioctl's for IGT testing (rev4)
URL : https://patchwork.freedesktop.org/series/86155/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_9857 -> Patchwork_19792
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in Patchwork_19792, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

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

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

* igt@gem_exec_parallel@engines@userptr:
- fi-icl-y: NOTRUN -> [SKIP][1] +4 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-icl-y/igt@gem_exec_parallel@[email protected]

* igt@gem_tiled_pread_basic:
- fi-icl-u2: [PASS][2] -> [SKIP][3] +4 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9857/fi-icl-u2/igt@gem_tiled_pread_basic.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-icl-u2/igt@gem_tiled_pread_basic.html

* igt@prime_vgem@basic-write:
- fi-tgl-u2: [PASS][4] -> [SKIP][5] +4 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9857/fi-tgl-u2/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-tgl-u2/igt@[email protected]

#### Suppressed ####

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

* igt@gem_exec_parallel@engines@userptr:
- {fi-tgl-dsi}: [PASS][6] -> [SKIP][7] +4 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9857/fi-tgl-dsi/igt@gem_exec_parallel@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-tgl-dsi/igt@gem_exec_parallel@[email protected]

* igt@gem_tiled_pread_basic:
- {fi-jsl-1}: [PASS][8] -> [SKIP][9] +4 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9857/fi-jsl-1/igt@gem_tiled_pread_basic.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-jsl-1/igt@gem_tiled_pread_basic.html

* igt@prime_vgem@basic-read:
- {fi-rkl-11500t}: [PASS][10] -> [SKIP][11] +4 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9857/fi-rkl-11500t/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-rkl-11500t/igt@[email protected]

* igt@prime_vgem@basic-write:
- {fi-ehl-1}: [PASS][12] -> [SKIP][13] +4 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9857/fi-ehl-1/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-ehl-1/igt@[email protected]
- {fi-ehl-2}: [PASS][14] -> [SKIP][15] +4 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9857/fi-ehl-2/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-ehl-2/igt@[email protected]

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_basic@semaphore:
- fi-icl-y: NOTRUN -> [SKIP][16] ([fdo#109315]) +17 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-icl-y/igt@amdgpu/[email protected]

* igt@gem_huc_copy@huc-copy:
- fi-icl-y: NOTRUN -> [SKIP][17] ([i915#2190])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-icl-y/igt@[email protected]

* igt@gem_tiled_blits@basic:
- fi-kbl-8809g: [PASS][18] -> [TIMEOUT][19] ([i915#2502] / [i915#3145])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9857/fi-kbl-8809g/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-kbl-8809g/igt@[email protected]

* igt@kms_chamelium@dp-crc-fast:
- fi-icl-y: NOTRUN -> [SKIP][20] ([fdo#109284] / [fdo#111827]) +8 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-icl-y/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- fi-icl-y: NOTRUN -> [SKIP][21] ([fdo#109285])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-icl-y/igt@[email protected]

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- fi-icl-y: NOTRUN -> [SKIP][22] ([fdo#109278])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-icl-y/igt@[email protected]

* igt@kms_psr@primary_mmap_gtt:
- fi-icl-y: NOTRUN -> [SKIP][23] ([fdo#110189]) +3 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-icl-y/igt@kms_psr@primary_mmap_gtt.html

#### Possible fixes ####

* igt@i915_selftest@live@client:
- fi-glk-dsi: [DMESG-FAIL][24] ([i915#3047]) -> [PASS][25]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9857/fi-glk-dsi/igt@i915_selftest@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-glk-dsi/igt@i915_selftest@[email protected]

#### Warnings ####

* igt@i915_pm_rpm@module-reload:
- fi-glk-dsi: [DMESG-WARN][26] ([i915#3143]) -> [DMESG-WARN][27] ([i915#1982] / [i915#3143])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9857/fi-glk-dsi/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19792/fi-glk-dsi/igt@[email protected]

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

[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1222]: https://gitlab.freedesktop.org/drm/intel/issues/1222
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2502]: https://gitlab.freedesktop.org/drm/intel/issues/2502
[i915#3047]: https://gitlab.freedesktop.org/drm/intel/issues/3047
[i915#3143]: https://gitlab.freedesktop.org/drm/intel/issues/3143
[i915#3145]: https://gitlab.freedesktop.org/drm/intel/issues/3145

Participating hosts (44 -> 41)
------------------------------

Additional (1): fi-icl-y
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-bsw-cyan fi-bdw-samus

Build changes
-------------

* IGT: IGT_6032 -> IGTPW_5603
* Linux: CI_DRM_9857 -> Patchwork_19792

CI-20190529: 20190529
CI_DRM_9857: 0f9254e98a162e962fa4b9517645c4be44367e27 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_5603: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5603/index.html
IGT_6032: f3fd2cc23455929d0ef276e05e02416b86a6db91 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_19792: d6bba833913fb941f00f3f7d549d81cce963c851 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

d6bba833913f drm/i915: Disable pread/pwrite ioctl's for IGT testing

== Logs ==

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

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx