profile/ivi/libdrm.git
16 years agoOn I965, use correct 3DSTATE_DRAWING_RECTANGLE command in vblank
Keith Packard [Sun, 20 Apr 2008 08:55:57 +0000 (01:55 -0700)]
On I965, use correct 3DSTATE_DRAWING_RECTANGLE command in vblank

The batchbuffer submission paths were fixed to use the 965-specific command,
but the vblank tasklet was not. When the older version is sent, the 965 will
lock up.

16 years agoFix buffer object map wait error.
Thomas Hellstrom [Mon, 14 Apr 2008 11:52:33 +0000 (13:52 +0200)]
Fix buffer object map wait error.
Add some branch prediction hints.

16 years agoFix buffer object creation validation.
Thomas Hellstrom [Mon, 14 Apr 2008 10:10:50 +0000 (12:10 +0200)]
Fix buffer object creation validation.

BO lock fixes.

16 years agoUnlock the BO mutex while waiting for idle, unmapped, unfenced.
Thomas Hellstrom [Sun, 13 Apr 2008 12:49:14 +0000 (14:49 +0200)]
Unlock the BO mutex while waiting for idle, unmapped, unfenced.

Move unfenced checking into idle checking.
Never time out while waiting for software events like unmapped or unfenced.

16 years agoFix up buffer manager locking.
Thomas Hellstrom [Fri, 11 Apr 2008 07:36:12 +0000 (09:36 +0200)]
Fix up buffer manager locking.

16 years agoSave and restore dsparb and d_state regs
Keith Packard [Thu, 27 Mar 2008 18:40:04 +0000 (11:40 -0700)]
Save and restore dsparb and d_state regs

16 years agoMissing KERNEL_VERSION macro
Patrice Mandin [Mon, 7 Apr 2008 20:24:24 +0000 (22:24 +0200)]
Missing KERNEL_VERSION macro

16 years agoAdd DragonFly BSD support for device creation
Hasso Tepper [Mon, 7 Apr 2008 12:27:43 +0000 (15:27 +0300)]
Add DragonFly BSD support for device creation

DragonFly behaves just like FreeBSD in this regard.

16 years agonouveau: enable accelerated move to sysmem
Ben Skeggs [Mon, 7 Apr 2008 03:29:11 +0000 (13:29 +1000)]
nouveau: enable accelerated move to sysmem

16 years agonouveau: enable m2mf for tt<->vram moves, fix fence_poll
Ben Skeggs [Mon, 7 Apr 2008 03:05:51 +0000 (13:05 +1000)]
nouveau: enable m2mf for tt<->vram moves, fix fence_poll

16 years agoPlace highmem pages last in the ttm page array.
Thomas Hellstrom [Sun, 6 Apr 2008 09:21:22 +0000 (11:21 +0200)]
Place highmem pages last in the ttm page array.

16 years agoUse clflush() when available for cache flushing.
Thomas Hellstrom [Sun, 6 Apr 2008 08:32:02 +0000 (10:32 +0200)]
Use clflush() when available for cache flushing.

16 years ago[I915] Fix VRAM eviction.
Thomas Hellstrom [Sun, 6 Apr 2008 07:46:29 +0000 (09:46 +0200)]
[I915] Fix VRAM eviction.

16 years agoFix emergency allocation accounting.
Thomas Hellstrom [Sun, 6 Apr 2008 07:33:50 +0000 (09:33 +0200)]
Fix emergency allocation accounting.

16 years agonv50: primitive i2c interrupt handler
Maarten Maathuis [Sat, 5 Apr 2008 19:02:00 +0000 (21:02 +0200)]
nv50: primitive i2c interrupt handler

16 years agonv50: primitive display interrupt handler.
Maarten Maathuis [Wed, 2 Apr 2008 23:13:31 +0000 (01:13 +0200)]
nv50: primitive display interrupt handler.

16 years agonouveau: fix return from function..
Dave Airlie [Mon, 31 Mar 2008 01:34:48 +0000 (11:34 +1000)]
nouveau: fix return from function..

dude kernel moduless use kernel errors :)

this fixes an oops on init when this codepath hits.

16 years agoInitialize the fence::error member.
Thomas Hellstrom [Sun, 30 Mar 2008 19:30:43 +0000 (21:30 +0200)]
Initialize the fence::error member.

