Commit Graph

3353 Commits (b92f5577670f99ded76e201a71aaa23cce8f7577)

Author SHA1 Message Date
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
Ben Skeggs 15cbde683f nv40: actually init all tile regs. 2008-02-16 04:47:02 +11:00
Kristian Høgsberg 373dbcf8b2 i915: Add a dri2 init path that gets the lock from the dri2 sarea. 2008-02-13 13:34:02 -05:00
Kristian Høgsberg db3f03ae35 i915: Only look up dev_priv->mmio_map if it's not already set up 2008-02-13 13:34:02 -05:00
Kristian Høgsberg ee15459483 i915: Add I915_PARAM_CHIPSET_ID param to get chipset ID. 2008-02-13 13:34:02 -05:00
Kristian Høgsberg 4feb0638f1 i915: Make sarea_priv setup optional. 2008-02-13 13:34:02 -05:00
Jesse Barnes d63b57749f 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.
2008-02-07 17:33:28 -08:00
Jesse Barnes 6f19473191 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).
2008-02-07 11:21:09 -08:00
Jesse Barnes 8b6c96dedd 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.
2008-02-07 10:48:08 -08:00
Jesse Barnes 79d6928520 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.
2008-02-07 10:40:06 -08:00
Thomas Hellstrom 76748efae2 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.
2008-02-05 10:36:49 +01:00
Stuart Bennett a0781e7622 nouveau: make nv34 work every time, not just every 2nd time
And make nv30_graph_init a bit more like mmio-traces
2008-02-04 16:38:31 +00:00
Maarten Maathuis 733e07663e 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.
2008-02-02 12:46:47 +01:00
Thomas Hellstrom c77b0937f2 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.
2008-01-31 14:11:12 +01:00
Thomas Hellstrom 47ee6237fe i915: Avoid calling drm_fence_flush_old excessively. 2008-01-30 22:14:02 +01:00
Thomas Hellstrom f1edb7ad91 Simplify the fencing code and differentiate between flushes and
waiting types.
Add a "command_stream_barrier" method to the bo driver.
2008-01-30 22:06:02 +01:00
Ben Skeggs 9a7e45858d nv40: some more nv67 changes
With some luck the drm-side will be OK now for this chipset.
2008-01-30 11:50:17 +11:00
Mirko 0744cb153a Add new RV380 pci id
bug 14289
2008-01-29 10:11:27 -05:00