Commit graph

14 commits

Author SHA1 Message Date
Ben Skeggs c4c7044ffc drm/nouveau: delay busy bo vma removal until fence signals
As opposed to an explicit wait.  Allows userspace to not stall waiting
on buffer deletion.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:31 +10:00
Ben Skeggs 264ce192b3 drm/nv84-/fence: prepare for emit/sync support of sysram sequences
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:00:53 +10:00
Ben Skeggs 827520ce06 drm/nouveau/fence: make internal hooks part of the context
A step towards being able to provide fences from other engines not
connected to PFIFO.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:00:53 +10:00
Ben Skeggs 60e5cb79cb drm/nv17/fence: split from nv10 code
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:00:52 +10:00
Ben Skeggs bba9852fee drm/nv84-/fence: abstract class emit/sync functions to virt+sequence
Now can be used to operate on any buffer mapped into the GPU virtual
address and not just the main inter-channel sync buffer.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:00:52 +10:00
Ben Skeggs a34caf78f2 drm/nv84/fence: access fences with full virtual address, not offset
Allows most of the code to be shared between nv84/nvc0 implementations,
and paves the way for doing emit/sync on non-VRAM buffers (multi-gpu,
dma-buf).

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:00:51 +10:00
Ben Skeggs e18c080fb8 drm/nouveau/fence/nv84-: put processes to sleep while waiting on fences
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:00:48 +10:00
Marcin Slusarz f20ebd034e drm/nv17-50: restore fence buffer on resume
Since commit 5e120f6e4b "drm/nouveau/fence:
convert to exec engine, and improve channel sync" nouveau fence sync
implementation for nv17-50 and nvc0+ started to rely on state of fence buffer
left by previous sync operation. But as pinned bo's (where fence state is
stored) are not saved+restored across suspend/resume, we need to do it
manually.

nvc0+ was fixed by commit d6ba6d215a
"drm/nvc0/fence: restore pre-suspend fence buffer context on resume".

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=50121

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
2013-01-13 18:07:45 +10:00
Ben Skeggs ebb945a94b drm/nouveau: port all engines to new engine module format
This is a HUGE commit, but it's not nearly as bad as it looks - any problems
can be isolated to a particular chipset and engine combination.  It was
simply too difficult to port each one at a time, the compat layers are
*already* ridiculous.

Most of the changes here are simply to the glue, the process for each of the
engine modules was to start with a standard skeleton and copy+paste the old
code into the appropriate places, fixing up variable names etc as needed.

v2: Marcin Slusarz <marcin.slusarz@gmail.com>
- fix find/replace bug in license header

v3: Ben Skeggs <bskeggs@redhat.com>
- bump indirect pushbuf size to 8KiB, 4KiB barely enough for userspace and
  left no space for kernel's requirements during GEM pushbuf submission.
- fix duplicate assignments noticed by clang

v4: Marcin Slusarz <marcin.slusarz@gmail.com>
- add sparse annotations to nv04_fifo_pause/nv04_fifo_start
- use ioread32_native/iowrite32_native for fifo control registers

v5: Ben Skeggs <bskeggs@redhat.com>
- rebase on v3.6-rc4, modified to keep copy engine fix intact
- nv10/fence: unmap fence bo before destroying
- fixed fermi regression when using nvidia gr fuc
- fixed typo in supported dma_mask checking

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-10-03 13:12:56 +10:00
Ben Skeggs f589be88ca drm/nouveau/pageflip: kick flip handling out of engsw and into fence
This is all very much a policy thing, and hence will not belong in SW
after the rework.

engsw now only handles receiving the event to say "can flip now" and makes
a callback to perform the actual work.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-10-03 13:12:55 +10:00
Ben Skeggs e193b1d42c drm/nouveau/fence: un-port from nouveau_exec_engine interfaces
Still the same code, but not an "engine" anymore.  The fence code is more of
a policy decision rather than exposing mechanisms, so it's not appropriate
to port it to the new engine subsystem.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-10-03 13:12:54 +10:00
Ben Skeggs 906c033e27 drm/nouveau/fence: fix a race where fence->channel can disappear
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:55:58 +10:00
Ben Skeggs 5e120f6e4b drm/nouveau/fence: convert to exec engine, and improve channel sync
Now have a somewhat simpler semaphore sync implementation for nv17:nv84,
and a switched to using semaphores as fences on nv84+ and making use of
the hardware's >= acquire operation.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:55:53 +10:00
Ben Skeggs d375e7d56d drm/nouveau/fence: minor api changes for an upcoming rework
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:55:46 +10:00