profile/ivi/libdrm.git
15 years agolibdrm: Set _XOPEN_SOURCE and _GNU_SOURCE
Ian Romanick [Mon, 6 Jul 2009 20:23:46 +0000 (13:23 -0700)]
libdrm: Set _XOPEN_SOURCE and _GNU_SOURCE

Several POSIX extensions are used in the libdrm code (e.g., mknod and ffs).
Set _XOPEN_SOURCE and _GNU_SOURCE to something reasonable to ensure that
prototypes for these functions are available.  This is done in configure.ac
using AC_USE_SYSTEM_MACROS.  This requires autoconf 2.60 or later.  Eventually
the code should check for the existance of these defines and do something
reasonable if they are not available.

Inspired by a patch by Pauli Nieminen and suggestions from Julien Cristau.
Thanks.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
15 years agointel: Fix up math errors when allocating very large BOs.
Eric Anholt [Mon, 6 Jul 2009 18:55:28 +0000 (11:55 -0700)]
intel: Fix up math errors when allocating very large BOs.

The logbase2 would overflow and wrap the size around to 0, making the code
allocate a 4kb object instead.  By simplifying the code to just walk the
14-entry bucket array comparing sizes instead of indexing on
ffs(1 << logbase2(size)), we avoid silly math errors and have code of
approximately the same speed.

Many thanks to Simon Farnsworth for debugging and providing a working patch.
Bug #27365.

15 years agointel: fix compiler warning about returning a void value.
Edward O'Callaghan [Thu, 2 Jul 2009 18:03:48 +0000 (11:03 -0700)]
intel: fix compiler warning about returning a void value.

bug #21999

15 years agolibdrm: Fix pci id numbers to unsigned so code won't mix signed/unsigned integers.
Pauli Nieminen [Fri, 3 Jul 2009 23:18:51 +0000 (02:18 +0300)]
libdrm: Fix pci id numbers to unsigned so code won't mix signed/unsigned integers.

15 years agostrcasecmp is in strings.h.
Ian Romanick [Mon, 6 Jul 2009 16:23:59 +0000 (09:23 -0700)]
strcasecmp is in strings.h.

Based on patch by Pauli Nieminen.  Thanks.

15 years agolibdrm: Remove typedef for non-existing enum
Pauli Nieminen [Fri, 3 Jul 2009 23:18:49 +0000 (02:18 +0300)]
libdrm: Remove typedef for non-existing enum

15 years agoradeon: move cs space checking code to libdrm_radeon.
Dave Airlie [Mon, 6 Jul 2009 03:34:24 +0000 (13:34 +1000)]
radeon: move cs space checking code to libdrm_radeon.

This ports a lot of the space checking code into a the common
library, so that the DDX and mesa can use it.

15 years agoradeon: fix cs buffer realloc padding
Jerome Glisse [Fri, 3 Jul 2009 13:03:03 +0000 (15:03 +0200)]
radeon: fix cs buffer realloc padding

We always realloc at least 0x1000 dwords (page on most system)
when growing the cs buffer this is to avoid having to realloc
at each cs_begin.

15 years agoradeon: fix realloc of packets.
Dave Airlie [Fri, 3 Jul 2009 11:13:22 +0000 (21:13 +1000)]
radeon: fix realloc of packets.

This should use ndw not cdw, using cdw leads to realloc alignment going wrong

15 years agoradeon: add buffer naming function
Dave Airlie [Thu, 2 Jul 2009 05:42:01 +0000 (15:42 +1000)]
radeon: add buffer naming function

15 years agoradeon: add support for write followed by read relocs.
Dave Airlie [Tue, 30 Jun 2009 02:19:28 +0000 (12:19 +1000)]
radeon: add support for write followed by read relocs.

the DDX does this and used to handle it internally

15 years agoremove some old ttm bits
Dave Airlie [Mon, 22 Jun 2009 23:51:05 +0000 (09:51 +1000)]
remove some old ttm bits

