Commit Graph

3835 Commits (129c8a11814741a997e3d039ab4be542d38e5ed8)

Author SHA1 Message Date
Eric Anholt df4ef348c8 Fix i915_wait_irq in the presence of interrupt masking.
In the short-circuit code for the breadcrumb already being new enough, we
need to update the sarea_priv copy of the breadcrumb just as if we had
waited.  Otherwise userland error checking will notice that we returned
too early based on its wrong information, and call wait_irq again (leading
to spinning until someone else comes along and updates the sarea_priv).

This bug was hidden when we had interrupt masking disabled, such as in
master, since the interrupt handler would update sarea_priv.
2008-06-13 10:47:33 -07:00
Eric Anholt e558e1d7da [gem] Catch -EINTR from blocking ioctls and restart them.
Thanks to Thomas Hellstrom for catching the issue, no thanks to the kernel
developer who authoritatively told me that they would get restarted on their
own.
2008-06-13 10:04:14 -07:00
Eric Anholt 0558d99c01 [gem] Remove the interrupt handler for retiring requests.
This was insufficient once we started masking interrupts to only when someone
was waiting for them (and would thus retire requests themselves).  It was
replaced by the retire_timer.
2008-06-13 09:54:14 -07:00
Eric Anholt c892e26bdf [gem] Don't require the lock in execbuf now that it's not needed for the ring. 2008-06-13 09:49:05 -07:00
Eric Anholt 100d6f3f83 Bump libdrm version to 2.4.0.
We need a version to depend on from the other components that require GEM and
the bufmgr code.  Some interfaces will be removed before the 2.4.0 release.
2008-06-12 13:22:40 -07:00
Eric Anholt cc74ac3590 Don't clear USER_INTERRUPT if we're not handling it.
This fixes a regression from commit d434b64f6a
which could cause us to fail to wake up for user interrupts if we lost a race.
2008-06-12 10:56:37 -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
Jesse Barnes 4a2e29bf99 Use GEM in modesetting
Use GEM for ring buffer setup and framebuffer allocation.  This means reworking
the hardware status page stuff a bit (just use the basic range allocator for
vram for now) and #ifdef'ing out the TTM & DRI2 code.  Works well enough to
load/unload several times and display fbcon on my T61 (though there's still
some unexplained console corruption).
2008-06-11 15:59:01 -07:00
Eric Anholt 57b4c4c32d Move the renaming of mm.c symbols to #defines in the header.
This reduces the diff from Mesa and reduces the illegibility of what I did.
2008-06-11 15:58:33 -07:00
Eric Anholt 846d792ac1 [gem] Another round of cleanups from checkpatch.pl 2008-06-11 15:51:17 -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
Eric Anholt 2a35d857b3 Remove override of drm module list in preparation for merge. 2008-06-11 12:20:56 -07:00
Eric Anholt dac3bcb414 [gem] Remove carefully-sprinkled i915_kernel_lost_context().
They are not unnecessary since the kernel's the only thing touching the ring.
2008-06-11 11:28:20 -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 62a3be962f [intel] Fix BUG_ON trigger in irq masking if you did on/off with irqs disabled. 2008-06-10 23:11:09 -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
Jesse Barnes c987e76d95 Add EDID quirk handling
Port over EDID quirks from X.Org so we can handle more monitors.  This meant
adding size info to the drm_display_mode struct, but other than that the
changes were isolated to the DRM EDID handling code (as they should be).
2008-06-09 16:20:45 -07:00
Eric Anholt 500c81d194 [gem] Don't forget to munmap in the non-bo-reuse object-freeing case. 2008-06-06 17:13:16 -07:00
Keith Packard c2fc142ea7 [intel] remove settable use_mi_batchbuffer_start
The driver can know what hardware requires MI_BATCH_BUFFER vs
    MI_BATCH_BUFFER_START; there's no reason to let user mode configure this.
