Commit graph

4363 commits

Author SHA1 Message Date
Ben Skeggs
7436dc6691 nv40: fail completely if we don't have a ctxprog for the chipset 2009-02-15 22:06:57 +10:00
Ben Skeggs
1fee78e8e4 nv50: context info for chipset 0xa0 2009-02-15 21:59:19 +10:00
Eric Anholt
8a1de2a4ee bump version to 2.4.4 2009-02-15 17:03:18 +10:00
Eric Anholt
011a04c7a2 intel: don't count fences on 965 and later, as they don't use them.
(cherry picked from commit cbdd6272c0)
2009-02-15 17:03:18 +10:00
Eric Anholt
544847b774 intel: Fix under-counting of fences registers required in check_aperture.
(cherry picked from commit 9209c9a653)
2009-02-15 17:03:17 +10:00
Jesse Barnes
727feefcac intel: libdrm support for fence management in execbuf
This patch tries to use the available fence count to figure out whether a
given batch can succeed or not (just like the aperture check).

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 2fa5f28eee)
2009-02-15 17:03:17 +10:00
Eric Anholt
dd027724ba intel: Retry pin ioctl on -EINTR.
(cherry picked from commit 02445eab64)
2009-02-15 17:03:17 +10:00
Owain G. Ainsworth
f78fda0c31 Remove drmModeReplaceFb after it was removed from the kernel.
It is impossible to replace the original semantics of this call purely
in userland, since the fb_id would change.

after discussion with Dr_Jakob

Signed-Off-By: Owain Ainsworth <oga@openbsd.org>
Acked-By: Jakob Bornecrantz <jakob@vmware.com>
2009-02-15 17:03:17 +10:00
Jesse Barnes
7df60d46fd libdrm: add autoconf check for clock_gettime
Should be more portable this way.
(cherry picked from commit badc63464c)
2009-02-15 17:03:16 +10:00
Jesse Barnes
3e4b9e9727 libdrm: only check for vblank timeout if we caught EINTR
Michel caught a case where we might overwrite a success or other return
value with EBUSY, so check the return value before checking for the
timeout condition.
(cherry picked from commit ca37077fb7)
2009-02-15 17:03:16 +10:00
Jesse Barnes
ace8c5ec92 libdrm: add timeout handling to drmWaitVBlank
In some cases, vblank interrupts may be disabled or otherwise broken.
The kernel has a 3s timeout builtin to handle these cases, but the X
server's SIGALM for cursor handling may interrupt vblank wait ioctls,
causing libdrm to restart the ioctl, making the kernel's timeout
useless.

This change tracks time across ioctl restarts and returns EBUSY to the
caller if the expected vblank sequence doesn't occur within 1s of the
first call.

Fixes fdo bz #18041, which is caused by a drmWaitVBlank hanging due to
the corresponding pipe getting disabled (thus preventing further events
from coming in).
2009-02-15 17:03:16 +10:00
Keith Packard
f869053223 intel: Cache tiling/swizzle state in user mode. Reset tiling on reuse.
Remember tiling mode values provided by appplications, and
record tiling mode when creating a buffer from another application. This
eliminates any need to ask the kernel for tiling values and also makes
reused buffers get the right tiling.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 18f091d136)
2009-02-15 17:03:16 +10:00
Keith Packard
9888b8b0ec intel: Debug output %u vs uint64_t warning fix
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 40334c6410)
2009-02-15 17:03:15 +10:00
Keith Packard
11cfc15299 intel: return error status from drm_intel_gem_bo_map
Applications may actually care if the mapping operation failed, so when
it happens, return an error indication. errno is probably trashed by
fprintf though.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit bd14b2cf75)
2009-02-15 17:03:15 +10:00
Keith Packard
7a5df78cb5 intel: Dump out memory usage information when the kernel fails to pin
The execbuffer ioctl returns ENOMEM when it fails to pin all of the buffers
in the GTT. This is usually caused by the DRM client attempting to use too
much memory in a single request. Dumping out the requested and available
memory values should help point out failures in the DRM code to catch over
commitments of this form.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit b13f4e1a32)
2009-02-15 17:03:15 +10:00
Eric Anholt
5764d9756e intel: don't skip set_domain on mapping of shared buffers.
(cherry picked from commit c86d431fe6)
2009-02-15 17:03:15 +10:00
Eric Anholt
ee310fe05f intel: don't let named buffers into the BO cache.
We wouldn't want some remaining 3D rendering to scribble on our batchbuffer.
(cherry picked from commit cebbd2edb5)
2009-02-15 17:03:14 +10:00
Eric Anholt
3fdda2f9ea intel: Remove the mapped flag, which is adequately covered by bo_gem->virtual.
(cherry picked from commit 782316801b)
2009-02-15 17:03:14 +10:00
Dave Airlie
6117fa1214 radeon: add libdrm_radeon.pc so we can make Mesa detect it 2009-02-15 17:03:14 +10:00
Michel Daenzer
9a1cfb960f radeon: add qword write function 2009-02-15 17:02:46 +10:00
Ben Skeggs
f0b1f1dce9 drm/nv50: fix nv9x chipsets
NVIDIA do this fun little sequence after updating the PRAMIN page tables.

On 9xxx chips, none of the PRAMIN BAR bindings (except the initial one)
worked, hence the majority of the setup needed to create a channel
ended up in the wrong place, causing all sorts of fun.

