Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1531899 > unrolled thread

[RFC][PATCH 0/5 v2] adv7511 EDID probing improvements

Started byJohn Stultz <john.stultz@linaro.org>
First post2016-11-29 06:10 +0100
Last post2016-12-12 20:10 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [RFC][PATCH 0/5 v2] adv7511 EDID probing improvements John Stultz <john.stultz@linaro.org> - 2016-11-29 06:10 +0100
    [RFC][PATCH 3/5 v2] drm/bridge: adv7511: Enable HPD interrupts to support hotplug and improve monitor detection John Stultz <john.stultz@linaro.org> - 2016-11-29 06:10 +0100
    Re: [RFC][PATCH 0/5 v2] adv7511 EDID probing improvements Archit Taneja <architt@codeaurora.org> - 2016-12-12 09:50 +0100
      Re: [RFC][PATCH 0/5 v2] adv7511 EDID probing improvements John Stultz <john.stultz@linaro.org> - 2016-12-12 20:10 +0100

#1531899 — [RFC][PATCH 0/5 v2] adv7511 EDID probing improvements

FromJohn Stultz <john.stultz@linaro.org>
Date2016-11-29 06:10 +0100
Subject[RFC][PATCH 0/5 v2] adv7511 EDID probing improvements
Message-ID<sIIQ1-3R4-3@gated-at.bofh.it>
Wanted to send out v2 of this patch set improving the EDID
probing on the adv7511 used on HiKey.

The first three patches are fixups that are hopefully straight
forward, integrating feedback I got from Laurant.

One of the previous patches that Laurant had concerns about, I
broke into two patches, which are the last two in this series. 
The core issue seems to be something going wrong with the regmap
cache state for the ADV7511_REG_EDID_I2C_ADDR (0x43) register
which results in i2c_transfer errors if we don't do the
regcache_sync/_mark_dirty() calls. I suspect there might be a
better solution there, so suggestions will be very welcome.

Thoughts and feedback would be appreciated!

thanks
-john

Cc: David Airlie <airlied@linux.ie>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org

Archit Taneja (1):
  drm/bridge: adv7511: Enable HPD interrupts to support hotplug and
    improve monitor detection

John Stultz (4):
  drm/bridge: adv7511: Use work_struct to defer hotplug handing to out
    of irq context
  drm/bridge: adv7511: Switch to using drm_kms_helper_hotplug_event()
  drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be
    reused internally
  drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID

 drivers/gpu/drm/bridge/adv7511/adv7511.h     |  2 ++
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 49 ++++++++++++++++------------
 2 files changed, 31 insertions(+), 20 deletions(-)

-- 
2.7.4

[toc] | [next] | [standalone]


#1531900 — [RFC][PATCH 3/5 v2] drm/bridge: adv7511: Enable HPD interrupts to support hotplug and improve monitor detection

FromJohn Stultz <john.stultz@linaro.org>
Date2016-11-29 06:10 +0100
Subject[RFC][PATCH 3/5 v2] drm/bridge: adv7511: Enable HPD interrupts to support hotplug and improve monitor detection
Message-ID<sIIQ1-3R4-15@gated-at.bofh.it>
In reply to#1531899
From: Archit Taneja <architt@codeaurora.org>

On some adv7511 implementations, we can get some spurious
disconnect signals which can cause monitor probing to fail.

This patch enables HPD (hot plug detect) interrupt support
which allows the monitor to be properly re-initialized when
the spurious disconnect signal goes away.

This also enables proper hotplug support.

Cc: David Airlie <airlied@linux.ie>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Originally-by: Archit Taneja <architt@codeaurora.org>
[jstultz: Added proper commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index 2caca0c..9f8dffd 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -338,7 +338,7 @@ static void adv7511_power_on(struct adv7511 *adv7511)
 		 * Still, let's be safe and stick to the documentation.
 		 */
 		regmap_write(adv7511->regmap, ADV7511_REG_INT_ENABLE(0),
-			     ADV7511_INT0_EDID_READY);
+			     ADV7511_INT0_EDID_READY | ADV7511_INT0_HPD);
 		regmap_write(adv7511->regmap, ADV7511_REG_INT_ENABLE(1),
 			     ADV7511_INT1_DDC_ERROR);
 	}
