summaryrefslogtreecommitdiff
path: root/shared-core/i915_dma.c
AgeCommit message (Collapse)Author
2007-12-11Allow relocation to be skipped when buffers don't move.Keith Packard
One of the costs of superioctl has been the need to perform relocations inside the kernel. The cost of mapping the buffers to the CPU and writing data is fairly high, especially if those buffers have been mapped and read by the GPU. If we assume that buffers don't move around very often, we can have the client compute the relocations itself using the previous GPU address. When that object doesn't move, the kernel can skip computing and writing the updated data. Here's a patch which adds a new field to struct drm_bo_info_req called 'presumed_offset', and a new DRM_BO_HINT_PRESUMED_OFFSET that is set when this field has been filled in by the client. There are two separate optimizations performed when the presumed_offset is correct: 1. i915_exec_reloc checks to see if all previous buffer offsets were guessed correctly. If so, there's no need for it to look at *any* of the relocations for a buffer. When this happens, it skips the whole relocation process, simply returning success. 2. i915_apply_reloc checks to see if the target buffer offset was guessed correctly. If so, it skips mapping the relocatee, computing the relocation and writing the value. If no relocations are needed, the relocatee should never be mapped to the CPU, and so the kernel shouldn't need to wait for any fences to pass.
2007-12-11Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/drm into ↵Dave Airlie
modesetting-101 Conflicts: linux-core/drm_drv.c shared-core/drm.h shared-core/i915_dma.c
2007-12-05Remove references to the sarea_priv perf_boxes field.Kristian Høgsberg
This field isn't touched or read by any other code in the stack so it's time to retire these last few references.
2007-12-01Clarify order of operationsRobert Noland
2007-12-01DRM_DEBUG already prints the function name.Robert Noland
2007-12-01drm: Add _DRM_DRIVER map flag.Robert Noland
This flag indicates that the driver is responsible for the map.
2007-11-29Beside the emitted warning, the added cast (u64 -> unsigned) strips outJiri Slaby
part of address on 64 bit. Cast to unsigned long instead. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2007-11-29drm: more cleanupsDave Airlie
2007-11-28i965: oops force mi batchbuffer startDave Airlie
2007-11-22Merge branch 'origin' into modesetting-101Dave Airlie
Conflicts: linux-core/drmP.h shared-core/i915_dma.c shared-core/i915_drm.h shared-core/radeon_drv.h
2007-11-22drm: major whitespace/coding style realignment with kernelDave Airlie
2007-11-19Fix capitalization of __linux__ define.Eric Anholt
2007-11-18Bug #13233: Fix build on FreeBSD.Robert Noland
2007-11-15intel: add flushing for i8xx chipsets.Dave Airlie
Add a nut vs hammer style chipset flush for the i8xx chipsets - reenable TTM code paths
2007-11-09i915: cleanup pageflip derefs sarea even if no sarea existsDave Airlie
2007-11-07i915: oops disable TTM is backwardsDave Airlie
2007-11-06Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into ↵Thomas Hellstrom
modesetting-101 Conflicts: linux-core/Makefile.kernel shared-core/i915_dma.c shared-core/i915_drv.h shared-core/i915_irq.c
2007-11-06i915: disable TTM on 8xx chips for now until flushing is solvedDave Airlie
2007-11-05Merge branch 'master' into modesetting-101Thomas Hellstrom
Conflicts: linux-core/drm_bufs.c shared-core/i915_dma.c shared-core/i915_drv.h shared-core/i915_irq.c
2007-11-05drm: remove lots of spurious whitespace.Dave Airlie
Kernel "cleanfile" script run.
2007-11-01Merge branch 'master' into modesetting-101Jesse Barnes
Conflicts: linux-core/Makefile.kernel linux-core/drm_stub.c linux-core/i915_drv.c shared-core/i915_dma.c shared-core/i915_drv.h Fixup suspend/resume conflicts (basically use what's in DRM master for now). Also fix up a few other conflicts that snuck in (i915_dma changes etc.).
2007-10-31drm: add chipset flushing via agp supportDave Airlie
2007-10-31i915: add backwards compat chipset flushing codeDave Airlie
2007-10-26i915: suspend/resume supportJesse Barnes
Add suspend/resume support to the i915 driver. Moves some of the initialization into the driver load routine, and fixes up places where we assumed no dev_private existed in some of the cleanup paths. This allows us to suspend/resume properly even if X isn't running.
2007-10-25Merge branch 'master' into modesetting-101Thomas Hellstrom
Conflicts: linux-core/Makefile.kernel linux-core/drm_bo.c linux-core/drm_objects.h
2007-10-25Merge branch 'master' into drm-ttm-finalizeThomas Hellstrom
2007-10-25i915: relocate buffers before validation add memory barrier between twoDave Airlie
2007-10-25i915: remove relocatee kernel mapping sooner stops mutex taking during sleepDave Airlie
2007-10-24Fix missing \n on some DRM_ERROR in i915_dma.cEric Anholt
2007-10-24i915: use a drm memory barrier defineDave Airlie
2007-10-23Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into ↵Alan Hourihane
modesetting-101
2007-10-23i915: require mfence before submitting batchbufferDave Airlie
2007-10-22A cmdbuf mutex to implement validate-submit-fence atomicity in the absenceThomas Hellstrom
of a hardware lock.
2007-10-22i915: split reloc execution into separate functionDave Airlie
2007-10-21Adapt i915 super-ioctl for lock-free operation.Thomas Hellstrom
2007-10-20Simple replacement for hardware lock in some cases.Thomas Hellstrom
Fix i915 since last commit.
2007-10-17Fix a crash on X startupAlan Hourihane
2007-10-17i915: lock struct mutex about buffer object lookupsDave Airlie
2007-10-16Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into ↵Alan Hourihane
modesetting-101 Conflicts: linux-core/drm_bo.c linux-core/drm_objects.h shared-core/i915_dma.c shared-core/i915_drv.h
2007-10-12i915: add superioctl support to i915Dave Airlie
This adds the initial i915 superioctl interface. The interface should be sufficent even if the implementation may needs fixes/optimisations internally in the drm wrt caching etc.
2007-09-28Revert drm_i915_flip_t braindamageJesse Barnes
I should not have renamed this field. I should not have renamed this field. I should not have renamed this field. On the plus side, it was at least binary compatible.
2007-09-24Merge branch 'master' into modesetting-101 - TTM & typedef removalJesse Barnes
Conflicts: linux-core/drmP.h linux-core/drm_bo.c linux-core/drm_drv.c linux-core/drm_objects.h shared-core/drm.h shared-core/i915_dma.c shared-core/i915_drv.h shared-core/i915_irq.c Mostly removing typedefs that snuck into the modesetting code and updating to the latest TTM APIs. As of today, the i915 driver builds, but there are likely to be problems, so debugging and bugfixes will come next.
2007-09-11Disambiguate planes & pipes for swap operationsJesse Barnes
This mod makes the SAREA track plane to pipe mappings and corrects the name of the plane info variables (they were mislabeled as pipe info since until now all code assumed a direct mapping between planes and pipes). It also updates the flip ioctl argument to take a set of planes rather than pipes, since planes are flipped while pipes generate vblank events.
2007-08-11i915: i965 non-secure batchbuffer bit has moved.Dave Airlie
2007-07-20Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.Eric Anholt
The data is now in kernel space, copied in/out as appropriate according to the This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal with those failures. This also means that XFree86 4.2.0 support for i810 DRM is lost.
2007-07-20Replace filp in ioctl arguments with drm_file *file_priv.Eric Anholt
As a fallout, replace filp storage with file_priv storage for "unique identifier of a client" all over the DRM. There is a 1:1 mapping, so this should be a noop. This could be a minor performance improvement, as everything on Linux dereferenced filp to get file_priv anyway, while only the mmap ioctls went the other direction.
2007-07-20Remove DRM_ERR OS macro.Eric Anholt
This was used to make all ioctl handlers return -errno on linux and errno on *BSD. Instead, just return -errno in shared code, and flip sign on return from shared code to *BSD code.
2007-07-19Merge branch 'origin'Eric Anholt
2007-07-18fix some missing whitespace/tabDave Airlie
2007-07-16Fix FreeBSD build.Eric Anholt