15 years agodrm: Strip old ttm.
Thomas Hellstrom [Mon, 22 Jun 2009 21:07:26 +0000 (23:07 +0200)]
drm: Strip old ttm.

Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
15 years agomodetest: use gtt unmap for object
Jesse Barnes [Mon, 22 Jun 2009 19:27:49 +0000 (12:27 -0700)]
modetest: use gtt unmap for object

Match gtt map/unmap for correctness.

15 years agolibdrm/radeon: add initial libdrm_radeon
Dave Airlie [Wed, 17 Jun 2009 07:47:42 +0000 (17:47 +1000)]
libdrm/radeon: add initial libdrm_radeon

requires --enable-radeon-experimental-api for now

15 years agonouveau: 0.0.14 + extend bo interface to support subrange mapping
Ben Skeggs [Wed, 3 Jun 2009 03:54:43 +0000 (13:54 +1000)]
nouveau: 0.0.14 + extend bo interface to support subrange mapping

Normal map() should operate as before, and map_range()/map_flush() should
give correct results but lacking any performance difference from map().

Nothing exiting being done here yet, but the interface is a good start.

15 years agonouveau: fix bo mapping issue
Ben Skeggs [Wed, 3 Jun 2009 22:59:53 +0000 (08:59 +1000)]
nouveau: fix bo mapping issue

15 years agoFix build on kernels < 2.6.26
Pekka Paalanen [Wed, 3 Jun 2009 19:26:43 +0000 (22:26 +0300)]
Fix build on kernels < 2.6.26

The commit 651e3dc6dd58a79c90db7513ee2fb28360a4560d, "drm: Fix
compilation on 2.6.30" broke all builds on kernels before 2.6.26.
Variadic functions cannot be inlined.

The variadic inline function is replaced with a variadic macro.

Also, the function dev_name() added by that same commit is never used,
so it is removed.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agonouveau: fill in bo->tiled field for referenced buffers
Ben Skeggs [Wed, 3 Jun 2009 00:24:30 +0000 (10:24 +1000)]
nouveau: fill in bo->tiled field for referenced buffers

Fixes the dri1 gallium driver if the front buffer happens to be non-linear.

15 years agonv50: magic fix for "3d busted without the binary driver first" issue
Ben Skeggs [Tue, 2 Jun 2009 07:06:34 +0000 (17:06 +1000)]
nv50: magic fix for "3d busted without the binary driver first" issue

No idea what this reg does.. NVIDIA put 0x802 into it on some chips, the
criteria aren't too clear on when they do that however.  Hopefully 0x800
will work everywhere...

15 years agodrm: Fix compilation on 2.6.30
Michael Buesch [Sun, 10 May 2009 22:21:14 +0000 (00:21 +0200)]
drm: Fix compilation on 2.6.30

This fixes DRM compilation of nouveau.ko on kernel 2.6.30.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
15 years agonouveau: bump for 0.0.13
Ben Skeggs [Tue, 26 May 2009 04:14:04 +0000 (14:14 +1000)]
nouveau: bump for 0.0.13

15 years agonouveau: backlight support for ppc laptops
Danny Tholen [Wed, 6 May 2009 23:11:34 +0000 (00:11 +0100)]
nouveau: backlight support for ppc laptops

Patch allows the backlight to be manipulated under gnome on apple powerpc
based NV30 machines.  It works fine on my powerbook, and should also work
for older NV17/NV18 machines.

Note that older powerpc specific tools (pbbuttonsd) have some problems with
this implementation (because the device is not yet there at the start time
of the daemon, and the code makes incorrect assumptions about the max
brightness values). However, IMHO these things can and should be addressed
in the daemon.

Some style/warning fixes applied by Stuart Bennett <stuart@freedesktop.org>

15 years agointel: quiet a warning.
Eric Anholt [Tue, 19 May 2009 17:07:16 +0000 (10:07 -0700)]
intel: quiet a warning.

