New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 762583 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

kevin: resolve drm more with upstream, including picking upstream picks

Project Member Reported by diand...@chromium.org, Sep 6 2017

Issue description

As part of the private b/64852540, we realized that there are some backports that we probably want related to drm and some other fixes to resolve things with the way upstream is working now.  

A non-exhaustive list of things we might want:

 UPSTREAM: dma-buf/sw_sync: clean up list before signaling the fence
 UPSTREAM: dma-buf/sw_sync: move timeline_fence_ops around
 UPSTREAM: reservation: revert "wait only with non-zero timeout specified (v3)" v2
 UPSTREAM: dma-buf/fence: revert "don't wait when specified timeout is zero" (v2)
 UPSTREAM: dma-buf/sync_file: Allow multiple sync_files to wrap a single dma-fence

 CHROMIUM: force signal all unsignaled fences on dying timeline
 UPSTREAM: dma-buf/sw-sync: Use an rbtree to sort fences in the timeline
 BACKPORT: dma-buf/sw-sync: Fix locking around sync_timeline lists
 UPSTREAM: dma-buf/sw-sync: sync_pt is private and of fixed size
 UPSTREAM: dma-buf/sw-sync: Reduce irqsave/irqrestore from known context
 UPSTREAM: dma-buf/sw-sync: Prevent user overflow on timeline advance
 Revert "REVERTME: dma-buf/sw_sync: fix userspace incrementing timeline by 0x7FFFFFFF"
 UPSTREAM: dma-buf/sw-sync: Fix the is-signaled test to handle u32 wraparound
 UPSTREAM: dma-buf/dma-fence: Extract __dma_fence_is_later()
 UPSTREAM: dma-buf/sync-file: Defer creation of sync_file->name
 UPSTREAM: dma-buf: avoid scheduling on fence status query v2
 UPSTREAM: sync_file: get rid of internal reference count.
 UPSTREAM: dma-buf: fence debugging
 UPSTREAM: dma-fence: add dma_fence_match_context helper
 UPSTREAM: dma-buf/dma-fence: improve doc for dma_fence_add_callback()

---

dbehr has already posted patches for some of these.

 

Comment 1 by dbehr@chromium.org, Nov 4 2017

Status: Started (was: Untriaged)

DONE UPSTREAM: dma-buf/sw_sync: clean up list before signaling the fence
DONE UPSTREAM: dma-buf/sw_sync: move timeline_fence_ops around
DONE UPSTREAM: dma-buf/sync_file: Allow multiple sync_files to wrap a single dma-fence

DONE, UPSTREAMED, CHROMIUM: force signal all unsignaled fences on dying timeline
DONE UPSTREAM: dma-buf/sw-sync: Use an rbtree to sort fences in the timeline
DONE BACKPORT: dma-buf/sw-sync: Fix locking around sync_timeline lists
DONE UPSTREAM: dma-buf/sw-sync: sync_pt is private and of fixed size
DONE  UPSTREAM: dma-buf/sw-sync: Reduce irqsave/irqrestore from known context
DONE  UPSTREAM: dma-buf/sw-sync: Prevent user overflow on timeline advance
DONE Revert "REVERTME: dma-buf/sw_sync: fix userspace incrementing timeline by 0x7FFFFFFF"

DONE UPSTREAM: dma-buf/sw-sync: Fix the is-signaled test to handle u32 wraparound
DONE UPSTREAM: dma-buf/dma-fence: Extract __dma_fence_is_later()
DONE UPSTREAM: dma-buf/sync-file: Defer creation of sync_file->name
DONE UPSTREAM: dma-buf: avoid scheduling on fence status query v2
DONE UPSTREAM: sync_file: get rid of internal reference count.
DONE UPSTREAM: dma-buf: fence debugging
DONE UPSTREAM: dma-fence: add dma_fence_match_context helper
DONE UPSTREAM: dma-buf/dma-fence: improve doc for dma_fence_add_callback()

