Skip to content

Commit fcc02c7

Browse files
committed
drm/i915/irq: add ilk_de_irq_postinstall()
Add a dedicated de postinstall function. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/f4a8570881e9be28a2406134b2898b8680f9e765.1691509966.git.jani.nikula@intel.com
1 parent 1007337 commit fcc02c7

File tree

3 files changed

+43
-37
lines changed

3 files changed

+43
-37
lines changed

drivers/gpu/drm/i915/display/intel_display_irq.c

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,47 @@ void valleyview_disable_display_irqs(struct drm_i915_private *dev_priv)
15831583
vlv_display_irq_reset(dev_priv);
15841584
}
15851585

1586+
void ilk_de_irq_postinstall(struct drm_i915_private *i915)
1587+
{
1588+
struct intel_uncore *uncore = &i915->uncore;
1589+
u32 display_mask, extra_mask;
1590+
1591+
if (GRAPHICS_VER(i915) >= 7) {
1592+
display_mask = (DE_MASTER_IRQ_CONTROL | DE_GSE_IVB |
1593+
DE_PCH_EVENT_IVB | DE_AUX_CHANNEL_A_IVB);
1594+
extra_mask = (DE_PIPEC_VBLANK_IVB | DE_PIPEB_VBLANK_IVB |
1595+
DE_PIPEA_VBLANK_IVB | DE_ERR_INT_IVB |
1596+
DE_PLANE_FLIP_DONE_IVB(PLANE_C) |
1597+
DE_PLANE_FLIP_DONE_IVB(PLANE_B) |
1598+
DE_PLANE_FLIP_DONE_IVB(PLANE_A) |
1599+
DE_DP_A_HOTPLUG_IVB);
1600+
} else {
1601+
display_mask = (DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT |
1602+
DE_AUX_CHANNEL_A | DE_PIPEB_CRC_DONE |
1603+
DE_PIPEA_CRC_DONE | DE_POISON);
1604+
extra_mask = (DE_PIPEA_VBLANK | DE_PIPEB_VBLANK |
1605+
DE_PIPEB_FIFO_UNDERRUN | DE_PIPEA_FIFO_UNDERRUN |
1606+
DE_PLANE_FLIP_DONE(PLANE_A) |
1607+
DE_PLANE_FLIP_DONE(PLANE_B) |
1608+
DE_DP_A_HOTPLUG);
1609+
}
1610+
1611+
if (IS_HASWELL(i915)) {
1612+
gen3_assert_iir_is_zero(uncore, EDP_PSR_IIR);
1613+
display_mask |= DE_EDP_PSR_INT_HSW;
1614+
}
1615+
1616+
if (IS_IRONLAKE_M(i915))
1617+
extra_mask |= DE_PCU_EVENT;
1618+
1619+
i915->irq_mask = ~display_mask;
1620+
1621+
ibx_irq_postinstall(i915);
1622+
1623+
GEN3_IRQ_INIT(uncore, DE, i915->irq_mask,
1624+
display_mask | extra_mask);
1625+
}
1626+
15861627
void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
15871628
{
15881629
struct intel_uncore *uncore = &dev_priv->uncore;

drivers/gpu/drm/i915/display/intel_display_irq.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ void gen11_display_irq_reset(struct drm_i915_private *i915);
6161
void ibx_irq_postinstall(struct drm_i915_private *i915);
6262
void vlv_display_irq_postinstall(struct drm_i915_private *i915);
6363
void icp_irq_postinstall(struct drm_i915_private *i915);
64+
void ilk_de_irq_postinstall(struct drm_i915_private *i915);
6465
void gen8_de_irq_postinstall(struct drm_i915_private *i915);
6566
void gen11_de_irq_postinstall(struct drm_i915_private *i915);
6667
void dg1_de_irq_postinstall(struct drm_i915_private *i915);

drivers/gpu/drm/i915/i915_irq.c

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -772,45 +772,9 @@ static void cherryview_irq_reset(struct drm_i915_private *dev_priv)
772772

773773
static void ilk_irq_postinstall(struct drm_i915_private *dev_priv)
774774
{
775-
struct intel_uncore *uncore = &dev_priv->uncore;
776-
u32 display_mask, extra_mask;
777-
778-
if (GRAPHICS_VER(dev_priv) >= 7) {
779-
display_mask = (DE_MASTER_IRQ_CONTROL | DE_GSE_IVB |
780-
DE_PCH_EVENT_IVB | DE_AUX_CHANNEL_A_IVB);
781-
extra_mask = (DE_PIPEC_VBLANK_IVB | DE_PIPEB_VBLANK_IVB |
782-
DE_PIPEA_VBLANK_IVB | DE_ERR_INT_IVB |
783-
DE_PLANE_FLIP_DONE_IVB(PLANE_C) |
784-
DE_PLANE_FLIP_DONE_IVB(PLANE_B) |
785-
DE_PLANE_FLIP_DONE_IVB(PLANE_A) |
786-
DE_DP_A_HOTPLUG_IVB);
787-
} else {
788-
display_mask = (DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT |
789-
DE_AUX_CHANNEL_A | DE_PIPEB_CRC_DONE |
790-
DE_PIPEA_CRC_DONE | DE_POISON);
791-
extra_mask = (DE_PIPEA_VBLANK | DE_PIPEB_VBLANK |
792-
DE_PIPEB_FIFO_UNDERRUN | DE_PIPEA_FIFO_UNDERRUN |
793-
DE_PLANE_FLIP_DONE(PLANE_A) |
794-
DE_PLANE_FLIP_DONE(PLANE_B) |
795-
DE_DP_A_HOTPLUG);
796-
}
797-
798-
if (IS_HASWELL(dev_priv)) {
799-
gen3_assert_iir_is_zero(uncore, EDP_PSR_IIR);
800-
display_mask |= DE_EDP_PSR_INT_HSW;
801-
}
802-
803-
if (IS_IRONLAKE_M(dev_priv))
804-
extra_mask |= DE_PCU_EVENT;
805-
806-
dev_priv->irq_mask = ~display_mask;
807-
808-
ibx_irq_postinstall(dev_priv);
809-
810775
gen5_gt_irq_postinstall(to_gt(dev_priv));
811776

812-
GEN3_IRQ_INIT(uncore, DE, dev_priv->irq_mask,
813-
display_mask | extra_mask);
777+
ilk_de_irq_postinstall(dev_priv);
814778
}
815779

816780
static void valleyview_irq_postinstall(struct drm_i915_private *dev_priv)

0 commit comments

Comments
 (0)