platform/upstream/libdrm.git
14 years agoCorrect the Solaris definitions of atomic_add & atomic_dec
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>
14 years agoMake libkms build default OS-dependent
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>
14 years agointel: Use the correct size when allocating reloc_target_info array
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>
14 years agoRevert "Fix pkgconfig includes for /usr/include/drm"
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.

14 years agonouveau: stop shipping nouveau_class.h
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.

14 years agodrm/radeon: add new cs command stream dumping facilities
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).

14 years agolibdrm: bump version number to 2.4.20 for release 2.4.20
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.

14 years agodrm/radeon: tab/whitespace cleanup
Jerome Glisse [Mon, 29 Mar 2010 14:39:08 +0000 (16:39 +0200)]
drm/radeon: tab/whitespace cleanup

14 years agomodetest: add optional select codepath
Jesse Barnes [Fri, 26 Mar 2010 20:13:57 +0000 (13:13 -0700)]
modetest: add optional select codepath

For misc. testing.

14 years agoFix pkgconfig includes for /usr/include/drm
Ben Skeggs [Thu, 25 Mar 2010 03:34:51 +0000 (13:34 +1000)]
Fix pkgconfig includes for /usr/include/drm

14 years agonouveau: fix annoying compiler warning
Ben Skeggs [Fri, 19 Mar 2010 00:20:09 +0000 (10:20 +1000)]
nouveau: fix annoying compiler warning

14 years agonouveau: fix segfault in nouveau_bo_new_tile() failure path
Ben Skeggs [Fri, 19 Mar 2010 00:17:19 +0000 (10:17 +1000)]
nouveau: fix segfault in nouveau_bo_new_tile() failure path

14 years agonouveau: remove unused field from nouveau_bo
Ben Skeggs [Mon, 22 Feb 2010 06:22:51 +0000 (16:22 +1000)]
nouveau: remove unused field from nouveau_bo

14 years agonouveau: Regenerate nouveau_class.h.
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>
14 years agoCheck HAVE_RADEON only after checking for atomic operations.
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>
14 years agointel: Install the header file in the libdrm/ directory.
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>
14 years agoInstall headers to $(includedir)/libdrm
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>
14 years agolibdrm_nouveau requires libdrm
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>
14 years agolibdrm_intel.pc: don't include ${includedir}/drm
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>
14 years agointel: Align untiled buffer pitch to 64B.
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.

14 years agolibdrm: Fix error message if libdrm_intel|radeon is disabled and there is no atomic...
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.

14 years agolibdrm_radeon: Optimize cs_gem_reloc to do less looping.
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>
14 years agolibdrm: Move intel_atomic.h to libdrm core for sharing.
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>
14 years agonouveau: Fix up the stride of NV20TCL_LIGHT_BACK_*.
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>
14 years agonouveau: Small lighting related addition to nouveau_class.h.
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>
14 years agointel: Repeat execbuffer if interrupted by signal
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>
14 years agonouveau: Update nouveau_class.h.
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>
14 years agointel: Only align Y-tiling pitch to the Y tile width.
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.

14 years agointel: Propagate some more error returns
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>
14 years agoIncrement version to 2.4.19 for release. 2.4.19
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.

14 years agointel: Update the needs_fence flag of buffers on the validate list.
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.

14 years agointel: Don't enable execbuf2 fenced relocs unless we have execbuf2.
Eric Anholt [Wed, 3 Mar 2010 00:04:14 +0000 (16:04 -0800)]
intel: Don't enable execbuf2 fenced relocs unless we have execbuf2.

14 years agointel: Don't tile-align pitch for untiled buffers.
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.

14 years agointel: Fix typo in conversion from IS_GEN to bufmgr_gem->gen.
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.

14 years agointel: add a comment about tiled buffer alloc height alignment from Mesa.
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.

14 years agonouveau: make sure initial kalloc for user bo ends up in the right place
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>
14 years agointel: Use an integer for chipset generation instead of many conditionals.
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.

14 years agolibdrm/intel: execbuf2 support
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>
14 years agotests/modetest: Don't get_props on a connector after freeing it.
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.

14 years agotests: vrefresh is actually not * 1000.
Marcin Kościelnicki [Sat, 27 Feb 2010 15:04:42 +0000 (15:04 +0000)]
tests: vrefresh is actually not * 1000.

14 years agotests: Add nouveau to list of supported modules.
Marcin Kościelnicki [Sat, 27 Feb 2010 15:04:41 +0000 (15:04 +0000)]
tests: Add nouveau to list of supported modules.