@@ -833,6 +833,10 @@ static int adv7511_bridge_attach(struct drm_bridge *bridge)
 	if (adv->type == ADV7533)
 		ret = adv7533_attach_dsi(adv);
 
+	if (adv->i2c_main->irq)
+		regmap_write(adv->regmap, ADV7511_REG_INT_ENABLE(0),
+				ADV7511_INT0_HPD);
+
 	return ret;
 }
 
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1540183

FromArchit Taneja <architt@codeaurora.org>
Date2016-12-12 09:50 +0100
Message-ID<sNut4-25U-5@gated-at.bofh.it>
In reply to#1531899
Hi,

On 11/29/2016 10:34 AM, John Stultz wrote:
> Wanted to send out v2 of this patch set improving the EDID
> probing on the adv7511 used on HiKey.
>
> The first three patches are fixups that are hopefully straight
> forward, integrating feedback I got from Laurant.
>
> One of the previous patches that Laurant had concerns about, I
> broke into two patches, which are the last two in this series.
> The core issue seems to be something going wrong with the regmap
> cache state for the ADV7511_REG_EDID_I2C_ADDR (0x43) register
> which results in i2c_transfer errors if we don't do the
> regcache_sync/_mark_dirty() calls. I suspect there might be a
> better solution there, so suggestions will be very welcome.
>
> Thoughts and feedback would be appreciated!

I tested this for ADV7533 on DB410c and it works well. We can
pull this if it works fine for ADV7511 too. Laurent, could we
get an Ack for the series from you?

Thanks,
Archit

>
> thanks
> -john
>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Archit Taneja <architt@codeaurora.org>
> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: dri-devel@lists.freedesktop.org
>
> Archit Taneja (1):
>   drm/bridge: adv7511: Enable HPD interrupts to support hotplug and
>     improve monitor detection
>
> John Stultz (4):
>   drm/bridge: adv7511: Use work_struct to defer hotplug handing to out
>     of irq context
>   drm/bridge: adv7511: Switch to using drm_kms_helper_hotplug_event()
>   drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be
>     reused internally
>   drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID
>
>  drivers/gpu/drm/bridge/adv7511/adv7511.h     |  2 ++
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 49 ++++++++++++++++------------
>  2 files changed, 31 insertions(+), 20 deletions(-)
>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [prev] | [next] | [standalone]


#1540561

FromJohn Stultz <john.stultz@linaro.org>
Date2016-12-12 20:10 +0100
Message-ID<sNE94-8b3-33@gated-at.bofh.it>
In reply to#1540183
On Mon, Dec 12, 2016 at 12:40 AM, Archit Taneja <architt@codeaurora.org> wrote:
> Hi,
>
> On 11/29/2016 10:34 AM, John Stultz wrote:
>>
>> Wanted to send out v2 of this patch set improving the EDID
>> probing on the adv7511 used on HiKey.
>>
>> The first three patches are fixups that are hopefully straight
>> forward, integrating feedback I got from Laurant.
>>
>> One of the previous patches that Laurant had concerns about, I
>> broke into two patches, which are the last two in this series.
>> The core issue seems to be something going wrong with the regmap
>> cache state for the ADV7511_REG_EDID_I2C_ADDR (0x43) register
>> which results in i2c_transfer errors if we don't do the
>> regcache_sync/_mark_dirty() calls. I suspect there might be a
>> better solution there, so suggestions will be very welcome.
>>
>> Thoughts and feedback would be appreciated!
>
>
> I tested this for ADV7533 on DB410c and it works well. We can
> pull this if it works fine for ADV7511 too. Laurent, could we
> get an Ack for the series from you?

I'll be re-sending the series (v3) later today to include fixups
suggested by Laurent and others.

thanks
-john

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web