Skip to contentSkip to conversation

drm/drm_vblank: Change EINVAL by the correct errno

PATCH In review Rodrigo Siqueira 3 participants 4 messages Oct 2, 2019 – Oct 3, 2019

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

PATCH v6 1/1 drm/drm_vblank: Change EINVAL by the correct errno

For historical reasons, the function drm_wait_vblank_ioctl always return -EINVAL if something gets wrong. This scenario limits the flexibility for the userspace to make detailed verification of any problem and take some action. In particular, the validation of “if (!dev->irq_enabled)” in the drm_wait_vblank_ioctl is responsible for checking if the driver support vblank or not. If the driver does not support VBlank, the function drm_wait_vblank_ioctl returns EINVAL, which does not represent the real issue; this patch changes this behavior by return EOPNOTSUPP. Additionally, drm_crtc_get_sequence_ioctl and drm_crtc_queue_sequence_ioctl, also returns EINVAL if vblank is not supported; this patch also changes the return value to EOPNOTSUPP in these functions. Lastly, these functions are invoked by libdrm, which is used by many compositors; because of this, it is important to check if this change breaks any compositor. In this sense, the following projects were examined:

* Drm-hwcomposer
* Kwin
* Sway
* Wlroots
* Wayland
* Weston
* Mutter
* Xorg (67 different drivers)

For each repository the verification happened in three steps:

* Update the main branch
* Look for any occurrence of "drmCrtcQueueSequence", "drmCrtcGetSequence", and "drmWaitVBlank" with the command git grep -n "STRING".
* Look in the git history of the project with the command git log -S<STRING>

None of the above projects validate the use of EINVAL when using drmWaitVBlank(), which make safe, at least for these projects, to change the return values. On the other hand, mesa and xserver project uses drmCrtcQueueSequence() and drmCrtcGetSequence(); this change is harmless for both projects.

Change since V5 (Pekka Paalanen):
- Check if the change also affects Mutter

Change since V4 (Daniel):
- Also return EOPNOTSUPP in drm_crtc_[get|queue]_sequence_ioctl

Change since V3:
- Return EINVAL for _DRM_VBLANK_SIGNAL (Daniel)

Change since V2:
Daniel Vetter and Chris Wilson
- Replace ENOTTY by EOPNOTSUPP
- Return EINVAL if the parameters are wrong

Cc Keith Packard <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Pekka Paalanen <[email protected]>
---
 drivers/gpu/drm/drm_vblank.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_vblank.c +3 -3
