Commit Graph

4425 Commits (00d8e960ca665b7f0528438331f4d0ae77fbb4cc)

Author SHA1 Message Date
Maarten Maathuis 00d8e960ca libdrm/nouveau: unref fences when deleting bo
- This was causing a significant memory leak.
2009-03-20 00:02:12 +01:00
Ben Skeggs 6169e3a601 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.
2009-03-18 10:25:22 +10:00
Robert Noland 2e2e8575b1 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>
2009-03-16 01:20:08 -05:00
Robert Noland e8d3476255 FreeBSD: Set up the nouveau build infrastructure
disabled by default until the rest of the patches are in.
2009-03-16 01:17:00 -05:00
Robert Noland dec955d728 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...
2009-03-16 00:41:23 -05:00
Robert Noland 44fec1a8e4 FreeBSD: Improve the debug output of drm_mmap(). 2009-03-16 00:35:18 -05:00
Robert Noland f8f49aa6ec FreeBSD: Add list_for_each_prev() to our bank of compat functions. 2009-03-16 00:30:28 -05:00
Robert Noland 6777c6bb8b FreeBSD: Don't set the PZERO flag to mtx_sleep.
We also don't support anything old enough to need tsleep.
2009-03-16 00:17:54 -05:00
Robert Noland 06e182d025 FreeBSD: use flsl() instead of ffsl().
I noticed that we were computing drm_order differently than linux.
2009-03-16 00:08:06 -05:00
Robert Noland 2ce00c6b67 FreeBSD: Minor code cleanup. 2009-03-16 00:07:31 -05:00
Robert Noland b0acc88606 FreeBSD: Increase MAX_PCI_RESOURCE
We can have more than 3 BARs to access.
2009-03-16 00:03:40 -05:00
Robert Noland f78040266b FreeBSD: Cast map handles to vm_offset_t
This prevents some warnings with nouveau.
2009-03-16 00:01:47 -05:00
Robert Noland 82eac8060b FreeBSD: Fix the printing of maps on amd64/i386 to be consistent 2009-03-09 13:37:57 -05:00
Robert Noland a3ba51bd04 FreeBSD: Fix up the flags for bus_dmamem here as well. 2009-03-09 13:34:26 -05:00
Robert Noland af1afb3c38 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.
2009-03-08 22:55:01 -05:00
vehemens 2221e16703 FreeBSD use kdev for kernel device name
Signed-off-by: Robert Noland <rnoland@2hip.net>
2009-03-08 22:18:43 -05:00
Ben Skeggs 391c92ae17 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!
2009-03-06 09:16:54 +10:00
Robert Noland 14503dafa7 FreeBSD: Rework DRM_[DEBUG,ERROR,INFO] macros a bit. 2009-03-05 00:47:26 -06:00
Robert Noland 0a227a3361 FreeBSD: Garbage collect entries from pcireg.h since we now include it. 2009-03-05 00:46:32 -06:00
Robert Noland 222dc6582e 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.
2009-03-05 00:44:56 -06:00
Robert Noland 4a27f1c638 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).
2009-03-05 00:42:52 -06:00
Pekka Paalanen e4b065ad9a 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>
2009-03-03 22:42:51 +02:00
Pekka Paalanen a6b28a86a6 drm, via: drop Linux < 2.6.20 support
Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-03-03 22:20:59 +02:00
Pekka Paalanen f44c740dc7 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>
2009-03-02 23:14:45 +02:00
Pekka Paalanen 081b2d6da2 drm: drop Linux < 2.6.18 support
Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-03-02 22:39:32 +02:00
Pekka Paalanen 62f4344c98 drm: drop Linux < 2.6.16 support
Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-03-02 22:35:23 +02:00
Pekka Paalanen 056ce26344 drm: drop Linux < 2.6.15 support
Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-03-02 22:31:24 +02:00
Pekka Paalanen b47de8d5a3 drm: drop Linux < 2.6.12 support
Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-03-02 22:09:26 +02:00
Pekka Paalanen 4c439ac4a7 drm: drop Linux < 2.6.10 support
Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-03-02 00:21:09 +02:00
Pekka Paalanen 4bdddf5715 drm: drop Linux <= 2.6.8 support
Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-03-02 00:13:00 +02:00
Pekka Paalanen d3f25ccca8 drm: drm_bo_mmap_locked() is static.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-03-01 23:53:02 +02:00
Pekka Paalanen a6dd0afa87 drm, ati: fix printf format warnings
Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-02-28 17:45:02 +02:00
Pekka Paalanen 9e8591dbdb drm: build fix for Linux drm_vblank_cleanup()
The commit 957b10695b, "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>
2009-02-28 16:09:56 +02:00
Robert Noland ad64ff30d0 FreeBSD: Introduce a kernel tuneable to disable msi at boot time. 2009-02-27 18:16:18 -06:00
Robert Noland 957b10695b Move vblank_init to driver load time. 2009-02-27 18:16:17 -06:00
Eric Anholt 7ce8d4c1fe 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.
2009-02-27 14:12:54 -08:00
Robert Noland ab582f64fd 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>
2009-02-26 23:51:57 -06:00
Robert Noland 948af0bd9b i915: Backport jbarnes gm45 vblank counter patch. 2009-02-25 14:20:52 -06:00
Eric Anholt efa485b2cf intel: Don't copy dirty data out when freeing a BO in the fake bufmgr. 2009-02-24 22:31:27 -08:00
Robert Noland e96fc62e53 FreeBSD: Drop the Giant lock. 2009-02-24 15:49:45 -06:00
Robert Noland b9b8e8f3cc FreeBSD: Turn on msi
There is a blacklist for devices that advertise the capability, but
don't work properly.
2009-02-24 15:47:35 -06:00
Robert Noland 153a0803db FreeBSD: Add some vblank related debugging and replace DRM_WAIT_ON with a local instance. 2009-02-24 14:21:10 -06:00
Robert Noland a44b4ca820 i915: A few whitespace cleanups. 2009-02-24 14:01:38 -06:00
Robert Noland 04d94197e6 linux: Add msi_enabled to the drm_device so the build should be happy. 2009-02-24 12:59:08 -06:00
Robert Noland 6870780428 radeon: Prepare radeon for msi support. 2009-02-24 12:28:42 -06:00
Robert Noland d45bc6667c 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
2009-02-24 12:24:29 -06:00
Kristian Høgsberg c3c21303e3 nouveau: Dist nouvea_dma.h as well.
Oops.  Disting is hard.
2009-02-24 11:42:46 -05:00
Kristian Høgsberg a71d3edd6c nouveau: Also dist nouveau_private.h. 2009-02-24 11:19:41 -05:00
Robert Noland 1c381092a3 FreeBSD: Rip out the locked task support now that i915 no longer uses it. 2009-02-24 00:22:56 -06:00
Robert Noland 9f94e39f0d i915: Rip out the use of vblank_swap 2009-02-23 22:39:07 -06:00