Commit Graph

3380 Commits (301be1dc9be8a83f5092417573967f35766227bc)

Author SHA1 Message Date
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
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
Alex Deucher a07c82183a RADEON: use DSTCACHE_CTLSTAT rather than RB2D_DSTCACHE_CTLSTAT
According to the hw guys, you should use DSTCACHE_CTLSTAT to flush
the 2D dst cache rather than RB2D_DSTCACHE_CTLSTAT.
2008-06-11 18:25:47 -04: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
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
Ian Romanick b535567ee9 xgixp: Remove dependency on TTM fences 2008-06-10 22:18:14 -07:00
Ian Romanick 4f3da2f200 xgi: Fix 64-bit kernel / 32-bit user issue. 2008-06-10 11:29:15 -07:00
Dave Airlie cdd0cb0ab3 ati_pcigart: split out the page insert function 2008-06-10 16:27:50 +10:00
Alex Deucher 4b8aecbde8 RADEON: Add untested support for RS400 chips
GART setup appears to work the same as RS480 chips.
Also RC4xx chips are actually RS400 based, not RS480 based.
2008-06-09 16:58:06 -04:00
Alex Deucher f6982b54c9 RADEON: switch IGP gart to use radeon_write_agp_base() 2008-06-09 16:28:35 -04:00
Robert Noland 63eb58040d Fix typo in i915_suspend
Reported by vehemens
2008-06-08 23:46:14 -04:00
Robert Noland 116870a908 I915 suspend/resume for FreeBSD 2008-06-08 13:56:14 -04:00
Dave Airlie d43f3cb097 r300/r500: add hier-z regs 2008-06-09 05:32:41 +10:00
Robert Noland 3b6ca4bf3f [FreeBSD] Rework ati_pcigart.c
This is mostly just a diff reduction with the linux version.
I'm not convinced that it will make anything better.
2008-06-08 02:00:48 -04:00
Robert Noland 96141bd33c [FreeBSD] We need to request busmastering support.
This seems to be the key to getting at least some radeon
cards working.  Most, if not all drivers need it enabled,
so just request it once the driver has attached.
2008-06-08 02:00:48 -04:00
Robert Noland 6d6921719c [FreeBSD] Incorporate vblank fixes for bsd. 2008-06-08 01:53:45 -04:00
Robert Noland ec3d996021 [FreeBSD] Forgot to call mtx_destroy on all the locks at unload. 2008-06-08 01:53:45 -04:00
Robert Noland 93c57ff4e5 [FreeBSD] Remove the locks in the vblank_disable_fn
They are recursive and causing panics with witness enabled.
2008-06-08 01:53:45 -04:00
Robert Noland fc74c2e9d6 [FreeBSD] Go back to using vbl_lock and move init/destroy to load/unload. 2008-06-08 01:53:45 -04: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 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
Dennis Kasprzyk 6905c7a29d radeon: Restore software interrupt on resume.
Fixes performance drop after suspend/resume on some systems.
2008-06-05 18:23:37 +02: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
Keith Packard 0903de0c8f Drop struct_mutex while waiting in drm_client_lock_take
struct_mutex cannot be held while blocking on DRM lock.
2008-06-03 21:49:57 -07:00
Eric Anholt 8a3b510405 Fix libdrm to actually include the new code instead of just building it. 2008-06-03 14:44:53 -07:00
Eric Anholt c4857429c7 Fix and hook up bufmgr code to the build. 2008-06-03 14:44:53 -07:00
Eric Anholt 6a9eb08a87 Import bufmgr code to libdrm. Not yet hooked up to the build. 2008-06-03 14:44:53 -07: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
Michel Dänzer d1dcb2b32e vblank: Special-case driver vblank counter going back by 1.
Turns out the radeon driver is affected by the same problem that prompted i915
to revert to less useful counter flipping at the end of the vblank interval. In
the long term, we can hopefully implement more reliable methods to achieve
counter flipping at the beginning of vblank, but otherwise this should be an
acceptable workaround.
2008-06-03 11:28:09 +02:00
Michel Dänzer 0144ebeb8a vblank: Don't return current sequence number and time if interrupted by signal. 2008-06-03 11:28:09 +02:00
Michel Dänzer 6b520005c6 Revert "don't copy back if an error was returned."
This reverts commit 6671ad1917.

The vblank ioctl needs to update the userspace parameters when interrupted by
a signal, which was prevented by this. Let's see if this breaks other ioctls...
2008-06-03 11:27:39 +02:00
Dave Airlie d5ae19ebcf drm: sg alloc should write back the handle to userspace 2008-06-03 12:44:06 +10:00
Dave Airlie f1e12d40af drm/ati_pcigart: use proper page mapping function
This should be pci_map_page not pci_map_single
2008-06-03 12:44:06 +10:00
Keith Packard 867c2bb461 [intel-gem] reloc_and_validate_object → object_bind_and_relocate
Just renaming this function and related parameters to match terminology used
elsewhere in the driver.
2008-06-02 12:37:10 -07:00
Keith Packard 1cb2940a25 [intel-gem] Propagate set_domain errors.
set_domain can block waiting for rendering to complete. If that process is
interrupted by a signal, it can return -EINTR. Catch this error in all
callers and correctly deal with the result.
2008-06-02 10:59:15 -07:00