Commit Graph

437 Commits (d70d60529f77ec73322be7b887fd6a3faf133bce)

Author SHA1 Message Date
Kristian Høgsberg a69c85fec8 Drop destroy ioctls for fences and buffer objects.
We now always create a drm_ref_object for user objects and this is then the only
things that holds a reference to the user object.  This way unreference on will
destroy the user object when the last drm_ref_object goes way.
2007-10-16 22:03:05 +11:00
Jesse Barnes 5cc3083179 Merge branch 'master' into modesetting-101 - TTM & typedef removal
Conflicts:

	linux-core/drmP.h
	linux-core/drm_bo.c
	linux-core/drm_drv.c
	linux-core/drm_objects.h
	shared-core/drm.h
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c

Mostly removing typedefs that snuck into the modesetting code and
updating to the latest TTM APIs.  As of today, the i915 driver builds,
but there are likely to be problems, so debugging and bugfixes will
come next.
2007-09-24 14:41:46 -07:00
Dave Airlie bc5423f168 drm_sysfs: update sysfs code from kernel 2007-09-20 14:01:29 +10:00
Ben Skeggs 97770db720 nouveau: Various internal and external API changes
1. DRM_NOUVEAU_GPUOBJ_FREE
	Used to free GPU objects.  The obvious usage case is for Gr objects,
	but notifiers can also be destroyed in the same way.

	GPU objects gain a destructor method and private data fields with
	this change, so other specialised cases (like notifiers) can be
	implemented on top of gpuobjs.

2. DRM_NOUVEAU_CHANNEL_FREE

3. DRM_NOUVEAU_CARD_INIT
	Ideally we'd do init during module load, but this isn't currently
	possible.  Doing init during firstopen() is bad as X has a love of
	opening/closing the DRM many times during startup.  Once the
	modesetting-101 branch is merged this can go away.

	IRQs are enabled in nouveau_card_init() now, rather than having the
	X server call drmCtlInstHandler().  We'll need this for when we give
	the kernel module its own channel.

4. DRM_NOUVEAU_GETPARAM
	Add CHIPSET_ID value, which will return the chipset id derived
	from NV_PMC_BOOT_0.

4. Use list_* in a few places, rather than home-brewed stuff.
2007-08-06 21:45:18 +10:00
Dave Airlie 7602e4f8a6 drm: add unlocked ioctl code path - not used yet 2007-08-02 19:13:58 +10:00
Eric Anholt 5b38e13416 Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.
The data is now in kernel space, copied in/out as appropriate according to the
This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal
with those failures.  This also means that XFree86 4.2.0 support for i810 DRM
is lost.
2007-07-20 18:16:42 -07:00
Eric Anholt c1119b1b09 Replace filp in ioctl arguments with drm_file *file_priv.
As a fallout, replace filp storage with file_priv storage for "unique
identifier of a client" all over the DRM.  There is a 1:1 mapping, so this
should be a noop.  This could be a minor performance improvement, as everything
on Linux dereferenced filp to get file_priv anyway, while only the mmap ioctls
went the other direction.
2007-07-20 13:39:45 -07:00
Eric Anholt 5dc9fd96d7 Fix linux spinlock macros after the last commit. 2007-07-20 12:55:51 -07:00
Eric Anholt 05204b9c8d Merge branch 'origin' 2007-07-19 06:31:26 -07:00
Eric Anholt 33a50412c2 Add dry-coded DRM drawable private information storage for FreeBSD.
With this, all modules build again.
2007-07-18 14:22:49 -07:00
Dave Airlie 6ad1df2176 drm: remove drm_u64_t, replace with uint64_t everwhere
This might break something, stdint.h inclusion in drm.h maybe required
but I'm not sure yet what platforms have it what ones don't.
2007-07-18 09:42:06 +10:00
Dave Airlie 191c062933 drm: remove drm_ref_t 2007-07-16 13:45:39 +10:00
Dave Airlie 24311d5d82 drm: remove drm_buf_t 2007-07-16 13:42:11 +10:00
Dave Airlie be85ad0333 drm: detypedef ttm/bo/fence code 2007-07-16 13:37:02 +10:00
Dave Airlie 6dce9e0735 drm: remove hashtab/sman and object typedefs 2007-07-16 12:48:44 +10:00
Dave Airlie 21ee6fbfb8 drm: remove drmP.h internal typedefs 2007-07-16 12:32:51 +10:00
Dave Airlie b95ac8b7b3 drm: detypedef drm.h and fixup all problems 2007-07-16 11:22:15 +10:00
Dave Airlie 5c6a23704a Merge branch 'radeon-ttm' of git://people.freedesktop.org/~airlied/drm into radeon-ttm
Conflicts:

	linux-core/ati_pcigart.c
	linux-core/drmP.h
	linux-core/radeon_buffer.c
2007-07-12 14:25:29 +10:00
Ben Skeggs 750371cb6e nouveau: separate region_offset into map_handle and offset. 2007-07-12 10:46:57 +10:00
Arthur Huillet 04e4922c0c Made drm_sg_alloc accessible from inside the DRM - drm_sg_alloc_ioctl is the ioctl wrapper 2007-07-11 02:34:00 +02:00
Kristian Høgsberg d57b7f02d2 Use idr_replace trick to eliminate struct drm_ctx_sarea_list. 2007-07-03 10:41:48 -04:00
Kristian Høgsberg b323ab52aa Drop drm_drawable_list and add drm_drawable_info directly to the idr. 2007-07-02 15:07:02 -04:00
Alan Hourihane 8a78dead29 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:

	linux-core/drm_drv.c
	linux-core/drm_fops.c
	linux-core/drm_objects.h
	linux-core/drm_stub.c
	shared-core/i915_dma.c
2007-06-29 20:09:44 +01:00
Jesse Barnes 97dcd7fd25 more vblank rework
- use a timer for disabling vblank events to avoid enable/disable calls too
    often
  - make i915 work with pre-965 chips again (would like to structure this
    better, but this hack works on my test system)
2007-06-22 11:06:51 -07:00
Michel Dänzer 0f5334be2b Remove DRIVER_IRQ_VBL(2).
If the driver doesn't support vertical blank interrupts, it won't call
drm_vblank_init(), and dev->num_crtcs will be 0.

Also fix an off-by-one test against dev->num_crtcs.
2007-06-15 11:01:51 +02:00
Michel Dänzer fbee089aca Make vblank waitqueue per CRTC. 2007-06-15 10:50:22 +02:00
Jesse Barnes b06268294a Comment new vblank routines and fixup several issues:
- use correct refcount variable in get/put routines
  - extract counter update from drm_vblank_get
  - make signal handling callback per-crtc
  - update interrupt handling logic, drivers should use drm_handle_vblank
  - move wakeup and counter update logic to new drm_handle_vblank routine
  - fixup usage of get/put in light of counter update extraction
  - fix longstanding bug in signal code, update pending counter only
    *after* we're sure we'll setup signal handling
2007-06-14 11:32:31 -07:00
Jesse Barnes ca47fa90b7 Update vblank code:
- move pre/post modeset ioctl to core
  - fixup i915 buffer swap
  - fix outstanding signal count code
  - create new core vblank init routine
  - test (works with glxgears)
  - simplify i915 interrupt handler
2007-06-12 13:35:41 -07:00
Jesse Barnes db689c7b95 Initial checkin of vblank rework. Code attempts to reduce the number
of vblank interrupt in order to save power.
2007-06-12 10:44:21 -07:00
Dave Airlie 280083d4a2 use krh's idr mods to remove lists from idr code 2007-06-10 15:40:21 +10:00
Dave Airlie 4294dcc050 complete PCIE backend for ttm
ttm test runs with it at least, needs to do more testing on it
2007-06-05 12:26:06 +10:00
Dave Airlie 234a906200 WIP cleanup 2007-06-05 10:47:42 +10:00
Dave Airlie 77b9d9d16b cleanup pcigart ttm for new backend layout 2007-06-05 10:35:41 +10:00
Dave Airlie 07345af838 Merge branch 'origin' into radeon-ttm
Conflicts:

	shared-core/radeon_drv.h
