diff options
author | Jani Nikula <jani.nikula@intel.com> | 2015-06-18 13:06:17 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-06-22 16:04:43 +0300 |
commit | 8c841e57cadee2d0de7a1ea81c987088fb6a17fd (patch) | |
tree | 58a81631fddd824903c77fd51d3d6a5c09f0cedb /drivers/gpu/drm/i915/i915_irq.c | |
parent | 77913b39addfaa836929815515ff55cea1142b66 (diff) | |
download | linux-8c841e57cadee2d0de7a1ea81c987088fb6a17fd.tar.xz |
drm/i915: reduce line width in {pch, i9xx}_get_hpd_pins()
Make Paulo happier.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 2d3b2ccf9ce4..a6fbe6443d63 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1257,8 +1257,10 @@ static bool i9xx_port_hotplug_long_detect(enum port port, u32 val) /* Get a bit mask of pins that have triggered, and which ones may be long. */ static void pch_get_hpd_pins(u32 *pin_mask, u32 *long_mask, - u32 hotplug_trigger, u32 dig_hotplug_reg, const u32 hpd[HPD_NUM_PINS]) + u32 hotplug_trigger, u32 dig_hotplug_reg, + const u32 hpd[HPD_NUM_PINS]) { + enum port port; int i; *pin_mask = 0; @@ -1268,12 +1270,14 @@ static void pch_get_hpd_pins(u32 *pin_mask, u32 *long_mask, return; for_each_hpd_pin(i) { - if (hpd[i] & hotplug_trigger) { - *pin_mask |= BIT(i); + if ((hpd[i] & hotplug_trigger) == 0) + continue; - if (pch_port_hotplug_long_detect(intel_hpd_pin_to_port(i), dig_hotplug_reg)) - *long_mask |= BIT(i); - } + *pin_mask |= BIT(i); + + port = intel_hpd_pin_to_port(i); + if (pch_port_hotplug_long_detect(port, dig_hotplug_reg)) + *long_mask |= BIT(i); } DRM_DEBUG_DRIVER("hotplug event received, stat 0x%08x, dig 0x%08x, pins 0x%08x\n", @@ -1285,6 +1289,7 @@ static void pch_get_hpd_pins(u32 *pin_mask, u32 *long_mask, static void i9xx_get_hpd_pins(u32 *pin_mask, u32 *long_mask, u32 hotplug_trigger, const u32 hpd[HPD_NUM_PINS]) { + enum port port; int i; *pin_mask = 0; @@ -1294,12 +1299,14 @@ static void i9xx_get_hpd_pins(u32 *pin_mask, u32 *long_mask, return; for_each_hpd_pin(i) { - if (hpd[i] & hotplug_trigger) { - *pin_mask |= BIT(i); + if ((hpd[i] & hotplug_trigger) == 0) + continue; - if (i9xx_port_hotplug_long_detect(intel_hpd_pin_to_port(i), hotplug_trigger)) - *long_mask |= BIT(i); - } + *pin_mask |= BIT(i); + + port = intel_hpd_pin_to_port(i); + if (i9xx_port_hotplug_long_detect(port, hotplug_trigger)) + *long_mask |= BIT(i); } DRM_DEBUG_DRIVER("hotplug event received, stat 0x%08x, pins 0x%08x\n", |