15 years agointel: Only do BO caching up to 64MB objects.
Eric Anholt [Mon, 18 May 2009 23:07:45 +0000 (16:07 -0700)]
intel: Only do BO caching up to 64MB objects.

This avoids making objects significantly bigger than they would be
otherwise, which would result in some failing at binding to the GTT.
Found from firefox hanging on:
http://upload.wikimedia.org/wikipedia/commons/b/b7/Singapore_port_panorama.jpg
due to a software fallback trying to do a GTT-mapped copy between two 73MB
BOs that were instead each 128MB, and failing because both couldn't fit
simultaneously.

The cost here is that we get no opportunity to cache these objects and
avoid the mapping.  But since the objects are a significant percentage
of the aperture size, each mapped access is likely having to fault and rebind
the object most of the time anyway.

Bug #20152 (2/3)

15 years agolibdrm/intel: Make get_pipe_from_crtc_id per-bufmgr. Return -1 on failure.
Keith Packard [Thu, 14 May 2009 23:58:14 +0000 (16:58 -0700)]
libdrm/intel: Make get_pipe_from_crtc_id per-bufmgr. Return -1 on failure.

The convention is that all APIs are per-bufmgr, so make this one the same.
Then, have it return -1 on failure so that the application can know what's
going on and do something sensible.

Signed-off-by: Keith Packard <keithp@keithp.com>
15 years agoAdd new drm_intel_get_pipe_from_crtc_id function.
Carl Worth [Wed, 29 Apr 2009 21:43:55 +0000 (14:43 -0700)]
Add new drm_intel_get_pipe_from_crtc_id function.

This wraps the new DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID ioctl,
allowing applications to discover the pipe number corresponding
to a given CRTC ID. This is necessary for doing pipe-specific
operations such as waiting for vblank on a given CRTC.

15 years agoBump to version 2.4.10 to mark addition of drm_intel_bo_disable_reuse
Keith Packard [Tue, 12 May 2009 22:33:28 +0000 (15:33 -0700)]
Bump to version 2.4.10 to mark addition of drm_intel_bo_disable_reuse

New API, new version.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
15 years agolibdrm/intel: add drm_intel_bo_disable_reuse api
Keith Packard [Mon, 11 May 2009 20:42:12 +0000 (13:42 -0700)]
libdrm/intel: add drm_intel_bo_disable_reuse api

Scanout buffers need to be freed through the kernel as it holds a reference
to them; exposing this API allows applications allocating scanout buffers to
flag them as not reusable.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
15 years agoUse C99 versions of __FUNCTION__ & __volatile__ when not building with gcc
Alan Coopersmith [Tue, 10 Jun 2008 00:03:28 +0000 (17:03 -0700)]
Use C99 versions of __FUNCTION__ & __volatile__ when not building with gcc

15 years agoDelete extra libdrm_lists.h line after libdrm_la_SOURCES in libdrm/Makefile.am
Alan Coopersmith [Sun, 10 May 2009 00:21:29 +0000 (17:21 -0700)]
Delete extra libdrm_lists.h line after libdrm_la_SOURCES in libdrm/Makefile.am

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
15 years agonouveau: backlight compat fix
Stuart Bennett [Wed, 6 May 2009 22:56:51 +0000 (23:56 +0100)]
nouveau: backlight compat fix

Avoid failure to build on old kernels with CONFIG_BACKLIGHT_CLASS_DEVICE set

15 years agonouveau: fix ppc for swab changes in Linux 2.6.29
Danny Tholen [Wed, 6 May 2009 22:41:09 +0000 (23:41 +0100)]
nouveau: fix ppc for swab changes in Linux 2.6.29

15 years agolibdrm/intel: assert that clients are using bo refcounting correctly
Keith Packard [Sat, 2 May 2009 01:47:04 +0000 (18:47 -0700)]
libdrm/intel: assert that clients are using bo refcounting correctly

