Commit Graph

3070 Commits (01e8f0ea426970859bafba72e067590df1a64eb0)

Author SHA1 Message Date
Thomas Hellstrom 5bebcd7a0b Dont allow !sysadmin clients to alter the memory type of
NO_EVICT buffers.
2008-03-12 10:19:36 +01:00
Alan Hourihane 88be276a42 Fix for debug memory routines 2008-03-12 10:13:22 +01:00
Alan Hourihane 3262577407 Add error message 2008-03-12 10:11:49 +01:00
Thomas Hellstrom c0a1cd052a Add an emergency pinnable memory quota for root-only processes. 2008-03-12 10:10:03 +01:00
Thomas Hellstrom 7bcce66a1d Fix kernel crash when we hit OOM conditions.
(Alan Hourihane)
2008-03-12 10:07:56 +01:00
Thomas Hellstrom f1a681ebe5 Avoid duplicate calls to drm_ttm_bind in some cases. 2008-03-12 10:02:09 +01:00
Thomas Hellstrom fa1d88e3b2 Make sure other TTM memory types than TT is really unbound when evicted. 2008-03-12 09:56:06 +01:00
Thomas Hellstrom 8a18d123f5 Avoid large kmallocs. 2008-03-12 09:49:27 +01:00
Stuart Bennett f13936f7fc nouveau: move AGP reset to mem_init_agp
Also, power cycle PGRAPH when resetting AGP -- it seems to fix problems encountered by p0g on nv25
2008-03-11 16:45:35 +00:00
Dave Airlie 07ba3b7193 remove unneeded load call 2008-03-10 18:30:17 +10:00
Keith Packard 2848f04861 Switch from PIPE_VBLANK to PIPE_EVENT interrupts.
My 965GM gets interrupts stuck when using the old PIPE_VBLANK interrupt.
Switch to the PIPE_EVENT interrupt mechanism, and set the PIPE*STAT
registers to use START_VBLANK on 965 and VBLANK on previous chips.
2008-03-08 00:04:30 -08:00
Dave Airlie ce3733572e drm/radeon: check sarea_priv exists 2008-03-08 08:30:30 +10:00
Ben Skeggs 1ccccbd4ce nouveau: redo channel idle detection
Will hopefully work a bit better than previous code, which depended on
knowing the channel's most recent PUT value.  Some chips always return
0 on reading these regs, and currently userspace is the only other entity
which knows the value.
2008-03-07 15:18:34 +11:00
Ben Skeggs cd924de029 nouveau: don't touch NV_USER regs on channel destroy.
Not only was this entirely pointless, it actually causes my NV30GL to
die randomly when channels are destroyed.
2008-03-07 15:18:34 +11:00
Dave Airlie 2540ea7dc6 flush_agp_mappings commit 2008-03-07 09:29:35 +10:00
Dave Airlie 92a30dd608 drm/bo: allow non-suser priv to add kernel BOs.
modprobe can be run with dropped capabilities we still want the kernel bos
to work.
2008-03-06 14:43:23 +10:00
Benjamin Herrenschmidt a875821f7b drm: Fix for non-coherent DMA PowerPC
This patch fixes bits of the DRM so to make the radeon DRI work on
non-cache coherent PCI DMA variants of the PowerPC processors.

It moves the few places that needs change to wrappers to that
other architectures with similar issues can easily add their
own changes to those wrappers, at least until we have more useful
generic kernel API.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2008-03-05 19:25:03 +10:00
Dave Airlie d5c0101252 ttm: make sure userspace can't destroy kernel create memory managers
this adds something to say the kernel initialised the memory region not
the userspace. and blocks userspace from deallocating kernel areas
2008-03-06 05:37:54 +10:00
Dave Airlie 180c9188f4 drm/ttm: add ioctl to get back memory managed area sized
taken from modesetting branch but could be useful outside it.
2008-03-06 05:31:50 +10:00
Dave Airlie 12574590cd drm: reorganise minor number handling using code from modesetting branch
Rip out the whole head thing and replace it with an idr and drm_minor
structure.
2008-03-06 05:21:50 +10:00
Xiang, Haihao 638353103d i915: Evict if relocatee buffer is CACHED_MAPPED before
writting relocations, otherwise the GPU probably sees some
inconsistent data. Fix fd.o bug#14656
2008-03-05 15:09:17 +08:00
Eric Anholt a6a2f2c8c4 Clarify when WAIT_LAZY is relevant to users. 2008-03-04 13:45:41 -08:00
Eric Anholt 3332a0add6 Remove unused DRM_FENCE_FLAG_WAIT_IGNORE_SIGNALS. 2008-03-04 13:41:30 -08:00
Eric Anholt d41846adb7 Clarify through the names what drm_ttm_alloc_pages() and friend actually did.
These are all about the page directory (pointers to pages) rather than the
actual pages backing the allocation.
2008-03-04 13:40:46 -08:00
Eric Anholt eedf3fa2f0 Don't shortcut the info syscall for drmBOBusy on nonshareable objects.
This broke the results when you're trying to check if a buffer you dispatched
some time ago is done being rendered from.
2008-03-04 12:16:51 -08:00
Zou Nan hai 63fd6f284d [i915] 2D driver may reset Frame count value, this may lead driver
to leap it's vblank count a huge value.
  This will stall some applications that switch video mode if vblank_mode is set to a non zero value in drirc.
