Commit 6bcc5ffc authored by Ryan Neph's avatar Ryan Neph Committed by Richard Fung
Browse files

FROMGIT: drm/virtio: exbuf->fence_fd unmodified on interrupted wait



An interrupted dma_fence_wait() becomes an -ERESTARTSYS returned
to userspace ioctl(DRM_IOCTL_VIRTGPU_EXECBUFFER) calls, prompting to
retry the ioctl(), but the passed exbuf->fence_fd has been reset to -1,
making the retry attempt fail at sync_file_get_fence().

The uapi for DRM_IOCTL_VIRTGPU_EXECBUFFER is changed to retain the
passed value for exbuf->fence_fd when returning anything besides a
successful result from the ioctl.

Fixes: 2cd7b6f0 ("drm/virtio: add in/out fence support for explicit synchronization")
Signed-off-by: default avatarRyan Neph <ryanneph@chromium.org>
Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
Reviewed-by: default avatarDmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: default avatarDmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230203233345.2477767-1-ryanneph@chromium.org
(cherry picked from commit 8f20660f
 git://anongit.freedesktop.org/drm/drm-misc.git drm-misc-fixes)

BUG=b:265458612
TEST=glxgears/vkcube/'Among Us' in ARCVM with crrev/c/4166428 reverted.

Change-Id: I7529f1c0406243ee0635d8e67daf8259a61179e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4234495


Auto-Submit: Ryan Neph <ryanneph@google.com>
Reviewed-by: default avatarYiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: default avatarSean Paul <sean@poorly.run>
Tested-by: default avatarRyan Neph <ryanneph@google.com>
Commit-Queue: Ryan Neph <ryanneph@google.com>
Signed-off-by: default avatarRichard Fung <richardfung@google.com>
parent 1123b84d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment