summaryrefslogtreecommitdiff
path: root/linux-core/drm_irq.c
AgeCommit message (Collapse)Author
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-12mode: Remove hotplug support from ioctl interfaceJakob Bornecrantz
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-08-13Don't call the vblank tasklet with irqs disabled.Thomas Hellstrom
If a specific tasklet shares data with irq context, it needs to take a private irq-blocking spinlock within the tasklet itself.
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-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-21Reinstate dev->vblank_enabled[].Michel Dänzer
I incorrectly thought it was obsolete.
2008-07-21Drop workaround for driver vblank counter going backwards.Michel Dänzer
The driver code that caused this is no longer necessary and has been dropped.
2008-07-21vblank-rework rework cleanups.Michel Dänzer
Remove some dead/obsolete code and make drm_update_vblank_count() static.
2008-07-21Remove obsolete dev->vblank_suspend[crtc] tests.Michel Dänzer
Caused drm_update_vblank_count() not to do its thing when called from drm_modeset_ctl() -> drm_vblank_get(). The vblank functionality no longer needs to be suspended during a modeset, so rename the field to vblank_inmodeset.
2008-07-19Update vblank code to new APIJesse Barnes
In my last push I forgot to convert users of drm_update_vblank_count over to drm_vblank_get/put, since that's where any interrupt off->on update accounting is done now. Since the modeset ioctl did something similar (an open coded update of the counter) convert it over to using get/put too, which saves us from having to deal with every combination of interrupt off & on between calls.
2008-07-17Avoid incorrect vblank wakeupsJesse Barnes
The current code uses the hw vblank counter exclusively, which can lead to wakeups during the active period rather than during the vblank period if the hw counter counts displayed frames rather than vblank periods. This change coverts the code over to using the counter while interrupts are enabled, fixing that issue. It also includes a couple of related changes: one to not enable the new enable/disable behavior until the modeset ioctl is called (to preserve old client behavior) and another to account for lost events due to mode setting with the new counter scheme. BSD will require similar changes to its drm_irq.c code, but they should be straightforward.
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-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-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-03vblank: Don't wait or update the counter while the CRTC is supposedly disabled.Michel Dänzer
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-03vblank: Clean up compensation for spurious wraparounds of driver counter.Michel Dänzer
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-03vblank: Special-case driver vblank counter going back by 1.Michel Dänzer
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-03vblank: Don't return current sequence number and time if interrupted by signal.Michel Dänzer
2008-04-28Merge branch 'master' into modesetting-101Thomas Hellstrom
Conflicts: linux-core/Makefile.kernel linux-core/drm_compat.c linux-core/drm_fops.c linux-core/drm_lock.c shared-core/drm.h shared-core/i915_dma.c shared-core/i915_drv.h shared-core/i915_irq.c
2008-04-27Use fixed sized types in new ioctlsJesse Barnes
Make both crtc and the command argument 32 bits to avoid any 32-on-64 compat issues.
2008-03-11Add support for monitor hotplug signals/waitsAlan Hourihane
Also adjust i915 irq handling as it follows the 16bit'ism's of the i8xx series.
2008-03-07drm/modesetting: fixup irq removal on exitDave Airlie
2008-02-28drm: add modesetting as a driver feature.Dave Airlie
This change adds a driver feature that for i915 is controlled by a module parameter. You now need to do insmod i915.ko modeset=1 to enable it the modesetting paths. It also fixes up lots of X paths. I can run my new DDX driver on this code with and without modesetting enabled
2008-02-21Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into ↵Alan Hourihane
modesetting-101
2008-02-21Don't free irq resources until after we've unregistered the handler.Kristian Høgsberg
2008-02-21Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into ↵Alan Hourihane
modesetting-101 Conflicts: linux-core/drm_sysfs.c
2008-02-21linux: Clean up vblank related resources from drm_irq_uninstall().Michel Dänzer
This fixes at least two problems: * The vblank_disable_fn timer callback could get called after the DRM was de-initialized, e.g. on X server shutdown. * Leak of vblank related resources when disabling and re-enabling the IRQ, e.g. on an X server reset.
2008-02-18Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into ↵Alan Hourihane
modesetting-101 Conflicts: linux-core/i915_fence.c linux-core/via_fence.c shared-core/i915_dma.c shared-core/i915_drv.h shared-core/i915_irq.c
2008-02-13major port of multi-master ideas into modesettingDave Airlie
2008-02-07Fix vblank enable/disable callbacksJesse Barnes
There were two problems with the existing callback code: the vblank enable callback happened multiple times per disable, making drivers more complex than they had to be, and there was a race between the final decrement of the vblank usage counter and the next enable call, which could have resulted in a put->schedule disable->get->enable->disable sequence, which would be bad. So add a new vblank_enabled array to track vblank enable on per-pipe basis, and add a lock to protect it along with the refcount + enable/disable calls to fix the race.
2008-01-25if irq already enabled well just keep truckingDave Airlie
2008-01-24Fixup modeset ioctl number & typedef usageJesse Barnes
Should be 0x08 rather than 0xa0, and shouldn't use typedefs.
2008-01-22Merge branch 'master' into vblank-rework, including mach64 supportJesse Barnes
Conflicts: linux-core/drmP.h linux-core/drm_drv.c shared-core/i915_drv.h shared-core/i915_irq.c shared-core/mga_irq.c shared-core/radeon_irq.c shared-core/via_irq.c Mostly trivial conflicts. mach64 support from Mathieu Bérard.
2008-01-03drm: cleanup DRM_DEBUG() parametersMárton Németh
As DRM_DEBUG macro already prints out the __FUNCTION__ string (see drivers/char/drm/drmP.h), it is not worth doing this again. At some other places the ending "\n" was added. airlied:- I cleaned up a few that this patch missed also
2007-11-22drm: major whitespace/coding style realignment with kernelDave Airlie
2007-11-01Cleanup vblank_init and fix drm_irq_installJesse Barnes
The vblank_init function wanted a couple of cleanups. Also, drm_irq_install wasn't checking the new return value of irq_postinstall. If it returns a failure, assume IRQs didn't get set up and take appropriate action.
2007-10-30Merge branch 'master' into vblank-rework, fixup remaining driversJesse Barnes
Conflicts: linux-core/drmP.h linux-core/drm_drv.c linux-core/drm_irq.c shared-core/i915_drv.h shared-core/i915_irq.c shared-core/mga_drv.h shared-core/mga_irq.c shared-core/radeon_drv.h shared-core/radeon_irq.c Merge in the latest master bits and update the remaining drivers (except mach64 which math_b is working on). Also remove the 9xx hack from the i915 driver; it seems to be correct.
2007-08-06nouveau: Various internal and external API changesBen Skeggs
1. DRM_NOUVEAU_GPUOBJ_FREE Used to free GPU objects. The obvious usage case is for Gr objects, but notifiers can also be destroyed in the same way. GPU objects gain a destructor method and private data fields with this change, so other specialised cases (like notifiers) can be implemented on top of gpuobjs. 2. DRM_NOUVEAU_CHANNEL_FREE 3. DRM_NOUVEAU_CARD_INIT Ideally we'd do init during module load, but this isn't currently possible. Doing init during firstopen() is bad as X has a love of opening/closing the DRM many times during startup. Once the modesetting-101 branch is merged this can go away. IRQs are enabled in nouveau_card_init() now, rather than having the X server call drmCtlInstHandler(). We'll need this for when we give the kernel module its own channel. 4. DRM_NOUVEAU_GETPARAM Add CHIPSET_ID value, which will return the chipset id derived from NV_PMC_BOOT_0. 4. Use list_* in a few places, rather than home-brewed stuff.
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-16drm: remove drmP.h internal typedefsDave Airlie
2007-07-16drm: detypedef drm.h and fixup all problemsDave Airlie
2007-06-22Merge branch 'vblank-rework' into vblankJesse Barnes
2007-06-22more vblank reworkJesse Barnes
- use a timer for disabling vblank events to avoid enable/disable calls too often - make i915 work with pre-965 chips again (would like to structure this better, but this hack works on my test system)
2007-06-22Fix vblank wait condition.Michel Dänzer
Sync-to-vblank actually works again for me with radeon.
2007-06-22Use drm_calloc instead of assigning 0.Michel Dänzer
2007-06-15Remove DRIVER_IRQ_VBL(2).Michel Dänzer
If the driver doesn't support vertical blank interrupts, it won't call drm_vblank_init(), and dev->num_crtcs will be 0. Also fix an off-by-one test against dev->num_crtcs.
2007-06-15Make vblank waitqueue per CRTC.Michel Dänzer