From: Ville Syrjälä <[email protected]>

Make sure our hpd pin count doesn't exceed the bitmasks we use
for tracking pending hotplugs. Not ever close to the limit yet,
but no harm in making sure either.

Signed-off-by: Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/i915_irq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index bb7c754979f8..c107e0837026 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1713,6 +1713,8 @@ static void intel_get_hpd_pins(struct drm_i915_private 
*dev_priv,
 {
        enum hpd_pin pin;
 
+       BUILD_BUG_ON(HPD_NUM_PINS > 32);
+
        for_each_hpd_pin(pin) {
                if ((hpd[pin] & hotplug_trigger) == 0)
                        continue;
-- 
2.16.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to