Commit Graph

4718 Commits (3c7ae8abe1eee1b1231f7c81e9898485940901c7)

Author SHA1 Message Date
Alan Coopersmith 3c7ae8abe1 Make libkms build default OS-dependent
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-04-16 17:37:58 -07:00
Chris Wilson 3506173ba7 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>
2010-04-11 18:48:31 +01:00
Kristian Høgsberg 894c86e840 Revert "Fix pkgconfig includes for /usr/include/drm"
This reverts commit 245d695779.

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.
2010-04-09 16:33:38 -04:00
Ben Skeggs 204c76c4d6 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.
2010-04-09 20:38:34 +10:00
Jerome Glisse 78de69713d 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).
2010-04-08 17:53:09 +02:00
Jesse Barnes c7650003c5 libdrm: bump version number to 2.4.20 for release
A few good fixes landed, get them out there.
2010-04-02 13:46:41 -07:00
Jerome Glisse cc20ed8100 drm/radeon: tab/whitespace cleanup 2010-03-29 16:39:08 +02:00
Jesse Barnes e6b3f906ce modetest: add optional select codepath
For misc. testing.
2010-03-26 13:14:38 -07:00
Ben Skeggs 245d695779 Fix pkgconfig includes for /usr/include/drm 2010-03-25 13:34:51 +10:00
Ben Skeggs c1c8bbf80b nouveau: fix annoying compiler warning 2010-03-19 10:20:15 +10:00
Ben Skeggs df32c307e8 nouveau: fix segfault in nouveau_bo_new_tile() failure path 2010-03-19 10:19:12 +10:00
Ben Skeggs a247fca8ba nouveau: remove unused field from nouveau_bo 2010-03-19 10:19:11 +10:00
Francisco Jerez 5671282115 nouveau: Regenerate nouveau_class.h.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-03-18 15:04:20 +01:00
Pauli Nieminen df9737094e 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>
2010-03-17 22:43:26 +02:00
Eric Anholt ef36c9a3b2 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>
2010-03-17 12:49:10 -07:00
Julien Cristau 976e779f9c 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>
2010-03-17 12:45:46 -07:00
Julien Cristau e73af7f560 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>
2010-03-17 12:45:31 -07:00
Julien Cristau d271336925 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>
2010-03-17 12:45:23 -07:00
Eric Anholt 7c697b1670 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.
2010-03-17 11:15:45 -07:00
Pauli Nieminen 30ce1fd152 libdrm: Fix error message if libdrm_intel|radeon is disabled and there is no atomic ops. 2010-03-17 14:34:57 +02:00
Pauli Nieminen 966c9907c0 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>
2010-03-17 12:42:21 +02:00
Pauli Nieminen 21105bc186 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>
2010-03-17 11:48:00 +02:00
Francisco Jerez df7157fe2e nouveau: Fix up the stride of NV20TCL_LIGHT_BACK_*.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-03-13 18:57:12 +01:00
Francisco Jerez 04fd3872ee nouveau: Small lighting related addition to nouveau_class.h.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-03-07 19:58:33 +01:00
Chris Wilson a4041e096c 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>
2010-03-07 14:17:24 +00:00
Francisco Jerez 581cafbc24 nouveau: Update nouveau_class.h.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-03-06 21:08:06 +01:00
Eric Anholt 1d4d1e6b13 intel: Only align Y-tiling pitch to the Y tile width.
Fixes piglit depth-tex-modes on gen4.
2010-03-04 16:27:45 -08:00
Chris Wilson 3e21e3ba00 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>
2010-03-04 21:17:48 +00:00
Eric Anholt b5495527f4 Increment version to 2.4.19 for release.
The primary motivation of this release is to expose the new execbuf2
Intel API.
2010-03-03 11:10:54 -08:00
Eric Anholt 47102863ed intel: Update the needs_fence flag of buffers on the validate list.
Fixes fbo-copyteximage on i915 with texture tiling and execbuf2 fenced
relocs.
2010-03-03 10:08:44 -08:00
Eric Anholt 766fa7909f intel: Don't enable execbuf2 fenced relocs unless we have execbuf2. 2010-03-02 16:04:14 -08:00
Eric Anholt 292a5d73a2 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.
2010-03-02 15:39:37 -08:00
Eric Anholt acbaff24e0 intel: Fix typo in conversion from IS_GEN to bufmgr_gem->gen.
Luckily I caught the bug with the first consumer of the interface.
2010-03-02 15:39:37 -08:00
Eric Anholt a0abb1b14e intel: add a comment about tiled buffer alloc height alignment from Mesa. 2010-03-02 15:39:37 -08:00
Maarten Maathuis cdc788d645 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>
2010-03-02 23:25:50 +01:00
Eric Anholt a1f9ea765d intel: Use an integer for chipset generation instead of many conditionals.
Saves a bunch of comparisons in hot paths.
2010-03-02 10:12:46 -08:00
Jesse Barnes b50964027b 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>
2010-03-02 10:10:50 -08:00
Marcin Kościelnicki 9a37455b35 tests/modetest: Don't get_props on a connector after freeing it. 2010-02-28 00:25:22 +00:00
Marcin Kościelnicki 694ef59532 tests: vrefresh is actually not * 1000. 2010-02-28 00:25:22 +00:00
Marcin Kościelnicki ecb668e1ef tests: Add nouveau to list of supported modules. 2010-02-28 00:25:22 +00:00
Marcin Kościelnicki d5a2e77682 libkms/nouveau: Add support 2010-02-28 00:25:22 +00:00
Marcin Kościelnicki 23f62721b7 libkms/intel: Throw out unused intel_bo fields.
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
2010-02-28 00:25:22 +00:00
Marcin Kościelnicki afd74ec555 Add config.h macro HAVE_NOUVEAU 2010-02-28 00:25:22 +00:00
Eric Anholt f6dc964e1d intel: Add initial support for Sandybridge, and clean up the #defines. 2010-02-25 10:41:03 -08:00
Francisco Jerez c27ce8674d nouveau: Update nouveau_class.h.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-02-25 18:32:06 +01:00
Patrice Mandin 3130f94c6e nv30: update for 8 texture units 2010-02-20 11:57:29 +01:00
Patrice Mandin bdcd12980b nv30: update for front/back stencil inversion
Signed-off-by: Patrice Mandin <patmandin@gmail.com>
2010-02-20 11:50:37 +01:00
Jakob Bornecrantz a5c8f55397 libkms: Use a standard version number 2010-02-18 16:29:36 +01:00
Jakob Bornecrantz 97003c53f9 libkms: Enable by default 2010-02-18 13:29:30 +01:00
Jakob Bornecrantz 25c0c638c4 libkms: Add missing include file to libkms source 2010-02-18 13:28:52 +01:00