2008-03-03 14:49:49 +08:00
Patrice Mandin 09999c90ab FIX_KMAP_BEGIN requires CONFIG_HIMEM (see include/asm-i386.h/fixmap.h) 2008-02-29 21:57:40 +01:00
Thomas Hellstrom 612c22f131 Working revision. 2008-02-29 15:38:55 +01:00
Thomas Hellstrom 1d068973d5 Fix compilation breakage on x86-64. 2008-02-29 13:32:25 +01:00
Thomas Hellstrom 2305100c0f More post-ioctl work. 2008-02-29 13:25:55 +01:00
Dave Airlie cdbd616ea5 agp: export the correct symbol 2008-02-29 10:16:24 +10:00
Thomas Hellstrom 8ef838e5ff Add a compat kmap_atomic_prot_pfn to do quick kernel map / unmaps of
PCI- or high memory.
This is substantially more efficient than drm_bo_kmap,
since the mapping only lives on a single processor.
Unmapping is done use kunmap_atomic(). Flushes only a single tlb() entry.

Add a support utility int drm_bo_pfn_prot() that returns the
pfn and desired page protection for a given bo offset.

This is all intended for relocations in bound TTMS or vram.
Mapping-accessing-unmapping must be atomic, either using preempt_xx() macros
or a spinlock.
2008-02-28 14:06:46 +01:00
Thomas Hellstrom 28d4d02d67 Initial commit. 2008-02-28 14:05:53 +01:00
Thomas Hellstrom 40c9e6a26d Add a compat kmap_atomic_prot_pfn to do quick kernel map / unmaps of
PCI- or high memory.
This is substantially more efficient than drm_bo_kmap,
since the mapping only lives on a single processor.
Unmapping is done use kunmap_atomic(). Flushes only a single tlb() entry.

Add a support utility int drm_bo_pfn_prot() that returns the
pfn and desired page protection for a given bo offset.

This is all intended for relocations in bound TTMS or vram.
Mapping-accessing-unmapping must be atomic, either using preempt_xx() macros
or a spinlock.
2008-02-28 13:47:15 +01:00
Thomas Hellstrom fd595fa4dc Reinstate buffer idle before applying relocations. 2008-02-27 21:44:40 +01:00
Thomas Hellstrom 72983ff301 Don't wait for buffer idle before applying relocations. 2008-02-27 19:46:28 +01:00
Thomas Hellstrom e87cec1968 [i915] Relocation fixes. 2008-02-26 10:47:05 +01:00
Thomas Hellstrom 56bb29cf37 Make the execbuffer code reasonably safe against errors.
In particular -EAGAINs, which should be common during Xserver operation.
Also handle the fence creation failure case.
2008-02-26 00:05:26 +01:00
Roland Scheidegger d6098db140 fix texture uploads with large 3d textures (bug 13980)
Texture uploads could hit the blitter coordinate limit, adjust the texture
offset when uploading the pieces. Make sure to check the end address of the
upload too.
2008-02-23 11:01:36 +01:00
Jesse Barnes 20d0e53916 i915: put ARX back into index mode before doing restore
Fixes resume from hibernate in some configurations.
2008-02-22 13:57:38 -08:00
Maarten Maathuis 0d32015974 nouveau: Remove some random (french) comment. 2008-02-22 19:28:54 +01:00
Maarten Maathuis 7e5f9c8bd3 nouveau: A single define of dma skips is more than enough. 2008-02-22 19:28:54 +01:00
Kristian Høgsberg b7086e6ae5 Fix one last occurance of struct _drm_i915_batchbuffer.
Thanks to Todd Merrill for pointing it out.
2008-02-22 11:22:52 -05:00
Kristian Høgsberg b0fee67a30 i915: Remove leading underscore from struct tags.
This matches the changes in mesa to use the system drm includes
for the definitions of the drm ioctl structs.
2008-02-22 00:12:39 -05:00
Kristian Høgsberg 32c67922b7 Don't free irq resources until after we've unregistered the handler. 2008-02-21 15:31:48 -05:00
Michel Dänzer 374b41e5bc linux: Clean up vblank related resources from drm_irq_uninstall().
This fixes at least two problems:

* The vblank_disable_fn timer callback could get called after the DRM was
  de-initialized, e.g. on X server shutdown.
* Leak of vblank related resources when disabling and re-enabling the IRQ, e.g.
  on an X server reset.
2008-02-21 11:49:38 +01:00
Alan Hourihane 9d1061b8cf fix SAREA 2008-02-20 22:23:31 +00:00
Dave Airlie 6c41e5381f drm: add support for passing state into the suspend hooks.
fix i915 driver to use state for hibernate save avoidance.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-20 10:02:20 +10:00
Keith Packard 5d8c754bc2 [915]: more registers for S3 (DSPCLK_GATE_D, CACHE_MODE_0, MI_ARB_STATE)
Failing to preserve the MI_ARB_STATE register was causing FIFO underruns on
the VGA output on my HP 2510p after resume.
2008-02-16 20:14:49 -08:00
Stephane Marchesin cd87e6352b nouveau: no GART on ia64 either. 2008-02-16 03:50:29 +01:00