profile/ivi/libdrm.git
13 years agolibkms: All current BO_TYPE are 32bpp
Chris Wilson [Sat, 14 May 2011 10:15:06 +0000 (11:15 +0100)]
libkms: All current BO_TYPE are 32bpp

... so request a 32bpp dumb buffer rather than a 16bpp.

Fixes modetest and friends.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoconfigure: version bump for 2.4.25 release
Chris Wilson [Mon, 11 Apr 2011 07:25:42 +0000 (08:25 +0100)]
configure: version bump for 2.4.25 release

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agolibdrm: (revised) vblank wait on crtc > 1
Ilija Hadzic [Thu, 24 Mar 2011 17:24:28 +0000 (13:24 -0400)]
libdrm: (revised) vblank wait on crtc > 1

Hi Alex,

Enclosed is a revised version of the patch sent on Mar 18, against
the master branch of the drm userspace (i.e. libdrm). Details
summarised in this thread:
http://lists.freedesktop.org/archives/dri-devel/2011-March/009499.html

This patch reconciles libdrm with the the kernel change that Dave
pushed this morning. It *supersedes* the previously sent patch (i.e.
apply it to the master branch as it exists at the time of this writing,
not as an incremental patch to the one sent previously).

Regards,

Ilija

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
13 years agointel: Also handle mrb_exec fallback with ring == I915_EXEC_RENDER
Chris Wilson [Mon, 4 Apr 2011 07:57:42 +0000 (08:57 +0100)]
intel: Also handle mrb_exec fallback with ring == I915_EXEC_RENDER

Reported-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm_mode: fix types on recently added ioctls
Dave Airlie [Tue, 29 Mar 2011 20:11:21 +0000 (06:11 +1000)]
drm_mode: fix types on recently added ioctls

13 years agoCleanup gen2 tiling confusion
Daniel Vetter [Sat, 26 Mar 2011 14:04:04 +0000 (15:04 +0100)]
Cleanup gen2 tiling confusion

A tile on gen2 has a size of 2kb, stride of 128 bytes and 16 rows.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agobuild: Update autotools configuration
Javier Jardón [Wed, 9 Feb 2011 13:28:20 +0000 (13:28 +0000)]
build: Update autotools configuration

Replace some deprecated autoconf macros and use the new libtool
syntax

13 years agolibdrm: oops fix get cap return value.
Dave Airlie [Fri, 4 Mar 2011 05:48:31 +0000 (15:48 +1000)]
libdrm: oops fix get cap return value.

13 years agolibkms: add dumb support
Dave Airlie [Wed, 9 Feb 2011 03:41:49 +0000 (13:41 +1000)]
libkms: add dumb support

this uses the drm cap interface to check if the dumb ioctl
is supported.

13 years agoImplement drmGetCap() to query device/driver capabilities
Ben Skeggs [Mon, 21 Feb 2011 01:27:19 +0000 (11:27 +1000)]
Implement drmGetCap() to query device/driver capabilities

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm: add dumb interface
Dave Airlie [Wed, 9 Feb 2011 03:41:28 +0000 (13:41 +1000)]
drm: add dumb interface

13 years agoBuild modetest for all chipsets, always build modeprint
Kristian Høgsberg [Fri, 4 Mar 2011 02:35:28 +0000 (21:35 -0500)]
Build modetest for all chipsets, always build modeprint

13 years agodon't try to build modetest without libkms
Matt Turner [Fri, 4 Mar 2011 02:20:52 +0000 (21:20 -0500)]
don't try to build modetest without libkms

Signed-off-by: Matt Turner <mattst88@gmail.com>
13 years agoconfigure: Bump version to 2.4.24
Chris Wilson [Tue, 1 Mar 2011 18:24:14 +0000 (18:24 +0000)]
configure: Bump version to 2.4.24

New kernel headers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agointel: Add I915_PARAM_HAS_RELAXED_DELTA
Chris Wilson [Tue, 1 Mar 2011 16:01:53 +0000 (16:01 +0000)]
intel: Add I915_PARAM_HAS_RELAXED_DELTA

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agointel: Fixup for the fix for relaxed tiling on gen2
Daniel Vetter [Tue, 22 Feb 2011 18:11:07 +0000 (19:11 +0100)]
intel: Fixup for the fix for relaxed tiling on gen2

This is Fail.

First patch to libdrm, and I've borked it up.

Noticed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agointel: fix relaxed tiling on gen2
Daniel Vetter [Tue, 22 Feb 2011 17:53:56 +0000 (18:53 +0100)]
intel: fix relaxed tiling on gen2

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agomodetest: Do no flip twice to a current front buffer
Benjamin Franzke [Thu, 17 Feb 2011 19:36:42 +0000 (20:36 +0100)]
modetest: Do no flip twice to a current front buffer

The incorrect order was:
fb, other_fb, other_fb, fb_id, other_fb, ..

13 years agotests/modeprint: Output masks as hex numbers
Benjamin Franzke [Thu, 17 Feb 2011 13:09:12 +0000 (14:09 +0100)]
tests/modeprint: Output masks as hex numbers

13 years agotests/modeprint: Remove needless dependency on drm_intel
Benjamin Franzke [Thu, 17 Feb 2011 13:07:58 +0000 (14:07 +0100)]
tests/modeprint: Remove needless dependency on drm_intel

13 years agomodetest: Create buffers using libkms
Benjamin Franzke [Thu, 17 Feb 2011 09:47:47 +0000 (10:47 +0100)]
modetest: Create buffers using libkms

13 years agoconfigure.ac: ac_define HAVE_RADEON
Benjamin Franzke [Thu, 17 Feb 2011 09:46:35 +0000 (10:46 +0100)]
configure.ac: ac_define HAVE_RADEON

13 years agolibkms/radeon: Add backend
nobled [Thu, 9 Sep 2010 09:07:21 +0000 (10:07 +0100)]
libkms/radeon: Add backend

Todo: What tiling should be set on scanout buffers?

Haven't tested besides compiling it.

13 years agointel: Remember named bo
Chris Wilson [Mon, 14 Feb 2011 09:39:06 +0000 (09:39 +0000)]
intel: Remember named bo

... and if asked to open a bo by the same global name, return a fresh
reference to the previously allocated buffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agointel: Set the public handle after opening by name
Chris Wilson [Mon, 14 Feb 2011 09:27:05 +0000 (09:27 +0000)]
intel: Set the public handle after opening by name

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agointel: compile fix for previous commit after rebasing
Chris Wilson [Wed, 12 Jan 2011 15:06:25 +0000 (15:06 +0000)]
intel: compile fix for previous commit after rebasing

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agointel: Fallback to old exec if no mrb_exec is available
Chris Wilson [Wed, 12 Jan 2011 10:57:46 +0000 (10:57 +0000)]
intel: Fallback to old exec if no mrb_exec is available

Reported-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33016
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agonouveau: fix up reloc_emit() to accept NULL target buffer
Ben Skeggs [Mon, 20 Dec 2010 06:02:42 +0000 (16:02 +1000)]
nouveau: fix up reloc_emit() to accept NULL target buffer

The nvc0 gallium drivers passes NULL here to indicate to the memory manager
that a buffer is being used, but without creating an actual reloc.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agonouveau: split pushbuf macros specific to nv04-nv50 out, and add nvc0
Ben Skeggs [Mon, 20 Dec 2010 00:53:44 +0000 (10:53 +1000)]
nouveau: split pushbuf macros specific to nv04-nv50 out, and add nvc0

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agonouveau: nvc0 drm has no concept of "notifier block"
Ben Skeggs [Wed, 8 Dec 2010 23:18:35 +0000 (09:18 +1000)]
nouveau: nvc0 drm has no concept of "notifier block"

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agointel: Export CONSTANT_BUFFER addressing mode
Chris Wilson [Sun, 19 Dec 2010 13:01:15 +0000 (13:01 +0000)]
intel: Export CONSTANT_BUFFER addressing mode

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoconfigure: Bump version to 2.4.23
Chris Wilson [Fri, 10 Dec 2010 12:10:46 +0000 (12:10 +0000)]
configure: Bump version to 2.4.23

To export new kernel API for Intel's 2010Q4 release.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agotests: Update for ENOENT returns from unknown handles
Chris Wilson [Fri, 10 Dec 2010 12:10:13 +0000 (12:10 +0000)]
tests: Update for ENOENT returns from unknown handles

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agointel: Reorder need_fence vs fenced_command to avoid fences on gen4
Chris Wilson [Tue, 7 Dec 2010 20:34:22 +0000 (20:34 +0000)]
intel: Reorder need_fence vs fenced_command to avoid fences on gen4

gen4+ hardware doesn't use fences for GPU access and the older kernel
doesn't expect userspace to make such a mistake. So don't.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32190
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm: don't do the create the node ourselves if we have udev.
Dave Airlie [Tue, 7 Dec 2010 04:26:09 +0000 (14:26 +1000)]
drm: don't do the create the node ourselves if we have udev.

