Commit Graph

4637 Commits (d920fa9d0b54873d53f03a006d0fe3df11136b74)

Author SHA1 Message Date
Ian Romanick 4179c5f0a6 s/AC_USE_SYSTEM_MACROS/AC_USE_SYSTEM_EXTENSIONS/
Not sure what I was thinking.
2009-07-06 15:36:20 -07:00
Pauli Nieminen c5a5bbbe89 libdrm: Make chown check for return value
If call was interrupted by signal we have to make call again.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2009-07-06 14:17:05 -07:00
Ian Romanick a953b3270c libdrm: Set _XOPEN_SOURCE and _GNU_SOURCE
Several POSIX extensions are used in the libdrm code (e.g., mknod and ffs).
Set _XOPEN_SOURCE and _GNU_SOURCE to something reasonable to ensure that
prototypes for these functions are available.  This is done in configure.ac
using AC_USE_SYSTEM_MACROS.  This requires autoconf 2.60 or later.  Eventually
the code should check for the existance of these defines and do something
reasonable if they are not available.

Inspired by a patch by Pauli Nieminen and suggestions from Julien Cristau.
Thanks.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2009-07-06 13:48:19 -07:00
Eric Anholt 78fa590a1d intel: Fix up math errors when allocating very large BOs.
The logbase2 would overflow and wrap the size around to 0, making the code
allocate a 4kb object instead.  By simplifying the code to just walk the
14-entry bucket array comparing sizes instead of indexing on
ffs(1 << logbase2(size)), we avoid silly math errors and have code of
approximately the same speed.

Many thanks to Simon Farnsworth for debugging and providing a working patch.
Bug #27365.
2009-07-06 13:11:03 -07:00
Edward O'Callaghan cea2d29ee4 intel: fix compiler warning about returning a void value.
bug #21999
2009-07-06 13:11:03 -07:00
Pauli Nieminen 90ae0f2bb8 libdrm: Fix pci id numbers to unsigned so code won't mix signed/unsigned integers. 2009-07-06 10:05:52 -07:00
Ian Romanick 015efd1bfa strcasecmp is in strings.h.
Based on patch by Pauli Nieminen.  Thanks.
2009-07-06 09:23:59 -07:00
Pauli Nieminen 3dda0050f1 libdrm: Remove typedef for non-existing enum 2009-07-06 09:20:31 -07:00
Dave Airlie 39970c67b7 radeon: move cs space checking code to libdrm_radeon.
This ports a lot of the space checking code into a the common
library, so that the DDX and mesa can use it.
2009-07-06 15:10:11 +10:00
Jerome Glisse 72a29340ea radeon: fix cs buffer realloc padding
We always realloc at least 0x1000 dwords (page on most system)
when growing the cs buffer this is to avoid having to realloc
at each cs_begin.
2009-07-03 15:03:03 +02:00
Dave Airlie af90222c45 radeon: fix realloc of packets.
This should use ndw not cdw, using cdw leads to realloc alignment going wrong
2009-07-03 21:13:22 +10:00
Dave Airlie fbac5891b9 radeon: add buffer naming function 2009-07-02 15:42:01 +10:00
Dave Airlie de1ed01214 radeon: add support for write followed by read relocs.
the DDX does this and used to handle it internally
2009-06-30 12:19:28 +10:00
Dave Airlie 790097c513 remove some old ttm bits 2009-06-23 09:51:05 +10:00
Thomas Hellstrom 9a33f62be1 drm: Strip old ttm.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-06-22 23:37:06 +02:00
Jesse Barnes 81644198ae modetest: use gtt unmap for object
Match gtt map/unmap for correctness.
2009-06-22 12:27:49 -07:00
Dave Airlie 2fa2db138b libdrm/radeon: add initial libdrm_radeon
requires --enable-radeon-experimental-api for now
2009-06-17 17:47:42 +10:00
Ben Skeggs 3d4bfe8c89 nouveau: 0.0.14 + extend bo interface to support subrange mapping
Normal map() should operate as before, and map_range()/map_flush() should
give correct results but lacking any performance difference from map().

Nothing exiting being done here yet, but the interface is a good start.
2009-06-05 14:07:23 +10:00
Ben Skeggs 2cb4c64d73 nouveau: fix bo mapping issue 2009-06-04 09:01:32 +10:00
Pekka Paalanen d7c42ff4c4 Fix build on kernels < 2.6.26
The commit 651e3dc6dd, "drm: Fix
compilation on 2.6.30" broke all builds on kernels before 2.6.26.
Variadic functions cannot be inlined.

The variadic inline function is replaced with a variadic macro.

Also, the function dev_name() added by that same commit is never used,
so it is removed.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-06-03 22:30:42 +03:00
Ben Skeggs 00fae87f96 nouveau: fill in bo->tiled field for referenced buffers
Fixes the dri1 gallium driver if the front buffer happens to be non-linear.
2009-06-03 10:25:53 +10:00
Ben Skeggs dbffeadcfc nv50: magic fix for "3d busted without the binary driver first" issue
No idea what this reg does.. NVIDIA put 0x802 into it on some chips, the
criteria aren't too clear on when they do that however.  Hopefully 0x800
will work everywhere...
2009-06-02 17:06:34 +10:00
Michael Buesch 651e3dc6dd drm: Fix compilation on 2.6.30
This fixes DRM compilation of nouveau.ko on kernel 2.6.30.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
2009-05-28 17:26:37 +10:00
Ben Skeggs c65a343ed2 nouveau: bump for 0.0.13 2009-05-26 15:47:14 +10:00
Danny Tholen 85b9f737db nouveau: backlight support for ppc laptops
Patch allows the backlight to be manipulated under gnome on apple powerpc
based NV30 machines.  It works fine on my powerbook, and should also work
for older NV17/NV18 machines.

