i915_irq.c (235783) | i915_irq.c (270516) |
---|---|
1/* i915_irq.c -- IRQ support for the I915 -*- linux-c -*- 2 */ 3/*- 4 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 5 * All Rights Reserved. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a 8 * copy of this software and associated documentation files (the --- 13 unchanged lines hidden (view full) --- 22 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 23 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 * 27 */ 28 29#include <sys/cdefs.h> | 1/* i915_irq.c -- IRQ support for the I915 -*- linux-c -*- 2 */ 3/*- 4 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 5 * All Rights Reserved. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a 8 * copy of this software and associated documentation files (the --- 13 unchanged lines hidden (view full) --- 22 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 23 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 * 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/dev/drm2/i915/i915_irq.c 235783 2012-05-22 11:07:44Z kib $"); | 30__FBSDID("$FreeBSD: head/sys/dev/drm2/i915/i915_irq.c 270516 2014-08-25 05:03:10Z adrian $"); |
31 32#include <dev/drm2/drmP.h> 33#include <dev/drm2/drm.h> 34#include <dev/drm2/i915/i915_drm.h> 35#include <dev/drm2/i915/i915_drv.h> 36#include <dev/drm2/i915/intel_drv.h> 37#include <sys/sched.h> 38#include <sys/sf_buf.h> --- 493 unchanged lines hidden (view full) --- 532 if (gt_iir & (GT_USER_INTERRUPT | GT_PIPE_NOTIFY)) 533 notify_ring(dev, &dev_priv->rings[RCS]); 534 if (gt_iir & GT_GEN6_BSD_USER_INTERRUPT) 535 notify_ring(dev, &dev_priv->rings[VCS]); 536 if (gt_iir & GT_BLT_USER_INTERRUPT) 537 notify_ring(dev, &dev_priv->rings[BCS]); 538 539 if (de_iir & DE_GSE_IVB) { | 31 32#include <dev/drm2/drmP.h> 33#include <dev/drm2/drm.h> 34#include <dev/drm2/i915/i915_drm.h> 35#include <dev/drm2/i915/i915_drv.h> 36#include <dev/drm2/i915/intel_drv.h> 37#include <sys/sched.h> 38#include <sys/sf_buf.h> --- 493 unchanged lines hidden (view full) --- 532 if (gt_iir & (GT_USER_INTERRUPT | GT_PIPE_NOTIFY)) 533 notify_ring(dev, &dev_priv->rings[RCS]); 534 if (gt_iir & GT_GEN6_BSD_USER_INTERRUPT) 535 notify_ring(dev, &dev_priv->rings[VCS]); 536 if (gt_iir & GT_BLT_USER_INTERRUPT) 537 notify_ring(dev, &dev_priv->rings[BCS]); 538 539 if (de_iir & DE_GSE_IVB) { |
540#if 1 541 KIB_NOTYET(); 542#else | |
543 intel_opregion_gse_intr(dev); | 540 intel_opregion_gse_intr(dev); |
544#endif | |
545 } 546 547 if (de_iir & DE_PLANEA_FLIP_DONE_IVB) { 548 intel_prepare_page_flip(dev, 0); 549 intel_finish_page_flip_plane(dev, 0); 550 } 551 552 if (de_iir & DE_PLANEB_FLIP_DONE_IVB) { --- 91 unchanged lines hidden (view full) --- 644 if (gt_iir & (GT_USER_INTERRUPT | GT_PIPE_NOTIFY)) 645 notify_ring(dev, &dev_priv->rings[RCS]); 646 if (gt_iir & bsd_usr_interrupt) 647 notify_ring(dev, &dev_priv->rings[VCS]); 648 if (gt_iir & GT_BLT_USER_INTERRUPT) 649 notify_ring(dev, &dev_priv->rings[BCS]); 650 651 if (de_iir & DE_GSE) { | 541 } 542 543 if (de_iir & DE_PLANEA_FLIP_DONE_IVB) { 544 intel_prepare_page_flip(dev, 0); 545 intel_finish_page_flip_plane(dev, 0); 546 } 547 548 if (de_iir & DE_PLANEB_FLIP_DONE_IVB) { --- 91 unchanged lines hidden (view full) --- 640 if (gt_iir & (GT_USER_INTERRUPT | GT_PIPE_NOTIFY)) 641 notify_ring(dev, &dev_priv->rings[RCS]); 642 if (gt_iir & bsd_usr_interrupt) 643 notify_ring(dev, &dev_priv->rings[VCS]); 644 if (gt_iir & GT_BLT_USER_INTERRUPT) 645 notify_ring(dev, &dev_priv->rings[BCS]); 646 647 if (de_iir & DE_GSE) { |
652#if 1 653 KIB_NOTYET(); 654#else | |
655 intel_opregion_gse_intr(dev); | 648 intel_opregion_gse_intr(dev); |
656#endif | |
657 } 658 659 if (de_iir & DE_PLANEA_FLIP_DONE) { 660 intel_prepare_page_flip(dev, 0); 661 intel_finish_page_flip_plane(dev, 0); 662 } 663 664 if (de_iir & DE_PLANEB_FLIP_DONE) { --- 385 unchanged lines hidden (view full) --- 1050 } 1051 1052 if (pipe_stats[pipe] & PIPE_LEGACY_BLC_EVENT_STATUS) 1053 blc_event = true; 1054 } 1055 1056 1057 if (blc_event || (iir & I915_ASLE_INTERRUPT)) { | 649 } 650 651 if (de_iir & DE_PLANEA_FLIP_DONE) { 652 intel_prepare_page_flip(dev, 0); 653 intel_finish_page_flip_plane(dev, 0); 654 } 655 656 if (de_iir & DE_PLANEB_FLIP_DONE) { --- 385 unchanged lines hidden (view full) --- 1042 } 1043 1044 if (pipe_stats[pipe] & PIPE_LEGACY_BLC_EVENT_STATUS) 1045 blc_event = true; 1046 } 1047 1048 1049 if (blc_event || (iir & I915_ASLE_INTERRUPT)) { |
1058#if 1 1059 KIB_NOTYET(); 1060#else | |
1061 intel_opregion_asle_intr(dev); | 1050 intel_opregion_asle_intr(dev); |
1062#endif | |
1063 } 1064 1065 /* With MSI, interrupts are only generated when iir 1066 * transitions from zero to nonzero. If another bit got 1067 * set while we were handling the existing iir bits, then 1068 * we would never get another interrupt. 1069 * 1070 * This is fine on non-MSI as well, as if we hit this path --- 705 unchanged lines hidden (view full) --- 1776 hotplug_en |= CRT_HOTPLUG_VOLTAGE_COMPARE_50; 1777 } 1778 1779 /* Ignore TV since it's buggy */ 1780 1781 I915_WRITE(PORT_HOTPLUG_EN, hotplug_en); 1782 } 1783 | 1051 } 1052 1053 /* With MSI, interrupts are only generated when iir 1054 * transitions from zero to nonzero. If another bit got 1055 * set while we were handling the existing iir bits, then 1056 * we would never get another interrupt. 1057 * 1058 * This is fine on non-MSI as well, as if we hit this path --- 705 unchanged lines hidden (view full) --- 1764 hotplug_en |= CRT_HOTPLUG_VOLTAGE_COMPARE_50; 1765 } 1766 1767 /* Ignore TV since it's buggy */ 1768 1769 I915_WRITE(PORT_HOTPLUG_EN, hotplug_en); 1770 } 1771 |
1784#if 1 1785 KIB_NOTYET(); 1786#else | |
1787 intel_opregion_enable_asle(dev); | 1772 intel_opregion_enable_asle(dev); |
1788#endif | |
1789 1790 return 0; 1791} 1792 1793static void 1794ironlake_irq_uninstall(struct drm_device *dev) 1795{ 1796 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; --- 482 unchanged lines hidden --- | 1773 1774 return 0; 1775} 1776 1777static void 1778ironlake_irq_uninstall(struct drm_device *dev) 1779{ 1780 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; --- 482 unchanged lines hidden --- |