Merge branches 'work.misc' and 'work.dcache' of git://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / drivers / gpu / drm / bridge / adv7511 / adv7511_drv.c
index 73021b388e12d3bc1ca7cabfc0178af223f77686..dd3ff2f2cdce00cb761ffe5be5bd15b0c915c38f 100644 (file)
@@ -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)