OSDN Git Service

android-x86/external-libdrm.git
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.

15 years agoFreeBSD: Turn on msi
Robert Noland [Tue, 24 Feb 2009 21:47:35 +0000 (15:47 -0600)]
FreeBSD: Turn on msi

There is a blacklist for devices that advertise the capability, but
don't work properly.

15 years agoFreeBSD: Add some vblank related debugging and replace DRM_WAIT_ON with a local instance.
Robert Noland [Tue, 24 Feb 2009 20:21:10 +0000 (14:21 -0600)]
FreeBSD: Add some vblank related debugging and replace DRM_WAIT_ON with a local instance.

15 years agoi915: A few whitespace cleanups.
Robert Noland [Tue, 24 Feb 2009 20:00:21 +0000 (14:00 -0600)]
i915:  A few whitespace cleanups.

15 years agolinux: Add msi_enabled to the drm_device so the build should be happy.
Robert Noland [Tue, 24 Feb 2009 18:59:08 +0000 (12:59 -0600)]
linux: Add msi_enabled to the drm_device so the build should be happy.

15 years agoradeon: Prepare radeon for msi support.
Robert Noland [Tue, 24 Feb 2009 18:28:42 +0000 (12:28 -0600)]
radeon: Prepare radeon for msi support.

15 years agoi915: This was part of a sync to the intel driver at some point
Robert Noland [Tue, 24 Feb 2009 08:00:42 +0000 (02:00 -0600)]
i915: This was part of a sync to the intel driver at some point

-Remove the old TTM interface
-Move register definitions to i915_reg.h
-Rework the irq handler

15 years agonouveau: Dist nouvea_dma.h as well.
Kristian Høgsberg [Tue, 24 Feb 2009 16:33:34 +0000 (11:33 -0500)]
nouveau: Dist nouvea_dma.h as well.

Oops.  Disting is hard.

15 years agonouveau: Also dist nouveau_private.h.
Kristian Høgsberg [Tue, 24 Feb 2009 16:19:41 +0000 (11:19 -0500)]
nouveau: Also dist nouveau_private.h.

15 years agoFreeBSD: Rip out the locked task support now that i915 no longer uses it.
Robert Noland [Tue, 24 Feb 2009 06:22:56 +0000 (00:22 -0600)]
FreeBSD: Rip out the locked task support now that i915 no longer uses it.

15 years agoi915: Rip out the use of vblank_swap
Robert Noland [Tue, 24 Feb 2009 04:39:07 +0000 (22:39 -0600)]
i915: Rip out the use of vblank_swap

15 years agoFreeBSD: There is no compelling reason to hold the lock here.
Robert Noland [Tue, 24 Feb 2009 02:22:44 +0000 (20:22 -0600)]
FreeBSD: There is no compelling reason to hold the lock here.

When I was lock profiling, this was high up on the list and I
see no reason to do it.

15 years agoFreeBSD: Don't set PZERO in mtx_sleep.
Robert Noland [Tue, 24 Feb 2009 02:16:15 +0000 (20:16 -0600)]
FreeBSD: Don't set PZERO in mtx_sleep.

15 years agoFreeBSD: Set MAP_NOSYNC on mmaps.
Robert Noland [Tue, 24 Feb 2009 02:01:26 +0000 (20:01 -0600)]
FreeBSD: Set MAP_NOSYNC on mmaps.

There is no reason to gratuitously sync these maps to swap.

15 years agoAdd libdrm_intel.pc by popular demand.
Eric Anholt [Mon, 23 Feb 2009 21:30:20 +0000 (13:30 -0800)]
Add libdrm_intel.pc by popular demand.

