Eric Anholt [Tue, 2 Nov 2010 18:19:21 +0000 (11:19 -0700)]
intel: Remove gratuitous assert on bo_reference.
This couldn't be triggered except by overflow, since there's an assert
in unreference to catch the usual failure of over-unreferencing.
Eric Anholt [Mon, 1 Nov 2010 13:54:58 +0000 (06:54 -0700)]
intel: Shove the fake bufmgr subdata implementation into the fake bufmgr.
Eric Anholt [Mon, 20 Sep 2010 21:14:14 +0000 (14:14 -0700)]
intel: Remove stale comment.
Francisco Jerez [Sun, 31 Oct 2010 00:22:29 +0000 (02:22 +0200)]
nouveau: Avoid unnecessary call to CPU_FINI.
nouveau_bo_unmap called the CPU_FINI IOCTL even if it was a NOSYNC
mapping. It caused no harmful effects (actually CPU_FINI is a no-op on
recent enough kernels) besides the precious CPU cycles being wasted.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Chris Wilson [Fri, 29 Oct 2010 09:49:54 +0000 (10:49 +0100)]
intel: enable relaxed fence allocation for i915
The kernel has always allowed userspace to underallocate objects
supplied for fencing. However, the kernel only allocated the object size
for the fence in the GTT and so caused tiling corruption. More recently
the kernel does allocate the full fence region in the GTT for an
under-sized object and so advertises that clients may finally make use
of this feature. The biggest benefit is for texture-heavy GL games on
i945 such as World of Padman which go from needing over 1GiB of RAM to
play to fitting in the GTT!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Adam Jackson [Wed, 27 Oct 2010 22:44:53 +0000 (18:44 -0400)]
s/drmStrdup/strdup/
_DRM_MALLOC hasn't been a relevant concern since we split libdrm out
from xserver.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Chris Wilson [Tue, 26 Oct 2010 10:35:11 +0000 (11:35 +0100)]
intel: Prepare for BLT ring split.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Francisco Jerez [Thu, 21 Oct 2010 21:02:43 +0000 (23:02 +0200)]
nouveau: Define the HAS_PAGEFLIP getparam.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Francisco Jerez [Tue, 28 Sep 2010 20:45:27 +0000 (22:45 +0200)]
nouveau: Let the user choose the push buffer size.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Francisco Jerez [Tue, 28 Sep 2010 20:47:11 +0000 (22:47 +0200)]
nouveau: Define buffer object usage flags.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Chris Wilson [Fri, 1 Oct 2010 15:50:09 +0000 (16:50 +0100)]
intel: Downgrade error warnings to debug
As the higher layers check the error return from libdrm-intel and
are supposed to handle the error (and print their own warning in
extremis) the voluminous output on stderr is just noise and a hazard in
its own right.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Carl Worth [Wed, 29 Sep 2010 03:40:37 +0000 (20:40 -0700)]
Increment version to 2.4.22
For the upcoming 2.4.22 release.
Chris Wilson [Sat, 25 Sep 2010 20:32:59 +0000 (21:32 +0100)]
intel: Replace open-coded drmIoctl with calls to drmIoctl()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Ben Skeggs [Tue, 21 Sep 2010 03:02:07 +0000 (13:02 +1000)]
nouveau: fix drm version check some more
... and make a mental note to not push commits before having coffee
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sun, 19 Sep 2010 22:07:28 +0000 (08:07 +1000)]
nouveau: fix thinko in drm version check
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Chris Wilson [Thu, 9 Sep 2010 17:52:28 +0000 (18:52 +0100)]
modetest: Fix drawing routines to use stride.
Jesse Barnes [Thu, 9 Sep 2010 17:27:22 +0000 (10:27 -0700)]
modetest: align fb pitch to 64 bytes
Docs say this is necessary, and the kernel now enforces this.
Jesse Barnes [Tue, 7 Sep 2010 20:10:15 +0000 (13:10 -0700)]
modetest: add edp and TV connector names to the connector name array
Eric Anholt [Thu, 26 Aug 2010 22:39:28 +0000 (15:39 -0700)]
Avoid use of c++ reserved keyword "virtual" when using a C++ compiler.
Avoids requiring nasty hacks around libdrm headers in the new C++
parts of Mesa drivers.
Chris Wilson [Tue, 24 Aug 2010 20:29:31 +0000 (21:29 +0100)]
Free the property blob along the error path.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Ben Skeggs [Wed, 18 Aug 2010 02:06:48 +0000 (12:06 +1000)]
nouveau: accept both 0.0.16 and 1.x.x
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Benjamin Herrenschmidt [Fri, 6 Aug 2010 03:55:11 +0000 (13:55 +1000)]
libdrm: Fix PCI domain domain support
This works in conjunction with newer kernels. If we succeed in requesting
interface 1.4, the we know the kernel provides proper domain numbers. If
not, ignore the domain number as it's bogus (except on Alpha).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Dave Airlie [Tue, 3 Aug 2010 22:41:23 +0000 (08:41 +1000)]
Copy headers from kernel drm-core-next
Chris Wilson [Thu, 1 Jul 2010 21:38:54 +0000 (22:38 +0100)]
drm mode: Return -errno on drmIoctl() failure
The high layers expect to receive a status code on error (on the
pessimistic assumption that the errno value will have been overwritten
by the time the failure is propagated all the way up), so convert
xf86drmMode.c to return -errno on an ioctl error and be consistent with
the rest of the libdrm API.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fernando Carrijo [Thu, 1 Jul 2010 16:28:29 +0000 (09:28 -0700)]
Purge macro NEED_REPLIES
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Brian Paul <brianp@vmware.com>
Chris Wilson [Tue, 29 Jun 2010 19:12:44 +0000 (20:12 +0100)]
intel: Suppress the error return from setting domains after mapping.
If the mapping succeeds we have a valid pointer. If setting the domain
failures we may incur cache corruption. However the usual failure mode
is because of a hung GPU, in which case it is preferable to ignore the
minor error from setting the domain and continue on oblivious. If
these errors persist, we should rate limit the warning [or even just
remove it].
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Thu, 24 Jun 2010 10:38:00 +0000 (11:38 +0100)]
intel: Limit tiled pitches to 8192 on pre-i965.
Fixes:
Bug 28515 - Failed to allocate framebuffer when exceed 2048 width
https://bugs.freedesktop.org/show_bug.cgi?id=28515
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Tue, 22 Jun 2010 12:03:52 +0000 (13:03 +0100)]
intel: Only adjust the local stride used for SET_TILING in tiled alloc
Mesa uses the returned pitch from alloc_tiled, so make sure that we set
it correctly before modifying the stride used for the SET_TILING call.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Tue, 22 Jun 2010 12:00:22 +0000 (13:00 +0100)]
intel: Restore SET_TILING for non-flinked bo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Tue, 22 Jun 2010 10:15:56 +0000 (11:15 +0100)]
intel: '===' != '=='
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Tue, 22 Jun 2010 10:07:26 +0000 (11:07 +0100)]
intel: Sanitise strides for linear buffers and SET_TILING
Ensure that the user doesn't attempt to specify a stride to use with a
linear buffer by forcing such to be zero.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Mon, 21 Jun 2010 14:38:06 +0000 (15:38 +0100)]
intel: Print out debugging message following ENOSPC
execbuffer() returns ENOSPC if it cannot fit the batch buffer into the
aperture which is the error we want to diagnose here.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Mon, 21 Jun 2010 14:21:48 +0000 (15:21 +0100)]
intel: Scan the cache for old bo once every second.
Rearrange the cache cleanup so that we always scan following a final
unreference, and guard against multiple scans in a single second.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Mon, 21 Jun 2010 13:20:56 +0000 (14:20 +0100)]
intel: Force stride to be 0 for I915_TILING_NONE.
When allocating a tiled buffer, if we remove the desired tiling mode due
to it being beyond hardware limits, also remove the stride. This ensures
that we only ever use stride 0 with I915_TILING_NONE.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Mon, 21 Jun 2010 13:27:23 +0000 (14:27 +0100)]
intel: Defer tiling change to allocation.
As we now expose a method to allocate tiled buffers, it makes more sense
to defer the SET_TILING until required. Besides the slim chance that it
will be a no-op, by delaying the change we are less likely to stall on
waiting for a bound buffer to release a fence register.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Mon, 21 Jun 2010 13:31:29 +0000 (14:31 +0100)]
intel: Track tiling stride
We need to inform the kernel if the tiling stride changes and not only
for changes of the tiling mode.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Eric Anholt [Thu, 10 Jun 2010 15:59:05 +0000 (08:59 -0700)]
Bump version to 2.4.21 for release.
Eric Anholt [Thu, 10 Jun 2010 16:03:41 +0000 (09:03 -0700)]
Fix radeon distcheck.
Eric Anholt [Thu, 10 Jun 2010 15:58:08 +0000 (08:58 -0700)]
intel: Fix several other paths for buffers pointing at themselves.
Eric Anholt [Sat, 5 Jun 2010 00:09:11 +0000 (17:09 -0700)]
intel: Add more intermediate sizes of cache buckets between powers of 2.
We had two cases recently where the rounding to powers of two hurt
badly: 4:2:0 YUV HD video frames would round up from 2.2MB to 4MB, and
Urban Terror was hitting aperture size limitations. For UT, this is
because mipmap trees for power of two texture sizes will land right in
the middle between two cache buckets.
By giving a few more sizes between powers of two, Urban Terror on my
945 ends up consuming 207MB of GEM objects instead of 272MB, and HD
video decode on Ironlake goes from 99MB to 75MB.
cairo-perf-diff of the benchmarks for gl and xlib shows a 1.09x and
1.06x speedup and a 1.07x, 1.08x, and 1.11x slowdown. From this, I
think this patch was really a no-op in terms of performance for these
CPU-bound workloads.
Chris Wilson [Wed, 9 Jun 2010 09:08:41 +0000 (10:08 +0100)]
intel: Convert to untiled pitches if surface is too large for tiling.
If the pitch is too large for the hardware to tile, recompute the
required surface size based on the untiled pitch and alignments. For the
older hardware, which has smaller limits and greater restrictions, this
may be a considerable saving in allocation size.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Eric Anholt [Mon, 7 Jun 2010 21:22:36 +0000 (14:22 -0700)]
Allow a buffer to point at itself and still get relocs.
I'm using this in experiments with the i965 Mesa driver.
Zou Nan hai [Wed, 2 Jun 2010 02:07:37 +0000 (10:07 +0800)]
intel: Add support for kernel multi-ringbuffer API.
This introduces a new API to exec on BSD ring buffer, for H.264 VLD
decoding.
Signed-off-by: Xiang Hai hao <haihao.xiang@intel.com>
Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Jesse Barnes [Thu, 3 Jun 2010 01:27:24 +0000 (18:27 -0700)]
add vbltest to .gitignore
Daniel Stone [Tue, 1 Jun 2010 18:23:42 +0000 (19:23 +0100)]
libkms: Fix include paths
Otherwise xf86drm.h isn't found, or the wrong one.
Eric Anholt [Wed, 26 May 2010 03:13:37 +0000 (20:13 -0700)]
Enable silent automake rules.
Eric Anholt [Wed, 26 May 2010 03:11:23 +0000 (20:11 -0700)]
intel_bufmgr_fake: fix compile warning.
Chris Wilson [Mon, 24 May 2010 17:35:41 +0000 (18:35 +0100)]
intel: Don't change tiling mode unless the kernel reports success.
Fixes:
Bug 26686 - Some textures are distorted with libdrm 2.4.18 in GTAVC>A3
http://bugs.freedesktop.org/show_bug.cgi?id=26686
This bug continues to haunt me. The kernel SET_TILING ioctl is
inconsistent in its return values when reporting an error. If one of its
sanity checks fail, then the input values are left unchanged. If the
kernel later fails to change the tiling mode, then the input values are
modified to match the current tiling on the object. In short, userspace
cannot trust the return values upon error and so we must assume that
upon error our current tiling mode matches reality and not update.
Chris Wilson [Thu, 13 May 2010 07:24:28 +0000 (08:24 +0100)]
Revert "intel: We don't need to take the bufmgr lock whilst mapping."
This reverts commit
7ca558494dd3f68f29bb6ca981de9b8f49620b60.
This was pushed ahead of an essential review of bo level locking in
mesa, without which we cannot know whether removing this lock is safe.
Jonathan Callen [Wed, 12 May 2010 17:55:34 +0000 (13:55 -0400)]
Only build tests in make check
Currently, all the tests for libdrm are built during 'make all', even
if you do not wish to run tests. Attached is a patch, based on
version 2.4.15, to make the tests build in 'make check'.
Kristian Høgsberg [Wed, 12 May 2010 17:34:25 +0000 (13:34 -0400)]
Pull in new kernel headers
Changes struct drm_mode_crtc_page_flip to use __u32 instead of uint32_t,
fixes
https://bugs.freedesktop.org/show_bug.cgi?id=26994
Chris Wilson [Tue, 11 May 2010 07:54:06 +0000 (08:54 +0100)]
intel: query whether a buffer is reusable.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Thu, 1 Apr 2010 16:15:39 +0000 (17:15 +0100)]
intel: We don't need to take the bufmgr lock whilst mapping.
Michel Dänzer [Wed, 28 Apr 2010 06:25:30 +0000 (08:25 +0200)]
vbltest: Doesn't need intel stuff.
Fixes build without libdrm_intel.
Jesse Barnes [Tue, 27 Apr 2010 19:43:20 +0000 (15:43 -0400)]
tests: add new vblank test
Simple test for event frequency.
Marek Olšák [Mon, 26 Apr 2010 18:06:53 +0000 (20:06 +0200)]
radeon: use the const qualifier in radeon_cs_write_table
Signed-off-by: Marek Olšák <maraeo@gmail.com>
Alan Coopersmith [Sat, 17 Apr 2010 00:34:11 +0000 (17:34 -0700)]
Correct the Solaris definitions of atomic_add & atomic_dec
The #defines added in
966c9907c040b4fe4b288b4a9d82598797aee743 were
mapping these to functions that don't exist.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Alan Coopersmith [Fri, 16 Apr 2010 17:12:37 +0000 (10:12 -0700)]
Make libkms build default OS-dependent
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Chris Wilson [Sun, 11 Apr 2010 17:40:38 +0000 (18:40 +0100)]
intel: Use the correct size when allocating reloc_target_info array
Thomas tracked down this error with kdm and commit b509640:
==4320== Invalid write of size 8
==4320== at 0x9A97998: do_bo_emit_reloc (in /usr/lib/libdrm_intel.so.1.0.0)
==4320== by 0x9A97B9C: drm_intel_gem_bo_emit_reloc (in /usr/lib/libdrm_intel.so.1.0.0)
==4320== by 0xAED3234: intel_batchbuffer_emit_reloc (in /usr/lib/xorg/modules/dri/i965_dri.so)
==4320== by 0xAF13827: brw_emit_vertices (in /usr/lib/xorg/modules/dri/i965_dri.so)
==4320== by 0xAF1F14D: brw_upload_state (in /usr/lib/xorg/modules/dri/i965_dri.so)
==4320== by 0xAF12122: brw_draw_prims (in /usr/lib/xorg/modules/dri/i965_dri.so)
==4320== by 0xB256824: vbo_exec_vtx_flush (in /usr/lib/xorg/modules/dri/libdricore.so)
==4320== by 0xB2523BB: vbo_exec_FlushVertices_internal (in /usr/lib/xorg/modules/dri/libdricore.so)
==4320== by 0xB252411: vbo_exec_FlushVertices (in /usr/lib/xorg/modules/dri/libdricore.so)
==4320== by 0xB195A3D: _mesa_PopAttrib (in /usr/lib/xorg/modules/dri/libdricore.so)
==4320== by 0x8DF0F02: __glXDisp_Render (in /usr/lib/xorg/modules/extensions/libglx.xorg)
==4320== by 0x8DF517F: __glXDispatch (in /usr/lib/xorg/modules/extensions/libglx.xorg)
==4320== Address 0x126a8b80 is 0 bytes after a block of size 16,368 alloc'd
==4320== at 0x4C23E03: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4320== by 0x9A97A64: do_bo_emit_reloc (in /usr/lib/libdrm_intel.so.1.0.0)
==4320== by 0x9A97B9C: drm_intel_gem_bo_emit_reloc (in /usr/lib/libdrm_intel.so.1.0.0)
==4320== by 0xAED3234: intel_batchbuffer_emit_reloc (in /usr/lib/xorg/modules/dri/i965_dri.so)
==4320== by 0xAF191DB: upload_binding_table_pointers (in /usr/lib/xorg/modules/dri/i965_dri.so)
==4320== by 0xAF1F14D: brw_upload_state (in /usr/lib/xorg/modules/dri/i965_dri.so)
==4320== by 0xAF12122: brw_draw_prims (in /usr/lib/xorg/modules/dri/i965_dri.so)
==4320== by 0xB255EF6: vbo_exec_DrawArrays (in /usr/lib/xorg/modules/dri/libdricore.so)
==4320== by 0x8DF67A3: __glXDisp_DrawArrays (in /usr/lib/xorg/modules/extensions/libglx.xorg)
==4320== by 0x8DF0F02: __glXDisp_Render (in /usr/lib/xorg/modules/extensions/libglx.xorg)
==4320== by 0x8DF517F: __glXDispatch (in /usr/lib/xorg/modules/extensions/libglx.xorg)
==4320== by 0x446293: ??? (in /usr/bin/Xorg)
which is simply due to only allocating space for the pointers and not
the structs themselves. D'oh.
Reported-by: Thomas Bächler <thomas@archlinux.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Kristian Høgsberg [Fri, 9 Apr 2010 20:33:38 +0000 (16:33 -0400)]
Revert "Fix pkgconfig includes for /usr/include/drm"
This reverts commit
245d6957794648d7fd83279c680fed6e4c262147.
libdrm now install headers in ${includedir}/libdrm and /usr/include/drm
is reserved for the kernel headers. We should only ever add one of these
to the CFLAGS.
Ben Skeggs [Fri, 9 Apr 2010 10:38:34 +0000 (20:38 +1000)]
nouveau: stop shipping nouveau_class.h
The motivation behind this is that by shipping it here, it's essentially
an API which causes issues while bisecting across changes to the header
files.
Jerome Glisse [Thu, 8 Apr 2010 15:50:34 +0000 (17:50 +0200)]
drm/radeon: add new cs command stream dumping facilities
Dump command stream + associated bo into a binary file
which follow a similar design as json file. It allows
to intercept a command stream and replay it in a standalone
program (see radeondb tools).
Jesse Barnes [Fri, 2 Apr 2010 20:46:41 +0000 (13:46 -0700)]
libdrm: bump version number to 2.4.20 for release
A few good fixes landed, get them out there.
Jerome Glisse [Mon, 29 Mar 2010 14:39:08 +0000 (16:39 +0200)]
drm/radeon: tab/whitespace cleanup
Jesse Barnes [Fri, 26 Mar 2010 20:13:57 +0000 (13:13 -0700)]
modetest: add optional select codepath
For misc. testing.
Ben Skeggs [Thu, 25 Mar 2010 03:34:51 +0000 (13:34 +1000)]
Fix pkgconfig includes for /usr/include/drm
Ben Skeggs [Fri, 19 Mar 2010 00:20:09 +0000 (10:20 +1000)]
nouveau: fix annoying compiler warning
Ben Skeggs [Fri, 19 Mar 2010 00:17:19 +0000 (10:17 +1000)]
nouveau: fix segfault in nouveau_bo_new_tile() failure path
Ben Skeggs [Mon, 22 Feb 2010 06:22:51 +0000 (16:22 +1000)]
nouveau: remove unused field from nouveau_bo
Francisco Jerez [Wed, 17 Mar 2010 20:40:33 +0000 (21:40 +0100)]
nouveau: Regenerate nouveau_class.h.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Pauli Nieminen [Wed, 17 Mar 2010 20:41:08 +0000 (22:41 +0200)]
Check HAVE_RADEON only after checking for atomic operations.
Fixes problem that libdrm_radeon was disabled in Makefile even when configure
claimed that radeon was enabled.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Eric Anholt [Wed, 17 Mar 2010 19:46:21 +0000 (12:46 -0700)]
intel: Install the header file in the libdrm/ directory.
Suggested-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Julien Cristau [Fri, 26 Feb 2010 18:07:24 +0000 (19:07 +0100)]
Install headers to $(includedir)/libdrm
Avoids conflicts with kernel headers.
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Julien Cristau [Fri, 26 Feb 2010 18:07:23 +0000 (19:07 +0100)]
libdrm_nouveau requires libdrm
nouveau_drmif.h includes xf86drm.h.
Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Julien Cristau [Fri, 26 Feb 2010 18:07:22 +0000 (19:07 +0100)]
libdrm_intel.pc: don't include ${includedir}/drm
intel_bufmgr.h is installed in ${includedir} directly, and the other
headers are taken care of by libdrm.pc's Cflags.
Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Eric Anholt [Wed, 17 Mar 2010 17:05:55 +0000 (10:05 -0700)]
intel: Align untiled buffer pitch to 64B.
This is the largest untiled pitch requirement from gen2 through gen4.
It's only the case for gen3 rendering to color regions with depth, but
it's rare for this to be a significant factor in memory usage -- for
example, gen4 requires 1 or 2 times the element size, or up to 64
bytes depending on the size of the elements. This is easier than
encoding all the various little quirks for untiled pitch alignment,
since we rarely do untiled now.
Pauli Nieminen [Wed, 17 Mar 2010 12:34:53 +0000 (14:34 +0200)]
libdrm: Fix error message if libdrm_intel|radeon is disabled and there is no atomic ops.
Pauli Nieminen [Sat, 29 Aug 2009 09:08:57 +0000 (12:08 +0300)]
libdrm_radeon: Optimize cs_gem_reloc to do less looping.
bo->referenced_in_cs is checked if bo is already in cs. Adding and removing
reference in bo is done with atomic operations to allow parallel access to a
bo from multiple contexts.
cs->id generation code quarentees there is not duplicated ids which limits
number of cs->ids to 32. If there is more cs objects rest will get id 0.
V2:
- Fix configure to check for atomics operations if libdrm_radeon is only selected.
- Make atomic operations private to libdrm.
This optimization decreases cs_write_reloc share of torcs profiling from 4.3%
to 2.6%.
Tested-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Pauli Nieminen [Wed, 10 Mar 2010 11:35:59 +0000 (13:35 +0200)]
libdrm: Move intel_atomic.h to libdrm core for sharing.
intel_atomic.h includes very usefull atomic operations for
lock free parrallel access of variables. Moving these to
core libdrm for code sharing with radeon.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Francisco Jerez [Sat, 13 Mar 2010 17:55:09 +0000 (18:55 +0100)]
nouveau: Fix up the stride of NV20TCL_LIGHT_BACK_*.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Francisco Jerez [Sun, 7 Mar 2010 17:56:42 +0000 (18:56 +0100)]
nouveau: Small lighting related addition to nouveau_class.h.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Chris Wilson [Sun, 7 Mar 2010 14:15:40 +0000 (14:15 +0000)]
intel: Repeat execbuffer if interrupted by signal
Repeat while EINTR, not EAGAIN! One more source of corruption
erradicated, hurray!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Francisco Jerez [Sat, 6 Mar 2010 20:07:31 +0000 (21:07 +0100)]
nouveau: Update nouveau_class.h.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Eric Anholt [Fri, 5 Mar 2010 00:09:40 +0000 (16:09 -0800)]
intel: Only align Y-tiling pitch to the Y tile width.
Fixes piglit depth-tex-modes on gen4.
Chris Wilson [Thu, 4 Mar 2010 21:17:48 +0000 (21:17 +0000)]
intel: Propagate some more error returns
Ensure that errors from the kernel are propagated back to the caller,
and not masked with return 0;
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Eric Anholt [Wed, 3 Mar 2010 19:10:54 +0000 (11:10 -0800)]
Increment version to 2.4.19 for release.
The primary motivation of this release is to expose the new execbuf2
Intel API.
Eric Anholt [Wed, 3 Mar 2010 18:07:27 +0000 (10:07 -0800)]
intel: Update the needs_fence flag of buffers on the validate list.
Fixes fbo-copyteximage on i915 with texture tiling and execbuf2 fenced
relocs.
Eric Anholt [Wed, 3 Mar 2010 00:04:14 +0000 (16:04 -0800)]
intel: Don't enable execbuf2 fenced relocs unless we have execbuf2.
Eric Anholt [Tue, 2 Mar 2010 23:25:42 +0000 (15:25 -0800)]
intel: Don't tile-align pitch for untiled buffers.
This allows Mesa to use drm_intel_bo_alloc_tiled() for its tiled
buffers, since it makes its decision about pitch before telling
libdrm. They happen to be the same choices for the tiled case.
Eric Anholt [Tue, 2 Mar 2010 23:24:50 +0000 (15:24 -0800)]
intel: Fix typo in conversion from IS_GEN to bufmgr_gem->gen.
Luckily I caught the bug with the first consumer of the interface.
Eric Anholt [Tue, 2 Mar 2010 23:05:30 +0000 (15:05 -0800)]
intel: add a comment about tiled buffer alloc height alignment from Mesa.
Maarten Maathuis [Wed, 24 Feb 2010 22:10:34 +0000 (23:10 +0100)]
nouveau: make sure initial kalloc for user bo ends up in the right place
- Currently reloc'ing a user bo to gart will first cause an allocation in vram,
which is then written to by cpu, then the bo gets moved to gart.
Acked-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Eric Anholt [Tue, 2 Mar 2010 16:49:36 +0000 (08:49 -0800)]
intel: Use an integer for chipset generation instead of many conditionals.
Saves a bunch of comparisons in hot paths.
Jesse Barnes [Tue, 15 Sep 2009 18:02:58 +0000 (11:02 -0700)]
libdrm/intel: execbuf2 support
This patch to libdrm adds support for the new execbuf2 ioctl. If
detected, it will be used instead of the old ioctl. By using the new
drm_intel_bufmgr_gem_enable_fenced_relocs(), you can indicate that any
time a fence register is actually required for a relocation target you
will call drm_intel_bo_emit_reloc_fence instead of
drm_intel_bo_emit_reloc, which will reduce fence register pressure.
Signed-off-by: Eric Anholt <eric@anholt.net>
Marcin Kościelnicki [Sat, 27 Feb 2010 15:04:40 +0000 (15:04 +0000)]
tests/modetest: Don't get_props on a connector after freeing it.
Marcin Kościelnicki [Sat, 27 Feb 2010 15:04:42 +0000 (15:04 +0000)]
tests: vrefresh is actually not * 1000.
Marcin Kościelnicki [Sat, 27 Feb 2010 15:04:41 +0000 (15:04 +0000)]
tests: Add nouveau to list of supported modules.
Marcin Kościelnicki [Sat, 27 Feb 2010 16:02:25 +0000 (16:02 +0000)]
libkms/nouveau: Add support
Marcin Kościelnicki [Sat, 27 Feb 2010 15:04:38 +0000 (15:04 +0000)]
libkms/intel: Throw out unused intel_bo fields.
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
Marcin Kościelnicki [Sat, 27 Feb 2010 15:04:37 +0000 (15:04 +0000)]
Add config.h macro HAVE_NOUVEAU