summaryrefslogtreecommitdiff
path: root/linux-core
AgeCommit message (Collapse)Author
2008-07-07Add back flink, open and close ioctls.Kristian Høgsberg
They fell through the cracks in 86accbcb.
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-07-07Use lowercase bool constants.Kristian Høgsberg
2008-06-24[intel-gem] Include drm_compat.h to get kmap_atomic_prot_pfnKeith Packard
2008-06-24drm_compat: it's CONFIG_HIGHMEM, not CONFIG_HIMEMKeith Packard
A mis-spelled config option (was it spelled that way in the past?) eliminated kmap_atomic_prot_pfn from core DRM.
2008-06-24[intel-gem] Recover resources from wedged hardware.Keith Packard
Clean up queues, free objects. On the next entervt, unmark the hardware to let the user try again (presumably after resetting the chip). Someday we'll automatically recover...
2008-06-24[intel-gem] pwrite through GTTKeith Packard
Pin/copy_from_user/unpin through the GTT to eliminate clflush costs. Benchmarks say this helps quite a bit.
2008-06-21[intel-gem] Add /proc/dri/*/i915_gem_interruptKeith Packard
This tracks most of the interrupt-related status, including the interrupt registers in the chip and the sequence number variables.
2008-06-21[intel-gem] Remove unused variable.Keith Packard
2008-06-20[intel-gem] Use polling in i915_gem_idle instead of interrupts.Keith Packard
While waiting for the hardware to idle on leavevt or lastclose, poll for the sync sequence number instead of waiting for an interrupt. This allows the code to bail if the hardware hangs for some reason. Also, this avoids issues with signals as the exisiting wait function is interruptible.
2008-06-20[intel-gem] Add intel-specific /proc entries to help monitor gem operationKeith Packard
This adds gem_active, gem_flushing, gem_inactive, gem_request and gem_seqno entries to monitor gem operation and help debug issues.
2008-06-20Add device-specific proc_init and proc_cleanup hooksKeith Packard
This allows device drivers to add proc files
2008-06-20[intel-gem] Use shmem_getpage instead of find_or_create_pageKeith Packard
find_or_create_page doesn't quite set up pages correctly; any newly created pages aren't hooked into the shmem object quite right; user space mmaps of those pages end up mapping pages full of zeros which then get written to the real pages inappropriately. This patch requires that the kernel export shmem_getpage.
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-18i915: add blanking support to intelfbJesse Barnes
Got tired of not having my LCD actually turn off when I left the machine at the console.
2008-06-18i915: cleanup PCI state before disabling MSIJesse Barnes
Core MSI code will BUG() if an interrupt handler is still registered when pci_disable_msi() is called.
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-18i915: use WC mapping for framebuffer screen_baseJesse Barnes
2008-06-18Merge branch 'modesetting-101' into modesetting-gemJesse Barnes
2008-06-18i915: switch back to fbcon on panicJesse Barnes
Normally when X is running, panic messages will be invisible and the machine will just appear to hard hang. This patch adds support for switching back to the fbcon framebuffer on panic (through the use of a panic notifier registration) so we can see what happened. Note that in order to be really useful, X will have to run its VT in something other than KD_GRAPHICS mode. Also, not all kernel errors result in panics, some go through BUG() which may trigger another type of event, not resulting in a switch.
2008-06-16[intel] Quirk away MSI support on 945G/GM.Eric Anholt
The PCI caps register reports MSI support even though it isn't really there.
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] Execute MI_FLUSH in leavevt_ioctlKeith Packard
In leavevt_ioctl, queue an MI_FLUSH and then block waiting for it to complete. This will empty the active and flushing lists. That leaves only the inactive list to evict.
2008-06-13[intel-gem] inactive list may contain objects in CPU write domainKeith Packard
Pin/unpin need to know whether to remove/add objects from the inactive list, inactive objects cannot be in any GPU write domain as those would be on the flushing list instead. However, inactive objects may be in the CPU write domain.
2008-06-13[intel-gem] BUG_ON active objects in gem_object_unbindKeith Packard
Now that gem_object_unbind waits for rendering to complete, objects should not be active when they are being pulled from the GTT. BUG_ON if this is broken.
2008-06-13[intel-gem] Debugging -- verify inactive list invariantsKeith Packard
Inactive list elements may not be pinned, active or have non-CPU write domains.
2008-06-13[intel-gem] whitespace fixesKeith Packard
2008-06-13[intel-gem] show total GTT space in /proc/dri/*/gem_objectsKeith Packard
2008-06-13[intel-gem] Wait for rendering to complete before unbinding.Keith Packard
Moving to the CPU domain doesn't ensure that rendering is finished, the buffer may still be in use as a texture or other data source.
2008-06-13[intel-gem] add gtt and pin counts to /proc/dri/*/gem_objectsKeith Packard
Not quite portable, but these are useful for intel. Some more general mechanism could be done...
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-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-13[gem] Don't require the lock in execbuf now that it's not needed for the ring.Eric Anholt
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-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] 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-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-09Add EDID quirk handlingJesse Barnes
Port over EDID quirks from X.Org so we can handle more monitors. This meant adding size info to the drm_display_mode struct, but other than that the changes were isolated to the DRM EDID handling code (as they should be).
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.