Commit Graph

233028 Commits

Author SHA1 Message Date
Dave Airlie
486af1896f drm/radeon: add new getparam for number of backends.
This allows userspace to work out how many DBs there are
for conditional rendering to work.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-01 15:01:20 +10:00
Dave Airlie
91132d6bb6 drm/radeon: fix up dereferencing of busy objects.
This could free things twice, just deref the GEM object
and hope its enough.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-01 15:01:14 +10:00
Dave Airlie
a61f2bc472 drm/radeon: bump version to 2.9
This lets r600g enable texture formats and some more extensions.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-01 15:01:11 +10:00
Dave Airlie
2a19cac8f9 drm/r600: parse the set predication command. (v2)
This is required for NV_conditional_render and EXT_transform_feedback.

v2: add evergreen support.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-01 15:00:40 +10:00
Dave Airlie
af50621a18 drm/radeon: make sure ib reads are in-order.
have to read values from the IB in order as we could cross
a page boundary at any time and won't be able to go backwards.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-28 14:24:01 +10:00
Dan Carpenter
cf8a47d156 drm/radeon/r600_cs: off by one errors
There are a bunch of off by one errors in the sanity checks here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-28 09:17:59 +10:00
Dave Airlie
dc87eaf177 Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next
* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (50 commits)
  drm/nv50: flesh out ZCULL init and match nvidia on later chipsets
  drm/nv50: support for compression
  drm/nv50-nvc0: delay GART binding until move_notify time
  drm/nouveau: rename nouveau_vram to nouveau_mem
  drm/nvc0: allow creation of buffers with any non-compressed memtype
  drm/nv50-nvc0: unmap buffers from the vm when they're evicted
  drm/nv50-nvc0: move vm bind/unbind to move_notify hook
  drm/nv50-nvc0: restrict memtype to those specified at creation time
  drm/nouveau: pass domain rather than ttm flags to gem_new()
  drm/nv50: simplify bo moves now that they're all through the vm
  drm/nouveau: remove no_vm/mappable flags from nouveau_bo
  drm/nouveau: Fix pageflip event
  drm/nouveau/vbios: parse more gpio tag bits from connector table
  drm/nouveau: decode PFIFO DMA_PUSHER error codes
  drm/nv50: fix typos in CCACHE error reporting
  drm/nvc0: support for sw methods + enable page flipping
  drm/nv50: enable page flipping
  drm/nv50-nvc0: activate/update ds channel's framebuffer on modesets
  drm/nv50-nvc0: initialise display sync channels
  drm/nv50-nvc0: precalculate some fb state when creating them
  ...
2011-02-25 13:37:02 +10:00
Ben Skeggs
562af10c67 drm/nv50: flesh out ZCULL init and match nvidia on later chipsets
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:46:10 +10:00
Ben Skeggs
8f7286f8e4 drm/nv50: support for compression
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:46:07 +10:00
Ben Skeggs
26c0c9e33a drm/nv50-nvc0: delay GART binding until move_notify time
The immediate benefit of doing this is that on NV50 and up, the GPU
virtual address of any buffer is now constant, regardless of what
memtype they're placed in.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:46:01 +10:00
Ben Skeggs
d5f423947a drm/nouveau: rename nouveau_vram to nouveau_mem
This structure will also be used for GART in the near future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:55 +10:00
Ben Skeggs
b5e2f0769a drm/nvc0: allow creation of buffers with any non-compressed memtype
This adds a table of known nvc0 memtypes, and modifies the validity check
to allow any non-compressed type.  Support for Z compression will come at
a later point.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:52 +10:00
Ben Skeggs
3425df486c drm/nv50-nvc0: unmap buffers from the vm when they're evicted
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:49 +10:00
Ben Skeggs
a4154bbffd drm/nv50-nvc0: move vm bind/unbind to move_notify hook
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:46 +10:00
Ben Skeggs
db5c8e299a drm/nv50-nvc0: restrict memtype to those specified at creation time
Upcoming patches are going to enable full support for buffers that keep
a constant GPU virtual address whenever they're validated for use by
the GPU.

In order for this to work properly while keeping support for large pages,
we need to know if it's ever going to be possible for a buffer to end
up in GART, and if so, disable large pages for the buffer's VMA.

This is a new restriction that's not present in earlier kernel's, but
should not break userspace as the current code never attempts to validate
buffers into a memtype other than it was created with.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:43 +10:00
Ben Skeggs
6ba9a68317 drm/nouveau: pass domain rather than ttm flags to gem_new()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:40 +10:00
Ben Skeggs
a670478834 drm/nv50: simplify bo moves now that they're all through the vm
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:37 +10:00
Ben Skeggs
d550c41e4f drm/nouveau: remove no_vm/mappable flags from nouveau_bo
'mappable' isn't really used at all, nor is it necessary anymore as the
bo code is capable of moving buffers to mappable vram as required.

