summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-06-13[intel-gem] Left the last exec buffer pinned. oops.Keith Packard
Loop end variable 'pinned' was set one too low.
2008-06-13[intel-gem] Pin objects during execbufferKeith Packard
Pinning the objects avoids accidentally evicting them while binding other objects.
2008-06-13[intel-gem] throttle based on frames rather than time. Reduces jitter.Keith Packard
Record the last execbuffer sequence for each client. Record that sequence in the throttle ioctl as the 'throttle sequence'. Wait for the last throttle sequence in the throttle ioctl.
2008-06-13[intel-gem] evict_something was failing when wait_request freed objectsKeith Packard
When i915_wait_request clears object from the active list, it may end up freeing them and not moving them to the inactive list. This ends up unbinding objects from the GTT without there ever being new objects visible to i915_gem_evict_something on the inactive list. As the only success condition required the presence of objects on the inactive list, this would falsely assume that no GTT space had been made available, and end up returning -ENOMEM to the application.
2008-06-13[intel] Enable MSI for i915 IRQKeith Packard
2008-06-13[intel] Restructure irq to pend all work until after iir write.Keith Packard
The interrupt identity register must be writen before any work occurs lest we drop an interrupt on the floor. This patch just shuffles code around to make sure that IIR is written as early as possible.
2008-06-13[intel-gem] Use a delayed_work instead of a timer + work_structKeith Packard
We want request retirement to occur about once a second when the request queue is non-empty. This was done with a timer that queued a work_struct, using a delayed_work instead makes a lot more sense.
2008-06-13[intel-gem] Reorder i915_add_request to schedule work lastKeith Packard
i915_add_request was calling schedule_delayed_work before adding the request to the list; it makes more sense to do that last.
2008-06-13Use /bin/pwd instead of trusting shell built-inKeith Packard
2008-06-13Fix i915_wait_irq in the presence of interrupt masking.Eric Anholt
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[gem] Catch -EINTR from blocking ioctls and restart them.Eric Anholt
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[gem] Remove the interrupt handler for retiring requests.Eric Anholt
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[gem] Don't require the lock in execbuf now that it's not needed for the ring.Eric Anholt
2008-06-12Bump libdrm version to 2.4.0.Eric Anholt
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-12Don't clear USER_INTERRUPT if we're not handling it.Eric Anholt
This fixes a regression from commit d434b64f6a760d85295e32298a9a1f3624ee1b69 which could cause us to fail to wake up for user interrupts if we lost a race.
2008-06-11[gem] Remove the drm_client_lock_take in set_domain.Eric Anholt
We no longer need to use it to protect against shared ringbuffer access.
2008-06-11Move the renaming of mm.c symbols to #defines in the header.Eric Anholt
This reduces the diff from Mesa and reduces the illegibility of what I did.
2008-06-11[gem] Another round of cleanups from checkpatch.plEric Anholt
2008-06-11[gem] Move potentially device-specific ioctls to the intel driver.Eric Anholt
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-11Remove override of drm module list in preparation for merge.Eric Anholt
2008-06-11[gem] Remove carefully-sprinkled i915_kernel_lost_context().Eric Anholt
They are not unnecessary since the kernel's the only thing touching the ring.
2008-06-10[intel] Fix BUG_ON trigger in irq masking if you did on/off with irqs disabled.Eric Anholt
2008-06-10[gem] Manage the ringbuffer from the kernel in the GEM case.Eric Anholt
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-06[gem] Don't forget to munmap in the non-bo-reuse object-freeing case.Eric Anholt
2008-06-06[intel] remove settable use_mi_batchbuffer_startKeith Packard
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[intel-gem] Use timers to retire requests periodically.Keith Packard
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[intel] free the hardware status page at driver_unloadKeith Packard
This goes with the other hardware status page patch.
2008-06-06[intel-gem] Add explicit throttle ioctlKeith Packard
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[libdrm/intel] Eliminate extra dri_gem_bo_bucket_entry structureKeith Packard
Place the buffer reuse links right into the dri_bo_gem object.
2008-06-06[libdrm/intel] Remove unused intel_validate_entry structureKeith Packard
2008-06-06[libdrm/intel] Reuse entire dri_bo_gem structureKeith Packard
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[intel] Allocate hardware status page at driver load timeKeith Packard
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-06Ignore X server provided mmio addressKeith Packard
2008-06-06[intel-gem] Dump error status on wait_request failureKeith Packard
2008-06-05Add a function to bufmgr_fake to evict all buffers in the GTT.Eric Anholt
This will be used by the X Server for VT switch.
2008-06-03Drop struct_mutex while waiting in drm_client_lock_takeKeith Packard
struct_mutex cannot be held while blocking on DRM lock.
2008-06-03Fix libdrm to actually include the new code instead of just building it.Eric Anholt
2008-06-03Fix and hook up bufmgr code to the build.Eric Anholt
2008-06-03Import bufmgr code to libdrm. Not yet hooked up to the build.Eric Anholt
2008-06-02[intel-gem] reloc_and_validate_object → object_bind_and_relocateKeith Packard
Just renaming this function and related parameters to match terminology used elsewhere in the driver.
2008-06-02[intel-gem] Propagate set_domain errors.Keith Packard
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-05-30Merge commit 'origin/master' into drm-gemEric Anholt
Conflicts: linux-core/Makefile.kernel shared-core/i915_drv.h shared-core/nouveau_state.c
2008-05-30[intel-gem] Only update obj->write_domain if we're actually changing it.Eric Anholt
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[intel-gem] Add an option to check GTT versus CPU coherency at execbuf time.Eric Anholt
2008-05-30r500: attempt to make AGP work by programming agp base in the MC correctlyDave Airlie
2008-05-29[intel-gem] Write the presumed_offset back out after updating it.Eric Anholt
Otherwise, 965 constant state buffers get re-relocated every exec. Ouch.
2008-05-28[intel-gem] Clean up active/inactive/flushing list debugging.Keith Packard
2008-05-28radeon: split microcode out into a separate header file.Dave Airlie
2008-05-27[intel-gem] Replace idlelock usage with real lock acquisition.Eric Anholt
2008-05-28i915: fix BSD bh, DRI2 not uses anywhere elseDave Airlie