Skip to content

Commit 5f34175

Browse files
committed
drm/bridge: adv7511: Reset registers on hotplug
The bridge loses its hw state when the cable is unplugged. If we detect this case in the hpd handler, reset its state. Reported-by: Rob Clark <robdclark@gmail.com> Tested-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180703165648.120401-1-seanpaul@chromium.org
1 parent 3156b53 commit 5f34175

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

drivers/gpu/drm/bridge/adv7511/adv7511_drv.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,18 @@ static void adv7511_hpd_work(struct work_struct *work)
429429
else
430430
status = connector_status_disconnected;
431431

432+
/*
433+
* The bridge resets its registers on unplug. So when we get a plug
434+
* event and we're already supposed to be powered, cycle the bridge to
435+
* restore its state.
436+
*/
437+
if (status == connector_status_connected &&
438+
adv7511->connector.status == connector_status_disconnected &&
439+
adv7511->powered) {
440+
regcache_mark_dirty(adv7511->regmap);
441+
adv7511_power_on(adv7511);
442+
}
443+
432444
if (adv7511->connector.status != status) {
433445
adv7511->connector.status = status;
434446
if (status == connector_status_disconnected)

0 commit comments

Comments
 (0)