]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
HACK: drm/i2c: adv7511: Remove hotplug event handling
authorArchit Taneja <architt@codeaurora.org>
Mon, 7 Sep 2015 06:15:43 +0000 (11:45 +0530)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 6 Apr 2018 06:06:53 +0000 (06:06 +0000)
Hotplug detect is currently unstable. Temporarily remove the driver's
hotplug handling code.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
drivers/gpu/drm/i2c/adv7511.c

index 43259bee09cc621fcfa0fcd2efb6a0097e94af5f..a314ef4164c526b177e272e2f6a68355a8ad8f06 100644 (file)
@@ -28,6 +28,8 @@ static const int edid_i2c_addr = 0x7e;
 static const int packet_i2c_addr = 0x70;
 static const int cec_i2c_addr = 0x78;
 
+#define HPD_ENABLE     0
+
 static struct adv7511 *encoder_to_adv7511(struct drm_encoder *encoder)
 {
        return to_encoder_slave(encoder)->slave_priv;
@@ -493,6 +495,7 @@ static void adv7511_power_off(struct adv7511 *adv7511)
  * Interrupt and hotplug detection
  */
 
+#if HPD_ENABLE
 static bool adv7511_hpd(struct adv7511 *adv7511)
 {
        unsigned int irq0;
@@ -510,6 +513,7 @@ static bool adv7511_hpd(struct adv7511 *adv7511)
 
        return false;
 }
+#endif
 
 static void adv7511_hpd_work(struct work_struct *work)
 {
@@ -717,7 +721,9 @@ adv7511_detect(struct adv7511 *adv7511,
 {
        enum drm_connector_status status;
        unsigned int val;
+#if HPD_ENABLE
        bool hpd;
+#endif
        int ret;
 
        ret = regmap_read(adv7511->regmap, ADV7511_REG_STATUS, &val);
@@ -729,6 +735,7 @@ adv7511_detect(struct adv7511 *adv7511,
        else
                status = connector_status_disconnected;
 
+#if HPD_ENABLE
        hpd = adv7511_hpd(adv7511);
 
        /* The chip resets itself when the cable is disconnected, so in case
@@ -747,6 +754,7 @@ adv7511_detect(struct adv7511 *adv7511,
                                   ADV7511_REG_POWER2_HDP_SRC_MASK,
                                   ADV7511_REG_POWER2_HDP_SRC_BOTH);
        }
+#endif
 
        adv7511->status = status;
        return status;
@@ -1008,6 +1016,11 @@ static void adv7533_bridge_post_disable(struct drm_bridge *bridge)
 {
        struct adv7511 *adv = bridge_to_adv7511(bridge);
 
+#if HPD_ENABLE
+       if (!adv7511->powered)
+               return;
+#endif
+
        adv7511_power_off(adv);
 }
 
@@ -1082,7 +1095,10 @@ static int adv7533_bridge_attach(struct drm_bridge *bridge)
                return -ENODEV;
        }
 
+#if HPD_ENABLE
        adv->connector.polled = DRM_CONNECTOR_POLL_HPD;
+#endif
+
        ret = drm_connector_init(bridge->dev, &adv->connector,
                        &adv7533_connector_funcs, DRM_MODE_CONNECTOR_HDMIA);
        if (ret) {
@@ -1094,7 +1110,9 @@ static int adv7533_bridge_attach(struct drm_bridge *bridge)
        drm_connector_register(&adv->connector);
        drm_mode_connector_attach_encoder(&adv->connector, adv->encoder);
 
+#if HPD_ENABLE
        drm_helper_hpd_irq_event(adv->connector.dev);
+#endif
 
        adv7533_attach_dsi(adv);