2007-06-05 10:09:11 +10:00
root a4cddc6596 Revert "drm: add new drm_wait_on function to replace macro"
This reverts commit 6e860d08d0.

As I said not a good plan - this macro will have to stay for now,
trying to do the vbl code with the inline was a bit messy - may need specialised
drm wait on functions
2007-06-03 18:12:28 +10:00
Dave Airlie 056c2f249a drm: move context handling code to use linux idr 2007-05-27 08:44:38 +10:00
Dave Airlie f64674743a drm: convert drawable handling to use Linux idr
This cleans this code up a lot and uses the generic Linux idr which is
designed for this.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-27 07:26:52 +10:00
Dave Airlie 7b48f0022a drm: cleanup use of Linux list handling macros
This makes the drms use of the list handling macros a lot cleaner
and more along the lines of how they should be used.
2007-05-26 04:26:24 +10:00
Alan Hourihane 315cf14af8 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:

	shared-core/i915_dma.c
2007-05-18 13:48:56 +01:00
Jesse Barnes b7bf317f42 Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
Conflicts:

	linux-core/drm_crtc.c
	linux-core/drm_fb.c

Lots of changes to merge with alanh's latest stuff:
  o fix use of fb->pitch now that it has the right value
  o add new helper for finding the CRTC given an FB
  o fix new fb_probe/fb_remove functions to take a CRTC
  o fixup callers of new FB routines
  o port drm_fb changes to intel_fb
  o check for errors after creating fb buffer object
  o go back to using cfb_imageblit since the accel stubs aren't ready
2007-05-17 10:35:07 -07:00
Jesse Barnes a18b4befb9 Fix FB pitch value (we had it wrong and were working around it in a few
places).
Add new FB hooks to the drm driver structure and make i915 use them for an
Intel specific FB driver.  This will allow acceleration and better handling
of the command stream.
2007-05-17 09:00:06 -07:00
Dave Airlie 6e860d08d0 drm: add new drm_wait_on function to replace macro 2007-04-28 15:07:43 +10:00
Dave Airlie 9f9c19065c remove DRM_GETSAREA and replace with drm_getsarea function 2007-04-28 15:07:43 +10:00
Dave Airlie b589b846e7 Merge branch 'origin' into modesetting-101 2007-04-26 15:56:21 +10:00
Thomas Hellstrom 2df2c70e20 Simplify the ttm backend interface and the agp ttm backend. 2007-04-18 16:33:28 +02:00
Dave Airlie 79aa1d5474 another large overhaul of interactions with userspace...
We need to keep a list of user created fbs to nuke on master exit.
We also need to use the bo properly.
2007-04-17 18:16:38 +10:00
Alan Hourihane a85440c8a6 Remove extraneous drm_crtc.h include 2007-04-12 15:11:38 +01:00
Alan Hourihane 9420ab4b41 Merge remote branch 'origin/modesetting-101' into modesetting-101 2007-04-12 15:10:08 +01:00
Dave Airlie ed0ebd9d3d make crtc_config be named mode_config
X.org calls this crtc_config but this is a bad name and will confuse ppl later
(and me now :-)
2007-04-10 18:56:02 +10:00
Dave Airlie a70f8e0ab2 radeon: add support for reverse engineered xpress200m
The IGPGART setup code was traced using mmio-trace on fglrx by myself
and Phillip Ezolt <phillipezolt@gmail.com> on dri-devel.

This code doesn't let the 3D driver work properly as the card has no
vertex shader support.

