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
Robert Noland
416754f1cc
[FreeBSD] Declare vblank_disable_fn callout MPSAFE.
2008-06-01 20:33:30 -07:00
Robert Noland
4ce47fd328
[FreeBSD] Get rid of vbl_lock and re-use irq_lock.
2008-06-01 20:33:30 -07:00
Robert Noland
ac4da86928
[FreeBSD] Add symlink for radeon_microcode.h
2008-06-01 12:07:54 -07:00
Robert Noland
2186f9f6ef
[FreeBSD] Call drm_vblank_cleanup during irq uninstall
...
I needed to re-arrange some functions for this.
Also needed to call DRM_SPINUNINIT on the vbl_lock during cleanup.
2008-06-01 12:07:54 -07:00
Alex Deucher
a12cbf8aa5
RADEON: fix typo in last commit
2008-05-30 18:20:01 -04:00
Eric Anholt
461bfa3da6
Merge commit 'origin/master' into drm-gem
...
Conflicts:
linux-core/Makefile.kernel
shared-core/i915_drv.h
shared-core/nouveau_state.c
2008-05-30 14:42:08 -07:00
Eric Anholt
50bce2bc62
[intel-gem] Only update obj->write_domain if we're actually changing it.
...
The problem was revealed where on 965, the display list vertex buffer would see:
create -> (CPU, CPU)
set_domain (CPU, CPU) -> (CPU, CPU)
set_comain (CPU, 0) -> (CPU, 0) (no clflush occurred)
execbuf (GPU, 0) -> (CPU+GPU, 0) (still no clflush)
instead of:
create -> (CPU, CPU)
set_domain (CPU, CPU) -> (CPU, CPU)
set_comain (CPU, 0) -> (CPU, CPU)
execbuf (GPU, 0) -> (CPU+GPU, 0) (clflushed)
2008-05-30 13:47:34 -07:00
Eric Anholt
4f92ed3427
[intel-gem] Add an option to check GTT versus CPU coherency at execbuf time.
2008-05-30 12:42:48 -07:00
Dave Airlie
6e8a2cff66
r500: attempt to make AGP work by programming agp base in the MC correctly
2008-05-30 20:27:31 +10:00
Eric Anholt
3b1e4e6dc3
[intel-gem] Write the presumed_offset back out after updating it.
...
Otherwise, 965 constant state buffers get re-relocated every exec. Ouch.
2008-05-29 12:53:21 -07:00
Keith Packard
19ff3366e4
[intel-gem] Clean up active/inactive/flushing list debugging.
2008-05-28 23:56:31 -07:00
Dave Airlie
5b86823fa3
radeon: split microcode out into a separate header file.
2008-05-28 11:12:57 +10:00
Eric Anholt
e10502002f
[intel-gem] Replace idlelock usage with real lock acquisition.
2008-05-27 18:03:18 -07:00
Dave Airlie
0c8a8db1b6
i915: fix BSD bh, DRI2 not uses anywhere else
2008-05-28 10:28:13 +10:00
Dave Airlie
c06096d34f
radeon: bump release date/version for r500 3D support
2008-05-28 10:02:20 +10:00
Alex Deucher
59c953245c
RADEON: add get_param for number of GB pipes
2008-05-27 18:34:33 -04:00
Owain Ainsworth
df127c303d
[BSD] Move unlock in drm_vm.c from accidental platform #ifdeffing.
...
Also remove an unreachable unlock.
2008-05-27 15:12:35 -07:00
Owain Ainsworth
cc7ad27fe4
[BSD] Fix lock leak in drm_update_draw malloc failure path.
2008-05-27 15:11:25 -07:00
Owain Ainsworth
9a2ae28fbe
[BSD] Fix lock leaks in error paths in drm_bufs.c.
2008-05-27 15:07:04 -07:00
Owain Ainsworth
200ac59573
[BSD] Remove superfluous recursive locking in drm_add_magic.
2008-05-27 14:59:38 -07:00
Jie Luo
e45f95a03b
[i915] Fix typo in (unused) START_ADDR definition.
2008-05-27 14:55:01 -07:00
Robert Noland
8cd045079e
[FreeBSD] Add vblank-rework support and get drivers building.
...
The i915 driver now works again.
2008-05-27 14:25:20 -07:00
Eric Anholt
ad8eb0ed01
[FreeBSD] Convert from drm_device_t to struct drm_device for consistency.
2008-05-27 14:25:08 -07:00
Keith Packard
1f4e36081b
[intel-gem] Must hold DRM lock while setting object domain
...
Object domain transfer can involve adding flush ops to the request queue,
and so the DRM lock must be held to avoid having the X server smash pointers
badly.
2008-05-26 17:41:46 -07:00
Keith Packard
d434b64f6a
[i915] leave interrupts masked off when not in use.
...
The interrupt enable register cannot be used to temporarily disable
interrupts, instead use the interrupt mask register.
Note that this change means that a pile of buffers will be left stuck on the
chip as the final interrupts will not be recognized to come and drain things.
2008-05-26 03:25:16 -07:00
Keith Packard
7cf3fd29fe
[intel-gem] Add DRM_I915_GEM_BUSY ioctl to check for idle buffers.
...
This new ioctl returns whether re-using the buffer would force a wait.
2008-05-25 20:45:20 -07:00