Commit Graph

4574 Commits (500f5b524000ed5930301f4303744cb4c0a19b75)

Author SHA1 Message Date
Kristian Høgsberg 500f5b5240 Fix build on *BSD
This adds a minimal #ifdef clause to drm.h that we'll push upstream.
Once that goes in we can share drm.h between linux, libdrm, and
the bsd's.
2009-11-23 18:25:11 -05:00
Kristian Høgsberg 863e39b56e Don't hardcore 'yes', use in configure.ac output
Oops, I assumed intel was always enable, but it just defaults to on.
2009-11-23 12:42:36 -05:00
Kristian Høgsberg 696fdb11f4 Output summary of enabled features at the end of configure.ac 2009-11-23 11:41:27 -05:00
Kristian Høgsberg dd6cbe7acb Drop duplicated radeon_*.h files in include/drm
These files are userspace headers and live in radeon/
2009-11-23 11:26:26 -05:00
Kristian Høgsberg 6b3cbe7655 Put mach64_drm.h back in to avoid breaking mesa build
We may want to drop mach64 from mesa instead, but that's a different
discussion.
2009-11-20 20:17:26 -05:00
Kristian Høgsberg 4f070d593c Install kernel headers in ${includedir}/drm 2009-11-20 19:46:34 -05:00
Pekka Paalanen 3a87b1f497 nouveau: fix DRM headers
The nouveau_drmif.h is not the Nouveau DRM kernel ABI file, but purely
user space stuff. Remove it, it does not belong in include/drm/.

Copy the right header from Nouveau kernel v2.6.31-rc9-757-gaca551c.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-11-21 01:00:36 +02:00
Kristian Høgsberg 10ce0ec188 Merge remote branch 'origin/master' into libdrm 2009-11-20 17:09:03 -05:00
Kristian Høgsberg 1b064cc428 Update README 2009-11-20 17:08:28 -05:00
Maciej Cencora b4312b639d libdrm_radeon: add radeon_bo_is_referenced_by_cs function
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-11-18 16:07:13 -05:00
Kristian Høgsberg e8523e087f Drop stale TODO and unused ChangeLog 2009-11-17 11:15:56 -05:00
Kristian Høgsberg 4f57abfe66 Move libdrm/ up one level 2009-11-17 11:15:06 -05:00
Kristian Høgsberg 9dd3613073 Drop shared-core, bsd-core, linux-core and scripts subdirs 2009-11-17 10:54:11 -05:00
Kristian Høgsberg a66cf9ce68 Use headers copied from kernel instead of shared-core 2009-11-17 10:54:11 -05:00
Kristian Høgsberg ba79b1a8c2 Fix typo in i915 pipe_from_crtc_id ioctl struct name 2009-11-17 10:54:11 -05:00
Kristian Høgsberg 2b42af9a2f Copy headers from kernel v2.6.32-rc6-130-g5b8f0be 2009-11-17 10:54:07 -05:00
Kristian Høgsberg a99680384a Add makefile rule to copy headers from kernel tree 2009-11-17 09:23:52 -05:00
Francisco Jerez c20706ffe5 nouveau: Update some nouveau_class.h definitions from renouveau.xml.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-11-15 18:13:28 +02:00
Chris Wilson 83a35b68f4 intel: Export madvise
Wrap the madvise ioctl for use in APPLE_object_purgeable.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-11-11 13:09:22 +00:00
Julien Cristau 89cc98c0d5 Only install libdrm_intel.pc if we build libdrm_intel 2009-11-05 15:49:09 +00:00
Ben Skeggs b7ed162d29 nouveau: turn another assertion into an error
Signed-off-by: Ben Skeggs <skeggsb@beleth.(none)>
2009-11-04 17:31:18 +10:00
Ben Skeggs f4c5063026 nouveau: modify api slightly to allow caller to handle reloc failures
Signed-off-by: Ben Skeggs <skeggsb@beleth.(none)>
2009-11-04 15:24:27 +10:00
Ben Skeggs a8bdf0e00c nouveau: add reloc refcnt to pending bo list
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2009-11-04 14:58:19 +10:00
Ben Skeggs 63910f8aa6 nouveau: drop rendering on the floor rather than asserting if flush fails
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2009-11-04 13:24:52 +10:00
Ben Skeggs 68c2ac9640 nouveau: update view of available aperture space after each flush
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2009-11-04 13:24:52 +10:00
Mathias Fröhlich 6eafd1cf38 radeon: fix allocation
The old code increments the command stream size by another kbyte, but does
not make sure that the requested packet size fits into the stream. The patch
ensures that the whole next packet fits there and rounds the allocated size to
a power of two.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-11-03 11:41:26 -05:00
Kristian Høgsberg b0b96636db Add support for vblank events
The kernel will now write data to the DRM fd for various event types if
requested.  Currently, the only supported event is a vblank event: it contains
the vblank count for the event as well as a timestamp from when the event
ocurred.  Since the DRM fd is now pollable, it's easy to integrate into
existing event loops.
2009-10-29 17:14:09 -07:00
Eric Anholt 0d7ad7e43c intel: Only call clock_gettime once per unreference_final.
Notably when freeing a batchbuffer, we often end up freeing many of the
buffers it points at as well.  Avoiding repeated calls brings us a 9% CPU
win for cairo-gl.