this can remove nodes it shouldn't, let udev run the show.

this is needed for reliably GPU switch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agointel: If the command is fenced inform the kernel
Chris Wilson [Fri, 3 Dec 2010 10:48:12 +0000 (10:48 +0000)]
intel: If the command is fenced inform the kernel

... but only account for a fenced used if the object is tiled.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoradeon: silence valgrind warnings by zeroing memory
Marek Olšák [Thu, 2 Dec 2010 03:12:16 +0000 (04:12 +0100)]
radeon: silence valgrind warnings by zeroing memory

13 years agointel: Add a forward declaration of struct drm_clip_rect
Chris Wilson [Thu, 25 Nov 2010 16:59:20 +0000 (16:59 +0000)]
intel: Add a forward declaration of struct drm_clip_rect

... so that intel_bufmgr.h can be compiled standalone.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agointel: Compute in-aperture size for relaxed fenced objects
Chris Wilson [Mon, 22 Nov 2010 09:50:06 +0000 (09:50 +0000)]
intel: Compute in-aperture size for relaxed fenced objects

For relaxed fencing the object may only consume the small set of active
pages, but still requires a fence region once bound into the aperture.
This is the size we need to use when computing the maximum possible
aperture space that could be used by a single batchbuffer and so avoid
hitting ENOSPC.

Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agonouveau: Add implicit pushbuf flush before gpuobj destruction.
Francisco Jerez [Sat, 20 Nov 2010 13:32:45 +0000 (14:32 +0100)]
nouveau: Add implicit pushbuf flush before gpuobj destruction.

It makes sure that GPU object destruction is executed in order with
respect to the previous FIFO commands.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
14 years agointel: Fix drm_intel_gem_bo_wait_rendering to wait for read-only usage too.
Eric Anholt [Tue, 9 Nov 2010 21:51:45 +0000 (13:51 -0800)]
intel: Fix drm_intel_gem_bo_wait_rendering to wait for read-only usage too.

Both the consumers of this API (sync objects and client throttling)
were expecting this behavior.  The kernel used to actually behave the
desired (but incorrect) way for us anyway, but that got fixed a while
back.

14 years agointel: initialize bufmgr.bo_mrb_exec unconditionally
Albert Damen [Sun, 7 Nov 2010 14:54:32 +0000 (15:54 +0100)]
intel: initialize bufmgr.bo_mrb_exec unconditionally

If bufmgr.bo_mrb_exec is not set, drm_intel_bo_mrb_exec returns ENODEV
even though drm_intel_gem_bo_mrb_exec2 will work fine for the RENDER ring.
Fixes xf86-video-intel after commit 'add BLT ring support' (5bed685f76)
with kernels without BSD or BLT ring support (2.6.34 and before).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31443
Signed-off-by: Albert Damen <albrt@gmx.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
14 years agointel: Drop silly asserts on mappings present at unmap time.
Eric Anholt [Tue, 2 Nov 2010 18:21:56 +0000 (11:21 -0700)]
intel: Drop silly asserts on mappings present at unmap time.

The intent of these was to catch mismatched map/unmap.  What it
actually did was check whether there was ever a mapping of that type
(including in a previous life of the buffer through the userland BO
cache), not whether they were mismatched.  We don't even actually want
to catch mismatched map/unmap, unless we also do refcounting, since at
one point Mesa would do map/map/use/unmap/unmap.  Just remove this
code instead.

14 years agointel: Remove gratuitous assert on bo_reference.
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.

14 years agointel: Shove the fake bufmgr subdata implementation into the fake bufmgr.
Eric Anholt [Mon, 1 Nov 2010 13:54:58 +0000 (06:54 -0700)]
intel: Shove the fake bufmgr subdata implementation into the fake bufmgr.

14 years agointel: Remove stale comment.
Eric Anholt [Mon, 20 Sep 2010 21:14:14 +0000 (14:14 -0700)]
intel: Remove stale comment.

14 years agonouveau: Avoid unnecessary call to CPU_FINI.
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>
14 years agointel: enable relaxed fence allocation for i915
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>
14 years agos/drmStrdup/strdup/
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>
14 years agointel: Prepare for BLT ring split.
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>
14 years agonouveau: Define the HAS_PAGEFLIP getparam.
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>
14 years agonouveau: Let the user choose the push buffer size.
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>
14 years agonouveau: Define buffer object usage flags.
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>
14 years agointel: Downgrade error warnings to debug
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>
14 years agoIncrement version to 2.4.22
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.

