Commit Graph

437 Commits (d70d60529f77ec73322be7b887fd6a3faf133bce)

Author SHA1 Message Date
Thomas Hellstrom 9a33f62be1 drm: Strip old ttm.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-06-22 23:37:06 +02:00
Pekka Paalanen 62f4344c98 drm: drop Linux < 2.6.16 support
Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-03-02 22:35:23 +02:00
Pekka Paalanen b47de8d5a3 drm: drop Linux < 2.6.12 support
Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-03-02 22:09:26 +02:00
Pekka Paalanen 9e8591dbdb drm: build fix for Linux drm_vblank_cleanup()
The commit 957b10695b, "Move vblank_init
to driver load time." forgot to add the function declaration in
linux-core/drmP.h.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-02-28 16:09:56 +02:00
Robert Noland 04d94197e6 linux: Add msi_enabled to the drm_device so the build should be happy. 2009-02-24 12:59:08 -06:00
Jesse Barnes 9583c099b4 Revert "Merge branch 'modesetting-gem'"
This reverts commit 6656db1055.

We really just want the libdrm and ioctl bits, not all the driver
stuff.
2008-12-10 15:50:22 -08:00
Dave Airlie 2d4420c666 Merge branch 'radeon-gem-cs' into modesetting-gem
Conflicts:

	libdrm/xf86drm.c
	linux-core/Makefile.kernel
	linux-core/drmP.h
	linux-core/drm_compat.h
	linux-core/drm_drv.c
	linux-core/drm_stub.c
	linux-core/drm_vm.c
	shared-core/i915_dma.c
	shared-core/r300_cmdbuf.c
	shared-core/radeon_drv.h
2008-08-14 09:36:34 +10:00
Dave Airlie 717dd804d0 drm: fixup master code to use krefs 2008-08-04 14:54:32 +10:00
Kristian Høgsberg 086716c8e2 Merge commit 'origin/drm-gem' into modesetting-gem
Conflicts:
	linux-core/Makefile.kernel
	linux-core/drmP.h
	linux-core/drm_mm.c
	linux-core/drm_stub.c
	linux-core/i915_gem.c
	linux-core/i915_opregion.c
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-08-01 13:35:56 -04:00
Kristian Høgsberg 5052e966ec Merge commit 'origin/master' into modesetting-gem
Conflicts:
	linux-core/Makefile.kernel
	linux-core/ati_pcigart.c
	linux-core/drm_compat.h
	linux-core/drm_irq.c
	linux-core/drm_lock.c
	linux-core/i915_drv.c
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
	shared-core/nouveau_mem.c
	shared-core/radeon_cp.c
	shared-core/radeon_drv.h
2008-07-31 15:18:32 -04:00
Dave Airlie 296073dc5f drm: remove object hash 2008-07-31 14:39:25 +10:00
Dave Airlie 9b8d71b5eb TTM: remove API and userspace objects.
This removes all the TTM userspace API and all userspace objects.

It also removes the drm_bo_lock.c code
2008-07-31 12:54:48 +10:00
Eric Anholt 689548b527 intel-gem: Remove dead field from reverted changes. 2008-07-30 11:29:32 -07:00
Eric Anholt 33c8e03787 Revert "Rename drm_mm.c and its fuctions to drm_memrange."
This reverts commit 3ad8db2071.

We ended up not needing that namespace, and I'd rather not have the churn
for producing diffs.
2008-07-30 11:25:34 -07:00
Eric Anholt 1d2bb68d28 Merge commit 'origin/master' into drm-gem
Conflicts:

	linux-core/Makefile.kernel
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-07-28 23:12:26 -07:00
Dave Airlie df9871064e radeon: add initial atombios modesetting and GEM -> TTM translation layer.
This is an initial import of the atom bios parser with modesetting support
for r500 hw using atombios. It also includes a simple memory manager
layer that translates a radeon GEM style interface onto TTM internally.

So far this memory manager has only been used for pinned object allocation
for the DDX to test modesetting.
2008-07-26 08:56:23 +10:00
Michel Dänzer 4be367b84b Reinstate dev->vblank_enabled[].
I incorrectly thought it was obsolete.
2008-07-21 11:48:04 +02:00
Michel Dänzer 205aff6a5c vblank-rework rework cleanups.
Remove some dead/obsolete code and make drm_update_vblank_count() static.
2008-07-21 08:16:55 +02:00
Michel Dänzer 014935b680 Remove obsolete dev->vblank_suspend[crtc] tests.
Caused drm_update_vblank_count() not to do its thing when called from
drm_modeset_ctl() -> drm_vblank_get().