15 years agoFix DRM_CAS() on Alpha. (#16549)
Ivan Kokshaysky [Mon, 23 Feb 2009 20:54:18 +0000 (15:54 -0500)]
Fix DRM_CAS() on Alpha. (#16549)

15 years agomodetest: Print names of properties.
Kristian Høgsberg [Mon, 23 Feb 2009 20:08:03 +0000 (15:08 -0500)]
modetest: Print names of properties.

15 years agoFix fix distcheck for optional nouveau stuff.
Pekka Paalanen [Sun, 22 Feb 2009 10:40:47 +0000 (12:40 +0200)]
Fix fix distcheck for optional nouveau stuff.

Tylo.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agoFix distcheck for optional nouveau stuff.
Eric Anholt [Sat, 21 Feb 2009 18:01:40 +0000 (10:01 -0800)]
Fix distcheck for optional nouveau stuff.

15 years agoBump version to 2.4.5 for new API additions.
Eric Anholt [Sat, 21 Feb 2009 17:57:19 +0000 (09:57 -0800)]
Bump version to 2.4.5 for new API additions.

15 years agointel: Add a new bufmgr alloc function to get BOs ready for rendering to.
Eric Anholt [Wed, 18 Feb 2009 21:06:35 +0000 (13:06 -0800)]
intel: Add a new bufmgr alloc function to get BOs ready for rendering to.

This avoids using the oldest BO in the BO cache and waiting for it to be
idle before we turn around and render to it with the GPU.  Thanks to
Chris Wilson for pointing out how silly we were being.

15 years agolibdrm/nouveau: free drmVersion after we're done with it
Ben Skeggs [Thu, 19 Feb 2009 23:25:35 +0000 (09:25 +1000)]
libdrm/nouveau: free drmVersion after we're done with it

15 years agolibdrm/nouveau: fix dma debugging
Ben Skeggs [Thu, 19 Feb 2009 09:40:19 +0000 (19:40 +1000)]
libdrm/nouveau: fix dma debugging

15 years agonouveau: support backlight only when kernel does
Pekka Paalanen [Wed, 18 Feb 2009 20:46:40 +0000 (22:46 +0200)]
nouveau: support backlight only when kernel does

Loading nouveau.ko would fail with unknown symbols, if the backlight
class device support is not provided in the kernel. Let's make the
backlight support dependant on the kernel configuration.

This is a bit ugly, the proper way would be to check for the config in
Makefile.kernel whether to build nouveau_backlight.o at all, and if not,
nouveau_drv.h should provide the stubs.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agonv40, nv50: fix backlight build for <2.6.29 kernels
Matthew Garrett [Wed, 18 Feb 2009 13:21:26 +0000 (13:21 +0000)]
nv40, nv50: fix backlight build for <2.6.29 kernels

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agonouveau: Add in-kernel backlight control support
Matthew Garrett [Wed, 18 Feb 2009 02:08:25 +0000 (02:08 +0000)]
nouveau: Add in-kernel backlight control support

Several nvidia-based systems don't support backlight control via the
standard ACPI control mechanisms. Instead, it's necessary for the driver
to modify the backlight control registers directly. This patch adds
support for determining whether the registers appear to be in use, and
if so registers a kernel backlight device to control them. The backlight
can then be controlled via existing userspace tools.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
15 years agodrm_compat: remove kmap_atomic_prot_pfn()
Pekka Paalanen [Sat, 14 Feb 2009 20:22:39 +0000 (22:22 +0200)]
drm_compat: remove kmap_atomic_prot_pfn()

This function is unused, and yet creates build problems: the symbol
init_mm is not exported by the latest -rc kernels and I don't believe it
ever will be. Even CONFIG_UNUSED_SYMBOLS does not provide it anymore.

If this function is needed in the future, it needs to be reinvented in
any case. So remove it.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agoRemove i915 driver sources from linux-core
Pekka Paalanen [Mon, 16 Feb 2009 18:43:02 +0000 (20:43 +0200)]
Remove i915 driver sources from linux-core

Intel developers have stated, that their DRM development continues
elsewhere in some Linux kernel trees. This makes the code in drm.git
just dead weight. This removal allows further cleanup of compatibility
code.

shared-core and bsd-core are left untouched this time.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
Acked-by: Eric Anholt <eric@anholt.net>
15 years agointel: Clear ioctl parameter outvalues and pads that confuse valgrind.
Eric Anholt [Mon, 16 Feb 2009 02:35:03 +0000 (18:35 -0800)]
intel: Clear ioctl parameter outvalues and pads that confuse valgrind.

The minor CPU cost here is probably outweighed by bothering us with noise in
the tool.

15 years agonv40: fail completely if we don't have a ctxprog for the chipset
Ben Skeggs [Sun, 15 Feb 2009 12:06:18 +0000 (22:06 +1000)]
nv40: fail completely if we don't have a ctxprog for the chipset

15 years agonv50: context info for chipset 0xa0
Ben Skeggs [Sun, 15 Feb 2009 11:52:19 +0000 (21:52 +1000)]
nv50: context info for chipset 0xa0

15 years agolibdrm: make libdrm_nouveau conditional, disabled by default
Ben Skeggs [Wed, 11 Feb 2009 04:18:03 +0000 (14:18 +1000)]
libdrm: make libdrm_nouveau conditional, disabled by default

libdrm isn't supposed to ship APIs not present in a released kernel.

15 years agomode: Make xfdrmMode.[c|h] not depend on drm_mode.h
Jakob Bornecrantz [Wed, 11 Feb 2009 15:43:20 +0000 (16:43 +0100)]
mode: Make xfdrmMode.[c|h] not depend on drm_mode.h

15 years agonouveau: fix type warnings: void* arith, un/signed
Pekka Paalanen [Wed, 4 Feb 2009 19:44:50 +0000 (21:44 +0200)]
nouveau: fix type warnings: void* arith, un/signed

nouveau_notifier.c had two places where void* was used in arithmetic,
fixed by using char*.

nouveau_dma_wait(), nouveau_notifier_wait_status() and
nouveau_resource_alloc() had signed/unsigned comparison warnings, fixed
by changing the function parameter into an unsigned type.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
15 years agodrm/nv50: fix nv9x chipsets
Ben Skeggs [Wed, 11 Feb 2009 00:48:36 +0000 (10:48 +1000)]
drm/nv50: fix nv9x chipsets

NVIDIA do this fun little sequence after updating the PRAMIN page tables.

On 9xxx chips, none of the PRAMIN BAR bindings (except the initial one)
worked, hence the majority of the setup needed to create a channel
ended up in the wrong place, causing all sorts of fun.

This is done by NVIDIA on nv8x chips also, so we'll do it for them too,
even though they appear to work without it.

15 years agodrm/nv50: add context info for nv98
Ben Skeggs [Wed, 11 Feb 2009 00:12:43 +0000 (10:12 +1000)]
drm/nv50: add context info for nv98

It won't work yet, just like the other 9xxx chips.  Real soon now :)

15 years agodrm/nv50: use a slightly different initial context for nv96
Ben Skeggs [Mon, 9 Feb 2009 23:05:09 +0000 (09:05 +1000)]
drm/nv50: use a slightly different initial context for nv96

I'm not 100% sure that the nv94 one we were using won't work.  The context
layouts are identical (well.. same ctxprog, so of course!), only a couple
of registers differ.  But, be safe until we actually get some 9xxx chips
working.

15 years agodrm/nv50: correct ramfc pointer in channel header
Ben Skeggs [Mon, 9 Feb 2009 23:02:17 +0000 (09:02 +1000)]
drm/nv50: correct ramfc pointer in channel header

Suprisingly the card still worked without this...

15 years agodrm/nv50: let the card handle the initial context switch
Ben Skeggs [Mon, 9 Feb 2009 22:57:21 +0000 (08:57 +1000)]
drm/nv50: let the card handle the initial context switch

Our PFIFO/PGRAPH context save/load functions don't really work well
(at all?) on nv5x yet.  Depending on what random state the card is
in before the drm loads, fbcon probably won't work correctly.

Luckily we've setup the GPU in such a way that it'll actually do a
hw context switch for the first context.  Not sure of how successful
this'd be currently on the older chips (actually, pretty sure it won't
work), so NV50 only for now.

15 years agonouveau: don't try to traverse non-existent lists
Stuart Bennett [Sat, 7 Feb 2009 21:20:17 +0000 (21:20 +0000)]
nouveau: don't try to traverse non-existent lists

Fixes nouveau_ioctl_mem_free Oops

15 years agonouveau: fix some issues where buffer objects never get freed
Ben Skeggs [Thu, 5 Feb 2009 13:03:29 +0000 (23:03 +1000)]
nouveau: fix some issues where buffer objects never get freed

15 years agomodetest: Add syntax to also specify a crtc when setting a mode.
Kristian Høgsberg [Wed, 4 Feb 2009 17:17:13 +0000 (12:17 -0500)]
modetest: Add syntax to also specify a crtc when setting a mode.

15 years agonouveau: install libdrm_nouveau with libdrm
Ben Skeggs [Fri, 30 Jan 2009 01:25:35 +0000 (11:25 +1000)]
nouveau: install libdrm_nouveau with libdrm

15 years agonouveau: bring in new mm api definitions, without the actual mm code
Ben Skeggs [Fri, 30 Jan 2009 01:18:54 +0000 (11:18 +1000)]
nouveau: bring in new mm api definitions, without the actual mm code

Use of the new bits is guarded with a mm_enabled=0 hardcode.

15 years agomodetest: Use cairo (if available) to paint a better pattern.
Kristian Høgsberg [Tue, 3 Feb 2009 20:03:41 +0000 (15:03 -0500)]
modetest: Use cairo (if available) to paint a better pattern.

15 years agomodetest: Don't sleep when just dumping state, wait for key for modeset.
Kristian Høgsberg [Tue, 3 Feb 2009 19:02:50 +0000 (14:02 -0500)]
modetest: Don't sleep when just dumping state, wait for key for modeset.

15 years agomodetest: Handle setting modes on multiple crtcs with one fb.
Kristian Høgsberg [Tue, 3 Feb 2009 19:00:00 +0000 (14:00 -0500)]
modetest: Handle setting modes on multiple crtcs with one fb.

15 years agomodetest: Use a more interesting test pattern.
Kristian Høgsberg [Tue, 3 Feb 2009 18:26:22 +0000 (13:26 -0500)]
modetest: Use a more interesting test pattern.

15 years agoRemove the "nv" driver.
Stephane Marchesin [Mon, 2 Feb 2009 22:47:11 +0000 (23:47 +0100)]
Remove the "nv" driver.

15 years agoNo need to pin buffer anymore in modetest.c
Kristian Høgsberg [Mon, 2 Feb 2009 20:47:09 +0000 (15:47 -0500)]
No need to pin buffer anymore in modetest.c

15 years agonouveau: don't save channel context if it has recently become invalid
Stuart Bennett [Thu, 29 Jan 2009 23:39:50 +0000 (23:39 +0000)]
nouveau: don't save channel context if it has recently become invalid

Bug exposed by DDX change d9da090c

15 years agonouveau: no suspend support for nv50+
Stuart Bennett [Sat, 25 Oct 2008 19:59:38 +0000 (20:59 +0100)]
nouveau: no suspend support for nv50+

15 years agoClean up README for the current state of kernel module affairs.
Eric Anholt [Wed, 28 Jan 2009 02:00:45 +0000 (18:00 -0800)]
Clean up README for the current state of kernel module affairs.

Bug #19608.