* [FOR CI] drm/drm_vblank: Change EINVAL by the correct errno
@ 2018-10-17 22:44 Rodrigo Siqueira
2018-10-17 23:06 ` ✗ Fi.CI.BAT: failure for " Patchwork
0 siblings, 1 reply; 2+ messages in thread
From: Rodrigo Siqueira @ 2018-10-17 22:44 UTC (permalink / raw)
To: Gustavo Padovan, Maarten Lankhorst, Sean Paul, David Airlie,
Daniel Vetter
Cc: dri-devel, linux-kernel, intel-gfx
For historical reason, the function drm_wait_vblank_ioctl always return
-EINVAL if something gets wrong. This scenario limits the flexibility
for the userspace make detailed verification of the 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, some operations are unsupported by this function, and
returns EINVAL; this patch also changes the return value to EOPNOTSUPP
in this case. Lastly, the function drm_wait_vblank_ioctl is 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-core
* Weston
* Xorg (67 different drivers)
For each repository the verification happened in three steps:
* Update the main branch
* Look for any occurrence "drmWaitVBlank" with the command:
git grep -n "drmWaitVBlank"
* Look in the git history of the project with the command:
git log -SdrmWaitVBlank
Finally, none of the above projects validate the use of EINVAL which
make safe, at least for these projects, to change the return values.
Change since V2:
Daniel Vetter and Chris Wilson
- Replace ENOTTY by EOPNOTSUPP
- Return EINVAL if the parameters are wrong
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
---
drivers/gpu/drm/drm_vblank.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index 98e091175921..80f5a3bb427e 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -1533,10 +1533,10 @@ 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;
+ return -EOPNOTSUPP;
if (vblwait->request.type &
~(_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK |
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/drm_vblank: Change EINVAL by the correct errno
2018-10-17 22:44 [FOR CI] drm/drm_vblank: Change EINVAL by the correct errno Rodrigo Siqueira
@ 2018-10-17 23:06 ` Patchwork
0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2018-10-17 23:06 UTC (permalink / raw)
To: Rodrigo Siqueira; +Cc: intel-gfx
== Series Details ==
Series: drm/drm_vblank: Change EINVAL by the correct errno
URL : https://patchwork.freedesktop.org/series/51147/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_5000 -> Patchwork_10497 =
== Summary - FAILURE ==
Serious unknown changes coming with Patchwork_10497 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_10497, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/51147/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10497:
=== IGT changes ===
==== Possible regressions ====
igt@kms_frontbuffer_tracking@basic:
fi-skl-6700hq: PASS -> INCOMPLETE
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-apl-guc: PASS -> DMESG-WARN
== Known issues ==
Here are the changes found in Patchwork_10497 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_module_reload@basic-reload:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#106248, fdo#106725)
igt@kms_flip@basic-flip-vs-modeset:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#106000)
igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
fi-byt-clapper: PASS -> FAIL (fdo#103191, fdo#107362)
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#106238)
igt@pm_rpm@module-reload:
fi-glk-j4005: PASS -> FAIL (fdo#104767)
==== Possible fixes ====
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
fi-byt-clapper: FAIL (fdo#107362) -> PASS
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#104767 https://bugs.freedesktop.org/show_bug.cgi?id=104767
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
fdo#106238 https://bugs.freedesktop.org/show_bug.cgi?id=106238
fdo#106248 https://bugs.freedesktop.org/show_bug.cgi?id=106248
fdo#106725 https://bugs.freedesktop.org/show_bug.cgi?id=106725
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
== Participating hosts (47 -> 40) ==
Missing (7): fi-kbl-soraka fi-ilk-m540 fi-icl-u fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-kbl-7560u
== Build changes ==
* Linux: CI_DRM_5000 -> Patchwork_10497
CI_DRM_5000: b9543c130d4f6edd76ec98090c46044ba6d9493e @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4683: 7766b1e2348b32cc8ed58a972c6fd53b20279549 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10497: f8c2d1bc25298648a77037bae78aa806676c1135 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
f8c2d1bc2529 drm/drm_vblank: Change EINVAL by the correct errno
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10497/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-17 23:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-17 22:44 [FOR CI] drm/drm_vblank: Change EINVAL by the correct errno Rodrigo Siqueira
2018-10-17 23:06 ` ✗ Fi.CI.BAT: failure for " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.