14 years agointel: Replace open-coded drmIoctl with calls to drmIoctl()
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>
14 years agonouveau: fix drm version check some more
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>
14 years agonouveau: fix thinko in drm version check
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>
14 years agomodetest: Fix drawing routines to use stride.
Chris Wilson [Thu, 9 Sep 2010 17:52:28 +0000 (18:52 +0100)]
modetest: Fix drawing routines to use stride.

14 years agomodetest: align fb pitch to 64 bytes
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.

14 years agomodetest: add edp and TV connector names to the connector name array
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

14 years agoAvoid use of c++ reserved keyword "virtual" when using a C++ compiler.
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.

14 years agoFree the property blob along the error path.
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>
14 years agonouveau: accept both 0.0.16 and 1.x.x
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>
14 years agolibdrm: Fix PCI domain domain support
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>
14 years agoCopy headers from kernel drm-core-next
Dave Airlie [Tue, 3 Aug 2010 22:41:23 +0000 (08:41 +1000)]
Copy headers from kernel drm-core-next

14 years agodrm mode: Return -errno on drmIoctl() failure
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>
14 years agoPurge macro NEED_REPLIES
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>
14 years agointel: Suppress the error return from setting domains after mapping.
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>
14 years agointel: Limit tiled pitches to 8192 on pre-i965.
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>
14 years agointel: Only adjust the local stride used for SET_TILING in tiled alloc
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>
14 years agointel: Restore SET_TILING for non-flinked bo.
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>
14 years agointel: '===' != '=='
Chris Wilson [Tue, 22 Jun 2010 10:15:56 +0000 (11:15 +0100)]
intel: '===' != '=='

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
14 years agointel: Sanitise strides for linear buffers and SET_TILING
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>
14 years agointel: Print out debugging message following ENOSPC
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>
14 years agointel: Scan the cache for old bo once every second.
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>
14 years agointel: Force stride to be 0 for I915_TILING_NONE.
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>
14 years agointel: Defer tiling change to allocation.
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>
14 years agointel: Track tiling stride
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>
14 years agoBump version to 2.4.21 for release.
Eric Anholt [Thu, 10 Jun 2010 15:59:05 +0000 (08:59 -0700)]
Bump version to 2.4.21 for release.

14 years agoFix radeon distcheck.
Eric Anholt [Thu, 10 Jun 2010 16:03:41 +0000 (09:03 -0700)]
Fix radeon distcheck.

14 years agointel: Fix several other paths for buffers pointing at themselves.
Eric Anholt [Thu, 10 Jun 2010 15:58:08 +0000 (08:58 -0700)]
intel: Fix several other paths for buffers pointing at themselves.

14 years agointel: Add more intermediate sizes of cache buckets between powers of 2.
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.

14 years agointel: Convert to untiled pitches if surface is too large for tiling.
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>
14 years agoAllow a buffer to point at itself and still get relocs.
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.

14 years agointel: Add support for kernel multi-ringbuffer API.
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>
14 years agoadd vbltest to .gitignore
Jesse Barnes [Thu, 3 Jun 2010 01:27:24 +0000 (18:27 -0700)]
add vbltest to .gitignore

14 years agolibkms: Fix include paths
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.

14 years agoEnable silent automake rules.
Eric Anholt [Wed, 26 May 2010 03:13:37 +0000 (20:13 -0700)]
Enable silent automake rules.

14 years agointel_bufmgr_fake: fix compile warning.
Eric Anholt [Wed, 26 May 2010 03:11:23 +0000 (20:11 -0700)]
intel_bufmgr_fake: fix compile warning.

14 years agointel: Don't change tiling mode unless the kernel reports success.
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&GTA3
  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.

14 years agoRevert "intel: We don't need to take the bufmgr lock whilst mapping."
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.

14 years agoOnly build tests in make check
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'.

14 years agoPull in new kernel headers
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

14 years agointel: query whether a buffer is reusable.
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>
14 years agointel: We don't need to take the bufmgr lock whilst mapping.
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.

14 years agovbltest: Doesn't need intel stuff.
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.

14 years agotests: add new vblank test
Jesse Barnes [Tue, 27 Apr 2010 19:43:20 +0000 (15:43 -0400)]
tests: add new vblank test

Simple test for event frequency.

14 years agoradeon: use the const qualifier in radeon_cs_write_table
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>
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>