Thanks to Matthew Garrett + Ubuntu for providing me some hardware to do this
work on.
2007-04-09 21:52:59 +10:00
Jesse Barnes a35ba455b2 make drmP.h include drm_crtc.h for CRTC related stuff.
fixup drm_crtc.c so it matches VGA and other outputs properly.
make drm_crtc.c less verbose.
add function declarations in drm_crtc.h for other files.
2007-04-07 19:22:39 -07:00
Dave Airlie 52f9028c84 Initial import of modesetting for intel driver in DRM 2007-04-05 11:21:06 +10:00
Dave Airlie 29ac7b1fe3 radeon: add setup for PCIE GART ttm 2007-04-03 21:20:00 +10:00
Dave Airlie e835820e23 add initial PCIE GART framework for TTM 2007-04-03 19:04:48 +10:00
Dave Airlie 2d7ecb8422 more tab/space conversion 2007-03-19 08:29:07 +11:00
Dave Airlie 2463b03cb4 whitespace cleanup pending a kernel merge 2007-03-19 08:23:43 +11:00
Dave Airlie c9178c3d01 ati: make pcigart code able to handle variable size PCI GART aperture
This code doesn't enable a variable aperture it just modifies the codebase
to allow me fix it up later
2007-03-04 18:16:29 +11:00
Jay Estabrook 6a51da7325 Fix Alpha domain/bus issue 2007-02-27 08:56:20 +00:00
Thomas Hellstrom a78f70faad Merge branch 'ttm-vram-0-1-branch' 2007-02-14 15:33:40 +01:00
Thomas Hellstrom 1345076c8f Rename drm_ttm.h to drm_objects.h
Fix up some header incompatibilities in drm_fence.c caused by the previous
commit.
2007-02-14 14:10:10 +01:00
Thomas Hellstrom 8ffc1844b0 Move fence- and buffer-object related header stuff to drm_ttm.h 2007-02-14 14:05:40 +01:00
Thomas Hellstrom 5c9a7b0f94 Remove an intel-specific hack and replace it with a fence driver callback. 2007-02-14 13:31:35 +01:00
Thomas Hellstrom 04760563b8 Set the drm bus map type for each buffer object memory type. 2007-02-14 12:39:02 +01:00
Thomas Hellstrom e1460426b8 Bugzilla Bug #9457
Add refcounting of user waiters to the DRM hardware lock, so that we can use the
DRM_LOCK_CONT flag more conservatively.

Also add a kernel waiter refcount that if nonzero transfers the lock for the kernel context,
when it is released. This is useful when waiting for idle and can be used
for very simple fence object driver implementations for the new memory manager.

It also resolves the AIGLX startup deadlock for the sis and the via drivers.
i810, i830 still require that the hardware lock is really taken so the deadlock remains
for those two. I'm not sure about ffb. Anyone familiar with that code?
2007-02-13 20:47:30 +01:00
Thomas Hellstrom 9efdae317c More bugfixes.
Fixed memory, pinned buffers and unmappable memory now seems
fully functional.
2007-02-13 20:05:32 +01:00
Thomas Hellstrom f02f83ee08 Cleanup and fix support for pinned buffers. 2007-02-12 17:47:57 +01:00
Thomas Hellstrom b2bcbf874b Add an accelerated buffer copy cleanup helper.
Export helper functions and make some important buffer-object functions non-static.
Add an i915 accelerated blit buffer move for pci memory buffers.
2007-02-08 21:28:33 +01:00
Thomas Hellstrom bf8f46d4c6 Fix mm_block leak.
Some other minor fixes.
2007-02-08 18:59:02 +01:00
Thomas Hellstrom e4b2da4406 A minor function interface change and some memcpy bugfixing.
Hooray!! it sort of works with a fixed AGP area as faked VRAM.
2007-02-08 16:21:38 +01:00
Thomas Hellstrom 1257907fa9 Simplify external ttm page allocation.
Implement a memcpy fallback for copying between buffers.
2007-02-08 13:29:08 +01:00
Thomas Hellstrom c1fbd8a566 Checkpoint commit.
Flag handling and memory type selection cleanup.
glxgears won't start.
2007-02-07 17:25:13 +01:00
Thomas Hellstrom af24465b2e Fix a stray unlock_kernel() in drm_vm.c
Add a file for memory move helpers, drm_bo_move.c
Implement generic memory move.
Cached, no_move and unmapped memory temporarily broken.
2007-02-07 12:52:23 +01:00
Thomas Hellstrom 71b9e876f9 Simplify pci map vs no pci map choice. 2007-02-06 16:59:45 +01:00
Thomas Hellstrom 40ce53dfde Implement a drm_mem_reg_t substructure in the buffer object type. 2007-02-06 15:56:43 +01:00
Thomas Hellstrom 609e3b0375 Implement a policy for selecting memory types. 2007-02-06 14:20:33 +01:00
Thomas Hellstrom 63f2abd721 Make also later kernels work with buffer object vm
and clean up some function names.
2007-02-02 19:49:11 +01:00
Thomas Hellstrom c269d560e4 Make vm handle buffer objects instead of ttm objects.
Remove ttm objects.
Make vm aware of PCI memory type buffer objects.
(Only works for pre 2.6.16 kernels for now).
2007-02-02 14:47:44 +01:00
Thomas Hellstrom dd733dea38 Fix missing ttm_open_vma call from previous commit.
Honour the ttm backend cant-use-aperture flag.
2007-02-01 13:19:05 +01:00
Thomas Hellstrom 9677c5ecc6 Prepare for removal of the ttm_object type. 2007-02-01 10:53:55 +01:00
Thomas Hellstrom 3024f23c65 memory manager: Make device driver aware of different memory types.
Memory types are either fixed (on-card or pre-bound AGP) or not fixed
(dynamically bound) to an aperture. They also carry information about:

