diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-05-14 00:31:07 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-05-25 15:34:00 +0300 |
commit | a1d0503d26ea2ef04f3f013d379e8f4d29c27127 (patch) | |
tree | d4ef4ff9b0fee65f6385296521d27dd327f83dd0 /drivers/gpu/drm/i2c/adv7511.c | |
parent | bdcddf95e82b1c4e370fc1196b1f4f50f775dab4 (diff) | |
download | linux-a1d0503d26ea2ef04f3f013d379e8f4d29c27127.tar.xz |
drm: adv7511: Fix crash in IRQ handler when no encoder is associated
The ADV7511 is probed before its slave encoder init function associates
it with an encoder. This creates a time window during which hot plug
detection interrupts can occur with an encoder, resulting in a crash in
the IRQ handler.
Fix this by ignoring hot plug detection IRQs when no encoder is
associated yet.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Diffstat (limited to 'drivers/gpu/drm/i2c/adv7511.c')
-rw-r--r-- | drivers/gpu/drm/i2c/adv7511.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i2c/adv7511.c b/drivers/gpu/drm/i2c/adv7511.c index b728523e194f..2aaa3c88999e 100644 --- a/drivers/gpu/drm/i2c/adv7511.c +++ b/drivers/gpu/drm/i2c/adv7511.c @@ -438,7 +438,7 @@ static int adv7511_irq_process(struct adv7511 *adv7511) regmap_write(adv7511->regmap, ADV7511_REG_INT(0), irq0); regmap_write(adv7511->regmap, ADV7511_REG_INT(1), irq1); - if (irq0 & ADV7511_INT0_HDP) + if (irq0 & ADV7511_INT0_HDP && adv7511->encoder) drm_helper_hpd_irq_event(adv7511->encoder->dev); if (irq0 & ADV7511_INT0_EDID_READY || irq1 & ADV7511_INT1_DDC_ERROR) { |