So this leaves:
 UPSTREAM: reservation: revert "wait only with non-zero timeout specified (v3)" v2
 UPSTREAM: dma-buf/fence: revert "don't wait when specified timeout is zero" (v2)

we need:

commit 698c0f7ff21674ec08a4c6e99dd6da62fe5a344d
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Mon Nov 7 16:16:14 2016 -0500

    dma-buf/fence: revert "don't wait when specified timeout is zero" (v2)

commit 06a66b5c77ede71f0601f4710284ca1076e673fa
Author: Christian König <christian.koenig@amd.com>
Date:   Mon Nov 7 16:16:16 2016 -0500

    reservation: revert "wait only with non-zero timeout specified (v3)" v2



Project Member

Comment 2 by bugdroid1@chromium.org, Nov 9 2017

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/56e57b251a17b0879f94066ac56334a5fb9b20ef

commit 56e57b251a17b0879f94066ac56334a5fb9b20ef
Author: Alex Deucher <alexdeucher@gmail.com>
Date: Thu Nov 09 03:48:51 2017

UPSTREAM: dma-buf/fence: revert "don't wait when specified timeout is zero" (v2)

Reverts commit 847b19a39e4c
	("dma-buf/fence: don't wait when specified timeout is zero")

When we don't call the wait function software signaling might never be
activated. This can cause infinite polling loops with unreliable interrupt
driven hardware.

v2: rebase on drm-next

BUG= chromium:762583 
TEST=boot up kevin

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian Knig <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
  [sumits: reword commit msg for checkpatch warnings]
Link: http://patchwork.freedesktop.org/patch/msgid/1478553376-18575-2-git-send-email-alexander.deucher@amd.com
(cherry picked from commit 698c0f7ff21674ec08a4c6e99dd6da62fe5a344d)
Signed-off-by: Dominik Behr <dbehr@chromium.org>

Change-Id: I957ed746f9d41cec0524b0006847bb74b6310c64
Reviewed-on: https://chromium-review.googlesource.com/754375
Commit-Ready: Dominik Behr <dbehr@chromium.org>
Tested-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[modify] https://crrev.com/56e57b251a17b0879f94066ac56334a5fb9b20ef/drivers/dma-buf/dma-fence.c

Project Member

Comment 3 by bugdroid1@chromium.org, Nov 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/389044d82b2a242fb0a5be5c07e1ef9b3a51c80a

commit 389044d82b2a242fb0a5be5c07e1ef9b3a51c80a
Author: Christian König <christian.koenig@amd.com>
Date: Thu Nov 09 03:48:53 2017

UPSTREAM: reservation: revert "wait only with non-zero timeout specified (v3)" v2

Reverts commit fb8b7d2b9d80
	("reservation: wait only with non-zero timeout specified (v3)")

Otherwise signaling might never be activated on the fences. This can
result in infinite waiting with hardware which has unreliable interrupts.

v2: still return one when the timeout is zero and we don't have any fences.

BUG= chromium:762583 
TEST=boot up kevin

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian Knig <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com> (v1)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
  [sumits: fix checkpatch warnings]
Link: http://patchwork.freedesktop.org/patch/msgid/1478553376-18575-4-git-send-email-alexander.deucher@amd.com
(cherry picked from commit 06a66b5c77ede71f0601f4710284ca1076e673fa)
Signed-off-by: Dominik Behr <dbehr@chromium.org>

Change-Id: I09895a3607af5537932a09245080ebbe71b16486
Reviewed-on: https://chromium-review.googlesource.com/754376
Commit-Ready: Dominik Behr <dbehr@chromium.org>
Tested-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[modify] https://crrev.com/389044d82b2a242fb0a5be5c07e1ef9b3a51c80a/drivers/dma-buf/reservation.c

Comment 4 by dbehr@chromium.org, Nov 28 2017

Status: Fixed (was: Started)

Sign in to add a comment