The vblank functionality no longer needs to be suspended during a modeset, so
rename the field to vblank_inmodeset.
2008-07-21 08:13:45 +02:00
Jesse Barnes 2204f926ab Avoid incorrect vblank wakeups
The current code uses the hw vblank counter exclusively, which can lead
to wakeups during the active period rather than during the vblank period
if the hw counter counts displayed frames rather than vblank periods.

This change coverts the code over to using the counter while interrupts
are enabled, fixing that issue.  It also includes a couple of related
changes:  one to not enable the new enable/disable behavior until the
modeset ioctl is called (to preserve old client behavior) and another to
account for lost events due to mode setting with the new counter scheme.

BSD will require similar changes to its drm_irq.c code, but they should
be straightforward.
2008-07-17 13:55:24 -04:00
Dave Airlie abdd523c75 drm: add fix for PAT on radeon with 2.6.26 2008-07-15 16:18:22 +10:00
Kristian Høgsberg 3e02f7fd31 Merge commit 'origin/drm-gem' into ms-gem
Conflicts:

	linux-core/drmP.h
	linux-core/drm_drv.c
	linux-core/drm_stub.c
	linux-core/i915_drv.c
	linux-core/i915_gem.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-07-07 15:43:43 -04:00
Kristian Høgsberg 7fd8a5de63 Use lowercase bool constants. 2008-07-07 12:04:35 -04:00
Keith Packard 2bd9799e4c Add device-specific proc_init and proc_cleanup hooks
This allows device drivers to add proc files
2008-06-20 16:40:14 -07:00
Jesse Barnes 86accbcb34 Merge commit 'origin/drm-gem' into modesetting-gem
Lots of conflicts, seems to load ok, but I'm sure some bugs snuck in.

Conflicts:

	linux-core/drmP.h
	linux-core/drm_lock.c
	linux-core/i915_gem.c
	shared-core/drm.h
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-06-18 15:25:54 -07:00
Keith Packard a7139cb851 [intel-gem] show total GTT space in /proc/dri/*/gem_objects 2008-06-13 19:35:22 -07:00
Keith Packard 217beb9c8d [intel-gem] add gtt and pin counts to /proc/dri/*/gem_objects
Not quite portable, but these are useful for intel. Some more general
mechanism could be done...
2008-06-13 15:43:02 -07:00
Eric Anholt b2606e325a [gem] Remove the drm_client_lock_take in set_domain.
We no longer need to use it to protect against shared ringbuffer access.
2008-06-11 16:19:23 -07:00
Eric Anholt 2655005762 [gem] Move potentially device-specific ioctls to the intel driver.
This is the create (may want location flags), pread/pwrite/mmap
(performance tuning hints), and set_domain (will 32 bits be enough for
everyone?) ioctls.  Left in the generic set are just flink/open/close.

The 2D driver must be updated for this change, and API but not ABI is broken
for 3D.  The driver version is bumped to mark this.
2008-06-11 14:42:40 -07:00
Jesse Barnes f5412a944f Merge commit 'origin/drm-gem' into modesetting-gem
Use new GEM based ring buffer initialization.  Still need to init GEM & use it
for framebuffer allocation etc.

Conflicts:

	shared-core/i915_dma.c
	shared-core/i915_drv.h
2008-06-11 10:25:45 -07:00
Eric Anholt 2150da5d1a [gem] Manage the ringbuffer from the kernel in the GEM case.
This requires that the X Server use the execbuf interface for buffer
submission, as it no longer has direct access to the ring.  This is
therefore a flag day for the gem interface.

This also adds enter/leavevt ioctls for use by the X Server.  These would
get stubbed out in a modesetting implementation, but are required while
in an environment where the device's state is only managed by the DRM while
X has the VT.
2008-06-10 22:57:07 -07:00
Jesse Barnes a1d9600724 Merge commit 'origin/drm-gem' into modesetting-gem
Passed the compile test; it's ready to ship.