'no_vm' isn't necessary anymore either, any places that don't want to be
mapped into a GPU address space should allocate the VRAM directly instead.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:34 +10:00
Benjamin Franzke
2503c6fa3e drm/nouveau: Fix pageflip event
Assign correct event when initializing nouveau_page_flip_state.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:31 +10:00
Ben Skeggs
a589e87fe7 drm/nouveau/vbios: parse more gpio tag bits from connector table
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:28 +10:00
Marcin Slusarz
3248421670 drm/nouveau: decode PFIFO DMA_PUSHER error codes
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:26 +10:00
Marcin Slusarz
4dcf905c84 drm/nv50: fix typos in CCACHE error reporting
The code was supposed to print registers around 0x405018 (which is read
earlier), not 0x405818.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:23 +10:00
Ben Skeggs
bd2f2037a4 drm/nvc0: support for sw methods + enable page flipping
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:20 +10:00
Ben Skeggs
d7117e0d4e drm/nv50: enable page flipping
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:17 +10:00
Ben Skeggs
1d3fac0c2a drm/nv50-nvc0: activate/update ds channel's framebuffer on modesets
The hw doesn't really appear to be designed to be used the way we have to
use it due to DRI2's design.  This leads us to having to keep the flipped
fb support active at all times.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:14 +10:00
Ben Skeggs
cdccc70eff drm/nv50-nvc0: initialise display sync channels
Also imports a couple of helper functions that'll be used to implement
page flipping in the following commits..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:11 +10:00
Ben Skeggs
45c4e0aae9 drm/nv50-nvc0: precalculate some fb state when creating them
Just a cleanup, to avoid duplicating parts of nv50_crtc.c's code in
the page flipping routines.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:08 +10:00
Ben Skeggs
292deb7a3b drm/nv50-nvc0: tidy evo object creation some more
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:05 +10:00
Ben Skeggs
60f60bf1bc drm/nv50-nvc0: request and wait on notification of modeset completion
This should prevent a number of races from occuring, the most obvious of
which will be exposed when we start making use of the "display sync" evo
channel for page flipping.  The DS channel will reject any command stream
that doesn't completely agree with the current "master" state.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:45:02 +10:00
Ben Skeggs
f13e435c59 drm/nv50-nvc0: switch to tasklet for display isr bh
We need to be able to have the bh run while possibly spinning waiting for
the EVO notifier to signal.  This apparently happens in some circumstances
with preempt disabled, so our workqueue was never being run.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:59 +10:00
Ben Skeggs
c7ca4d1b6b drm/nouveau: make vbios parser runnable from an atomic context
The nv50 display isr bh needs to be converted to a tasklet, which means
we can't sleep anymore.  The places we execute vbios init tables are
rare, and not in any way performance critical, so this isn't a huge
problem.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:56 +10:00
Ben Skeggs
8348f36d89 drm/nv50-nvc0: include nv50_display in evo debugging
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:53 +10:00
Ben Skeggs
33f409df1e drm/nv50-nvc0: tidy evo init failure paths
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:51 +10:00
Ben Skeggs
961b6e686e drm/nv50-nvc0: fix ramht entries for multiple evo channels
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:48 +10:00
Ben Skeggs
30d81817a2 drm/nv50-nvc0: disp channels have fixed purposes, don't "allocate" them
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:45 +10:00
Ben Skeggs
59c0f5780f drm/nv50-nvc0: rename disp->evo to disp->master
More appropriate, and we're about to be using more than just the master
EVO channel.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:42 +10:00
Ben Skeggs
ef8389a84b drm/nv50-nvc0: move non-sharable display state into private structure
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:39 +10:00
Tejun Heo
d82f8e6c80 drm/nouveau: use system_wq instead of dev_priv->wq
With cmwq, there's no reason for nouveau to use a dedicated workqueue.
Drop dev_priv->wq and use system_wq instead.  Each work item is sync
flushed when the containing structure is unregistered/destroyed.

Note that this change also makes sure that nv50_gpio_handler is not
freed while the contained work item is still running.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:36 +10:00
Lucas Stach
f17811dfa7 drm/nouveau: use I2C_MODULE_PREFIX kernel define
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:33 +10:00
Ben Skeggs
ec23802d61 drm/nv50: drop explicit yields in favour of smaller PFIFO timeslice
This gives a small, but noticeable performance gain at lower performance
levels, and unchanged at the higher ones.

With this commit, we're now using the same timeslice size as the NVIDIA
binary driver currently does, and dropping an unknown bit that NVIDIA
no longer appear to set.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:30 +10:00
Ben Skeggs
e3b7ed5e99 drm/nv84: use vm offsets for semaphores
We may well be making more use of semaphores in the future, having the
entire VM available makes requiring DMA objects for each and every
semaphore block unnecessary.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:27 +10:00
Ben Skeggs
fc772ec48d drm/nv50: 0x50 needs semaphore yields too
Evil, evil chipset.  Worst of both worlds.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:25 +10:00
Ben Skeggs
ea5f2786a0 drm/nouveau: silence some compiler warnings
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:22 +10:00
Ben Skeggs
cb1d771aa0 drm/nvc0: implement semaphores for inter-channel sync
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:19 +10:00
Ben Skeggs
cc8cd6479c drm/nvc0/pfifo: semi-handle a couple more irqs
And also, don't disable PFIFO IRQs completely whenever we recieve one,
just when we don't know about it already.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:16 +10:00
Ben Skeggs
c3b90a7d4c drm/nv84: switch to new-style semaphores
These are the same semaphores nvc0 will use, and they potentially allow
us to do much cooler things than our current inter-channel sync impl.

Lets switch to them where possible now for some testing.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:13 +10:00
Ben Skeggs
e0435120a8 drm/nv40: support for 39-bit dma addresses on native PCIE chipsets
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:10 +10:00
Ben Skeggs
7948758d27 drm/nv40: implement support for on-chip PCIEGART
v2. moved nv44 pciegart table back to instmem, where it's not
    accessible by userspace clients.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:44:04 +10:00
Ben Skeggs
58e6c7a918 drm/nouveau: introduce new gart type, and name _SGDMA more appropriately
In preparation for the addition of a new nv40 backend, we'll need to be
able to distinguish between a paged dma object and the on-chip GART.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:30:15 +10:00
Ben Skeggs
efa58db3de drm/nouveau: move + rename some stuff in nouveau_sgdma.c
In preparation for the addition of a new nv40 pcie backend.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25 06:30:05 +10:00