Commit Graph

4716 Commits (894c86e8400f13f1ee0dfe23ca4b5f98c32d9223)

Author SHA1 Message Date
Eric Anholt 73b59c8943 Bump to version 2.4.13 for release. 2009-08-28 15:20:22 -07:00
Eric Anholt 8214a65ad1 Add drm_intel_bo_busy to query whether mapping a BO would block. 2009-08-28 14:56:41 -07:00
Michel Dänzer 19d6fadfa2 Revert "libdrm_radeon: Always wait for BO idle in bo_map."
This reverts commit 0a732983f0.

Paul Nieminen and Dave Airlie pointed out on IRC that this shouldn't be
necessary. I was seeing visual corruption in X before I made this change, but
I can't reproduce that anymore so it was probably an unrelated issue.
2009-08-28 11:42:07 +02:00
Michel Dänzer 0a732983f0 libdrm_radeon: Always wait for BO idle in bo_map.
This allows users to eliminate explicit bo_wait calls before bo_map calls.
2009-08-27 08:36:58 +02:00
Jakob Bornecrantz ce6c68dc8a Kill last remnant of replacefb ioctl
Kenrels doesn't expose this ioctl
2009-08-25 12:05:48 +02:00
Alex Deucher 02a4d22e95 radeon: pull in z pipe changes from kernel 2009-08-24 18:15:03 -04:00
Pauli Nieminen caad8d8555 radeon: add support for busy/domain check interface.
airlied: modified the interface to drop busy return value, just return
it normally, also fixed int->uint32_t for domain

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-22 13:16:18 +10:00
Ben Skeggs cbb3ae3dab nouveau: fix a thinko in copyless pushbuf ioctl
No idea why G80 doesn't hit this, but, this fixes at least one NV40 card.
2009-08-19 15:56:24 +10:00
Pauli Nieminen 8c43b79b21 libdrm_radeon: Optimize copy of table to cs buffer with specialized call.
Using this call in OUT_BATCH_TABLE reduces radeonEmitState cpu usage from
9% to 5% and emit_vpu goes from 7% to 1.5%. I did use calgrind to profile
gears for cpu hotspots with r500 card.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-18 14:54:25 -04:00
Pauli Nieminen a474fd978c libdrm_radeon: Fix loops so that compiler can optimize them.
GCC did war about optimization not possible because possible forever loop.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-18 14:53:46 -04:00
Pauli Nieminen 64cef1e465 libdrm/radeon: Update head of linked list not to point freed memory.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-18 14:52:43 -04:00
Ben Skeggs 28f4bfa04b nouveau: support for copy-less pushbuf ioctl 2009-08-18 15:55:42 +10:00
Ben Skeggs 250ab3a38e nouveau: for the moment, assert if we exceed some reloc limits
Nasty, but nicer than silently not writing into the pushbuf
2009-08-18 15:55:02 +10:00
Dave Airlie 1978f6d8d1 radeon: fix bo wait at map time. 2009-08-17 21:21:53 +10:00
Christoph Brill f7996165ff Filter radeon pkgconfig file as do intel and nouveau 2009-08-16 08:26:25 +02:00
Dave Airlie 1d465178fb radeon: fix GTT writing space check
Noticed by vehemens on irc.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-08-15 21:32:35 +10:00
Anssi Hannula d74c67fb13 link libdrm_intel with -lrt for new use of clock_gettime().
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-08-05 11:26:40 -07:00
Dave Airlie 4507863058 libdrm_radeon: add tiling support 2009-08-01 17:20:38 +10:00
Dave Airlie 322cf6cf73 radeon: don't map/unmap explicitly.
This caches the mapping and just use mapping as a sync point
2009-08-01 17:20:35 +10:00
Ben Skeggs 5a73f066ba nouveau: don't overwrite user-specified bo size needlessly 2009-07-28 20:59:05 +10:00
Ben Skeggs 0bf8fb3bce nouveau: user buffers need to be mappable 2009-07-28 20:59:05 +10:00
Ben Skeggs 001331f4f1 nouveau: drm api 0.0.15, update object header, remove fake bo support 2009-07-28 20:59:05 +10:00
Maarten Maathuis 30449829c0 libdrm/nouveau: unmap before ufree means nvbo->sysmem != NULL, which inbalances cpu_prep/cpu_finish
- The bo was mapped with sysmem == NULL, so this means cpu prep is called.
- The bo was unmapped with sysmem != NULL, so this means cpu finish is not called.
- This can lead to a non-zero "cpu writers" count in ttm_bo.
2009-07-27 19:24:13 +02:00
Alex Deucher 9aed44beea Add RADEON_INIT_R600_CP too
this rounds out the r6xx/r7xx stuff in radeon_drm.h
2009-07-15 14:51:38 -04:00
Alex Deucher 0411c37409 Add R600_SCRATCH_REG_OFFSET to radeon_drm.h
This lets us libdrm from master for r6xx/r7xx 3d
2009-07-15 14:42:02 -04:00
Eric Anholt eea95ed8af Bump to version 2.4.12 for release. 2009-07-15 10:04:44 -07:00
Eric Anholt 3f3c5be6f9 intel: Free buffers in the BO cache that haven't been reused in a while.
The goal of the BO cache is to keep buffers on hand for fast continuous use,
as in every frame of a game or every batchbuffer of the X Server.  Keeping
older buffers on hand not only doesn't serve this purpose, it may hurt
performance by resulting in disk cache getting kicked out, or even driving
the system to swap.

Bug #20766.
2009-07-09 20:17:53 -07:00
Dave Airlie 80179df5f8 configure: move AC_USE_SYSTEM_EXTENSIONS up higher
this was giving me a warning on automake 1.11
2009-07-10 02:38:13 +10:00
Ben Skeggs f257201c11 nouveau: fix pin for buffers created with bo_wrap 2009-07-09 11:41:47 +10:00
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