2008-06-06 21:54:38 +01:00
Keith Packard 6cd0ef06a6 [intel] remove settable use_mi_batchbuffer_start
The driver can know what hardware requires MI_BATCH_BUFFER vs
MI_BATCH_BUFFER_START; there's no reason to let user mode configure this.
2008-06-06 13:26:03 -07:00
Keith Packard 9f46c6935d [intel-gem] Use timers to retire requests periodically.
Without the user IRQ running constantly, there's no wakeup when the ring
empties to go retire requests and free buffers. Use a 1 second timer to make
that happen more often.
2008-06-06 13:00:47 -07:00
Keith Packard a708106c77 [intel] free the hardware status page at driver_unload
This goes with the other hardware status page patch.
2008-06-06 13:00:46 -07:00
Keith Packard 56a96841d0 [intel-gem] Add explicit throttle ioctl
Instead of throttling and execbuffer time, have the application ask to
throttle explicitly. This allows the throttle to happen less often, and
without holding the DRM lock.
2008-06-06 13:00:46 -07:00
Keith Packard 329e086225 [libdrm/intel] Eliminate extra dri_gem_bo_bucket_entry structure
Place the buffer reuse links right into the dri_bo_gem object.
2008-06-06 13:00:46 -07:00
Keith Packard 5a55b48a41 [libdrm/intel] Remove unused intel_validate_entry structure 2008-06-06 13:00:46 -07:00
Keith Packard a919ff5d5e [libdrm/intel] Reuse entire dri_bo_gem structure
The code was discarding the dri_bo_gem structure and saving only the kernel
handle. This lost the mmap address, causing pain when the next buffer user
wanted to map the buffer.
2008-06-06 13:00:46 -07:00
Keith Packard 5f5badb26f [intel] Allocate hardware status page at driver load time
I couldn't get the re-allocated HWS to work on my 965GM, so I just gave up
and made it persist across the lifetime of the driver instead.
2008-06-06 13:00:46 -07:00
Keith Packard 84162ccb7d Ignore X server provided mmio address 2008-06-06 13:00:46 -07:00
Keith Packard 118baeee18 [intel-gem] Dump error status on wait_request failure 2008-06-06 13:00:46 -07:00
Dave Airlie 6d4ffd12cd drm: fix up fb resize again 2008-06-06 16:24:27 +10:00
Dave Airlie 00bb548c61 intel: don't set the mode on the framebuffer if isn't set to scanout our framebuffer 2008-06-06 15:38:53 +10:00
Dave Airlie ec774e4d72 Merge remote branch 'origin/modesetting-101' into modesetting-101-fb 2008-06-06 15:21:57 +10:00
Dave Airlie be501f00a3 intelfb: add multi fb paths 2008-06-06 15:21:22 +10:00
Dave Airlie e6a3a1fdad intelfb: remove duplicate define 2008-06-06 14:55:03 +10:00
Dave Airlie fc08877b17 intelfb: admit fbdev is crap and punt on trying to resize to a larger fbdev. 2008-06-06 14:53:34 +10:00
Dave Airlie 8387a232a3 intelfb: move mode sets into the intel crtcs
better place to store them.
2008-06-06 12:02:51 +10:00
Dave Airlie 25c1bb334f drm/intel: make hotplug just be an event 2008-06-06 10:39:58 +10:00
Dave Airlie 5f94172f81 intel: if no spare crtc exists don't just take one. 2008-06-06 10:31:36 +10:00
Jesse Barnes 03bf1fba67 sysfs registration/teardown fixups
A check in drm_sysfs_connector_remove was supposed to allow it to be called
even with unregistered objects, to make cleanup paths a little simpler.
However, device_is_regsitered didn't always seem to return what we thought it
would, so we'd sometimes end up leaving objects lying around rather than
unregistering them.

Fix this situation up by requiring devices to be registered before being
removed.  Any problems resulting from this change should be easier to track
down than the alternative (which is leaving kobjects registered after unload).
2008-06-05 15:58:43 -07:00
Eric Anholt d198e9b091 Add a function to bufmgr_fake to evict all buffers in the GTT.
This will be used by the X Server for VT switch.
2008-06-05 08:45:39 -07:00
Dave Airlie d9ead89c79 drm/modeset: add more debugging and fixup some fb enable/disabe bits 2008-06-05 16:32:41 +10:00
Dave Airlie b31adb005a drm/modesetting: more fb interface cleanups 2008-06-05 15:55:03 +10:00
Dave Airlie efcf066eff drm/modesetting: attempt to make fb code more sane 2008-06-05 15:21:07 +10: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 56a1293184 modesetting: fix fb clearing up 2008-06-05 11:43:48 +10:00
Dave Airlie 1495dd31d6 modesetting: use surface width height for buffer allocs 2008-06-05 11:24:57 +10:00
Dave Airlie 1d980669e6 modesetting: add surface width/heights 2008-06-05 11:20:52 +10:00
Dave Airlie 967bd21911 modesetting: initial attempt at debonging fb 2008-06-05 11:11:22 +10:00
Jesse Barnes e90716671d i915: use kzalloc to allocate intel_output for lvds
Better to initialize all the struct fields to 0.  Also more consistent with
other output init routines.
2008-06-04 12:50:03 -07:00