1) Whether they can be mapped cached.
2) Whether they are at all mappable.
3) Whether they need an ioremap to be accessible from kernel space.

In this way VRAM memory and, for example, pre-bound AGP appear
identical to the memory manager.

This also makes support for unmappable VRAM simple to implement.
2007-01-31 14:50:57 +01:00
Thomas Hellstrom 1e4c7d69f5 Some cleanup. A buffer object should only have one active memory type. 2007-01-29 13:37:02 +01:00
Thomas Hellstrom 582637641a Remove a scary error printed when we were leaking memory caches.
We don't use memory caches anymore...

Fix memory accounting initialization to only use low or DMA32 memory.
2007-01-25 14:27:29 +01:00
Christoph Hellwig b147c39263 drm: remove drm_follow_page, and drm_ioremap and ioremapfree
This comes from the Re: [patch] paravirt: isolate module ops on lkml
It needs some testing, please report any regressions caused.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-01-08 11:47:15 +11:00
Dave Airlie 2dcbf6a599 make build against 2.6.20 hopefully 2007-01-01 11:30:38 +11:00
Thomas Hellstrom 9acd4a13f2 Remove the stupid root_node field from the core memory manager. 2006-12-20 19:33:50 +01:00
Dave Airlie 6333bfdb58 fixup inclusion of agp.h 2006-12-19 21:37:50 +11:00
Dave Airlie 86ff2aeb9b drm: remove all 2.4 support for drm development tree.
Bye bye 2.4 you served us well..
2006-12-19 20:29:03 +11:00
Michael Buesch b3c88d31e1 drm/linux-core: drmP.h compilation fix
I need the following patch to fix compilation of
latest drm/linux-core on my ppc64 machine.

/home/mb/develop/git/drm/linux-core/savage_bci.c: In function ‘savage_driver_firstopen’:
/home/mb/develop/git/drm/linux-core/savage_bci.c:587: error: ‘DRM_MTRR_WC’ undeclared (first use in this function)
/home/mb/develop/git/drm/linux-core/savage_bci.c:587: error: (Each undeclared identifier is reported only once
/home/mb/develop/git/drm/linux-core/savage_bci.c:587: error: for each function it appears in.)
/home/mb/develop/git/drm/linux-core/savage_bci.c: In function ‘savage_driver_lastclose’:
/home/mb/develop/git/drm/linux-core/savage_bci.c:664: error: ‘DRM_MTRR_WC’ undeclared (first use in this function)