Add assertions to drm_intel_gem_bo_reference,
drm_intel_gem_bo_reference_locked and drm_intel_gem_bo_unreference_locked
that the object has not been freed (refcount > 0). Mistakes in refcounting
lead to attempts to insert a bo into a free list more than once which causes
application failure as empty free lists are dereferenced as buffer objects.

Signed-off-by: Keith Packard <keithp@keithp.com>
15 years agointel: NULL fake bo block when freeing in evict_all
Jesse Barnes [Wed, 22 Apr 2009 00:13:16 +0000 (17:13 -0700)]
intel: NULL fake bo block when freeing in evict_all

Fixes assertion failures on later use of the object.

15 years agolibdrm/mode: align subpixel results
Dave Airlie [Wed, 22 Apr 2009 10:25:40 +0000 (20:25 +1000)]
libdrm/mode: align subpixel results

15 years agonouveau: write posting got lost somewhere, bring it back
Ben Skeggs [Thu, 16 Apr 2009 23:29:19 +0000 (09:29 +1000)]
nouveau: write posting got lost somewhere, bring it back

15 years agonouveau: store bo handle in public struct in bo_ref_handle
Ben Skeggs [Wed, 15 Apr 2009 02:44:21 +0000 (12:44 +1000)]
nouveau: store bo handle in public struct in bo_ref_handle

15 years agoBump version to 2.4.9
Jesse Barnes [Fri, 10 Apr 2009 22:34:24 +0000 (15:34 -0700)]
Bump version to 2.4.9

Who needs 2.4.8 anyway?

15 years agoBump version to 2.4.8
Jesse Barnes [Fri, 10 Apr 2009 22:24:41 +0000 (15:24 -0700)]
Bump version to 2.4.8

15 years agoRevert "libdrm: speed up connector & mode fetching"
Jesse Barnes [Fri, 10 Apr 2009 22:24:10 +0000 (15:24 -0700)]
Revert "libdrm: speed up connector & mode fetching"

This reverts commit cd5c66c659168cbe2e3229ebf8be79f764ed0ee1.  It broke too
many kernel assumptions about the double ioctl (connector status, mode
fetching, etc.)

15 years agoBump version to 2.4.7
Kristian Høgsberg [Thu, 9 Apr 2009 19:19:10 +0000 (15:19 -0400)]
Bump version to 2.4.7

15 years agotest: Avoid recursive dependency in makefile
Kristian Høgsberg [Thu, 9 Apr 2009 19:17:51 +0000 (15:17 -0400)]
test: Avoid recursive dependency in makefile

15 years agotest: Makefile.am grammar nazi
Kristian Høgsberg [Thu, 9 Apr 2009 19:02:40 +0000 (15:02 -0400)]
test: Makefile.am grammar nazi

15 years agodrm: fix test makefile
Dave Airlie [Mon, 6 Apr 2009 23:26:32 +0000 (09:26 +1000)]
drm: fix test makefile

no idea if this is correct but it works so meh

15 years agoSkip tests that require root
Kristian Høgsberg [Mon, 6 Apr 2009 21:22:10 +0000 (17:22 -0400)]
Skip tests that require root

This lets us do make distcheck as non-root.

15 years agoXFAIL auth and lock test cases
Kristian Høgsberg [Mon, 6 Apr 2009 21:18:17 +0000 (17:18 -0400)]
XFAIL auth and lock test cases

They're writing to the read end of a pipe and failing.

15 years agoUse libudev in test case to only run gem tests for intel devices.
Kristian Høgsberg [Mon, 6 Apr 2009 21:13:01 +0000 (17:13 -0400)]
Use libudev in test case to only run gem tests for intel devices.

15 years agoMove drm_vblank_cleanup() after lastclose.
Robert Noland [Tue, 31 Mar 2009 18:33:18 +0000 (13:33 -0500)]
Move drm_vblank_cleanup() after lastclose.

This may prevent a possible panic on shutdown.

15 years agolibdrm: speed up connector & mode fetching
Jesse Barnes [Mon, 30 Mar 2009 21:35:30 +0000 (14:35 -0700)]
libdrm: speed up connector & mode fetching

This patch speeds up drmModeGetConnector by pre-allocating mode &
property info space before calling into the kernel.  In many cases this
pre-allocation will be sufficient to hold the returned values (it's easy
enough to tweak if the common case becomes larger), which means we don't
have to make the second call, which saves a lot of time.

Acked-by: Jakob Bornecrantz <wallbraker@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agonouveau: nForce 1/2 IGP memory sanity check from DDX
Stuart Bennett [Mon, 30 Mar 2009 19:38:49 +0000 (20:38 +0100)]
nouveau: nForce 1/2 IGP memory sanity check from DDX

15 years agolibdrm: bump version to 2.4.6
Jesse Barnes [Mon, 30 Mar 2009 18:25:09 +0000 (11:25 -0700)]
libdrm: bump version to 2.4.6

This version includes GTT unmap support for the Intel bufmgr.

15 years agolibdrm/intel: support GTT maps correctly
Jesse Barnes [Thu, 26 Mar 2009 23:43:00 +0000 (16:43 -0700)]
libdrm/intel: support GTT maps correctly

libdrm has some support for GTT mapping already, but there are bugs
with it (no surprise since it hasn't been used much).

In fixing 20803, I found that sharing bo_gem->virtual was a bad idea,
since a previously mapped object might not end up getting GTT mapped,
leading to corruption.  So this patch splits the fields according to
use, taking care to unmap both at free time (but preserving the map
caching).

There's still a risk we might run out of mappings (there's a sysctl
tunable for max number of mappings per process, defaulted to 64k or so
it looks like) but at least GTT maps will work with these changes (and
some others for fixing PAT breakage in the kernel).

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agonouveau: plug drm fifo ioremap leak (#14941)
Stuart Bennett [Tue, 24 Mar 2009 23:39:41 +0000 (23:39 +0000)]
nouveau: plug drm fifo ioremap leak (#14941)

15 years agonouveau: add linux compat defines for PCI config access, use them for nvidia IGPs
Stuart Bennett [Tue, 24 Mar 2009 23:26:30 +0000 (23:26 +0000)]
nouveau: add linux compat defines for PCI config access, use them for nvidia IGPs

15 years agonouveau: use PFB_CSTATUS naming from ddx (reg introduced with nv10)
Stuart Bennett [Tue, 24 Mar 2009 16:42:36 +0000 (16:42 +0000)]
nouveau: use PFB_CSTATUS naming from ddx (reg introduced with nv10)

NV04 had a PFB_FIFO_DATA at the same address, which we don't use, so
remove it to reduce confusion

15 years agolibdrm/nouveau: fix typo in nouveau_device_close()
Ben Skeggs [Tue, 24 Mar 2009 22:10:12 +0000 (08:10 +1000)]
libdrm/nouveau: fix typo in nouveau_device_close()

15 years agolibdrm/nouveau: ask the kernel for vram/gart aperture sizes
Ben Skeggs [Fri, 20 Mar 2009 00:35:55 +0000 (10:35 +1000)]
libdrm/nouveau: ask the kernel for vram/gart aperture sizes

15 years agolibdrm/nouveau: remove unneccesary null ptr checks
Ben Skeggs [Fri, 20 Mar 2009 00:32:47 +0000 (10:32 +1000)]
libdrm/nouveau: remove unneccesary null ptr checks

15 years agolibdrm/nouveau: incr refcount on ref fence before decr on old fence
Ben Skeggs [Fri, 20 Mar 2009 00:24:40 +0000 (10:24 +1000)]
libdrm/nouveau: incr refcount on ref fence before decr on old fence

15 years agolibdrm/nouveau: unref fences when deleting bo
Maarten Maathuis [Thu, 19 Mar 2009 22:59:42 +0000 (23:59 +0100)]
libdrm/nouveau: unref fences when deleting bo

- This was causing a significant memory leak.

15 years agolibdrm/nouveau: implement bo_handle_get for !mm_enabled
Ben Skeggs [Wed, 18 Mar 2009 00:25:22 +0000 (10:25 +1000)]
libdrm/nouveau: implement bo_handle_get for !mm_enabled

bo_handle_ref on !mm_enabled treats handle as an offset, make
bo_handle_get do the same rather than failing.

15 years agolibdrm_nouveau: The handle that is passed to mmap needs to be drm_handle_t
Robert Noland [Sun, 15 Mar 2009 18:52:58 +0000 (13:52 -0500)]
libdrm_nouveau: The handle that is passed to mmap needs to be drm_handle_t

drm_handle_t is defined to be a u32 on linux and a u64 on everything
else.  This addresses an issue on FreeBSD amd64 where the map offsets
may be greater than 32bits.  When the handle is cast to 32bit, mmap
cannot match the requested map and causes X to crash.

This should be a NOOP on linux since drm_handle_t is always 32bit.

Signed-off-by: Robert Noland <rnoland@2hip.net>
15 years agoFreeBSD: Set up the nouveau build infrastructure
Robert Noland [Mon, 16 Mar 2009 06:07:15 +0000 (01:07 -0500)]
FreeBSD: Set up the nouveau build infrastructure

disabled by default until the rest of the patches are in.

15 years agoFreeBSD: Add support for matching solely on vedor id.
Robert Noland [Mon, 16 Mar 2009 05:41:23 +0000 (00:41 -0500)]
FreeBSD: Add support for matching solely on vedor id.

This also adds that ability to set device name from VPD, but that
doesn't seem to be working...

15 years agoFreeBSD: Improve the debug output of drm_mmap().
Robert Noland [Mon, 16 Mar 2009 05:35:18 +0000 (00:35 -0500)]
FreeBSD: Improve the debug output of drm_mmap().

15 years agoFreeBSD: Add list_for_each_prev() to our bank of compat functions.
Robert Noland [Mon, 16 Mar 2009 05:30:28 +0000 (00:30 -0500)]
FreeBSD: Add list_for_each_prev() to our bank of compat functions.

15 years agoFreeBSD: Don't set the PZERO flag to mtx_sleep.
Robert Noland [Mon, 16 Mar 2009 05:17:54 +0000 (00:17 -0500)]
FreeBSD: Don't set the PZERO flag to mtx_sleep.

We also don't support anything old enough to need tsleep.

15 years agoFreeBSD: use flsl() instead of ffsl().
Robert Noland [Mon, 16 Mar 2009 05:08:06 +0000 (00:08 -0500)]
FreeBSD: use flsl() instead of ffsl().

I noticed that we were computing drm_order differently than linux.

15 years agoFreeBSD: Minor code cleanup.
Robert Noland [Mon, 16 Mar 2009 05:07:31 +0000 (00:07 -0500)]
FreeBSD: Minor code cleanup.

15 years agoFreeBSD: Increase MAX_PCI_RESOURCE
Robert Noland [Mon, 16 Mar 2009 05:03:40 +0000 (00:03 -0500)]
FreeBSD: Increase MAX_PCI_RESOURCE

We can have more than 3 BARs to access.

15 years agoFreeBSD: Cast map handles to vm_offset_t
Robert Noland [Mon, 16 Mar 2009 05:01:47 +0000 (00:01 -0500)]
FreeBSD: Cast map handles to vm_offset_t

This prevents some warnings with nouveau.

15 years agoFreeBSD: Fix the printing of maps on amd64/i386 to be consistent
Robert Noland [Mon, 9 Mar 2009 18:37:57 +0000 (13:37 -0500)]
FreeBSD: Fix the printing of maps on amd64/i386 to be consistent

15 years agoFreeBSD: Fix up the flags for bus_dmamem here as well.
Robert Noland [Mon, 9 Mar 2009 18:34:26 +0000 (13:34 -0500)]
FreeBSD: Fix up the flags for bus_dmamem here as well.

15 years agoFreeBSD: Fix up the flags to bus_dmamem_*
Robert Noland [Mon, 9 Mar 2009 03:55:01 +0000 (22:55 -0500)]
FreeBSD: Fix up the flags to bus_dmamem_*

Allow it to sleep waiting for resources during the allocation stage.
Only use BUS_DMA_NOWAIT when loading the map.

15 years agoFreeBSD use kdev for kernel device name
vehemens [Mon, 9 Mar 2009 01:17:15 +0000 (18:17 -0700)]
FreeBSD use kdev for kernel device name

Signed-off-by: Robert Noland <rnoland@2hip.net>
15 years agodrm/nouveau: make portion of vram as reserved for PRAMIN on all chipsets
Ben Skeggs [Thu, 5 Mar 2009 23:04:44 +0000 (09:04 +1000)]
drm/nouveau: make portion of vram as reserved for PRAMIN on all chipsets

NV04 was completely busted.  Push buffers were getting allocated at the
end of VRAM, overwriting PRAMIN.  So, it turns out PRAMIN is in VRAM on
all chips.  Question answered!

15 years agoFreeBSD: Rework DRM_[DEBUG,ERROR,INFO] macros a bit.
Robert Noland [Thu, 5 Mar 2009 06:47:26 +0000 (00:47 -0600)]
FreeBSD: Rework DRM_[DEBUG,ERROR,INFO] macros a bit.

15 years agoFreeBSD: Garbage collect entries from pcireg.h since we now include it.
Robert Noland [Thu, 5 Mar 2009 06:46:32 +0000 (00:46 -0600)]
FreeBSD: Garbage collect entries from pcireg.h since we now include it.

15 years agoFreeBSD: We only want drm to ever attach to the primary pci device.
Robert Noland [Thu, 5 Mar 2009 06:44:56 +0000 (00:44 -0600)]
FreeBSD: We only want drm to ever attach to the primary pci device.

Intel 855 chips present the same pci id for both heads.  This prevents
us from attaching to the dummy second head.  All other chips that I
am aware of either only present a single pci id, or different ids
for each head so that we only match on the correct head.

15 years agoFreeBSD: rework drm_scatter.c which allocates scatter / gather pages for use by
Robert Noland [Thu, 5 Mar 2009 06:42:52 +0000 (00:42 -0600)]
FreeBSD: rework drm_scatter.c which allocates scatter / gather pages for use by
ati pci gart to use bus_dma to handle the allocations.  This fixes
a garbled screen issue on at least some radeons (X1400 tested).

15 years agodrm: drop Linux < 2.6.21 support
Pekka Paalanen [Tue, 3 Mar 2009 20:42:51 +0000 (22:42 +0200)]
drm: drop Linux < 2.6.21 support

This also means, that DRM_FULL_MM_COMPAT is always defined,
so it is dropped, too.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agodrm, via: drop Linux < 2.6.20 support
Pekka Paalanen [Tue, 3 Mar 2009 20:20:59 +0000 (22:20 +0200)]
drm, via: drop Linux < 2.6.20 support

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agodrm: drop Linux < 2.6.19 support
Pekka Paalanen [Mon, 2 Mar 2009 21:14:45 +0000 (23:14 +0200)]
drm: drop Linux < 2.6.19 support

This also means dropping the DRM_ODD_MM_COMPAT case.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agodrm: drop Linux < 2.6.18 support
Pekka Paalanen [Mon, 2 Mar 2009 20:39:32 +0000 (22:39 +0200)]
drm: drop Linux < 2.6.18 support

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agodrm: drop Linux < 2.6.16 support
Pekka Paalanen [Mon, 2 Mar 2009 20:35:23 +0000 (22:35 +0200)]
drm: drop Linux < 2.6.16 support

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agodrm: drop Linux < 2.6.15 support
Pekka Paalanen [Mon, 2 Mar 2009 20:26:46 +0000 (22:26 +0200)]
drm: drop Linux < 2.6.15 support

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agodrm: drop Linux < 2.6.12 support
Pekka Paalanen [Mon, 2 Mar 2009 20:09:26 +0000 (22:09 +0200)]
drm: drop Linux < 2.6.12 support

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agodrm: drop Linux < 2.6.10 support
Pekka Paalanen [Sun, 1 Mar 2009 22:17:44 +0000 (00:17 +0200)]
drm: drop Linux < 2.6.10 support

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agodrm: drop Linux <= 2.6.8 support
Pekka Paalanen [Sun, 1 Mar 2009 22:13:00 +0000 (00:13 +0200)]
drm: drop Linux <= 2.6.8 support

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agodrm: drm_bo_mmap_locked() is static.
Pekka Paalanen [Sun, 1 Mar 2009 21:53:02 +0000 (23:53 +0200)]
drm: drm_bo_mmap_locked() is static.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agodrm, ati: fix printf format warnings
Pekka Paalanen [Sat, 28 Feb 2009 15:45:02 +0000 (17:45 +0200)]
drm, ati: fix printf format warnings

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agodrm: build fix for Linux drm_vblank_cleanup()
Pekka Paalanen [Sat, 28 Feb 2009 14:09:56 +0000 (16:09 +0200)]
drm: build fix for Linux drm_vblank_cleanup()

The commit 957b10695b619d6ed2f1098b00502395d9a3c149, "Move vblank_init
to driver load time." forgot to add the function declaration in
linux-core/drmP.h.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agoFreeBSD: Introduce a kernel tuneable to disable msi at boot time.
Robert Noland [Fri, 27 Feb 2009 23:52:08 +0000 (17:52 -0600)]
FreeBSD: Introduce a kernel tuneable to disable msi at boot time.

15 years agoMove vblank_init to driver load time.
Robert Noland [Wed, 25 Feb 2009 23:59:26 +0000 (17:59 -0600)]
Move vblank_init to driver load time.

15 years agointel: Update reloc_tree_size of the first buffer when we count the tree size.
Eric Anholt [Fri, 27 Feb 2009 21:46:31 +0000 (13:46 -0800)]
intel: Update reloc_tree_size of the first buffer when we count the tree size.

This helps avoid the n^2 performance cost of counting tree size when we
get a lot of relocations into our batch buffer.  rgb10text on keithp's laptop
went from 136k glyphs/sec to 234k glyphs/sec.

15 years agoFreeBSD: Fix up some ioctl permissions issues missed many times over.
Robert Noland [Fri, 27 Feb 2009 05:51:57 +0000 (23:51 -0600)]
FreeBSD: Fix up some ioctl permissions issues missed many times over.

This was somehow hit with r600 demo.

Submitted by:  Jung-uk Kim <jkim@FreeBSD.org>

15 years agoi915: Backport jbarnes gm45 vblank counter patch.
Robert Noland [Wed, 25 Feb 2009 20:19:01 +0000 (14:19 -0600)]
i915: Backport jbarnes gm45 vblank counter patch.

15 years agointel: Don't copy dirty data out when freeing a BO in the fake bufmgr.
Eric Anholt [Wed, 25 Feb 2009 05:36:56 +0000 (21:36 -0800)]
intel: Don't copy dirty data out when freeing a BO in the fake bufmgr.

15 years agoFreeBSD: Drop the Giant lock.
Robert Noland [Tue, 24 Feb 2009 21:49:45 +0000 (15:49 -0600)]
FreeBSD: Drop the Giant lock.