16 years ago[i915] Report buffer state _after_ fence submission to user-space.
Thomas Hellstrom [Sun, 30 Mar 2008 13:14:45 +0000 (15:14 +0200)]
[i915] Report buffer state _after_ fence submission to user-space.
This fixes a problem where the wrong bo->fence_type was reported, and
also saves some memory space.
[bo core] export the drm_bo_fill_rep_arg function.

16 years agoDon't call fence::poll during irq if there are no waiters.
Thomas Hellström [Thu, 6 Mar 2008 16:35:56 +0000 (17:35 +0100)]
Don't call fence::poll during irq if there are no waiters.

16 years agonouveau: forgot to add a break
Maarten Maathuis [Sun, 30 Mar 2008 12:50:41 +0000 (14:50 +0200)]
nouveau: forgot to add a break

16 years agonouveau: Add ctx values for nv86.
Maarten Maathuis [Sun, 30 Mar 2008 12:46:45 +0000 (14:46 +0200)]
nouveau: Add ctx values for nv86.

- Note that this may not work for all nv86.

16 years agodrm/r300: fix wait interface mixup
Dave Airlie [Sat, 29 Mar 2008 21:33:39 +0000 (07:33 +1000)]
drm/r300: fix wait interface mixup

This interface was defined completely wrong, however userspace has only
ever used 4 values from it (0x1, 0x2, 0x3 and 0x6), so fix the interface to do what userspace actually expected but define new defines for new users to use
it properly.

16 years agor300: Correctly translate the value for the R300_CMD_WAIT command.
Oliver McFadden [Sat, 29 Mar 2008 17:25:44 +0000 (17:25 +0000)]
r300: Correctly translate the value for the R300_CMD_WAIT command.

Previously, the R300_CMD_WAIT command would write the passed directly to the
hardware. However this is incorrect because the R300_WAIT_* values used are
internal interface values that do not map directly to the hardware.

The new function I have added translates the R300_WAIT_* values into appropriate
values for the hardware before writing the register.

Thanks to John Bridgman for pointing this out. :-)

16 years agonouveau: nv20 bios does not initialise PTIMER
Stuart Bennett [Tue, 25 Mar 2008 18:30:05 +0000 (18:30 +0000)]
nouveau: nv20 bios does not initialise PTIMER

The wait functions depend on PTIMER, so write the old (incorrect, but working) values for uninitialised hw

16 years agoi915: fix oops on agp=off
Dave Airlie [Mon, 24 Mar 2008 08:52:26 +0000 (18:52 +1000)]
i915: fix oops on agp=off

Kernel bug 10289.

16 years agoMerge branch 'r500-fp'
Dave Airlie [Mon, 24 Mar 2008 08:47:50 +0000 (18:47 +1000)]
Merge branch 'r500-fp'

16 years agonouveau: silence warning
Ben Skeggs [Sun, 23 Mar 2008 16:22:42 +0000 (03:22 +1100)]
nouveau: silence warning

16 years agonv40: voodoo - not quite.
Ben Skeggs [Sun, 23 Mar 2008 16:20:59 +0000 (03:20 +1100)]
nv40: voodoo - not quite.

16 years agonv40: allocate massive amount of PRAMIN for grctx on all chipsets.
Ben Skeggs [Sun, 23 Mar 2008 16:13:05 +0000 (03:13 +1100)]
nv40: allocate massive amount of PRAMIN for grctx on all chipsets.

More or less a workaround for issues on some chipsets where a context
switch results in critical data in PRAMIN being overwritten by the GPU.

The correct fix is known, but may take some time before it's a feasible
option.

16 years agor500: fragment program upload is also used to upload constants.
Dave Airlie [Fri, 21 Mar 2008 06:59:52 +0000 (16:59 +1000)]
r500: fragment program upload is also used to upload constants.

Limit frag address to 8 bits

16 years agodrm: fixup r500fp submission
Dave Airlie [Thu, 20 Mar 2008 04:20:53 +0000 (14:20 +1000)]
drm: fixup r500fp submission

16 years agonouveau: do not set on-board timer's numerator/denominator to bad values
Stuart Bennett [Tue, 18 Mar 2008 23:12:28 +0000 (23:12 +0000)]
nouveau: do not set on-board timer's numerator/denominator to bad values

16 years agoRADEON: switch over to new production microcode
Alex Deucher [Wed, 19 Mar 2008 19:37:56 +0000 (15:37 -0400)]
RADEON: switch over to new production microcode

This needs to be tested thoroughly before pushing to the
kernel.

16 years agoRADEON: production microcode for all radeons, r1xx-r6xx
Alex Deucher [Wed, 19 Mar 2008 18:57:42 +0000 (14:57 -0400)]
RADEON: production microcode for all radeons, r1xx-r6xx

This updated microcode is not in use yet.

16 years agomove some more r300 regs into not allowed on r500
Dave Airlie [Wed, 19 Mar 2008 06:10:37 +0000 (16:10 +1000)]
move some more r300 regs into not allowed on r500

16 years agodrm: add new rs690 pci id
Dave Airlie [Mon, 17 Mar 2008 23:07:45 +0000 (09:07 +1000)]
drm: add new rs690 pci id

16 years agoEvict cached_mapped relocatee before applying reloc.
Thomas Hellstrom [Mon, 17 Mar 2008 10:37:10 +0000 (11:37 +0100)]
Evict cached_mapped relocatee before applying reloc.

Fix that got left out after the intel-post-reloc merge.

16 years agoinitial r500 RS and FP register and upload code
Dave Airlie [Mon, 17 Mar 2008 01:08:03 +0000 (11:08 +1000)]
initial r500 RS and FP register and upload code

16 years agodrm/pcigart: fix the pci gart to use the drm_pci wrapper.
Dave Airlie [Sun, 16 Mar 2008 21:05:46 +0000 (07:05 +1000)]
drm/pcigart: fix the pci gart to use the drm_pci wrapper.

This is the correct fix for the RS690 and hopefully the dma coherent work.

For now we limit everybody to a 32-bit DMA mask but it is possible for
RS690 to use a 40-bit DMA mask for the GART table itself,
and the PCIE cards can use 40-bits for the table entries.

Signed-off-by: Dave Airlie <airlied@redhat.com>
16 years agoAvoid unnecessary waits for command regulator pause.
Thomas Hellstrom [Sun, 16 Mar 2008 19:07:14 +0000 (20:07 +0100)]
Avoid unnecessary waits for command regulator pause.

16 years ago[via] Remove some leftover vars.
Thomas Hellstrom [Sun, 16 Mar 2008 10:44:35 +0000 (11:44 +0100)]
[via] Remove some leftover vars.

16 years ago[via] Allow a little larger stride for SG DMA DownloadFromScreen.
Thomas Hellstrom [Sun, 16 Mar 2008 10:39:18 +0000 (11:39 +0100)]
[via] Allow a little larger stride for SG DMA DownloadFromScreen.