14 years agolibkms/nouveau: Add support
Marcin Kościelnicki [Sat, 27 Feb 2010 16:02:25 +0000 (16:02 +0000)]
libkms/nouveau: Add support

14 years agolibkms/intel: Throw out unused intel_bo fields.
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>
14 years agoAdd config.h macro HAVE_NOUVEAU
Marcin Kościelnicki [Sat, 27 Feb 2010 15:04:37 +0000 (15:04 +0000)]
Add config.h macro HAVE_NOUVEAU

14 years agointel: Add initial support for Sandybridge, and clean up the #defines.
Eric Anholt [Thu, 22 Oct 2009 23:37:56 +0000 (16:37 -0700)]
intel: Add initial support for Sandybridge, and clean up the #defines.

14 years agonouveau: Update nouveau_class.h.
Francisco Jerez [Thu, 25 Feb 2010 17:28:18 +0000 (18:28 +0100)]
nouveau: Update nouveau_class.h.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
14 years agonv30: update for 8 texture units
Patrice Mandin [Sat, 20 Feb 2010 10:57:29 +0000 (11:57 +0100)]
nv30: update for 8 texture units

14 years agonv30: update for front/back stencil inversion
Patrice Mandin [Sat, 20 Feb 2010 10:50:37 +0000 (11:50 +0100)]
nv30: update for front/back stencil inversion

Signed-off-by: Patrice Mandin <patmandin@gmail.com>
14 years agolibkms: Use a standard version number
Jakob Bornecrantz [Thu, 18 Feb 2010 15:29:36 +0000 (16:29 +0100)]
libkms: Use a standard version number

14 years agolibkms: Enable by default
Jakob Bornecrantz [Thu, 18 Feb 2010 12:27:29 +0000 (13:27 +0100)]
libkms: Enable by default

14 years agolibkms: Add missing include file to libkms source
Jakob Bornecrantz [Thu, 18 Feb 2010 12:14:07 +0000 (13:14 +0100)]
libkms: Add missing include file to libkms source

14 years agovmwgfx: Update kernel header
Jakob Bornecrantz [Thu, 18 Feb 2010 12:27:59 +0000 (13:27 +0100)]
vmwgfx: Update kernel header

14 years agoradeon: add square-tiling flag
Marek Olšák [Sun, 14 Feb 2010 16:57:19 +0000 (17:57 +0100)]
radeon: add square-tiling flag

14 years agoIncrement version to 2.4.18 for release. 2.4.18
Carl Worth [Tue, 16 Feb 2010 20:12:41 +0000 (12:12 -0800)]
Increment version to 2.4.18 for release.

The primary motivation of the release is the bug fix in commit
4f0f871730b76730ca58209181d16725b0c40184

14 years agonouveau: bump MAX_PUSH to 512
Ben Skeggs [Tue, 16 Feb 2010 05:42:00 +0000 (15:42 +1000)]
nouveau: bump MAX_PUSH to 512

14 years agonouveau: interface changes for 0.0.16 DRM
Luca Barbieri [Fri, 29 Jan 2010 08:53:24 +0000 (09:53 +0100)]
nouveau: interface changes for 0.0.16 DRM

This commit encompasses the changes necessary to run on top of the 0.0.16
nouveau interface, additional APIs to support the new features of the
interface, as well as code from Luca Barbieri to improve the pushbuf
interface, which just happens to break nouveau's libdrm ABI so was delayed
until now.

API changes as a result of 0.0.16 DRM interface:

1. No more bo_pin()/bo_unpin(), these were only there for UMS and we no
   longer support it.

2. Any random nouveau_bo can be submitted to the GPU as a push buffer.

3. Relocations can be applied on any nouveau_bo

This patch changes the pushbuffer ABI to:

1. No longer use/expose nouveau_pushbuffer. Everything is directly
   in nouveau_channel. This saves the extra "pushbuf" pointer dereference.

2. Use cur/end pointers instead of tracking the remaining size.
   Pushing data now only needs to alter cur and not both cur and remaining.

The goal is to make the *_RING macros faster and make the interface simpler
and cleaner in the process.

The *_RING APIs are unchanged, but those are inlined and the ABI is changed.

Also, anything accessing pushbuf->remaining instead of using AVAIL_RING
will need to be fixed.

14 years agodrm: a some new connector types from the kernel
Alex Deucher [Thu, 11 Feb 2010 00:39:46 +0000 (19:39 -0500)]
drm: a some new connector types from the kernel