I looked at in-kernel drmP.h and it actually
has the same fix in it.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
2006-12-16 11:27:22 +01:00
Thomas Hellstrom 38ed67196f Remove the memory caches for fence objects and memory manager nodes,
since the support for memory caches has gone from 2.6.20.
2006-12-15 12:37:24 +01:00
Thomas Hellstrom f6d5fecdd2 Last minute changes to support multi-page size buffer offset alignments.
This will come in very handy for tiled buffers on intel hardware.
Also add some padding to interface structures to allow future binary backwards
compatible changes.
2006-10-27 11:28:37 +02:00
Thomas Hellstrom e09544a2d3 New mm function names. Update header. 2006-10-26 21:20:34 +02:00
Thomas Hellstrom d70347bfc0 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm 2006-10-19 17:07:26 +02:00
Thomas Hellstrom e22b04f807 Merging drm-ttm-0-2-branch
Conflicts:

	linux-core/drmP.h
	linux-core/drm_drv.c
	linux-core/drm_irq.c
	linux-core/drm_stub.c
	shared-core/drm.h
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2006-10-18 17:33:19 +02:00
Thomas Hellstrom e172945d66 Avoid driver-specific AGP user-populated types, since we don't know what AGP
driver we're on.
Avoid global cache flushes before inserting pages.
In general, they are never mapped, and not accessed through the kernel map, so
a cache flush should not be necessary. The exception is pages that are bound
cached. We might need a cache flush for those.
2006-10-18 16:54:17 +02:00
Thomas Hellstrom c34faf224b Remove max number of locked pages check and call, since
that is now handled by the memory accounting.
2006-10-17 20:03:26 +02:00
Thomas Hellstrom f22f89e6b3 Add vma list memory usage to memory accounting.
Use byte unit for /proc printout of memory usage for small sizes to be
able to detect memory allocation bugs more easily.
2006-10-17 19:52:34 +02:00
Thomas Hellstrom d515936ea7 Add memory usage accounting to avoid DOS problems. 2006-10-17 19:40:57 +02:00
Thomas Hellstrom 5443dbe35f Implement mm_lock and mm_unlock functions.
The mm_lock function is used when leaving vt. It evicts _all_ buffers.
Buffers with the DRM_BO_NO_MOVE attribute set will be guaranteed to
get the same offset when / if they are rebound.
2006-10-17 16:00:25 +02:00
Thomas Hellstrom db5c671e86 Remove the memory manager parameter from the put_block function, as this
makes the client code a lot cleaner. Prepare buffer manager for lock and
unlock calls.
2006-10-17 11:28:48 +02:00
Thomas Hellstrom 5881ce1b91 Extend generality for more memory types.
Fix up init and destruction code.
2006-10-17 11:05:37 +02:00
Dave Airlie 1bab514c0a remove config.h from build no longer exists kbuild does it 2006-10-14 23:38:20 +10:00
Thomas Hellstrom 10150df02b Simplify the AGP backend interface somewhat.
Fix buffer bound caching policy changing, Allow
on-the-fly changing of caching policy on bound buffers if the hardware
supports it.

Allow drivers to use driver-specific AGP memory types for TTM AGP pages.
Will make AGP drivers much easier to migrate.
2006-10-12 12:09:16 +02:00
Thomas Hellstrom f2db76e2f2 Big update:
Adapt for new functions in the 2.6.19 kernel.
Remove the ability to have multiple regions in one TTM.
   This simplifies a lot of code.
Remove the ability to access TTMs from user space.
   We don't need it anymore without ttm regions.
Don't change caching policy for evicted buffers. Instead change it only
   when the buffer is accessed by the CPU (on the first page fault).
   This tremendously speeds up eviction rates.