Note that older powerpc specific tools (pbbuttonsd) have some problems with
this implementation (because the device is not yet there at the start time
of the daemon, and the code makes incorrect assumptions about the max
brightness values). However, IMHO these things can and should be addressed
in the daemon.

Some style/warning fixes applied by Stuart Bennett <stuart@freedesktop.org>
2009-05-22 15:43:26 +01:00
Eric Anholt f355ad8943 intel: quiet a warning. 2009-05-19 10:07:16 -07:00
Eric Anholt 469655fab7 intel: Only do BO caching up to 64MB objects.
This avoids making objects significantly bigger than they would be
otherwise, which would result in some failing at binding to the GTT.
Found from firefox hanging on:
http://upload.wikimedia.org/wikipedia/commons/b/b7/Singapore_port_panorama.jpg
due to a software fallback trying to do a GTT-mapped copy between two 73MB
BOs that were instead each 128MB, and failing because both couldn't fit
simultaneously.

The cost here is that we get no opportunity to cache these objects and
avoid the mapping.  But since the objects are a significant percentage
of the aperture size, each mapped access is likely having to fault and rebind
the object most of the time anyway.

Bug #20152 (2/3)
2009-05-19 10:05:38 -07:00
Keith Packard f57d7f4b0b libdrm/intel: Make get_pipe_from_crtc_id per-bufmgr. Return -1 on failure.
The convention is that all APIs are per-bufmgr, so make this one the same.
Then, have it return -1 on failure so that the application can know what's
going on and do something sensible.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-14 16:58:14 -07:00
Carl Worth afd245dd7f Add new drm_intel_get_pipe_from_crtc_id function.
This wraps the new DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID ioctl,
allowing applications to discover the pipe number corresponding
to a given CRTC ID. This is necessary for doing pipe-specific
operations such as waiting for vblank on a given CRTC.
2009-05-14 15:32:54 -07:00
Keith Packard 8b8e20e0f9 Bump to version 2.4.10 to mark addition of drm_intel_bo_disable_reuse
New API, new version.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2009-05-12 18:19:22 -07:00
Keith Packard 5b5ce30128 libdrm/intel: add drm_intel_bo_disable_reuse api
Scanout buffers need to be freed through the kernel as it holds a reference
to them; exposing this API allows applications allocating scanout buffers to
flag them as not reusable.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2009-05-12 18:19:22 -07:00
Alan Coopersmith 628dc48a16 Use C99 versions of __FUNCTION__ & __volatile__ when not building with gcc 2009-05-10 15:35:03 -07:00
Alan Coopersmith 1bae8844ca Delete extra libdrm_lists.h line after libdrm_la_SOURCES in libdrm/Makefile.am
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-05-09 17:22:17 -07:00
Stuart Bennett 94d48d0385 nouveau: backlight compat fix
Avoid failure to build on old kernels with CONFIG_BACKLIGHT_CLASS_DEVICE set
2009-05-07 01:00:41 +01:00
Danny Tholen e2b5fde7f6 nouveau: fix ppc for swab changes in Linux 2.6.29 2009-05-07 01:00:41 +01:00
Keith Packard 68103b2758 libdrm/intel: assert that clients are using bo refcounting correctly
Add assertions to drm_intel_gem_bo_reference,
drm_intel_gem_bo_reference_locked and drm_intel_gem_bo_unreference_locked
that the object has not been freed (refcount > 0). Mistakes in refcounting
lead to attempts to insert a bo into a free list more than once which causes
application failure as empty free lists are dereferenced as buffer objects.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 18:49:59 -07:00
Jesse Barnes 11b60973bc intel: NULL fake bo block when freeing in evict_all
Fixes assertion failures on later use of the object.
2009-04-27 11:49:16 -07:00
Dave Airlie 412d370b9a libdrm/mode: align subpixel results 2009-04-22 20:25:40 +10:00
Ben Skeggs a1e3ab9e55 nouveau: write posting got lost somewhere, bring it back 2009-04-17 09:29:19 +10:00
Ben Skeggs 78e753d033 nouveau: store bo handle in public struct in bo_ref_handle 2009-04-15 12:44:21 +10:00
Jesse Barnes 07646002c6 Bump version to 2.4.9
Who needs 2.4.8 anyway?
2009-04-10 15:34:24 -07:00
Jesse Barnes 4d5e82e7d3 Bump version to 2.4.8 2009-04-10 15:24:41 -07:00
Jesse Barnes 3637dcc66d Revert "libdrm: speed up connector & mode fetching"
This reverts commit cd5c66c659.  It broke too
many kernel assumptions about the double ioctl (connector status, mode
fetching, etc.)
2009-04-10 15:24:10 -07:00
Kristian Høgsberg fef29358bb Bump version to 2.4.7 2009-04-09 15:19:10 -04:00
Kristian Høgsberg ec9b7b320a test: Avoid recursive dependency in makefile 2009-04-09 15:17:51 -04:00
Kristian Høgsberg a85e07b903 test: Makefile.am grammar nazi 2009-04-09 15:02:40 -04:00
Dave Airlie 1faab66cfd drm: fix test makefile
no idea if this is correct but it works so meh
2009-04-07 09:26:32 +10:00
Kristian Høgsberg 751db3fe27 Skip tests that require root
This lets us do make distcheck as non-root.
2009-04-06 17:22:10 -04:00
Kristian Høgsberg 8a5c4d567f XFAIL auth and lock test cases
They're writing to the read end of a pipe and failing.
2009-04-06 17:18:17 -04:00
Kristian Høgsberg e9d6116e5b Use libudev in test case to only run gem tests for intel devices. 2009-04-06 17:13:01 -04:00