index 9c6899758bc9..71cf2633ac58 100644
@@ -1610,7 +1610,7 @@ int drm_wait_vblank_ioctl(struct drm_device *dev, void *data,
 	unsigned int flags, pipe, high_pipe;
 
 	if (!dev->irq_enabled)
-		return -EINVAL;
+		return -EOPNOTSUPP;
 
 	if (vblwait->request.type & _DRM_VBLANK_SIGNAL)
 		return -EINVAL;
@@ -1876,7 +1876,7 @@ int drm_crtc_get_sequence_ioctl(struct drm_device *dev, void *data,
 		return -EOPNOTSUPP;
 
 	if (!dev->irq_enabled)
-		return -EINVAL;
+		return -EOPNOTSUPP;
 
 	crtc = drm_crtc_find(dev, file_priv, get_seq->crtc_id);
 	if (!crtc)
@@ -1934,7 +1934,7 @@ int drm_crtc_queue_sequence_ioctl(struct drm_device *dev, void *data,
 		return -EOPNOTSUPP;
 
 	if (!dev->irq_enabled)
-		return -EINVAL;
+		return -EOPNOTSUPP;
 
 	crtc = drm_crtc_find(dev, file_priv, queue_seq->crtc_id);
 	if (!crtc)
Signature · 1 line
2.23.0

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

#1 lore raw

✓ Fi.CI.BAT: success for drm/drm_vblank: Change EINVAL by the correct errno (rev6)

== Series Details ==

== Series Details ==

Series: drm/drm_vblank: Change EINVAL by the correct errno (rev6)
URL : https://patchwork.freedesktop.org/series/51147/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6991 -> Patchwork_14631
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_create@basic-files:
- fi-bxt-dsi: [PASS][1] -> [INCOMPLETE][2] ([fdo#103927])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/fi-bxt-dsi/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/fi-bxt-dsi/igt@[email protected]
- fi-apl-guc: [PASS][3] -> [INCOMPLETE][4] ([fdo#103927])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/fi-apl-guc/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/fi-apl-guc/igt@[email protected]

* igt@gem_ctx_switch@legacy-render:
- fi-icl-u2: [PASS][5] -> [INCOMPLETE][6] ([fdo#107713] / [fdo#111381])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/fi-icl-u2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/fi-icl-u2/igt@[email protected]

* igt@gem_exec_suspend@basic-s4-devices:
- fi-icl-u3: [PASS][7] -> [DMESG-WARN][8] ([fdo#107724]) +2 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/fi-icl-u3/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/fi-icl-u3/igt@[email protected]

#### Possible fixes ####

* igt@gem_mmap_gtt@basic-small-bo-tiledx:
- fi-icl-u3: [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10] +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/fi-icl-u3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/fi-icl-u3/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][11] ([fdo#111045] / [fdo#111096]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/fi-kbl-7500u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/fi-kbl-7500u/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#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381
[fdo#111880]: https://bugs.freedesktop.org/show_bug.cgi?id=111880

Participating hosts (51 -> 43)
------------------------------

Additional (1): fi-kbl-soraka
Missing (9): fi-ilk-m540 fi-hsw-4200u fi-tgl-u2 fi-glk-dsi fi-byt-squawks fi-bsw-cyan fi-bdw-samus fi-byt-clapper fi-skl-6700k2

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

* CI: CI-20190529 -> None
* Linux: CI_DRM_6991 -> Patchwork_14631

CI-20190529: 20190529
CI_DRM_6991: 1f02b477cc08d4560a0c2cf6cc98340e09c7c734 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5209: ec639c89860b859fdf4b038c2fa8ad593bd6909e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14631: a3d03aea21d7d3ce6a5d893019af3ee677dbc435 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

a3d03aea21d7 drm/drm_vblank: Change EINVAL by the correct errno

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✓ Fi.CI.IGT: success for drm/drm_vblank: Change EINVAL by the correct errno (rev6)

In reply to Rodrigo Siqueira
== Series Details ==

== Series Details ==

Series: drm/drm_vblank: Change EINVAL by the correct errno (rev6)
URL : https://patchwork.freedesktop.org/series/51147/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6991_full -> Patchwork_14631_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_eio@in-flight-suspend:
- shard-apl: [PASS][1] -> [DMESG-WARN][2] ([fdo#108566])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-apl1/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-apl7/igt@[email protected]

* igt@gem_exec_schedule@in-order-bsd:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#111325]) +6 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-iclb8/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-iclb4/igt@[email protected]

* igt@gem_exec_schedule@preempt-contexts-bsd2:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#109276]) +20 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-iclb4/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-iclb6/igt@[email protected]

* igt@gem_userptr_blits@map-fixed-invalidate-busy:
- shard-snb: [PASS][7] -> [DMESG-WARN][8] ([fdo#111870])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-snb6/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-snb1/igt@[email protected]
- shard-hsw: [PASS][9] -> [DMESG-WARN][10] ([fdo#111870])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-hsw2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-hsw5/igt@[email protected]

* igt@gem_userptr_blits@map-fixed-invalidate-busy-gup:
- shard-kbl: [PASS][11] -> [DMESG-WARN][12] ([fdo#111870])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-kbl7/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-kbl2/igt@[email protected]
- shard-skl: [PASS][13] -> [DMESG-WARN][14] ([fdo#111870])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-skl10/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-skl4/igt@[email protected]

* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
- shard-snb: [PASS][15] -> [DMESG-WARN][16] ([fdo#110789] / [fdo#111870])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-snb2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-snb4/igt@[email protected]
- shard-glk: [PASS][17] -> [DMESG-WARN][18] ([fdo#111870])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-glk5/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-glk2/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap:
- shard-apl: [PASS][19] -> [DMESG-WARN][20] ([fdo#109385] / [fdo#111870])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-apl1/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-apl2/igt@[email protected]

* igt@gem_wait@write-wait-vcs0:
- shard-skl: [PASS][21] -> [DMESG-WARN][22] ([fdo#106107])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-skl7/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-skl4/igt@[email protected]

* igt@i915_suspend@fence-restore-tiled2untiled:
- shard-iclb: [PASS][23] -> [INCOMPLETE][24] ([fdo#107713])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-iclb6/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-iclb7/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-pwrite:
- shard-iclb: [PASS][25] -> [FAIL][26] ([fdo#103167]) +6 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-pwrite.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-iclb5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-pwrite.html

* igt@kms_frontbuffer_tracking@psr-suspend:
- shard-skl: [PASS][27] -> [INCOMPLETE][28] ([fdo#104108] / [fdo#106978])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-skl7/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-skl4/igt@[email protected]

* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [PASS][29] -> [SKIP][30] ([fdo#109441])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-iclb4/igt@kms_psr@psr2_primary_page_flip.html

* igt@perf@oa-exponents:
- shard-glk: [PASS][31] -> [FAIL][32] ([fdo#105483])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-glk8/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-glk3/igt@[email protected]

#### Possible fixes ####

* igt@gem_eio@suspend:
- shard-kbl: [FAIL][33] ([fdo#111550]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-kbl2/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-kbl7/igt@[email protected]

* igt@gem_exec_schedule@preempt-bsd:
- shard-iclb: [SKIP][35] ([fdo#111325]) -> [PASS][36] +3 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-iclb4/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-iclb3/igt@[email protected]

* igt@gem_mmap_gtt@basic-small-copy-xy:
- shard-glk: [DMESG-WARN][37] ([fdo#107732]) -> [PASS][38] +1 similar issue
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-glk9/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-glk6/igt@[email protected]

* igt@gem_userptr_blits@coherency-sync:
- shard-snb: [DMESG-WARN][39] ([fdo#111870]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-snb1/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-snb5/igt@[email protected]

* igt@gem_userptr_blits@map-fixed-invalidate-busy:
- shard-kbl: [DMESG-WARN][41] ([fdo#111870]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-kbl6/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-kbl4/igt@[email protected]
- shard-glk: [DMESG-WARN][43] ([fdo#111870]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-glk3/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-glk9/igt@[email protected]

* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
- shard-skl: [DMESG-WARN][45] ([fdo#111870]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-skl8/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-skl10/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap-after-close:
- shard-hsw: [DMESG-WARN][47] ([fdo#111870]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-hsw6/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-hsw4/igt@[email protected]

* {igt@i915_pm_dc@dc6-dpms}:
- shard-iclb: [FAIL][49] ([fdo#110548]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-iclb3/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-iclb2/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-kbl: [FAIL][51] ([fdo#105363]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-kbl1/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-kbl1/igt@[email protected]
- shard-skl: [FAIL][53] ([fdo#105363]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-skl1/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-skl8/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-skl: [INCOMPLETE][55] ([fdo#109507]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-skl8/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-skl7/igt@[email protected]
- shard-apl: [DMESG-WARN][57] ([fdo#108566]) -> [PASS][58] +1 similar issue
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-apl7/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-apl1/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: [FAIL][59] ([fdo#103167]) -> [PASS][60] +7 similar issues
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-iclb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html

* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [FAIL][61] ([fdo#108145]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-skl6/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-skl1/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [FAIL][63] ([fdo#108145] / [fdo#110403]) -> [PASS][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-skl8/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-skl1/igt@[email protected]

* igt@kms_psr@no_drrs:
- shard-iclb: [FAIL][65] ([fdo#108341]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-iclb1/igt@kms_psr@no_drrs.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-iclb2/igt@kms_psr@no_drrs.html

* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [SKIP][67] ([fdo#109441]) -> [PASS][68] +1 similar issue
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-iclb3/igt@kms_psr@psr2_cursor_render.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-iclb2/igt@kms_psr@psr2_cursor_render.html

* igt@perf_pmu@cpu-hotplug:
- shard-glk: [DMESG-WARN][69] ([fdo#107732] / [fdo#111800]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-glk9/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-glk6/igt@[email protected]

* igt@prime_busy@wait-before-bsd:
- shard-iclb: [WARN][71] -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-iclb1/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-iclb5/igt@[email protected]

* igt@prime_vgem@fence-wait-bsd2:
- shard-iclb: [SKIP][73] ([fdo#109276]) -> [PASS][74] +21 similar issues
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-iclb6/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-iclb1/igt@[email protected]

#### Warnings ####

* igt@gem_mocs_settings@mocs-reset-bsd2:
- shard-iclb: [FAIL][75] ([fdo#111330]) -> [SKIP][76] ([fdo#109276]) +2 similar issues
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-iclb4/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-iclb7/igt@[email protected]

* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
- shard-hsw: [DMESG-WARN][77] ([fdo#111870]) -> [DMESG-WARN][78] ([fdo#110789] / [fdo#111870])
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-hsw5/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-hsw2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw:
- shard-iclb: [FAIL][79] ([fdo#103167]) -> [INCOMPLETE][80] ([fdo#106978] / [fdo#107713])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6991/shard-iclb5/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/shard-iclb1/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#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105483]: https://bugs.freedesktop.org/show_bug.cgi?id=105483
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#106978]: https://bugs.freedesktop.org/show_bug.cgi?id=106978
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107732]: https://bugs.freedesktop.org/show_bug.cgi?id=107732
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109385]: https://bugs.freedesktop.org/show_bug.cgi?id=109385
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#110548]: https://bugs.freedesktop.org/show_bug.cgi?id=110548
[fdo#110789]: https://bugs.freedesktop.org/show_bug.cgi?id=110789
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
[fdo#111550]: https://bugs.freedesktop.org/show_bug.cgi?id=111550
[fdo#111800]: https://bugs.freedesktop.org/show_bug.cgi?id=111800
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870

Participating hosts (11 -> 9)
------------------------------

Missing (2): shard-tglb pig-hsw-4770r

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

* CI: CI-20190529 -> None
* Linux: CI_DRM_6991 -> Patchwork_14631

CI-20190529: 20190529
CI_DRM_6991: 1f02b477cc08d4560a0c2cf6cc98340e09c7c734 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5209: ec639c89860b859fdf4b038c2fa8ad593bd6909e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14631: a3d03aea21d7d3ce6a5d893019af3ee677dbc435 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14631/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Acked-by on v6 1/1
#3 lore raw
In reply to Rodrigo Siqueira
Quoted 70 lines · On Wed, 2 Oct 2019 11:05:16 -0300 Rodrigo Siqueira…

For historical reasons, the function drm_wait_vblank_ioctl always return -EINVAL if something gets wrong. This scenario limits the flexibility for the userspace to make detailed verification of any problem and take some action. In particular, the validation of “if (!dev->irq_enabled)” in the drm_wait_vblank_ioctl is responsible for checking if the driver support vblank or not. If the driver does not support VBlank, the function drm_wait_vblank_ioctl returns EINVAL, which does not represent the real issue; this patch changes this behavior by return EOPNOTSUPP. Additionally, drm_crtc_get_sequence_ioctl and drm_crtc_queue_sequence_ioctl, also returns EINVAL if vblank is not supported; this patch also changes the return value to EOPNOTSUPP in these functions. Lastly, these functions are invoked by libdrm, which is used by many compositors; because of this, it is important to check if this change breaks any compositor. In this sense, the following projects were examined:

* Drm-hwcomposer
* Kwin
* Sway
* Wlroots
* Wayland
* Weston
* Mutter
* Xorg (67 different drivers)

For each repository the verification happened in three steps:

* Update the main branch
* Look for any occurrence of "drmCrtcQueueSequence", "drmCrtcGetSequence", and "drmWaitVBlank" with the command git grep -n "STRING".
* Look in the git history of the project with the command git log -S<STRING>

None of the above projects validate the use of EINVAL when using drmWaitVBlank(), which make safe, at least for these projects, to change the return values. On the other hand, mesa and xserver project uses drmCrtcQueueSequence() and drmCrtcGetSequence(); this change is harmless for both projects.

Change since V5 (Pekka Paalanen):
- Check if the change also affects Mutter

Change since V4 (Daniel):
- Also return EOPNOTSUPP in drm_crtc_[get|queue]_sequence_ioctl

Change since V3:
- Return EINVAL for _DRM_VBLANK_SIGNAL (Daniel)

Change since V2:
Daniel Vetter and Chris Wilson
- Replace ENOTTY by EOPNOTSUPP
- Return EINVAL if the parameters are wrong

Cc Keith Packard <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Pekka Paalanen <[email protected]>
---
 drivers/gpu/drm/drm_vblank.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_vblank.c +0 -0
index 9c6899758bc9..71cf2633ac58 100644

drivers/gpu/drm/drm_vblank.c int drm_wait_vblank_ioctl(struct drm_device *dev, void *data, · line 1616

Quoted 8 lines
drivers/gpu/drm/drm_vblank.c +1 -1
@@ -1610,7 +1610,7 @@ int drm_wait_vblank_ioctl(struct drm_device *dev, void *data,
 	unsigned int flags, pipe, high_pipe;
 
 	if (!dev->irq_enabled)
-		return -EINVAL;
+		return -EOPNOTSUPP;
 
 	if (vblwait->request.type & _DRM_VBLANK_SIGNAL)
 		return -EINVAL;

Hi,

this part looks safe for Weston indeed, so this part:

There is no need to check the "Wayland" project, it will never do anything with DRM.

(What looks extremely suspicious though is the libdrm implementation of drmWaitVblank() in case the ioctl returns EINTR, but that's unrelated.)

Thanks,
pq