diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-02-18 08:19:33 -0500 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-03-19 06:28:55 -0400 |
commit | 2e96206c4f952295e11c311fbb2a7aa2105024af (patch) | |
tree | e62bc56dfeec42f71ef8652d81f6156b825c8c2c | |
parent | 6b94aea01d4f96235e947892f6c39f837045e741 (diff) |
drm: adv7511: Fix DDC error interrupt handling
The DDC error interrupt bit is located in REG_INT1, not REG_INT0. Update
both the interrupt wait code and the interrupt sources reset code
accordingly.
Cc: stable@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-rw-r--r-- | drivers/gpu/drm/i2c/adv7511.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i2c/adv7511.c b/drivers/gpu/drm/i2c/adv7511.c index 61aa824d45d2..840895a77825 100644 --- a/drivers/gpu/drm/i2c/adv7511.c +++ b/drivers/gpu/drm/i2c/adv7511.c | |||
@@ -467,14 +467,16 @@ static int adv7511_get_edid_block(void *data, u8 *buf, unsigned int block, | |||
467 | block); | 467 | block); |
468 | ret = adv7511_wait_for_interrupt(adv7511, | 468 | ret = adv7511_wait_for_interrupt(adv7511, |
469 | ADV7511_INT0_EDID_READY | | 469 | ADV7511_INT0_EDID_READY | |
470 | ADV7511_INT1_DDC_ERROR, 200); | 470 | (ADV7511_INT1_DDC_ERROR << 8), 200); |
471 | 471 | ||
472 | if (!(ret & ADV7511_INT0_EDID_READY)) | 472 | if (!(ret & ADV7511_INT0_EDID_READY)) |
473 | return -EIO; | 473 | return -EIO; |
474 | } | 474 | } |
475 | 475 | ||
476 | regmap_write(adv7511->regmap, ADV7511_REG_INT(0), | 476 | regmap_write(adv7511->regmap, ADV7511_REG_INT(0), |
477 | ADV7511_INT0_EDID_READY | ADV7511_INT1_DDC_ERROR); | 477 | ADV7511_INT0_EDID_READY); |
478 | regmap_write(adv7511->regmap, ADV7511_REG_INT(1), | ||
479 | ADV7511_INT1_DDC_ERROR); | ||
478 | 480 | ||
479 | /* Break this apart, hopefully more I2C controllers will | 481 | /* Break this apart, hopefully more I2C controllers will |
480 | * support 64 byte transfers than 256 byte transfers | 482 | * support 64 byte transfers than 256 byte transfers |
@@ -528,7 +530,9 @@ static int adv7511_get_modes(struct drm_encoder *encoder, | |||
528 | /* Reading the EDID only works if the device is powered */ | 530 | /* Reading the EDID only works if the device is powered */ |
529 | if (adv7511->dpms_mode != DRM_MODE_DPMS_ON) { | 531 | if (adv7511->dpms_mode != DRM_MODE_DPMS_ON) { |
530 | regmap_write(adv7511->regmap, ADV7511_REG_INT(0), | 532 | regmap_write(adv7511->regmap, ADV7511_REG_INT(0), |
531 | ADV7511_INT0_EDID_READY | ADV7511_INT1_DDC_ERROR); | 533 | ADV7511_INT0_EDID_READY); |
534 | regmap_write(adv7511->regmap, ADV7511_REG_INT(1), | ||
535 | ADV7511_INT1_DDC_ERROR); | ||
532 | regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER, | 536 | regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER, |
533 | ADV7511_POWER_POWER_DOWN, 0); | 537 | ADV7511_POWER_POWER_DOWN, 0); |
534 | adv7511->current_edid_segment = -1; | 538 | adv7511->current_edid_segment = -1; |
@@ -563,7 +567,9 @@ static void adv7511_encoder_dpms(struct drm_encoder *encoder, int mode) | |||
563 | adv7511->current_edid_segment = -1; | 567 | adv7511->current_edid_segment = -1; |
564 | 568 | ||
565 | regmap_write(adv7511->regmap, ADV7511_REG_INT(0), | 569 | regmap_write(adv7511->regmap, ADV7511_REG_INT(0), |
566 | ADV7511_INT0_EDID_READY | ADV7511_INT1_DDC_ERROR); | 570 | ADV7511_INT0_EDID_READY); |
571 | regmap_write(adv7511->regmap, ADV7511_REG_INT(1), | ||
572 | ADV7511_INT1_DDC_ERROR); | ||
567 | regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER, | 573 | regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER, |
568 | ADV7511_POWER_POWER_DOWN, 0); | 574 | ADV7511_POWER_POWER_DOWN, 0); |
569 | /* | 575 | /* |