Current code is safe for kernels <= 2.6.14.
Should also be OK with 2.6.19 and above.
2006-10-11 13:40:35 +02:00
Thomas Hellstrom c58574c605 Use a nopage-based approach to fault in pfns. 2006-10-10 10:37:26 +02:00
Thomas Hellstrom cee659afb5 Get rid of all ugly PTE hacks. 2006-10-03 12:08:07 +02:00
George Sapountzis f3deef730d Bug 6242: [mach64] Use private DMA buffers, part #3.
Add DRM_PCI_BUFFER_RO flag for mapping PCI DMA buffer read-only. An additional
flag is needed, since PCI DMA buffers do not have an associated map.
2006-10-02 22:47:23 +03:00
Thomas Hellstrom a31046b873 Add a buffer object manager for TTM maps. 2006-10-02 14:03:15 +02:00
Michel Dänzer 67e88e5628 Hook up DRM_IOCTL_UPDATE_DRAW ioctl.
(cherry picked from 98a8950458 commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer 9810ec2737 Add support for tracking drawable information to core
Actually make the existing ioctls for adding and removing drawables do
something useful, and add another ioctl for the X server to update drawable
information. The only kind of drawable information tracked so far is cliprects.
(cherry picked from 29598e5253 commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer a7b8c8d523 Add support for interrupt triggered driver callback with lock held to DRM core.
(cherry picked from d817cc1f30 commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer 2735f9e290 Add support for secondary vertical blank interrupt to DRM core.
(cherry picked from ab351505f3 commit)
2006-09-29 12:55:08 +02:00
Thomas Hellstrom 3802f9adbf Fix buffer manager takedown error.
Prepare for the possibility to evict all buffers from vram / agp.
This will be used by the X server when, for example, switching vts.
2006-09-29 11:15:59 +02:00
Michel Dänzer 98a8950458 Hook up DRM_IOCTL_UPDATE_DRAW ioctl. 2006-09-28 15:41:35 +02:00
Michel Dänzer 29598e5253 Add support for tracking drawable information to core
Actually make the existing ioctls for adding and removing drawables do
something useful, and add another ioctl for the X server to update drawable
information. The only kind of drawable information tracked so far is cliprects.
2006-09-28 15:41:35 +02:00
Michel Dänzer d817cc1f30 Add support for interrupt triggered driver callback with lock held to DRM core. 2006-09-28 15:41:35 +02:00
Michel Dänzer ab351505f3 Add support for secondary vertical blank interrupt to DRM core. 2006-09-28 15:41:35 +02:00
Thomas Hellstrom 711f077b74 Allow for a driver to overload the ttm backend object methods. 2006-09-26 14:36:53 +02:00
Thomas Hellstrom 273eb7833d Add /proc filesystem buffer / fence object accounting.
Check for NULL pointer in the i915 flush handler.
Remove i915_sync_flush declaration.
2006-09-25 11:51:08 +02:00
Felix Kuhling 62f6ea2256 bug 5942: add stubs for drm_mtrr_add/del for non-MTRR configured linux 2006-09-22 03:46:54 +10:00
Thomas Hellstrom fa511a3ff5 Allow for 64-bit map handles of ttms and buffer objects. 2006-09-20 16:31:15 +02:00
Dave Airlie ef98a8e20d drm: put domain number back to 0, domain support is seriously fubar.. 2006-09-18 21:23:34 +10:00
Thomas Hellstrom f613022cee Allow a "native type" to be associated with a fence sequence.
In the intel case, we can associate a flush with a sequence.
2006-09-15 16:47:09 +02:00
Thomas Hellstrom 49fbeb339c Some bugfixes.
Change the fence object interface somewhat to allow some more flexibility.
Make list IOCTLS really restartable.
Try to avoid busy-waits in the kernel using immediate return to user-space with an -EAGAIN.
2006-09-15 11:18:35 +02:00
Thomas Hellstrom 191e284709 More bugfixes.
Disable the i915 IRQ turnoff for now since it seems to be causing problems.
2006-09-12 12:01:00 +02:00
Thomas Hellstrom 99acb79366 Various bugfixes. 2006-09-08 17:24:38 +02:00
Eric Anholt 55057660f0 Put the PCI device/vendor id in the drm_device_t.
This helps us unbreak FreeBSD DRM from the 965 changes.
2006-09-06 23:25:14 -07:00
Thomas Hellstrom 6042153968 Fence all unfenced buffers function. 2006-09-05 18:00:25 +02:00
Thomas Hellstrom a6b8e3eaf4 Make memory caches global so that they can be used with
multiple heads.
2006-09-04 16:57:20 +02:00
Thomas Hellstrom 11f51a9a87 Bugfixes,
Memory allocation optimizations.
Buffer manager takedown.
2006-09-01 15:41:55 +02:00
Thomas Hellstrom 44f6d08988 Validation and fencing. 2006-08-31 21:42:29 +02:00
Thomas Hellstrom 03c137c5f8 Remove the buffer manager mutex. Use dev->struct_mutex instead.
Add a function to free buffers on hold for destruction if their
  fence object has expired.
Add a timer to periodically call that function when there are
  buffers pending deletion.
2006-08-31 15:36:40 +02:00
Thomas Hellstrom ec8c79b79d More mapping synchronization.
libdrm validate and fencing functions.
2006-08-31 14:10:13 +02:00
Thomas Hellstrom 914a77a15a Buffer object binding.
Some code reordering.
2006-08-30 21:30:47 +02:00
Thomas Hellstrom d39055174b Remove the buffer object hint field and use it only
as an argument.
Validate stub.
2006-08-30 17:40:07 +02:00
Thomas Hellstrom e47a4fda2e Memory manager init and takedown. 2006-08-30 13:04:08 +02:00
Thomas Hellstrom 033bda07e9 Buffer object reply fill in.
Lindent of drm_bo.c drm_ttm.c
2006-08-30 09:57:35 +02:00
Thomas Hellstrom 23f01c9fe8 Checkpoint commit. Buffer object flags and IOCTL argument list. 2006-08-29 18:40:08 +02:00
Thomas Hellstrom 0dedfc2cd0 Checkpoint ttm addition to buffer objects. 2006-08-29 14:52:02 +02:00
Thomas Hellstrom 279e8d26c6 64-bit IOCTL integer (Michel Dnzer & Brian Paul) 2006-08-29 10:45:34 +02:00
Thomas Hellstrom 0d67356de4 Proper TTM dereferencing
Initial buffer object creation.
2006-08-28 16:36:37 +02:00
Thomas Hellstrom 05536a6478 Buffer object idle and mapping synchronization. 2006-08-28 13:51:39 +02:00
Thomas Hellstrom e181f594a4 Add a 64-bit drm unsigned type for 64-bit clean IOCTLS.
Conversion functions in drmP.h and xf86drm.c.
2006-08-28 09:49:09 +02:00
Thomas Hellstrom 4ddabd1562 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into drm-ttm-0-2-branch
Conflicts:

	linux-core/drmP.h
2006-08-28 09:28:10 +02:00
Dave Airlie 9b984b34e9 drm: lots of small cleanups and whitespace issues fixed up
remove a mach64 warning, align a lot of things from linux kernel
2006-08-28 11:31:43 +10:00
Dave Airlie 205c573e44 remove local copies of pci domain/bus/slot/num 2006-08-28 11:27:09 +10:00
Thomas Hellstrom ac26b51503 Have TTM create and reference ioctl call return the actual TTM size. 2006-08-27 19:45:38 +02:00
Thomas Hellstrom 65e7274008 ttm create / destroy / ref / unref ioctl. 2006-08-27 19:03:20 +02:00
Thomas Hellstrom 35c8ce6c29 ttm and buffer objects ioctl stubs. 2006-08-25 19:03:42 +02:00
Thomas Hellstrom 4c03030b12 Checkpoint commit
Buffer object code.
2006-08-25 18:05:35 +02:00
Thomas Hellstrom ca4e34e532 ttm code cleanup.
Fix the sleep-in-page-table-spinlock bug discovered by Dave Airlie
2006-08-22 11:19:53 +02:00