Add eDP (embedded displayport) and generic TV

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
14 years agointel: Handle resetting of input params after EINTR during SET_TILING
Chris Wilson [Wed, 10 Feb 2010 09:45:13 +0000 (09:45 +0000)]
intel: Handle resetting of input params after EINTR during SET_TILING

The SET_TILING is pernicious in that it overwrites the input arguments
following an error in order to report the current tiling state of the
buffer. This caught us by surprise as we then fed those arguments back
into to the ioctl unmodified following an EINTR and so the kernel then
reported success for the no-op. We interpreted this success as meaning
that the tiling on the buffer had changed so updated our state and
started using the buffer incorrectly in the new tiled/untiled manner.
This lead to all sorts of random corruption and GPU hangs, even though
the batch buffers would look sane (when the GPU had not wandered off
into forbidden territory).

References:

  Bug 25475 - [i915] Xorg crash / Execbuf while wedged
  http://bugs.freedesktop.org/show_bug.cgi?id=25475

  Bug 25554 - i830_uxa_prepare_access: gtt bo map failed: Input/output error
  http://bugs.freedesktop.org/show_bug.cgi?id=25554

(And probably every other weird bug in the last few months.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
14 years agointel: Account for potential pinned buffers hogging fences
Chris Wilson [Tue, 9 Feb 2010 08:32:54 +0000 (08:32 +0000)]
intel: Account for potential pinned buffers hogging fences

As the kernel reports the total number of fences, we must guess how many
fences are likely to be pinned. In the typical system these will be only
used by the scanout buffers, of which there may be one per pipe, and any
number of manually pinned fenced buffers. So take a conservative guess
and reserve two fences for use by the system.

Note this reduces the number of fences to 3 for i915 and prior.

Reference:
  http://bugs.freedesktop.org/show_bug.cgi?id=25911
  The latest intel driver 2.10.0 causes kernel oops and system hangs

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
14 years agoTidy up compile warnings by cleaning up types.
Matthew W. S. Bell [Sat, 30 Jan 2010 02:14:44 +0000 (02:14 +0000)]
Tidy up compile warnings by cleaning up types.

14 years agolibdrm/radeon: Fix section size mismatch to reset the section.
Pauli Nieminen [Mon, 1 Feb 2010 18:19:33 +0000 (20:19 +0200)]
libdrm/radeon: Fix section size mismatch to reset the section.

If there is section size mismatch reusing the section object
makes section start fail.
Reseting the object before doing error checking prevents the
possible flood of errors.

14 years agoradeon: enable by default now that kms is out of staging
Dave Airlie [Tue, 2 Feb 2010 00:58:50 +0000 (10:58 +1000)]
radeon: enable by default now that kms is out of staging

14 years agointel: check return value for calloc
Dave Airlie [Tue, 2 Feb 2010 00:57:12 +0000 (10:57 +1000)]
intel: check return value for calloc

14 years agonouveau: Regenerate nouveau_class.h.
Francisco Jerez [Sun, 31 Jan 2010 16:47:50 +0000 (17:47 +0100)]
nouveau: Regenerate nouveau_class.h.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
14 years agonouveau: add nouveau_resource_destroy
Marcin Slusarz [Tue, 12 Jan 2010 14:31:28 +0000 (15:31 +0100)]
nouveau: add nouveau_resource_destroy

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
14 years agolibkms: Rework interface to not duplicate fields from kms and make formats explicit
Jakob Bornecrantz [Sat, 23 Jan 2010 01:41:49 +0000 (01:41 +0000)]
libkms: Rework interface to not duplicate fields from kms and make formats explicit

List of changes:
Fixes the cursor size to 64x64, you still need ti supply width and height
Explicitly make the cursor format A8R8G8B8
Explicitly make the scanout format X8R8G8B8

14 years agonouveau: Update nouveau_drm.h
Marcin Kościelnicki [Tue, 26 Jan 2010 18:39:21 +0000 (18:39 +0000)]
nouveau: Update nouveau_drm.h

14 years agolibkms: Fix return value in vmwgfx_bo_create
Jakob Bornecrantz [Sat, 23 Jan 2010 01:38:18 +0000 (01:38 +0000)]
libkms: Fix return value in vmwgfx_bo_create

14 years agonouveau: fail channel creation if pushbuf init fails
Ben Skeggs [Thu, 21 Jan 2010 05:17:26 +0000 (15:17 +1000)]
nouveau: fail channel creation if pushbuf init fails

14 years agointel: Add pkg-config dependency on libdrm.so using 'Requires'
Chris Wilson [Wed, 20 Jan 2010 10:42:46 +0000 (10:42 +0000)]
intel: Add pkg-config dependency on libdrm.so using 'Requires'

14 years agoSupport gcc's __FUNCTION__ for people using other compilers
Alan Coopersmith [Sun, 17 Jan 2010 03:34:13 +0000 (19:34 -0800)]
Support gcc's __FUNCTION__ for people using other compilers

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
14 years agoAdd support for Solaris libc atomic operations
Alan Coopersmith [Sun, 17 Jan 2010 03:28:50 +0000 (19:28 -0800)]
Add support for Solaris libc atomic operations

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
14 years agoInclude alloca.h in tests/drmstat.c when configure detects it
Alan Coopersmith [Wed, 16 Dec 2009 23:03:58 +0000 (15:03 -0800)]
Include alloca.h in tests/drmstat.c when configure detects it

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
14 years agonouveau: disable flush_notify on channel_free
Marcin Slusarz [Tue, 12 Jan 2010 14:38:29 +0000 (15:38 +0100)]
nouveau: disable flush_notify on channel_free

We don't want do call flush_notify when we will FIRE the RING
a couple of lines later, because grobj bound to this channel
might be already freed.

14 years agonouveau: fix memory leak in nouveau_channel_free
Marcin Slusarz [Tue, 12 Jan 2010 14:32:39 +0000 (15:32 +0100)]
nouveau: fix memory leak in nouveau_channel_free

14 years agolibkms: Fix multiple map unmap in vmwgfx and add comment in intel
Jakob Bornecrantz [Fri, 15 Jan 2010 20:13:20 +0000 (20:13 +0000)]
libkms: Fix multiple map unmap in vmwgfx and add comment in intel

14 years agoradeon: get device id from the kernel, use it in cs_print
Jerome Glisse [Thu, 14 Jan 2010 19:01:55 +0000 (20:01 +0100)]
radeon: get device id from the kernel, use it in cs_print

This allow external tools to know for which asics a cs
is destinated to.

14 years agoradeon: simpler cs print function
Jerome Glisse [Thu, 14 Jan 2010 11:28:20 +0000 (12:28 +0100)]
radeon: simpler cs print function

We don't intend libdrm-radeon to become clever enough to
decode cs for all GPU we support. Better to let an external
tool do the job. This will print raw cs in an easy to parse
way.

14 years agoradeon: indentation + trailing space cleanup
Jerome Glisse [Thu, 14 Jan 2010 10:28:25 +0000 (11:28 +0100)]
radeon: indentation + trailing space cleanup

14 years agoradeon: indentation & trailing space cleanup
Jerome Glisse [Thu, 14 Jan 2010 10:24:16 +0000 (11:24 +0100)]
radeon: indentation & trailing space cleanup

14 years agoradeon: indentation + trailing space cleanup
Jerome Glisse [Thu, 14 Jan 2010 10:08:43 +0000 (11:08 +0100)]
radeon: indentation + trailing space cleanup

14 years agotests: Update kmstest a bit
Jakob Bornecrantz [Tue, 12 Jan 2010 21:35:28 +0000 (22:35 +0100)]
tests: Update kmstest a bit

14 years agolibkms: Use sysfs instead of udev to find driver
Jakob Bornecrantz [Tue, 12 Jan 2010 17:53:49 +0000 (17:53 +0000)]
libkms: Use sysfs instead of udev to find driver

Udev code is still there just commented out.

14 years agotests: Add a very small libkms test
Jakob Bornecrantz [Fri, 8 Jan 2010 15:34:44 +0000 (15:34 +0000)]
tests: Add a very small libkms test

14 years agolibkms/intel: Don't fail to create bo if we fail to tile
Jakob Bornecrantz [Fri, 8 Jan 2010 15:19:44 +0000 (15:19 +0000)]
libkms/intel: Don't fail to create bo if we fail to tile

14 years agonouveau: Update nouveau_class.h.
Francisco Jerez [Fri, 8 Jan 2010 03:34:39 +0000 (04:34 +0100)]
nouveau: Update nouveau_class.h.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
14 years agolibkms: Add intel backend
Jakob Bornecrantz [Fri, 8 Jan 2010 03:00:56 +0000 (03:00 +0000)]
libkms: Add intel backend

14 years agolibkms: Pick driver backend via pci id that we get from udev
Jakob Bornecrantz [Fri, 8 Jan 2010 02:51:04 +0000 (02:51 +0000)]
libkms: Pick driver backend via pci id that we get from udev

14 years agomodes: Retry GETCONNECTOR if a hotplug event occurs between the two ioctls
Peter Clifton [Wed, 6 Jan 2010 20:44:11 +0000 (20:44 +0000)]
modes: Retry GETCONNECTOR if a hotplug event occurs between the two ioctls

If the available modes changes between the two GETCONNECTOR ioctls, that
caused the kernel to skip filling one array and led to a crash (as the size
of the allocated and initialised block of memory differed from the reported
size, and might be NULL if no modes were present at first).

This bug manifest its self on my machine due to spurious false positive
detections of a connected TV-out.

Fixes: http://bugs.freedesktop.org/show_bug.cgi?id=25912
       Crash whilst probing modes

Based upon the similar fixes for the GETRESOURCES ioctls by Chris Wilson,
in the following commits:

    commit e6c136ca7a4c54457b48be1aec2be024b3e4a28d
    commit 85fb3e55fdb7af9b5f59c1ec0f15d1950e601b05
    commit d1308f4fe7f94aae51ca9f70947aea8e09597f37

Signed-off-by: Peter Clifton <pcjc2@cam.ac.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
14 years agomodes: Fix previous commit for potential legal NULLs
Chris Wilson [Wed, 6 Jan 2010 16:53:33 +0000 (16:53 +0000)]
modes: Fix previous commit for potential legal NULLs

If the count is 0, then the malloc is permitted to return NULL, so don't
throw an error in that case.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
14 years agomodes: Free local resources after allocation failure in GETRESOURCES
Chris Wilson [Wed, 6 Jan 2010 15:39:49 +0000 (15:39 +0000)]
modes: Free local resources after allocation failure in GETRESOURCES

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
14 years agomodes: Retry GETRESOURCES if a hotplug event occurs between the two ioctls
Chris Wilson [Wed, 6 Jan 2010 15:19:25 +0000 (15:19 +0000)]
modes: Retry GETRESOURCES if a hotplug event occurs between the two ioctls

Peter Clifton hit an issue whereby he had a spurious TV hotplug event
that occurred between the two GETRESOURCES ioctls that caused the kernel
to skip filling one array and led to a crash (as the size of the
allocated and initialised block of memory differed from the reported
size).

Fixes: http://bugs.freedesktop.org/show_bug.cgi?id=25912
       Crash whilst probing modes

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-by: Peter Clifton <pcjc2@cam.ac.uk>
14 years agolibkms: Make vmwgfx optional
Jakob Bornecrantz [Tue, 5 Jan 2010 19:55:02 +0000 (20:55 +0100)]
libkms: Make vmwgfx optional

14 years agolibkms: Remove duped vmwgfx_drm.h header
Jakob Bornecrantz [Tue, 5 Jan 2010 20:04:57 +0000 (21:04 +0100)]
libkms: Remove duped vmwgfx_drm.h header

14 years agoMerge branch 'master' into libkms-master
Jakob Bornecrantz [Tue, 5 Jan 2010 19:59:24 +0000 (20:59 +0100)]
Merge branch 'master' into libkms-master

Conflicts:
configure.ac

14 years agolibkms: Disable by default
Jakob Bornecrantz [Tue, 5 Jan 2010 19:58:37 +0000 (20:58 +0100)]
libkms: Disable by default

14 years agovmwgfx: Add experimental vmwgfx kernel header
Jakob Bornecrantz [Tue, 5 Jan 2010 18:53:10 +0000 (19:53 +0100)]
vmwgfx: Add experimental vmwgfx kernel header

14 years agonouveau: add BEGIN_RING_NI
Marcin Slusarz [Wed, 30 Dec 2009 20:32:40 +0000 (21:32 +0100)]
nouveau: add BEGIN_RING_NI

14 years agonouveau: Unreference pushbuf objects on channel destruction.
Younes Manton [Mon, 28 Dec 2009 23:00:09 +0000 (18:00 -0500)]
nouveau: Unreference pushbuf objects on channel destruction.

- unreference pushbuf objects on channel destruction

Based on Krzysztof Smiechowicz's patch.

14 years agonouveau: Update some object definitions from renouveau.xml.
Francisco Jerez [Mon, 28 Dec 2009 17:01:42 +0000 (18:01 +0100)]
nouveau: Update some object definitions from renouveau.xml.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>