mirror of
https://github.com/torvalds/linux.git
synced 2026-04-26 10:32:25 -04:00
drm/i915/irq: pass display to macros that expect display
Underneath, the HAS_PCH_NOP(), DISPLAY_VER(), HAS_FBC(), and HAS_HOTPLUG() macros really expect a struct intel_display. Switch to it in preparation for removing the transitional __to_intel_display() macro. Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://lore.kernel.org/r/de3302dd9ebc21226a9dadcbcdeeaf01e57186be.1754499175.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -439,7 +439,7 @@ static irqreturn_t ilk_irq_handler(int irq, void *arg)
|
||||
* able to process them after we restore SDEIER (as soon as we restore
|
||||
* it, we'll get an interrupt if SDEIIR still has something to process
|
||||
* due to its back queue). */
|
||||
if (!HAS_PCH_NOP(i915)) {
|
||||
if (!HAS_PCH_NOP(display)) {
|
||||
sde_ier = raw_reg_read(regs, SDEIER);
|
||||
raw_reg_write(regs, SDEIER, 0);
|
||||
}
|
||||
@@ -459,7 +459,7 @@ static irqreturn_t ilk_irq_handler(int irq, void *arg)
|
||||
de_iir = raw_reg_read(regs, DEIIR);
|
||||
if (de_iir) {
|
||||
raw_reg_write(regs, DEIIR, de_iir);
|
||||
if (DISPLAY_VER(i915) >= 7)
|
||||
if (DISPLAY_VER(display) >= 7)
|
||||
ivb_display_irq_handler(display, de_iir);
|
||||
else
|
||||
ilk_display_irq_handler(display, de_iir);
|
||||
@@ -834,6 +834,7 @@ static void cherryview_irq_postinstall(struct drm_i915_private *dev_priv)
|
||||
|
||||
static u32 i9xx_error_mask(struct drm_i915_private *i915)
|
||||
{
|
||||
struct intel_display *display = i915->display;
|
||||
/*
|
||||
* On gen2/3 FBC generates (seemingly spurious)
|
||||
* display INVALID_GTT/INVALID_GTT_PTE table errors.
|
||||
@@ -846,7 +847,7 @@ static u32 i9xx_error_mask(struct drm_i915_private *i915)
|
||||
* Unfortunately we can't mask off individual PGTBL_ER bits,
|
||||
* so we just have to mask off all page table errors via EMR.
|
||||
*/
|
||||
if (HAS_FBC(i915))
|
||||
if (HAS_FBC(display))
|
||||
return I915_ERROR_MEMORY_REFRESH;
|
||||
else
|
||||
return I915_ERROR_PAGE_TABLE |
|
||||
@@ -924,12 +925,12 @@ static void i915_irq_postinstall(struct drm_i915_private *dev_priv)
|
||||
I915_MASTER_ERROR_INTERRUPT |
|
||||
I915_USER_INTERRUPT;
|
||||
|
||||
if (DISPLAY_VER(dev_priv) >= 3) {
|
||||
if (DISPLAY_VER(display) >= 3) {
|
||||
dev_priv->irq_mask &= ~I915_ASLE_INTERRUPT;
|
||||
enable_mask |= I915_ASLE_INTERRUPT;
|
||||
}
|
||||
|
||||
if (HAS_HOTPLUG(dev_priv)) {
|
||||
if (HAS_HOTPLUG(display)) {
|
||||
dev_priv->irq_mask &= ~I915_DISPLAY_PORT_INTERRUPT;
|
||||
enable_mask |= I915_DISPLAY_PORT_INTERRUPT;
|
||||
}
|
||||
@@ -963,7 +964,7 @@ static irqreturn_t i915_irq_handler(int irq, void *arg)
|
||||
|
||||
ret = IRQ_HANDLED;
|
||||
|
||||
if (HAS_HOTPLUG(dev_priv) &&
|
||||
if (HAS_HOTPLUG(display) &&
|
||||
iir & I915_DISPLAY_PORT_INTERRUPT)
|
||||
hotplug_status = i9xx_hpd_irq_ack(display);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user