[ # ]  backend                         test   min(s) median(s) stddev. count
before:
[  0]       gl            firefox-talos-gfx   58.941   58.966   0.75%    3/3
after:
[  0]       gl            firefox-talos-gfx   54.186   54.195   0.49%    3/3
2009-10-20 14:24:44 -07:00
Eric Anholt 66d2714f54 intel: Improve bo_references performance by skipping the tree walk.
If the target we're asking about hasn't ever been used as a relocation
target, then it obviously hasn't been used as a target by the batch's reloc
tree.  This is the common case for good GL programming where you only map
fresh buffers, and gives us a 5% win in cairo-gl.

[ # ]  backend                         test   min(s) median(s) stddev. count
before:
[  0]       gl            firefox-talos-gfx   64.680   64.756   0.06%    3/3
after:
[  0]       gl            firefox-talos-gfx   60.816   60.970   0.29%    3/3
2009-10-20 13:31:55 -07:00
Ben Skeggs 67628aa39d nouveau: retry if pushbuf ioctl interrupted by signal
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2009-10-20 12:57:46 +10:00
Ben Skeggs fdd960a95c nouveau: function to return status of bo being referenced in pushbuf
Will be used to implement gallium's is_{texture,buffer}_referenced()
callbacks properly.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2009-10-19 09:07:45 +10:00
Patrice Mandin 3a387a983e nouveau: nv30: add render target logbase2 width,height 2009-10-13 22:50:46 +02:00
Eric Anholt a221e4fd92 intel: Add the defines for the kernel overlay support landing in 2.6.33. 2009-10-13 11:36:01 -07:00
Chris Wilson 901bacd29c intel: Fallback to atomic-ops.h [libatomic-ops-dev]
Use the external implementation for atomic operations across a wide
range of architectures.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-13 15:13:00 +01:00
Chris Wilson 24c905f841 configure: Typo in error message.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-13 14:25:54 +01:00
Chris Wilson fc8f6be5a9 configure: Conditionally build libdrm_intel
Only build libdrm_intel automatically if we have support for atomic
operations. To force configure to build drm pass --enable-intel, which
will cause the configure to error if no support is found. Or pass
--disable-intel to explicitly prevent libdrm_intel from being built.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-12 23:58:47 +01:00
Eric Anholt a107e5b129 Bump to 2.4.15 for release. 2009-10-08 16:59:17 -07:00
Eric Anholt 9764061ab1 intel: Remove the asserts about the ignored alignment parameter.
I slipped it in with the alloc_tiled changes, since we were explicitly
throwing the parameter away.  It caught some bogus released code, which
we've now fixed, so remove the asserts to keep old drivers working.
2009-10-08 15:55:02 -07:00
Jesse Barnes 3a7dfcdfaf intel: Add a bo_alloc function for tiled BOs.
This simplifies driver code in handling object allocation, and also gives us
an opportunity to possibly cache tiled buffers if it turns out to be a win.

[anholt: This is chopped out of the execbuf2 patch, as it seems to be useful
separately and cleans up the execbuf2 changes to be more obvious]
2009-10-06 15:45:10 -07:00
Eric Anholt 02c775fc75 intel: Fix up some stale doxygen comments. 2009-10-06 15:45:10 -07:00
Eric Anholt d70d60529f intel: Reformat to the kernel coding style. Welcome to the 8-space future.
This is done with:
Lindent *.[ch]
perl -pi -e 's|drm_intel_bo \* |drm_intel_bo *|g' *.[ch]
perl -pi -e 's|drm_intel_bufmgr \* |drm_intel_bufmgr *|g' *.[ch]
perl -pi -e 's|drm_intel_bo_gem \* |drm_intel_bo_gem *|g' *.[ch]
perl -pi -e 's|drm_intel_bufmgr_gem \* |drm_intel_bufmgr_gem *|g' *.[ch]
perl -pi -e 's|_fake \* |_fake *|g' *.[ch]
hand-editing to whack indented comments into line and other touchups.
2009-10-06 15:45:06 -07:00
Eric Anholt 3c9bd068e0 intel: Don't allocate more relocation entries than the BO could support.
This saves 32k of relocation entry storage for many 965 state buffers.  No
noticeable impact on performance for cairo-gl firefox.
2009-10-06 13:30:07 -07:00
Chris Wilson ac34f599ea tests: Disable intel-specific tests with --disable-intel
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-03 23:18:19 +01:00
Chris Wilson ab3300c581 intel: Add a configure option to *disable* building libdrm-intel
In conjunction with the atomic operation patch, it may be more
convenient for some people to disable building libdrm-intel and its
dependencies upon the atomic intrinsics then it is for them to use a
supported compiler.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-03 22:58:25 +01:00
Chris Wilson 61bddf8504 intel: report errno
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-03 22:58:16 +01:00
Michel Dänzer 11f0e450dd libdrm_radeon: Update RADEON_TILING_* flags to what's in current kernels. 2009-10-03 17:37:07 +02:00
Nicolai Hähnle a5fb264257 libdrm_radeon: Zero-initialize structures to silence valgrind warnings
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-03 13:46:10 +02:00
Chris Wilson 04495eeec2 intel: Use atomic refcounters
As the target architecture for Intel GPUs is the x86, we can presume to
have reasonable compiler support for Intel atomic intrinsics, i.e. gcc,
and so use those in preference to pulling in a complicated mess of
fragile assembly.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[anholt: hand-resolved against my previous commit.  This brings cairo-gl
firefox-talos-gfx time from 65 seconds back down to 62 seconds.]
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-02 13:21:23 -07:00
Chris Wilson 0fb215ae31 intel: Mark cached bo as purgeable
Set the DONTNEED flag on cached buffers so that the kernel is free to
discard those when under memory pressure.

[anholt: This takes firefox-talos-gfx time from ~62 seconds to ~65 seconds
on my GM965, but it seems like a hit worth taking for the improved
functionality from saving memory]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-02 12:54:13 -07:00
Eric Anholt 12d9b7cc85 intel: Don't free the reloc list when putting a freed BO in the cache.
This takes firefox-talos-gfx from 74 seconds to 70 seconds on my GM965.
2009-10-02 11:11:31 -07:00