This is done by NVIDIA on nv8x chips also, so we'll do it for them too,
even though they appear to work without it.
2009-02-11 11:22:59 +10:00
Ben Skeggs
55c9884d98 drm/nv50: add context info for nv98
It won't work yet, just like the other 9xxx chips.  Real soon now :)
2009-02-11 11:18:28 +10:00
Ben Skeggs
13d7b06baf drm/nv50: use a slightly different initial context for nv96
I'm not 100% sure that the nv94 one we were using won't work.  The context
layouts are identical (well.. same ctxprog, so of course!), only a couple
of registers differ.  But, be safe until we actually get some 9xxx chips
working.
2009-02-10 09:07:28 +10:00
Ben Skeggs
8a60b2d6a8 drm/nv50: correct ramfc pointer in channel header
Suprisingly the card still worked without this...
2009-02-10 09:02:17 +10:00
Ben Skeggs
bc0e48baa3 nv50: support chipset NV96
ctxprog seen in okias' trace identical to one we use on NV94, assuming
the initial context values for NV94 will work here too.
2009-02-10 09:01:00 +10:00
Ben Skeggs
31caf2f9a9 drm/nv50: let the card handle the initial context switch
Our PFIFO/PGRAPH context save/load functions don't really work well
(at all?) on nv5x yet.  Depending on what random state the card is
in before the drm loads, fbcon probably won't work correctly.

Luckily we've setup the GPU in such a way that it'll actually do a
hw context switch for the first context.  Not sure of how successful
this'd be currently on the older chips (actually, pretty sure it won't
work), so NV50 only for now.
2009-02-10 08:57:21 +10:00
Ben Skeggs
2e7db8cc34 drm/nouveau: init fbcon after we flag the card as initialised 2009-02-10 08:56:17 +10:00
Pekka Paalanen
3762c97c82 drm compat: fix euid for >=2.6.28
drm_fops.c reads the current process' EUID directly from task_struct.
Apparently starting in 2.6.28-rc4 this fails to build.

In Linus' tree, commit b6dff3ec5e116e3af6f537d4caedcad6b9e5082a
"CRED: Separate task security context from task_struct"
moves the euid field from task_struct to another struct.

Earlier commit 9e2b2dc4133f65272a6d3c5dcb2ce63f8a87cae9
"CRED: Introduce credential access wrappers" implements the wrapper
macros to access e.g. euid. This is in 2.6.27-rc4, and this contains the
definition of current_euid() that will be used in the DRM compatibility header
for kernels before 2.6.27. That commit also creates <linux/cred.h>, which
contains the upstream definition of current_euid().

drm_fops.c is fixed to use current_euid(), and drm_compat.h will offer
the compatibility definition for kernels <2.6.27.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-02-10 08:55:32 +10:00
Ben Skeggs
933995b1da drm/nouveau: store vram/gart object handles for each channel 2009-02-10 08:55:30 +10:00
Ben Skeggs
417c2c411f nv50: remove some badness, we bail in these situations now anyway 2009-02-06 05:29:14 +10:00
Ben Skeggs
1952a896d0 nouveau: fix some issues where buffer objects never get freed 2009-02-05 23:03:29 +10:00
Ben Skeggs
95fc1b0b52 nv50/kms: be less verbose without debug=1 2009-02-04 15:03:48 +10:00
Ben Skeggs
15ed426dd4 nv50/kms: use DRM_DEBUG 2009-02-04 15:03:48 +10:00
Ben Skeggs
988b805fd6 nv50/kms: oops, re-enable fbcon unregister, got disabled while debugging 2009-02-04 15:03:47 +10:00
Ben Skeggs
bf8181b78a nv50/kms: store dcb entry ptr & or in encoder struct, remove nv50_output.h 2009-02-04 15:03:47 +10:00
Ben Skeggs
5923c976fb nv50/kms: nv50_kms_ -> nv50_ 2009-02-04 15:03:47 +10:00
Ben Skeggs
cd2a87a682 nv50/kms: remove the last of nv50_kms_wrapper 2009-02-04 15:03:47 +10:00
Ben Skeggs
69beb9c191 nv50/kms: remove last bit of state mirroring 2009-02-04 15:03:46 +10:00
Ben Skeggs
0d7e613b66 nv50/kms: remove nv50_fb 2009-02-04 15:03:46 +10:00
Ben Skeggs
af8a76bd22 nv50/kms: get rid of nv50_fb_info 2009-02-04 15:03:46 +10:00
Ben Skeggs
f16514cccc nv50/kms: remove kms_priv 2009-02-04 15:03:46 +10:00
Ben Skeggs
8ed61cf557 nv50/kms: remove nv50_kms_get_scaling_mode() 2009-02-04 15:03:46 +10:00
Ben Skeggs
98e859f2f7 nv50/kms: remove redefinitions of scaling modes.. 2009-02-04 15:03:45 +10:00
Ben Skeggs
140a2da135 nv50/kms: remove or_counter, unused 2009-02-04 15:03:45 +10:00
Ben Skeggs
9f20d45d0a nv50/kms: clean up dcb_table usage a little 2009-02-04 15:03:45 +10:00
Ben Skeggs
d2b4a1fc8b nv50/kms: remove now unused fields from structs 2009-02-04 15:03:45 +10:00
Ben Skeggs
12f2125f11 nv50/kms: remove nv50_connector.type, also redundant 2009-02-04 15:03:44 +10:00
Ben Skeggs
c45ad75cd5 nv50/kms: remove nv50_output.type, it's redundant 2009-02-04 15:03:44 +10:00
Ben Skeggs
d84972f0eb nv50/kms: get rid of struct nouveau_mode 2009-02-04 15:03:44 +10:00
Ben Skeggs
ef42af67ce nv50/kms: merge nv50_kms_crtc and nv50_crtc 2009-02-04 15:03:44 +10:00