diff options
| author | 2021-12-20 10:00:30 +0100 | |
|---|---|---|
| committer | 2021-12-20 10:00:30 +0100 | |
| commit | 35eaa42c4a1017c08d0572008db375becb621744 (patch) | |
| tree | 8185b6d18acfc63285e3132c9039c7d6c9a90527 /drivers/gpu/drm/drm_syncobj.c | |
| parent | serial: 8250_pci: remove redundant assignment to tmp after the mask operation (diff) | |
| parent | Linux 5.16-rc6 (diff) | |
| download | wireguard-linux-35eaa42c4a1017c08d0572008db375becb621744.tar.xz wireguard-linux-35eaa42c4a1017c08d0572008db375becb621744.zip | |
Merge 5.16-rc6 into tty-next
We need the tty/serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/drm_syncobj.c')
| -rw-r--r-- | drivers/gpu/drm/drm_syncobj.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c index c9a9d74f338c..c313a5b4549c 100644 --- a/drivers/gpu/drm/drm_syncobj.c +++ b/drivers/gpu/drm/drm_syncobj.c @@ -404,8 +404,17 @@ int drm_syncobj_find_fence(struct drm_file *file_private, if (*fence) { ret = dma_fence_chain_find_seqno(fence, point); - if (!ret) + if (!ret) { + /* If the requested seqno is already signaled + * drm_syncobj_find_fence may return a NULL + * fence. To make sure the recipient gets + * signalled, use a new fence instead. + */ + if (!*fence) + *fence = dma_fence_get_stub(); + goto out; + } dma_fence_put(*fence); } else { ret = -EINVAL; |