Conflicts:

	libdrm/Makefile.am
	linux-core/Makefile.kernel
	linux-core/drmP.h
	linux-core/drm_memrange.c
	linux-core/drm_stub.c
	shared-core/drm.h
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-06-10 17:31:54 -07:00
Dave Airlie f73e54bbf0 drm: modesetting unify the hotplug init paths a lot.
remove fb callbacks, just probe into the driver to sort it out
2008-06-05 13:40:08 +10:00
Dave Airlie 967bd21911 modesetting: initial attempt at debonging fb 2008-06-05 11:11:22 +10:00
Dave Airlie 76a44f14d6 drm/modesetting: overhaul the fb create/delete.
Move TTM code into the driver
2008-06-04 11:59:28 +10:00
Michel Dänzer ba7263b8c2 vblank: Don't wait or update the counter while the CRTC is supposedly disabled.
Without kernel modesetting, this requires cooperation of the userspace
modesetting driver. We may have to leave the vblank interrupt enabled otherwise
to avoid problems.
2008-06-03 11:28:10 +02:00
Michel Dänzer 237172b767 vblank: Clean up compensation for spurious wraparounds of driver counter.
Only compensate when the driver counter actually appears to have moved
backwards.

The compensation deltas need to be incremental instead of absolute; drop the
vblank_offset field and just use atomic_sub().
2008-06-03 11:28:10 +02:00
Dave Airlie 149b17311a drm: initial mode object groups.
This creates a default group attached to the legacy drm minor nodes.

It covers all the objects in the set. make set resources only return
objects for this set. Need to fix up other functions to only work on
objects in their allowed set.
2008-06-02 16:45:44 +10:00
Dave Airlie 9d38448ed3 modesetting: the great renaming.
Okay we have crtc, encoder and connectors.

No more outputs exposed beyond driver internals

I've broken intel tv connector stuff.
Really for TV we should have one TV connector, with a sub property for the
type of signal been driven over it
2008-05-30 15:10:04 +10:00
Eric Anholt e10502002f [intel-gem] Replace idlelock usage with real lock acquisition. 2008-05-27 18:03:18 -07:00
Hong Liu a51e38548c fix kernel oops when removing fb
drm_crtc->fb may point to NULL, f.e X server will allocate a new fb
and assign it to the CRTC at startup, when X server exits, it will destroy
the allocated fb, making drm_crtc->fb points to NULL.
2008-05-12 12:31:56 -07:00
Keith Packard ff39db099b [GEM] Make pread/pwrite manage memory domains. No luck with movnti though.
pread and pwrite must update the memory domains to ensure consistency with
the GPU. At some point, it should be possible to avoid clflush through this
path, but that isn't working for me.
2008-05-11 00:10:16 -07:00
Keith Packard 1e26ca44c9 [gem] API cleanup. allocate->create unreference->close name->flink
Make the API names a bit more consistent.
2008-05-09 12:18:09 -07:00
Jakob Bornecrantz 7bcbc443f4 i915: Changed intel_fb to use the new drm_crtc_set_config interface 2008-05-08 20:10:18 +02:00
Keith Packard 9af4c49743 [intel-gem] Move domains to relocation records. add set_domain ioctl.
Domain information is about buffer relationships, not buffer contents. That
means a relocation contains the domain information as it knows how the
source buffer references the target buffer.

This also adds the set_domain ioctl so that user space can move buffers to
the cpu domain.
2008-05-08 10:44:02 -07:00
Keith Packard 631e86c5c4 Start coding up memory domains 2008-05-06 14:43:49 -07:00
Eric Anholt dafe48e623 GEM: Replace drm_memrange_for_each with just evicting what we brought in.
I was wrong about how the data structure worked, and didn't care to fix it
to support debugging code.
2008-05-05 14:38:26 -07:00
Keith Packard b6f173c430 Add i915_dispatch_gem_execbuffer (broken).
This function submits a gem-based execbuffer to the ring.
It doesn't work yet.
2008-05-05 10:51:49 -07:00
Keith Packard ab3549d133 Add a bit of /proc/dri/*/gem support. Clean up some refcount/pagelock issues.
Track named objects in /proc/dri/0/gem_names.
Track total object count in /proc/dri/0/gem_objects.
Initialize device gem data.
return -ENODEV for gem ioctls if the driver doesn't support gem.
Call unlock_page when unbinding from gtt.
Add numerous misssing calls to drm_gem_object_unreference.
2008-05-02 16:34:16 -07:00
Keith Packard 39e20bcd5f Add name/open ioctls, separate handle and pointer ref counts.
Names are just another unique integer set (from another idr object).
Names are removed when the user refernces (handles) are all destroyed --
this required that handles for objects be counted separately from
internal kernel references (so that we can tell when the handles are all
gone).
2008-05-02 12:29:17 -07:00