mirror of https://gitee.com/openkylin/linux.git
drm/i915: reduce indent in i9xx_hpd_irq_handler
Bail out early if nothing to do. No functional changes. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
b1b38278e1
commit
0d2e42970c
|
@ -1756,28 +1756,29 @@ static void i9xx_hpd_irq_handler(struct drm_device *dev)
|
||||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||||
u32 hotplug_status = I915_READ(PORT_HOTPLUG_STAT);
|
u32 hotplug_status = I915_READ(PORT_HOTPLUG_STAT);
|
||||||
|
|
||||||
if (hotplug_status) {
|
if (!hotplug_status)
|
||||||
I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status);
|
return;
|
||||||
/*
|
|
||||||
* Make sure hotplug status is cleared before we clear IIR, or else we
|
|
||||||
* may miss hotplug events.
|
|
||||||
*/
|
|
||||||
POSTING_READ(PORT_HOTPLUG_STAT);
|
|
||||||
|
|
||||||
if (IS_G4X(dev) || IS_VALLEYVIEW(dev)) {
|
I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status);
|
||||||
u32 hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_G4X;
|
/*
|
||||||
|
* Make sure hotplug status is cleared before we clear IIR, or else we
|
||||||
|
* may miss hotplug events.
|
||||||
|
*/
|
||||||
|
POSTING_READ(PORT_HOTPLUG_STAT);
|
||||||
|
|
||||||
intel_hpd_irq_handler(dev, hotplug_trigger, 0, hpd_status_g4x);
|
if (IS_G4X(dev) || IS_VALLEYVIEW(dev)) {
|
||||||
} else {
|
u32 hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_G4X;
|
||||||
u32 hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_I915;
|
|
||||||
|
|
||||||
intel_hpd_irq_handler(dev, hotplug_trigger, 0, hpd_status_i915);
|
intel_hpd_irq_handler(dev, hotplug_trigger, 0, hpd_status_g4x);
|
||||||
}
|
} else {
|
||||||
|
u32 hotplug_trigger = hotplug_status & HOTPLUG_INT_STATUS_I915;
|
||||||
|
|
||||||
if ((IS_G4X(dev) || IS_VALLEYVIEW(dev)) &&
|
intel_hpd_irq_handler(dev, hotplug_trigger, 0, hpd_status_i915);
|
||||||
hotplug_status & DP_AUX_CHANNEL_MASK_INT_STATUS_G4X)
|
|
||||||
dp_aux_irq_handler(dev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((IS_G4X(dev) || IS_VALLEYVIEW(dev)) &&
|
||||||
|
hotplug_status & DP_AUX_CHANNEL_MASK_INT_STATUS_G4X)
|
||||||
|
dp_aux_irq_handler(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t valleyview_irq_handler(int irq, void *arg)
|
static irqreturn_t valleyview_irq_handler(int irq, void *arg)
|
||||||
|
|
Loading…
Reference in New Issue