OSDN Git Service

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

16 years agolinux: Clean up vblank related resources from drm_irq_uninstall().
Michel Dänzer [Thu, 21 Feb 2008 10:49:38 +0000 (11:49 +0100)]
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.

16 years agofix SAREA
Alan Hourihane [Wed, 20 Feb 2008 22:22:49 +0000 (22:22 +0000)]
fix SAREA

16 years agodrm: add support for passing state into the suspend hooks.
Dave Airlie [Wed, 20 Feb 2008 00:02:20 +0000 (10:02 +1000)]
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>
16 years ago[915]: more registers for S3 (DSPCLK_GATE_D, CACHE_MODE_0, MI_ARB_STATE)
Keith Packard [Sun, 17 Feb 2008 03:19:29 +0000 (19:19 -0800)]
[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.

16 years agonouveau: no GART on ia64 either.
Stephane Marchesin [Sat, 16 Feb 2008 02:50:10 +0000 (03:50 +0100)]
nouveau: no GART on ia64 either.

16 years agonv40: actually init all tile regs.
Ben Skeggs [Fri, 15 Feb 2008 17:33:27 +0000 (04:33 +1100)]
nv40: actually init all tile regs.

16 years agoi915: Add a dri2 init path that gets the lock from the dri2 sarea.
Kristian Høgsberg [Tue, 5 Feb 2008 18:27:16 +0000 (13:27 -0500)]
i915: Add a dri2 init path that gets the lock from the dri2 sarea.

16 years agoi915: Only look up dev_priv->mmio_map if it's not already set up
Kristian Høgsberg [Tue, 12 Feb 2008 21:08:18 +0000 (16:08 -0500)]
i915: Only look up dev_priv->mmio_map if it's not already set up

16 years agoi915: Add I915_PARAM_CHIPSET_ID param to get chipset ID.
Kristian Høgsberg [Tue, 5 Feb 2008 17:27:48 +0000 (12:27 -0500)]
i915: Add I915_PARAM_CHIPSET_ID param to get chipset ID.

16 years agoi915: Make sarea_priv setup optional.
Kristian Høgsberg [Tue, 5 Feb 2008 17:25:22 +0000 (12:25 -0500)]
i915: Make sarea_priv setup optional.

16 years agoRestore pipeconf regs unconditionally
Jesse Barnes [Fri, 8 Feb 2008 01:33:28 +0000 (17:33 -0800)]
Restore pipeconf regs unconditionally

On many chipsets, the checks for DPLL enable or VGA mode will prevent the
pipeconf regs from being restored, which could result in a blank display or X
failing to come back after resume.  So restore them unconditionally along with
actually restoring pipe B's palette correctly.

16 years agoFix saveGR array size
Jesse Barnes [Thu, 7 Feb 2008 19:21:09 +0000 (11:21 -0800)]
Fix saveGR array size

Make sure we have enough room for all the GR registers or we'll end up
clobbering the AR index register (which should actually be harmless
unless the BIOS is making an assumption about it).

16 years agoi915: save/restore interrupt state
Jesse Barnes [Thu, 7 Feb 2008 18:48:08 +0000 (10:48 -0800)]
i915: save/restore interrupt state

On resume, if the interrupt state isn't restored correctly, we may end
up with a flood of unexpected or ill-timed interrupts, which could cause
the kernel to disable the interrupt or vblank events to happen at the
wrong time.  So save/restore them properly.

16 years agoFix vblank enable/disable callbacks
Jesse Barnes [Thu, 7 Feb 2008 18:40:06 +0000 (10:40 -0800)]
Fix vblank enable/disable callbacks

There were two problems with the existing callback code:  the vblank
enable callback happened multiple times per disable, making drivers more
complex than they had to be, and there was a race between the final
decrement of the vblank usage counter and the next enable call, which
could have resulted in a put->schedule disable->get->enable->disable
sequence, which would be bad.

So add a new vblank_enabled array to track vblank enable on per-pipe
basis, and add a lock to protect it along with the refcount +
enable/disable calls to fix the race.

16 years agoi915: Re-report breadcrumbs on poll to the fence manager,
Thomas Hellstrom [Tue, 5 Feb 2008 09:35:56 +0000 (10:35 +0100)]
i915: Re-report breadcrumbs on poll to the fence manager,

since a breadcrumb may actually turn up before a corresponding fence object
has been placed on the fence ring.

16 years agonouveau: make nv34 work every time, not just every 2nd time
Stuart Bennett [Mon, 28 Jan 2008 22:59:26 +0000 (22:59 +0000)]
nouveau: make nv34 work every time, not just every 2nd time

And make nv30_graph_init a bit more like mmio-traces

16 years agonouveau: NV40 can/should now be able to run after the blob.
Maarten Maathuis [Sat, 2 Feb 2008 11:46:31 +0000 (12:46 +0100)]
nouveau: NV40 can/should now be able to run after the blob.

- Moved the fix from the ddx to drm, because it seemed more appropriate.
- Don't be shy, report if it works for you or not.

16 years agoAdd an fence_class_manager::last_queued_sequence member, since a
Thomas Hellstrom [Thu, 31 Jan 2008 13:11:12 +0000 (14:11 +0100)]
Add an fence_class_manager::last_queued_sequence member, since a
sequence number may actually turn up before the corresponding fence
object has been queued on the ring.

Fence drivers can use this member to determine whether a
sequence number must be re-reported.

16 years agoi915: Avoid calling drm_fence_flush_old excessively.
Thomas Hellstrom [Wed, 30 Jan 2008 21:14:02 +0000 (22:14 +0100)]
i915: Avoid calling drm_fence_flush_old excessively.

16 years agoSimplify the fencing code and differentiate between flushes and
Thomas Hellstrom [Wed, 30 Jan 2008 21:06:02 +0000 (22:06 +0100)]
Simplify the fencing code and differentiate between flushes and
waiting types.
Add a "command_stream_barrier" method to the bo driver.

16 years agonv40: some more nv67 changes
Ben Skeggs [Wed, 30 Jan 2008 00:40:13 +0000 (11:40 +1100)]
nv40: some more nv67 changes

With some luck the drm-side will be OK now for this chipset.

16 years agoAdd new RV380 pci id
Mirko [Tue, 29 Jan 2008 15:11:27 +0000 (10:11 -0500)]
Add new RV380 pci id

bug 14289

16 years agoFix hibernate save/restore of VGA attribute regs
Jesse Barnes [Tue, 29 Jan 2008 05:05:22 +0000 (21:05 -0800)]
Fix hibernate save/restore of VGA attribute regs

In hibernate, we may end up calling the VGA save regs function twice, so we
need to make sure it's idempotent.  That means leaving ARX in index mode after
the first save operation.  Fixes hibernate on 965.

16 years agodrm: add initial rs690 support for drm.
Maciej Cencora [Sun, 27 Jan 2008 02:50:31 +0000 (12:50 +1000)]
drm: add initial rs690 support for drm.

This adds support for configuring the RS690 GART.

16 years agomach64: fix after vblank-rework
George Sapountzis [Fri, 25 Jan 2008 14:54:29 +0000 (16:54 +0200)]
mach64: fix after vblank-rework

don't disable vblank interrupts (similar to r128)

16 years agoFixup modeset ioctl number & typedef usage
Jesse Barnes [Fri, 25 Jan 2008 04:59:51 +0000 (20:59 -0800)]
Fixup modeset ioctl number & typedef usage

Should be 0x08 rather than 0xa0, and shouldn't use typedefs.

16 years agoMerge commit 'airlied/i915-ttm-cfu'
Eric Anholt [Thu, 24 Jan 2008 20:32:08 +0000 (12:32 -0800)]
Merge commit 'airlied/i915-ttm-cfu'

This requires updated Mesa to handle the new relocation format.

16 years agoRemove broken 'in vblank' accounting
Jesse Barnes [Thu, 24 Jan 2008 16:57:04 +0000 (08:57 -0800)]
Remove broken 'in vblank' accounting

We need to return an accurate vblank count to the callers of
->get_vblank_counter, and in the Intel case the actual frame count
register isn't udpated until the next active line is displayed, so we
need to return one more than the frame count register if we're currently
in a vblank period.

However, none of the various ways of doing this is working yet, so
disable the logic for now.  This may result in a few missed events, but
should fix the hangs some people have seen due to the current code
tripping the wraparound logic in drm_update_vblank_count.

16 years agoi915: fix missing header when copying data from userspace
Dave Airlie [Thu, 24 Jan 2008 05:18:09 +0000 (15:18 +1000)]
i915: fix missing header when copying data from userspace

16 years agoi915 make relocs use copy from user
Dave Airlie [Thu, 24 Jan 2008 04:37:40 +0000 (14:37 +1000)]
i915 make relocs use copy from user

Switch relocs to using copy from user and remove index and pass buffer
handles in instead.

16 years agoFix thinko in get_vblank_counter
Jesse Barnes [Wed, 23 Jan 2008 16:39:57 +0000 (08:39 -0800)]
Fix thinko in get_vblank_counter

Should use vtotal not htotal to figure out if we're in a vblank period.

16 years agoFix IS_I915G macro
Jesse Barnes [Wed, 23 Jan 2008 16:38:01 +0000 (08:38 -0800)]
Fix IS_I915G macro

One to many parantheses...

16 years agonouveau: Fix warning in nouveau_mem.c
Maarten Maathuis [Wed, 23 Jan 2008 15:40:19 +0000 (16:40 +0100)]
nouveau: Fix warning in nouveau_mem.c

16 years agoi915/flush: get the ret the right way around
Dave Airlie [Wed, 23 Jan 2008 06:45:09 +0000 (16:45 +1000)]
i915/flush: get the ret the right way around

16 years agodrm/i915: add support for E7221
Dave Airlie [Wed, 23 Jan 2008 06:44:51 +0000 (16:44 +1000)]
drm/i915: add support for E7221

16 years agoCorrect vblank count value
Jesse Barnes [Tue, 22 Jan 2008 23:16:01 +0000 (15:16 -0800)]
Correct vblank count value

The frame count registers don't increment until the start of the next
frame, so make sure we return an incremented count if called during the
actual vblank period.

16 years agoi915 irq fixes
Jesse Barnes [Tue, 22 Jan 2008 21:11:29 +0000 (13:11 -0800)]
i915 irq fixes

Ack the IRQs correctly (PIPExSTAT first followed by IIR).  Don't read
vblank counter registers on disabled pipes (might hang otherwise).  And
deal with flipped pipe/plane mappings if present.

16 years agoMerge branch 'master' into vblank-rework, including mach64 support
Jesse Barnes [Tue, 22 Jan 2008 17:42:37 +0000 (09:42 -0800)]
Merge branch 'master' into vblank-rework, including mach64 support

Conflicts:

linux-core/drmP.h
linux-core/drm_drv.c
shared-core/i915_drv.h
shared-core/i915_irq.c
shared-core/mga_irq.c
shared-core/radeon_irq.c
shared-core/via_irq.c

Mostly trivial conflicts.

mach64 support from Mathieu Bérard.

16 years agoRevert "Fix pipe<->plane mapping vs. vblank handling (again)"
Dave Airlie [Tue, 22 Jan 2008 03:39:28 +0000 (14:39 +1100)]
Revert "Fix pipe<->plane mapping vs. vblank handling (again)"

This reverts commit bfc29606e4a818897eebca46a5e23bbe7bc3ce25.

This regresses i915 here for me I can't get greater than 0.333 fps with gears

16 years agonouveau: don't forget NV80.
Stephane Marchesin [Mon, 21 Jan 2008 20:11:47 +0000 (21:11 +0100)]
nouveau: don't forget NV80.

16 years agonouveau: new card family for old card designs.
Stephane Marchesin [Mon, 21 Jan 2008 20:01:28 +0000 (21:01 +0100)]
nouveau: new card family for old card designs.

16 years agoi915: fix invalid opcode exception on cpus without clflush
Kyle McMartin [Thu, 17 Jan 2008 23:51:56 +0000 (18:51 -0500)]
i915: fix invalid opcode exception on cpus without clflush

i915_flush_ttm was unconditionally executing a clflush instruction
to (obviously) flush the cache. Instead, check if the cpu supports
clflush, and if not, fall back to calling wbinvd to flush the entire
cache.

Signed-off-by: Kyle McMartin <kmcmartin@redhat.com>
16 years agoAdd additional explanation of DRM_BO_FLAG_CACHED_MAPPED before I forget again.
Eric Anholt [Mon, 7 Jan 2008 21:10:50 +0000 (13:10 -0800)]
Add additional explanation of DRM_BO_FLAG_CACHED_MAPPED before I forget again.

16 years agoi915: Add chipset id for Intel Integrated Graphics Device
Zhenyu Wang [Wed, 9 Jan 2008 03:30:35 +0000 (11:30 +0800)]
i915: Add chipset id for Intel Integrated Graphics Device

This adds new chipset id in drm.

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>