diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index d447d7d508f4..e2dac9b5f4ce 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -950,7 +950,7 @@ static int __intel_get_crtc_scanline(struct intel_crtc *crtc) | |||
950 | if (mode->flags & DRM_MODE_FLAG_INTERLACE) | 950 | if (mode->flags & DRM_MODE_FLAG_INTERLACE) |
951 | vtotal /= 2; | 951 | vtotal /= 2; |
952 | 952 | ||
953 | if (IS_GEN2(dev_priv)) | 953 | if (IS_GEN(dev_priv, 2)) |
954 | position = I915_READ_FW(PIPEDSL(pipe)) & DSL_LINEMASK_GEN2; | 954 | position = I915_READ_FW(PIPEDSL(pipe)) & DSL_LINEMASK_GEN2; |
955 | else | 955 | else |
956 | position = I915_READ_FW(PIPEDSL(pipe)) & DSL_LINEMASK_GEN3; | 956 | position = I915_READ_FW(PIPEDSL(pipe)) & DSL_LINEMASK_GEN3; |
@@ -1030,7 +1030,7 @@ static bool i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe, | |||
1030 | if (stime) | 1030 | if (stime) |
1031 | *stime = ktime_get(); | 1031 | *stime = ktime_get(); |
1032 | 1032 | ||
1033 | if (IS_GEN2(dev_priv) || IS_G4X(dev_priv) || INTEL_GEN(dev_priv) >= 5) { | 1033 | if (IS_GEN(dev_priv, 2) || IS_G4X(dev_priv) || INTEL_GEN(dev_priv) >= 5) { |
1034 | /* No obvious pixelcount register. Only query vertical | 1034 | /* No obvious pixelcount register. Only query vertical |
1035 | * scanout position from Display scan line register. | 1035 | * scanout position from Display scan line register. |
1036 | */ | 1036 | */ |
@@ -1090,7 +1090,7 @@ static bool i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe, | |||
1090 | else | 1090 | else |
1091 | position += vtotal - vbl_end; | 1091 | position += vtotal - vbl_end; |
1092 | 1092 | ||
1093 | if (IS_GEN2(dev_priv) || IS_G4X(dev_priv) || INTEL_GEN(dev_priv) >= 5) { | 1093 | if (IS_GEN(dev_priv, 2) || IS_G4X(dev_priv) || INTEL_GEN(dev_priv) >= 5) { |
1094 | *vpos = position; | 1094 | *vpos = position; |
1095 | *hpos = 0; | 1095 | *hpos = 0; |
1096 | } else { | 1096 | } else { |
@@ -2547,7 +2547,7 @@ static void ilk_display_irq_handler(struct drm_i915_private *dev_priv, | |||
2547 | I915_WRITE(SDEIIR, pch_iir); | 2547 | I915_WRITE(SDEIIR, pch_iir); |
2548 | } | 2548 | } |
2549 | 2549 | ||
2550 | if (IS_GEN5(dev_priv) && de_iir & DE_PCU_EVENT) | 2550 | if (IS_GEN(dev_priv, 5) && de_iir & DE_PCU_EVENT) |
2551 | ironlake_rps_change_irq_handler(dev_priv); | 2551 | ironlake_rps_change_irq_handler(dev_priv); |
2552 | } | 2552 | } |
2553 | 2553 | ||
@@ -3243,7 +3243,7 @@ void i915_clear_error_registers(struct drm_i915_private *dev_priv) | |||
3243 | { | 3243 | { |
3244 | u32 eir; | 3244 | u32 eir; |
3245 | 3245 | ||
3246 | if (!IS_GEN2(dev_priv)) | 3246 | if (!IS_GEN(dev_priv, 2)) |
3247 | I915_WRITE(PGTBL_ER, I915_READ(PGTBL_ER)); | 3247 | I915_WRITE(PGTBL_ER, I915_READ(PGTBL_ER)); |
3248 | 3248 | ||
3249 | if (INTEL_GEN(dev_priv) < 4) | 3249 | if (INTEL_GEN(dev_priv) < 4) |
@@ -3586,11 +3586,11 @@ static void ironlake_irq_reset(struct drm_device *dev) | |||
3586 | { | 3586 | { |
3587 | struct drm_i915_private *dev_priv = to_i915(dev); | 3587 | struct drm_i915_private *dev_priv = to_i915(dev); |
3588 | 3588 | ||
3589 | if (IS_GEN5(dev_priv)) | 3589 | if (IS_GEN(dev_priv, 5)) |
3590 | I915_WRITE(HWSTAM, 0xffffffff); | 3590 | I915_WRITE(HWSTAM, 0xffffffff); |
3591 | 3591 | ||
3592 | GEN3_IRQ_RESET(DE); | 3592 | GEN3_IRQ_RESET(DE); |
3593 | if (IS_GEN7(dev_priv)) | 3593 | if (IS_GEN(dev_priv, 7)) |
3594 | I915_WRITE(GEN7_ERR_INT, 0xffffffff); | 3594 | I915_WRITE(GEN7_ERR_INT, 0xffffffff); |
3595 | 3595 | ||
3596 | if (IS_HASWELL(dev_priv)) { | 3596 | if (IS_HASWELL(dev_priv)) { |
@@ -4045,7 +4045,7 @@ static void gen5_gt_irq_postinstall(struct drm_device *dev) | |||
4045 | } | 4045 | } |
4046 | 4046 | ||
4047 | gt_irqs |= GT_RENDER_USER_INTERRUPT; | 4047 | gt_irqs |= GT_RENDER_USER_INTERRUPT; |
4048 | if (IS_GEN5(dev_priv)) { | 4048 | if (IS_GEN(dev_priv, 5)) { |
4049 | gt_irqs |= ILK_BSD_USER_INTERRUPT; | 4049 | gt_irqs |= ILK_BSD_USER_INTERRUPT; |
4050 | } else { | 4050 | } else { |
4051 | gt_irqs |= GT_BLT_USER_INTERRUPT | GT_BSD_USER_INTERRUPT; | 4051 | gt_irqs |= GT_BLT_USER_INTERRUPT | GT_BSD_USER_INTERRUPT; |
@@ -4836,7 +4836,7 @@ void intel_irq_init(struct drm_i915_private *dev_priv) | |||
4836 | if (INTEL_GEN(dev_priv) >= 8) | 4836 | if (INTEL_GEN(dev_priv) >= 8) |
4837 | rps->pm_intrmsk_mbz |= GEN8_PMINTR_DISABLE_REDIRECT_TO_GUC; | 4837 | rps->pm_intrmsk_mbz |= GEN8_PMINTR_DISABLE_REDIRECT_TO_GUC; |
4838 | 4838 | ||
4839 | if (IS_GEN2(dev_priv)) { | 4839 | if (IS_GEN(dev_priv, 2)) { |
4840 | /* Gen2 doesn't have a hardware frame counter */ | 4840 | /* Gen2 doesn't have a hardware frame counter */ |
4841 | dev->max_vblank_count = 0; | 4841 | dev->max_vblank_count = 0; |
4842 | } else if (IS_G4X(dev_priv) || INTEL_GEN(dev_priv) >= 5) { | 4842 | } else if (IS_G4X(dev_priv) || INTEL_GEN(dev_priv) >= 5) { |
@@ -4852,7 +4852,7 @@ void intel_irq_init(struct drm_i915_private *dev_priv) | |||
4852 | * Gen2 doesn't have a hardware frame counter and so depends on | 4852 | * Gen2 doesn't have a hardware frame counter and so depends on |
4853 | * vblank interrupts to produce sane vblank seuquence numbers. | 4853 | * vblank interrupts to produce sane vblank seuquence numbers. |
4854 | */ | 4854 | */ |
4855 | if (!IS_GEN2(dev_priv)) | 4855 | if (!IS_GEN(dev_priv, 2)) |
4856 | dev->vblank_disable_immediate = true; | 4856 | dev->vblank_disable_immediate = true; |
4857 | 4857 | ||
4858 | /* Most platforms treat the display irq block as an always-on | 4858 | /* Most platforms treat the display irq block as an always-on |
@@ -4924,14 +4924,14 @@ void intel_irq_init(struct drm_i915_private *dev_priv) | |||
4924 | dev->driver->disable_vblank = ironlake_disable_vblank; | 4924 | dev->driver->disable_vblank = ironlake_disable_vblank; |
4925 | dev_priv->display.hpd_irq_setup = ilk_hpd_irq_setup; | 4925 | dev_priv->display.hpd_irq_setup = ilk_hpd_irq_setup; |
4926 | } else { | 4926 | } else { |
4927 | if (IS_GEN2(dev_priv)) { | 4927 | if (IS_GEN(dev_priv, 2)) { |
4928 | dev->driver->irq_preinstall = i8xx_irq_reset; | 4928 | dev->driver->irq_preinstall = i8xx_irq_reset; |
4929 | dev->driver->irq_postinstall = i8xx_irq_postinstall; | 4929 | dev->driver->irq_postinstall = i8xx_irq_postinstall; |
4930 | dev->driver->irq_handler = i8xx_irq_handler; | 4930 | dev->driver->irq_handler = i8xx_irq_handler; |
4931 | dev->driver->irq_uninstall = i8xx_irq_reset; | 4931 | dev->driver->irq_uninstall = i8xx_irq_reset; |
4932 | dev->driver->enable_vblank = i8xx_enable_vblank; | 4932 | dev->driver->enable_vblank = i8xx_enable_vblank; |
4933 | dev->driver->disable_vblank = i8xx_disable_vblank; | 4933 | dev->driver->disable_vblank = i8xx_disable_vblank; |
4934 | } else if (IS_GEN3(dev_priv)) { | 4934 | } else if (IS_GEN(dev_priv, 3)) { |
4935 | dev->driver->irq_preinstall = i915_irq_reset; | 4935 | dev->driver->irq_preinstall = i915_irq_reset; |
4936 | dev->driver->irq_postinstall = i915_irq_postinstall; | 4936 | dev->driver->irq_postinstall = i915_irq_postinstall; |
4937 | dev->driver->irq_uninstall = i915_irq_reset; | 4937 | dev->driver->irq_uninstall = i915_irq_reset; |