diff options
author | Sean Paul <seanpaul@chromium.org> | 2018-07-03 12:56:03 -0400 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2018-07-09 13:05:55 -0400 |
commit | 5f3417569165a8ee57654217f73e0160312f409c (patch) | |
tree | a72adb92f508f116ff4a8192554b932b3bbe00c6 /drivers | |
parent | 3156b53c2e2fadafa1a16412a8791b38f94b5bdc (diff) | |
download | linux-stable-5f3417569165a8ee57654217f73e0160312f409c.tar.gz linux-stable-5f3417569165a8ee57654217f73e0160312f409c.tar.bz2 linux-stable-5f3417569165a8ee57654217f73e0160312f409c.zip |
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
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index 73021b388e12..dd3ff2f2cdce 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c @@ -429,6 +429,18 @@ static void adv7511_hpd_work(struct work_struct *work) else status = connector_status_disconnected; + /* + * The bridge resets its registers on unplug. So when we get a plug + * event and we're already supposed to be powered, cycle the bridge to + * restore its state. + */ + if (status == connector_status_connected && + adv7511->connector.status == connector_status_disconnected && + adv7511->powered) { + regcache_mark_dirty(adv7511->regmap); + adv7511_power_on(adv7511); + } + if (adv7511->connector.status != status) { adv7511->connector.status = status; if (status == connector_status_disconnected) |