summaryrefslogtreecommitdiff
path: root/shared-core/i915_dma.c
AgeCommit message (Collapse)Author
2009-02-27Move vblank_init to driver load time.Robert Noland
2009-02-25i915: Backport jbarnes gm45 vblank counter patch.Robert Noland
2009-02-24i915: This was part of a sync to the intel driver at some pointRobert Noland
-Remove the old TTM interface -Move register definitions to i915_reg.h -Rework the irq handler
2009-02-23i915: Rip out the use of vblank_swapRobert Noland
2008-12-10Revert "Merge branch 'modesetting-gem'"Jesse Barnes
This reverts commit 6656db10551bbb8770dd945b6d81d5138521f208. We really just want the libdrm and ioctl bits, not all the driver stuff.
2008-11-13Merge branch 'master' into modesetting-gemJesse Barnes
Conflicts: libdrm/Makefile.am libdrm/intel/intel_bufmgr.h libdrm/intel/intel_bufmgr_fake.c libdrm/intel/intel_bufmgr_gem.c shared-core/drm.h shared-core/i915_dma.c shared-core/i915_irq.c shared-core/radeon_cp.c shared-core/radeon_drv.h
2008-10-27i915: Since FreeBSD doesn't have gem support yet, don't advertise it.Robert Noland
This allows us to not crash X when using newer Intel ddx drivers.
2008-10-25drm/i915: fix ioremap of a user address for non-root (CVE-2008-3831)Matthias Hopf
Olaf Kirch noticed that the i915_set_status_page() function of the i915 kernel driver calls ioremap with an address offset that is supplied by userspace via ioctl. The function zeroes the mapped memory via memset and tells the hardware about the address. Turns out that access to that ioctl is not restricted to root so users could probably exploit that to do nasty things. We haven't tried to write actual exploit code though. It only affects the Intel G33 series and newer.
2008-09-30Merge remote branch 'origin/master' into modesetting-gemDave Airlie
Conflicts: libdrm/Makefile.am libdrm/dri_bufmgr.h linux-core/drm_irq.c linux-core/drm_sysfs.c linux-core/drm_ttm.c shared-core/i915_dma.c shared-core/i915_irq.c shared-core/nouveau_drv.h shared-core/radeon_cp.c
2008-09-06[FreeBSD] Ensure that drm_pci_alloc is never called while locks are held.Robert Noland
2008-09-05i915: fix i915_ring_validate()Robert Noland
2008-08-24i915: Fix i915 build on FreeBSDRobert Noland
ifdef out all the gem stuff for now. Also, the msi stuff isn't portable the way it is... I'll try and fix that up sometime soon.
2008-08-24i915: Clear sarea_priv during lastclose.Robert Noland
sarea_priv needs to be NULL before i915_initialized is called to properly reset it. The stale value produces a panic any time something opens/closes drm without calling initialize. i.e. version checking
2008-08-24i915: Free dev->dev_private on unload.Robert Noland
2008-08-24i915: Move spinlock init / destroy to load / unload time.Robert Noland
This resolves the panic on FreeBSD during VT switch, without attempting any of the more lofty goals for the time being.
2008-08-14i915: fixup from last merge hopefullyDave Airlie
2008-08-14Merge branch 'radeon-gem-cs' into modesetting-gemDave Airlie
Conflicts: libdrm/xf86drm.c linux-core/Makefile.kernel linux-core/drmP.h linux-core/drm_compat.h linux-core/drm_drv.c linux-core/drm_stub.c linux-core/drm_vm.c shared-core/i915_dma.c shared-core/r300_cmdbuf.c shared-core/radeon_drv.h
2008-08-08Merge branch 'drm-gem'Eric Anholt
Conflicts: shared-core/i915_dma.c This brings in kernel support and userland interface for intel GEM.
2008-08-01Merge commit 'origin/drm-gem' into modesetting-gemKristian Høgsberg
Conflicts: linux-core/Makefile.kernel linux-core/drmP.h linux-core/drm_mm.c linux-core/drm_stub.c linux-core/i915_gem.c linux-core/i915_opregion.c shared-core/i915_dma.c shared-core/i915_drv.h shared-core/i915_irq.c
2008-08-01Revert "i915: Move all of the irq install/uninstall to load time."Dave Airlie
This reverts commit 965a72202b439068e62ac341990f51953457b202. Please re-do over properly
2008-07-31Merge commit 'origin/master' into modesetting-gemKristian Høgsberg
Conflicts: linux-core/Makefile.kernel linux-core/ati_pcigart.c linux-core/drm_compat.h linux-core/drm_irq.c linux-core/drm_lock.c linux-core/i915_drv.c shared-core/i915_dma.c shared-core/i915_drv.h shared-core/i915_irq.c shared-core/nouveau_mem.c shared-core/radeon_cp.c shared-core/radeon_drv.h
2008-07-31drm: userspace rip out TTM APIDave Airlie
2008-07-31TTM: remove API and userspace objects.Dave Airlie
This removes all the TTM userspace API and all userspace objects. It also removes the drm_bo_lock.c code
2008-07-30intel-gem: Replace version bump signalling GEM with I915_PARAM_HAS_GEM.Eric Anholt
2008-07-30i915: add version checks for opregion on old kernelsDave Airlie
2008-07-28Merge commit 'origin/master' into drm-gemEric Anholt
Conflicts: linux-core/Makefile.kernel shared-core/i915_dma.c shared-core/i915_drv.h shared-core/i915_irq.c
2008-07-23i915: Move all of the irq install/uninstall to load time.Robert Noland
This resolves a panic on FreeBSD which was caused by trying to re-initialize the swap lock. It's just much easier to initialize all of the locks at load time. It should also ensure that the vblank structures are available earlier.
2008-07-15This is a modified version of Hong's patch from last month, with a fewHong Liu
modifications to make it work correctly on my test hardware (altered the backlight write function, made it enable the legacy backlight controller interrupts on mobile hardware, sorted the interrupt function so we don't get an excessive number of vblank interrupts). This lets the backlight keys on my T61 work properly, though there's a 750msec or so delay between the request and the brightness actually changing - this sounds awfully like the hardware spinning waiting for a status flag to become ready, but as far as I can tell they're all set correctly. If anyone can figure out what's wrong here, it'd be nice to know. Some of the functions are still stubs and just tell the hardware that the request was successful. These can be filled in as kernel modesetting gets integrated. I think it's worth getting this in anyway, since it's required for backlight control to work properly on some new platforms. Signed-off-by: Matthew Garrett <mjg@redhat.com>
2008-07-11intel-gem: Add two new ioctls for managing tiling on objects.Eric Anholt
Various chips have exciting interactions between the CPU and the GPU's different ways of accessing interleaved memory, so we need some kernel assistance in determining how it works. Only fully tested on GM965 so far.
2008-07-07Merge commit 'origin/drm-gem' into ms-gemKristian Høgsberg
Conflicts: linux-core/drmP.h linux-core/drm_drv.c linux-core/drm_stub.c linux-core/i915_drv.c linux-core/i915_gem.c shared-core/i915_drv.h shared-core/i915_irq.c
2008-06-24i915: register definition & header file cleanupJesse Barnes
It would be nice if one day the DRM driver was the canonical source for register definitions and core macros. To that end, this patch cleans things up quite a bit, removing redundant definitions (some with different names referring to the same register) and generally tidying up the header file.
2008-06-20[intel-gem] Add DRM_IOCTL_I915_GEM_SW_FINISH to flag CPU writesKeith Packard
When a software fallback has completed, usermode must notify the kernel so that any scanout buffers can be synchronized. This ioctl should be called whenever a fallback completes to flush CPU and chipset caches.
2008-06-18Merge commit 'origin/drm-gem' into modesetting-gemJesse Barnes
Lots of conflicts, seems to load ok, but I'm sure some bugs snuck in. Conflicts: linux-core/drmP.h linux-core/drm_lock.c linux-core/i915_gem.c shared-core/drm.h shared-core/i915_dma.c shared-core/i915_drv.h shared-core/i915_irq.c
2008-06-16[linux] Use the device's irq for handler setup instead of stale dev->irq.Eric Anholt
This fixes registration when MSI is set up after the stub function fills in dev->irq. Otherwise /proc/interrupts would report attachment to the fasteoi interrupt. dev->irq is still exposed (and updated at IRQ setup) for the drivers that use it for whatever reason.
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] 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[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-11Use GEM in modesettingJesse Barnes
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[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-11Merge commit 'origin/drm-gem' into modesetting-gemJesse Barnes
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-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-10Merge commit 'origin/drm-gem' into modesetting-gemJesse Barnes
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-08I915 suspend/resume for FreeBSDRobert Noland
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] 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[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