diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-11-16 10:55:10 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-11-16 10:55:10 -0500 |
commit | 3143a2bf18d12545f77dafa5b9f7fee83b001223 (patch) | |
tree | 2a305319c2c734e06d11236bed795bc2ba1e23c9 /drivers/gpu/drm/i915/i915_irq.c | |
parent | c94f28c383f58c9de74678e0f1624db9c5f8a8cb (diff) |
drm/i915: Convert (void)I915_READ to POSTING_READ
... and so hide the flushes from tracing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 21034527d3a4..ef3503733ebb 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -70,7 +70,7 @@ ironlake_enable_graphics_irq(drm_i915_private_t *dev_priv, u32 mask) | |||
70 | if ((dev_priv->gt_irq_mask_reg & mask) != 0) { | 70 | if ((dev_priv->gt_irq_mask_reg & mask) != 0) { |
71 | dev_priv->gt_irq_mask_reg &= ~mask; | 71 | dev_priv->gt_irq_mask_reg &= ~mask; |
72 | I915_WRITE(GTIMR, dev_priv->gt_irq_mask_reg); | 72 | I915_WRITE(GTIMR, dev_priv->gt_irq_mask_reg); |
73 | (void) I915_READ(GTIMR); | 73 | POSTING_READ(GTIMR); |
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
@@ -80,7 +80,7 @@ ironlake_disable_graphics_irq(drm_i915_private_t *dev_priv, u32 mask) | |||
80 | if ((dev_priv->gt_irq_mask_reg & mask) != mask) { | 80 | if ((dev_priv->gt_irq_mask_reg & mask) != mask) { |
81 | dev_priv->gt_irq_mask_reg |= mask; | 81 | dev_priv->gt_irq_mask_reg |= mask; |
82 | I915_WRITE(GTIMR, dev_priv->gt_irq_mask_reg); | 82 | I915_WRITE(GTIMR, dev_priv->gt_irq_mask_reg); |
83 | (void) I915_READ(GTIMR); | 83 | POSTING_READ(GTIMR); |
84 | } | 84 | } |
85 | } | 85 | } |
86 | 86 | ||
@@ -91,7 +91,7 @@ ironlake_enable_display_irq(drm_i915_private_t *dev_priv, u32 mask) | |||
91 | if ((dev_priv->irq_mask_reg & mask) != 0) { | 91 | if ((dev_priv->irq_mask_reg & mask) != 0) { |
92 | dev_priv->irq_mask_reg &= ~mask; | 92 | dev_priv->irq_mask_reg &= ~mask; |
93 | I915_WRITE(DEIMR, dev_priv->irq_mask_reg); | 93 | I915_WRITE(DEIMR, dev_priv->irq_mask_reg); |
94 | (void) I915_READ(DEIMR); | 94 | POSTING_READ(DEIMR); |
95 | } | 95 | } |
96 | } | 96 | } |
97 | 97 | ||
@@ -101,7 +101,7 @@ ironlake_disable_display_irq(drm_i915_private_t *dev_priv, u32 mask) | |||
101 | if ((dev_priv->irq_mask_reg & mask) != mask) { | 101 | if ((dev_priv->irq_mask_reg & mask) != mask) { |
102 | dev_priv->irq_mask_reg |= mask; | 102 | dev_priv->irq_mask_reg |= mask; |
103 | I915_WRITE(DEIMR, dev_priv->irq_mask_reg); | 103 | I915_WRITE(DEIMR, dev_priv->irq_mask_reg); |
104 | (void) I915_READ(DEIMR); | 104 | POSTING_READ(DEIMR); |
105 | } | 105 | } |
106 | } | 106 | } |
107 | 107 | ||
@@ -111,7 +111,7 @@ i915_enable_irq(drm_i915_private_t *dev_priv, u32 mask) | |||
111 | if ((dev_priv->irq_mask_reg & mask) != 0) { | 111 | if ((dev_priv->irq_mask_reg & mask) != 0) { |
112 | dev_priv->irq_mask_reg &= ~mask; | 112 | dev_priv->irq_mask_reg &= ~mask; |
113 | I915_WRITE(IMR, dev_priv->irq_mask_reg); | 113 | I915_WRITE(IMR, dev_priv->irq_mask_reg); |
114 | (void) I915_READ(IMR); | 114 | POSTING_READ(IMR); |
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
@@ -121,7 +121,7 @@ i915_disable_irq(drm_i915_private_t *dev_priv, u32 mask) | |||
121 | if ((dev_priv->irq_mask_reg & mask) != mask) { | 121 | if ((dev_priv->irq_mask_reg & mask) != mask) { |
122 | dev_priv->irq_mask_reg |= mask; | 122 | dev_priv->irq_mask_reg |= mask; |
123 | I915_WRITE(IMR, dev_priv->irq_mask_reg); | 123 | I915_WRITE(IMR, dev_priv->irq_mask_reg); |
124 | (void) I915_READ(IMR); | 124 | POSTING_READ(IMR); |
125 | } | 125 | } |
126 | } | 126 | } |
127 | 127 | ||
@@ -144,7 +144,7 @@ i915_enable_pipestat(drm_i915_private_t *dev_priv, int pipe, u32 mask) | |||
144 | dev_priv->pipestat[pipe] |= mask; | 144 | dev_priv->pipestat[pipe] |= mask; |
145 | /* Enable the interrupt, clear any pending status */ | 145 | /* Enable the interrupt, clear any pending status */ |
146 | I915_WRITE(reg, dev_priv->pipestat[pipe] | (mask >> 16)); | 146 | I915_WRITE(reg, dev_priv->pipestat[pipe] | (mask >> 16)); |
147 | (void) I915_READ(reg); | 147 | POSTING_READ(reg); |
148 | } | 148 | } |
149 | } | 149 | } |
150 | 150 | ||
@@ -156,7 +156,7 @@ i915_disable_pipestat(drm_i915_private_t *dev_priv, int pipe, u32 mask) | |||
156 | 156 | ||
157 | dev_priv->pipestat[pipe] &= ~mask; | 157 | dev_priv->pipestat[pipe] &= ~mask; |
158 | I915_WRITE(reg, dev_priv->pipestat[pipe]); | 158 | I915_WRITE(reg, dev_priv->pipestat[pipe]); |
159 | (void) I915_READ(reg); | 159 | POSTING_READ(reg); |
160 | } | 160 | } |
161 | } | 161 | } |
162 | 162 | ||
@@ -321,7 +321,7 @@ static irqreturn_t ironlake_irq_handler(struct drm_device *dev) | |||
321 | /* disable master interrupt before clearing iir */ | 321 | /* disable master interrupt before clearing iir */ |
322 | de_ier = I915_READ(DEIER); | 322 | de_ier = I915_READ(DEIER); |
323 | I915_WRITE(DEIER, de_ier & ~DE_MASTER_IRQ_CONTROL); | 323 | I915_WRITE(DEIER, de_ier & ~DE_MASTER_IRQ_CONTROL); |
324 | (void)I915_READ(DEIER); | 324 | POSTING_READ(DEIER); |
325 | 325 | ||
326 | de_iir = I915_READ(DEIIR); | 326 | de_iir = I915_READ(DEIIR); |
327 | gt_iir = I915_READ(GTIIR); | 327 | gt_iir = I915_READ(GTIIR); |
@@ -386,7 +386,7 @@ static irqreturn_t ironlake_irq_handler(struct drm_device *dev) | |||
386 | 386 | ||
387 | done: | 387 | done: |
388 | I915_WRITE(DEIER, de_ier); | 388 | I915_WRITE(DEIER, de_ier); |
389 | (void)I915_READ(DEIER); | 389 | POSTING_READ(DEIER); |
390 | 390 | ||
391 | return ret; | 391 | return ret; |
392 | } | 392 | } |
@@ -796,7 +796,7 @@ static void i915_report_and_clear_eir(struct drm_device *dev) | |||
796 | printk(KERN_ERR " ACTHD: 0x%08x\n", | 796 | printk(KERN_ERR " ACTHD: 0x%08x\n", |
797 | I915_READ(ACTHD_I965)); | 797 | I915_READ(ACTHD_I965)); |
798 | I915_WRITE(IPEIR_I965, ipeir); | 798 | I915_WRITE(IPEIR_I965, ipeir); |
799 | (void)I915_READ(IPEIR_I965); | 799 | POSTING_READ(IPEIR_I965); |
800 | } | 800 | } |
801 | if (eir & GM45_ERROR_PAGE_TABLE) { | 801 | if (eir & GM45_ERROR_PAGE_TABLE) { |
802 | u32 pgtbl_err = I915_READ(PGTBL_ER); | 802 | u32 pgtbl_err = I915_READ(PGTBL_ER); |
@@ -804,7 +804,7 @@ static void i915_report_and_clear_eir(struct drm_device *dev) | |||
804 | printk(KERN_ERR " PGTBL_ER: 0x%08x\n", | 804 | printk(KERN_ERR " PGTBL_ER: 0x%08x\n", |
805 | pgtbl_err); | 805 | pgtbl_err); |
806 | I915_WRITE(PGTBL_ER, pgtbl_err); | 806 | I915_WRITE(PGTBL_ER, pgtbl_err); |
807 | (void)I915_READ(PGTBL_ER); | 807 | POSTING_READ(PGTBL_ER); |
808 | } | 808 | } |
809 | } | 809 | } |
810 | 810 | ||
@@ -815,7 +815,7 @@ static void i915_report_and_clear_eir(struct drm_device *dev) | |||
815 | printk(KERN_ERR " PGTBL_ER: 0x%08x\n", | 815 | printk(KERN_ERR " PGTBL_ER: 0x%08x\n", |
816 | pgtbl_err); | 816 | pgtbl_err); |
817 | I915_WRITE(PGTBL_ER, pgtbl_err); | 817 | I915_WRITE(PGTBL_ER, pgtbl_err); |
818 | (void)I915_READ(PGTBL_ER); | 818 | POSTING_READ(PGTBL_ER); |
819 | } | 819 | } |
820 | } | 820 | } |
821 | 821 | ||
@@ -846,7 +846,7 @@ static void i915_report_and_clear_eir(struct drm_device *dev) | |||
846 | printk(KERN_ERR " ACTHD: 0x%08x\n", | 846 | printk(KERN_ERR " ACTHD: 0x%08x\n", |
847 | I915_READ(ACTHD)); | 847 | I915_READ(ACTHD)); |
848 | I915_WRITE(IPEIR, ipeir); | 848 | I915_WRITE(IPEIR, ipeir); |
849 | (void)I915_READ(IPEIR); | 849 | POSTING_READ(IPEIR); |
850 | } else { | 850 | } else { |
851 | u32 ipeir = I915_READ(IPEIR_I965); | 851 | u32 ipeir = I915_READ(IPEIR_I965); |
852 | 852 | ||
@@ -863,12 +863,12 @@ static void i915_report_and_clear_eir(struct drm_device *dev) | |||
863 | printk(KERN_ERR " ACTHD: 0x%08x\n", | 863 | printk(KERN_ERR " ACTHD: 0x%08x\n", |
864 | I915_READ(ACTHD_I965)); | 864 | I915_READ(ACTHD_I965)); |
865 | I915_WRITE(IPEIR_I965, ipeir); | 865 | I915_WRITE(IPEIR_I965, ipeir); |
866 | (void)I915_READ(IPEIR_I965); | 866 | POSTING_READ(IPEIR_I965); |
867 | } | 867 | } |
868 | } | 868 | } |
869 | 869 | ||
870 | I915_WRITE(EIR, eir); | 870 | I915_WRITE(EIR, eir); |
871 | (void)I915_READ(EIR); | 871 | POSTING_READ(EIR); |
872 | eir = I915_READ(EIR); | 872 | eir = I915_READ(EIR); |
873 | if (eir) { | 873 | if (eir) { |
874 | /* | 874 | /* |
@@ -1435,17 +1435,17 @@ static void ironlake_irq_preinstall(struct drm_device *dev) | |||
1435 | 1435 | ||
1436 | I915_WRITE(DEIMR, 0xffffffff); | 1436 | I915_WRITE(DEIMR, 0xffffffff); |
1437 | I915_WRITE(DEIER, 0x0); | 1437 | I915_WRITE(DEIER, 0x0); |
1438 | (void) I915_READ(DEIER); | 1438 | POSTING_READ(DEIER); |
1439 | 1439 | ||
1440 | /* and GT */ | 1440 | /* and GT */ |
1441 | I915_WRITE(GTIMR, 0xffffffff); | 1441 | I915_WRITE(GTIMR, 0xffffffff); |
1442 | I915_WRITE(GTIER, 0x0); | 1442 | I915_WRITE(GTIER, 0x0); |
1443 | (void) I915_READ(GTIER); | 1443 | POSTING_READ(GTIER); |
1444 | 1444 | ||
1445 | /* south display irq */ | 1445 | /* south display irq */ |
1446 | I915_WRITE(SDEIMR, 0xffffffff); | 1446 | I915_WRITE(SDEIMR, 0xffffffff); |
1447 | I915_WRITE(SDEIER, 0x0); | 1447 | I915_WRITE(SDEIER, 0x0); |
1448 | (void) I915_READ(SDEIER); | 1448 | POSTING_READ(SDEIER); |
1449 | } | 1449 | } |
1450 | 1450 | ||
1451 | static int ironlake_irq_postinstall(struct drm_device *dev) | 1451 | static int ironlake_irq_postinstall(struct drm_device *dev) |
@@ -1464,7 +1464,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev) | |||
1464 | I915_WRITE(DEIIR, I915_READ(DEIIR)); | 1464 | I915_WRITE(DEIIR, I915_READ(DEIIR)); |
1465 | I915_WRITE(DEIMR, dev_priv->irq_mask_reg); | 1465 | I915_WRITE(DEIMR, dev_priv->irq_mask_reg); |
1466 | I915_WRITE(DEIER, dev_priv->de_irq_enable_reg); | 1466 | I915_WRITE(DEIER, dev_priv->de_irq_enable_reg); |
1467 | (void) I915_READ(DEIER); | 1467 | POSTING_READ(DEIER); |
1468 | 1468 | ||
1469 | if (IS_GEN6(dev)) { | 1469 | if (IS_GEN6(dev)) { |
1470 | render_mask = | 1470 | render_mask = |
@@ -1485,7 +1485,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev) | |||
1485 | } | 1485 | } |
1486 | 1486 | ||
1487 | I915_WRITE(GTIER, dev_priv->gt_irq_enable_reg); | 1487 | I915_WRITE(GTIER, dev_priv->gt_irq_enable_reg); |
1488 | (void) I915_READ(GTIER); | 1488 | POSTING_READ(GTIER); |
1489 | 1489 | ||
1490 | if (HAS_PCH_CPT(dev)) { | 1490 | if (HAS_PCH_CPT(dev)) { |
1491 | hotplug_mask = SDE_CRT_HOTPLUG_CPT | SDE_PORTB_HOTPLUG_CPT | | 1491 | hotplug_mask = SDE_CRT_HOTPLUG_CPT | SDE_PORTB_HOTPLUG_CPT | |
@@ -1501,7 +1501,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev) | |||
1501 | I915_WRITE(SDEIIR, I915_READ(SDEIIR)); | 1501 | I915_WRITE(SDEIIR, I915_READ(SDEIIR)); |
1502 | I915_WRITE(SDEIMR, dev_priv->pch_irq_mask_reg); | 1502 | I915_WRITE(SDEIMR, dev_priv->pch_irq_mask_reg); |
1503 | I915_WRITE(SDEIER, dev_priv->pch_irq_enable_reg); | 1503 | I915_WRITE(SDEIER, dev_priv->pch_irq_enable_reg); |
1504 | (void) I915_READ(SDEIER); | 1504 | POSTING_READ(SDEIER); |
1505 | 1505 | ||
1506 | if (IS_IRONLAKE_M(dev)) { | 1506 | if (IS_IRONLAKE_M(dev)) { |
1507 | /* Clear & enable PCU event interrupts */ | 1507 | /* Clear & enable PCU event interrupts */ |
@@ -1537,7 +1537,7 @@ void i915_driver_irq_preinstall(struct drm_device * dev) | |||
1537 | I915_WRITE(PIPEBSTAT, 0); | 1537 | I915_WRITE(PIPEBSTAT, 0); |
1538 | I915_WRITE(IMR, 0xffffffff); | 1538 | I915_WRITE(IMR, 0xffffffff); |
1539 | I915_WRITE(IER, 0x0); | 1539 | I915_WRITE(IER, 0x0); |
1540 | (void) I915_READ(IER); | 1540 | POSTING_READ(IER); |
1541 | } | 1541 | } |
1542 | 1542 | ||
1543 | /* | 1543 | /* |
@@ -1591,7 +1591,7 @@ int i915_driver_irq_postinstall(struct drm_device *dev) | |||
1591 | 1591 | ||
1592 | I915_WRITE(IMR, dev_priv->irq_mask_reg); | 1592 | I915_WRITE(IMR, dev_priv->irq_mask_reg); |
1593 | I915_WRITE(IER, enable_mask); | 1593 | I915_WRITE(IER, enable_mask); |
1594 | (void) I915_READ(IER); | 1594 | POSTING_READ(IER); |
1595 | 1595 | ||
1596 | if (I915_HAS_HOTPLUG(dev)) { | 1596 | if (I915_HAS_HOTPLUG(dev)) { |
1597 | u32 hotplug_en = I915_READ(PORT_HOTPLUG_EN); | 1597 | u32 hotplug_en = I915_READ(PORT_HOTPLUG_EN); |