16 years ago[via] The millionth fixup for the millionth-1 attempt to stabilize the AGP
Thomas Hellstrom [Sun, 16 Mar 2008 10:37:17 +0000 (11:37 +0100)]
[via] The millionth fixup for the millionth-1 attempt to stabilize the AGP
DMA command submission. It's worth remembering that all new bright ideas on how
to make this command reader work properly and according to docs
will probably fail :( Bring in some old code.

16 years ago[via] Fix driver after vblank-rework merge.
Thomas Hellstrom [Sun, 16 Mar 2008 10:29:57 +0000 (11:29 +0100)]
[via] Fix driver after vblank-rework merge.

16 years agoati: fix rs690 igp gart by allocating the page table in 32-bit memory
Dave Airlie [Sun, 16 Mar 2008 05:01:27 +0000 (15:01 +1000)]
ati: fix rs690 igp gart by allocating the page table in 32-bit memory

16 years agodrm/rs690: set AGP_BASE_2 to 0
Dave Airlie [Sun, 16 Mar 2008 04:00:16 +0000 (14:00 +1000)]
drm/rs690: set AGP_BASE_2 to 0

16 years agodrm: set rs690 gart base completly.
Dave Airlie [Sun, 16 Mar 2008 02:58:07 +0000 (12:58 +1000)]
drm: set rs690 gart base completly.

The docs state bits 4-11 represent bits 32-39 of a 40-bit address

16 years agodrm: this u32 should be a dma_addr_t
Dave Airlie [Sun, 16 Mar 2008 02:56:11 +0000 (12:56 +1000)]
drm: this u32 should be a dma_addr_t

doesn't fix anything but just making it consistent

16 years agofix build problems
Alan Hourihane [Fri, 14 Mar 2008 00:25:42 +0000 (00:25 +0000)]
fix build problems

16 years agodrm: Fix race that can lockup the kernel
Mike Isely [Thu, 13 Mar 2008 23:53:05 +0000 (09:53 +1000)]
drm: Fix race that can lockup the kernel

The i915_vblank_swap() function schedules an automatic buffer swap
upon receipt of the vertical sync interrupt.  Such an operation is
lengthy so it can't be allowed to happen in normal interrupt context,
thus the DRM implements this by scheduling the work in a kernel
softirq-scheduled tasklet.  In order for the buffer swap to work
safely, the DRM's central lock must be taken, via a call to
drm_lock_take() located in drivers/char/drm/drm_irq.c within the
function drm_locked_tasklet_func().  The lock-taking logic uses a
non-interrupt-blocking spinlock to implement the manipulations needed
to take the lock.  This semantic would be safe if all attempts to use
the spinlock only happen from process context.  However this buffer
swap happens from softirq context which is really a form of interrupt
context.  Thus we have an unsafe situation, in that
drm_locked_tasklet_func() can block on a spinlock already taken by a
thread in process context which will never get scheduled again because
of the blocked softirq tasklet.  This wedges the kernel hard.

To trigger this bug, run a dual-head cloned mode configuration which
uses the i915 drm, then execute an opengl application which
synchronizes buffer swaps against the vertical sync interrupt.  In my
testing, a lockup always results after running anywhere from 5 minutes
to an hour and a half.  I believe dual-head is needed to really
trigger the problem because then the vertical sync interrupt handling
is no longer predictable (due to being interrupt-sourced from two
different heads running at different speeds).  This raises the
probability of the tasklet trying to run while the userspace DRI is
doing things to the GPU (and manipulating the DRM lock).

The fix is to change the relevant spinlock semantics to be the
interrupt-blocking form.  After this change I am no longer able to
trigger the lockup; the longest test run so far was 20 hours (test
stopped after that point).

Note: I have examined the places where this spinlock is being
employed; all are reasonably short bounded sequences and should be
suitable for interrupts being blocked without impacting overall kernel
interrupt response latency.

Signed-off-by: Mike Isely <isely@pobox.com>
16 years agoFix chip family for RV550
Alex Deucher [Wed, 12 Mar 2008 15:16:12 +0000 (11:16 -0400)]
Fix chip family for RV550

16 years agonv50: force channel vram access through vm
Ben Skeggs [Wed, 12 Mar 2008 12:37:29 +0000 (23:37 +1100)]
nv50: force channel vram access through vm

If we ever want to be able to use the 3D engine we have no choice.  It
appears that the tiling setup (required for 3D on G8x) is in the page tables.

The immediate benefit of this change however is that it's now not possible
for a client to use the GPU to render over the top of important engine setup
tables, which also live in VRAM.

G8x VRAM size is limited to 512MiB at the moment, as we use a 1-1 mapping
of real vram pages to their offset within the start of a channel's VRAM
DMA object and only populate a single PDE for VRAM use.

16 years agoMerge branch 'intel-post-reloc'
Thomas Hellstrom [Wed, 12 Mar 2008 10:34:29 +0000 (11:34 +0100)]
Merge branch 'intel-post-reloc'

Conflicts:

linux-core/drm_compat.c
linux-core/drm_compat.h
linux-core/drm_ttm.c
shared-core/i915_dma.c

Bump driver minor to 13 due to introduction of new
relocation type.

16 years agoBug # 14712
Thomas Hellstrom [Wed, 12 Mar 2008 09:36:40 +0000 (10:36 +0100)]
Bug # 14712
Disable page saving for GPU read-only TTMs.

16 years agoDont allow !sysadmin clients to alter the memory type of
Thomas Hellstrom [Wed, 12 Mar 2008 09:19:36 +0000 (10:19 +0100)]
Dont allow !sysadmin clients to alter the memory type of
NO_EVICT buffers.

16 years agoFix for debug memory routines
Alan Hourihane [Thu, 17 Jan 2008 13:04:42 +0000 (13:04 +0000)]
Fix for debug memory routines

16 years agoAdd error message
Alan Hourihane [Thu, 17 Jan 2008 13:04:23 +0000 (13:04 +0000)]
Add error message

16 years agoAdd an emergency pinnable memory quota for root-only processes.
Thomas Hellstrom [Thu, 17 Jan 2008 12:10:36 +0000 (13:10 +0100)]
Add an emergency pinnable memory quota for root-only processes.

16 years agoFix kernel crash when we hit OOM conditions.
Thomas Hellstrom [Wed, 12 Mar 2008 09:07:56 +0000 (10:07 +0100)]
Fix kernel crash when we hit OOM conditions.
(Alan Hourihane)

16 years agoAvoid duplicate calls to drm_ttm_bind in some cases.
Thomas Hellstrom [Wed, 12 Mar 2008 09:02:09 +0000 (10:02 +0100)]
Avoid duplicate calls to drm_ttm_bind in some cases.

16 years agoMake sure other TTM memory types than TT is really unbound when evicted.
Thomas Hellstrom [Wed, 12 Mar 2008 08:56:06 +0000 (09:56 +0100)]
Make sure other TTM memory types than TT is really unbound when evicted.

16 years agoAvoid large kmallocs.
Thomas Hellstrom [Thu, 28 Feb 2008 08:08:52 +0000 (09:08 +0100)]
Avoid large kmallocs.

16 years agonouveau: move AGP reset to mem_init_agp
Stuart Bennett [Tue, 11 Mar 2008 00:33:58 +0000 (00:33 +0000)]
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

16 years agoremove unneeded load call
Dave Airlie [Mon, 10 Mar 2008 08:30:17 +0000 (18:30 +1000)]
remove unneeded load call

16 years agoSwitch from PIPE_VBLANK to PIPE_EVENT interrupts.
Keith Packard [Thu, 24 Jan 2008 19:46:45 +0000 (11:46 -0800)]
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.

16 years agodrm/radeon: check sarea_priv exists
Dave Airlie [Fri, 7 Mar 2008 22:30:03 +0000 (08:30 +1000)]
drm/radeon: check sarea_priv exists

16 years agonouveau: redo channel idle detection
Ben Skeggs [Fri, 7 Mar 2008 04:08:59 +0000 (15:08 +1100)]
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.

16 years agonouveau: don't touch NV_USER regs on channel destroy.
Ben Skeggs [Fri, 7 Mar 2008 03:38:05 +0000 (14:38 +1100)]
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.

16 years agoflush_agp_mappings commit
Dave Airlie [Thu, 6 Mar 2008 23:29:35 +0000 (09:29 +1000)]
flush_agp_mappings commit

16 years agodrm/bo: allow non-suser priv to add kernel BOs.
Dave Airlie [Thu, 6 Mar 2008 04:43:23 +0000 (14:43 +1000)]
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.

16 years agodrm: Fix for non-coherent DMA PowerPC
Benjamin Herrenschmidt [Wed, 5 Mar 2008 09:25:03 +0000 (19:25 +1000)]
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>
16 years agottm: make sure userspace can't destroy kernel create memory managers
Dave Airlie [Mon, 18 Feb 2008 00:39:21 +0000 (10:39 +1000)]
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

16 years agodrm/ttm: add ioctl to get back memory managed area sized
Dave Airlie [Wed, 20 Feb 2008 03:27:10 +0000 (13:27 +1000)]
drm/ttm: add ioctl to get back memory managed area sized

taken from modesetting branch but could be useful outside it.

16 years agodrm: reorganise minor number handling using code from modesetting branch
Dave Airlie [Wed, 5 Mar 2008 19:21:50 +0000 (05:21 +1000)]
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.

16 years agoi915: Evict if relocatee buffer is CACHED_MAPPED before
Xiang, Haihao [Wed, 5 Mar 2008 07:08:46 +0000 (15:08 +0800)]
i915: Evict if relocatee buffer is CACHED_MAPPED before
writting relocations, otherwise the GPU probably sees some
inconsistent data. Fix fd.o bug#14656

16 years agoClarify when WAIT_LAZY is relevant to users.
Eric Anholt [Tue, 4 Mar 2008 21:45:41 +0000 (13:45 -0800)]
Clarify when WAIT_LAZY is relevant to users.

16 years agoRemove unused DRM_FENCE_FLAG_WAIT_IGNORE_SIGNALS.
Eric Anholt [Thu, 31 Jan 2008 03:02:56 +0000 (19:02 -0800)]
Remove unused DRM_FENCE_FLAG_WAIT_IGNORE_SIGNALS.

16 years agoClarify through the names what drm_ttm_alloc_pages() and friend actually did.
Eric Anholt [Tue, 4 Mar 2008 21:35:23 +0000 (13:35 -0800)]
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.

16 years agoDon't shortcut the info syscall for drmBOBusy on nonshareable objects.
Eric Anholt [Tue, 4 Mar 2008 20:16:51 +0000 (12:16 -0800)]
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.

16 years ago [i915] 2D driver may reset Frame count value, this may lead driver
Zou Nan hai [Mon, 3 Mar 2008 06:49:49 +0000 (14:49 +0800)]
  [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.

16 years agoFIX_KMAP_BEGIN requires CONFIG_HIMEM (see include/asm-i386.h/fixmap.h)
Patrice Mandin [Fri, 29 Feb 2008 20:57:40 +0000 (21:57 +0100)]
FIX_KMAP_BEGIN requires CONFIG_HIMEM (see include/asm-i386.h/fixmap.h)

16 years agoWorking revision.
Thomas Hellstrom [Fri, 29 Feb 2008 14:38:55 +0000 (15:38 +0100)]
Working revision.

16 years agoFix compilation breakage on x86-64.
Thomas Hellstrom [Fri, 29 Feb 2008 12:31:14 +0000 (13:31 +0100)]
Fix compilation breakage on x86-64.

16 years agoMore post-ioctl work.
Thomas Hellstrom [Fri, 29 Feb 2008 12:25:55 +0000 (13:25 +0100)]
More post-ioctl work.

16 years agoagp: export the correct symbol
Dave Airlie [Fri, 29 Feb 2008 00:16:24 +0000 (10:16 +1000)]
agp: export the correct symbol

16 years agoAdd a compat kmap_atomic_prot_pfn to do quick kernel map / unmaps of
Thomas Hellstrom [Thu, 28 Feb 2008 12:47:15 +0000 (13:47 +0100)]
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.

16 years agoInitial commit.
Thomas Hellstrom [Thu, 28 Feb 2008 13:05:53 +0000 (14:05 +0100)]
Initial commit.

16 years agoAdd a compat kmap_atomic_prot_pfn to do quick kernel map / unmaps of
Thomas Hellstrom [Thu, 28 Feb 2008 12:47:15 +0000 (13:47 +0100)]
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.

16 years agoReinstate buffer idle before applying relocations.
Thomas Hellstrom [Wed, 27 Feb 2008 20:44:40 +0000 (21:44 +0100)]
Reinstate buffer idle before applying relocations.

16 years agoDon't wait for buffer idle before applying relocations.
Thomas Hellstrom [Wed, 27 Feb 2008 18:46:28 +0000 (19:46 +0100)]
Don't wait for buffer idle before applying relocations.

16 years ago[i915] Relocation fixes.
Thomas Hellstrom [Tue, 26 Feb 2008 09:47:05 +0000 (10:47 +0100)]
[i915] Relocation fixes.

16 years agoMake the execbuffer code reasonably safe against errors.
Thomas Hellstrom [Mon, 25 Feb 2008 23:01:09 +0000 (00:01 +0100)]
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.

16 years agofix texture uploads with large 3d textures (bug 13980)
Roland Scheidegger [Sat, 23 Feb 2008 10:01:36 +0000 (11:01 +0100)]
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.

16 years agoi915: put ARX back into index mode before doing restore
Jesse Barnes [Fri, 22 Feb 2008 21:57:38 +0000 (13:57 -0800)]
i915: put ARX back into index mode before doing restore

Fixes resume from hibernate in some configurations.

16 years agonouveau: Remove some random (french) comment.
Maarten Maathuis [Fri, 22 Feb 2008 12:41:05 +0000 (13:41 +0100)]
nouveau: Remove some random (french) comment.

16 years agonouveau: A single define of dma skips is more than enough.
Maarten Maathuis [Fri, 22 Feb 2008 12:35:13 +0000 (13:35 +0100)]
nouveau: A single define of dma skips is more than enough.

16 years agoFix one last occurance of struct _drm_i915_batchbuffer.
Kristian Høgsberg [Fri, 22 Feb 2008 16:22:52 +0000 (11:22 -0500)]
Fix one last occurance of struct _drm_i915_batchbuffer.

Thanks to Todd Merrill for pointing it out.

16 years agoi915: Remove leading underscore from struct tags.
Kristian Høgsberg [Fri, 22 Feb 2008 05:12:39 +0000 (00:12 -0500)]
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.

16 years agoDon't free irq resources until after we've unregistered the handler.
Kristian Høgsberg [Thu, 21 Feb 2008 20:31:48 +0000 (15:31 -0500)]
Don't free irq resources until after we've unregistered the handler.