Commit 860cefce authored by Jani Nikula's avatar Jani Nikula

drm/i915: move pipestat_irq_mask to display substruct

The info is related to display, and should be placed under
i915->display.
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/2e2f1c9576126927ea63a54639077c01d44ad5b6.1712599670.git.jani.nikula@intel.com
parent f25ae90f
...@@ -454,6 +454,7 @@ struct intel_display { ...@@ -454,6 +454,7 @@ struct intel_display {
u8 vblank_enabled; u8 vblank_enabled;
u32 de_irq_mask[I915_MAX_PIPES]; u32 de_irq_mask[I915_MAX_PIPES];
u32 pipestat_irq_mask[I915_MAX_PIPES];
} irq; } irq;
struct { struct {
......
...@@ -180,7 +180,7 @@ void ibx_disable_display_interrupt(struct drm_i915_private *i915, u32 bits) ...@@ -180,7 +180,7 @@ void ibx_disable_display_interrupt(struct drm_i915_private *i915, u32 bits)
u32 i915_pipestat_enable_mask(struct drm_i915_private *dev_priv, u32 i915_pipestat_enable_mask(struct drm_i915_private *dev_priv,
enum pipe pipe) enum pipe pipe)
{ {
u32 status_mask = dev_priv->pipestat_irq_mask[pipe]; u32 status_mask = dev_priv->display.irq.pipestat_irq_mask[pipe];
u32 enable_mask = status_mask << 16; u32 enable_mask = status_mask << 16;
lockdep_assert_held(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
...@@ -234,10 +234,10 @@ void i915_enable_pipestat(struct drm_i915_private *dev_priv, ...@@ -234,10 +234,10 @@ void i915_enable_pipestat(struct drm_i915_private *dev_priv,
lockdep_assert_held(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
drm_WARN_ON(&dev_priv->drm, !intel_irqs_enabled(dev_priv)); drm_WARN_ON(&dev_priv->drm, !intel_irqs_enabled(dev_priv));
if ((dev_priv->pipestat_irq_mask[pipe] & status_mask) == status_mask) if ((dev_priv->display.irq.pipestat_irq_mask[pipe] & status_mask) == status_mask)
return; return;
dev_priv->pipestat_irq_mask[pipe] |= status_mask; dev_priv->display.irq.pipestat_irq_mask[pipe] |= status_mask;
enable_mask = i915_pipestat_enable_mask(dev_priv, pipe); enable_mask = i915_pipestat_enable_mask(dev_priv, pipe);
intel_uncore_write(&dev_priv->uncore, reg, enable_mask | status_mask); intel_uncore_write(&dev_priv->uncore, reg, enable_mask | status_mask);
...@@ -257,10 +257,10 @@ void i915_disable_pipestat(struct drm_i915_private *dev_priv, ...@@ -257,10 +257,10 @@ void i915_disable_pipestat(struct drm_i915_private *dev_priv,
lockdep_assert_held(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
drm_WARN_ON(&dev_priv->drm, !intel_irqs_enabled(dev_priv)); drm_WARN_ON(&dev_priv->drm, !intel_irqs_enabled(dev_priv));
if ((dev_priv->pipestat_irq_mask[pipe] & status_mask) == 0) if ((dev_priv->display.irq.pipestat_irq_mask[pipe] & status_mask) == 0)
return; return;
dev_priv->pipestat_irq_mask[pipe] &= ~status_mask; dev_priv->display.irq.pipestat_irq_mask[pipe] &= ~status_mask;
enable_mask = i915_pipestat_enable_mask(dev_priv, pipe); enable_mask = i915_pipestat_enable_mask(dev_priv, pipe);
intel_uncore_write(&dev_priv->uncore, reg, enable_mask | status_mask); intel_uncore_write(&dev_priv->uncore, reg, enable_mask | status_mask);
...@@ -402,7 +402,7 @@ void i9xx_pipestat_irq_reset(struct drm_i915_private *dev_priv) ...@@ -402,7 +402,7 @@ void i9xx_pipestat_irq_reset(struct drm_i915_private *dev_priv)
PIPESTAT_INT_STATUS_MASK | PIPESTAT_INT_STATUS_MASK |
PIPE_FIFO_UNDERRUN_STATUS); PIPE_FIFO_UNDERRUN_STATUS);
dev_priv->pipestat_irq_mask[pipe] = 0; dev_priv->display.irq.pipestat_irq_mask[pipe] = 0;
} }
} }
...@@ -446,7 +446,7 @@ void i9xx_pipestat_irq_ack(struct drm_i915_private *dev_priv, ...@@ -446,7 +446,7 @@ void i9xx_pipestat_irq_ack(struct drm_i915_private *dev_priv,
break; break;
} }
if (iir & iir_bit) if (iir & iir_bit)
status_mask |= dev_priv->pipestat_irq_mask[pipe]; status_mask |= dev_priv->display.irq.pipestat_irq_mask[pipe];
if (!status_mask) if (!status_mask)
continue; continue;
......
...@@ -241,7 +241,6 @@ struct drm_i915_private { ...@@ -241,7 +241,6 @@ struct drm_i915_private {
/** Cached value of IMR to avoid reads in updating the bitfield */ /** Cached value of IMR to avoid reads in updating the bitfield */
u32 irq_mask; u32 irq_mask;
u32 pipestat_irq_mask[I915_MAX_PIPES];
bool preserve_bios_swizzle; bool preserve_bios_swizzle;
......
...@@ -499,7 +499,6 @@ struct xe_device { ...@@ -499,7 +499,6 @@ struct xe_device {
/* only to allow build, not used functionally */ /* only to allow build, not used functionally */
u32 irq_mask; u32 irq_mask;
u32 pipestat_irq_mask[I915_MAX_PIPES];
u32 enabled_irq_mask; u32 enabled_irq_mask;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment