aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Cooksey2016-03-09 15:06:17 -0600
committerPraneeth Bajjuri2016-03-16 16:55:55 -0500
commit3a96195f1064726bae6dfe431becef0af4be6f20 (patch)
treecc63b3965e8446f52841b81e7f6cce88ea7376c9
parentb45e1c1a604ae715723d211db98caac6a9c08577 (diff)
downloadkernel-video-3a96195f1064726bae6dfe431becef0af4be6f20.tar.gz
kernel-video-3a96195f1064726bae6dfe431becef0af4be6f20.tar.xz
kernel-video-3a96195f1064726bae6dfe431becef0af4be6f20.zip
OMAPDRM: Force HDMI WP ON to recieve HPD events
Forces the HDMI WP core on, otherwise the core will not generate a HPD interrupt since the module is off. The side effect of forcing the module on is that default display modes are selected. A reprobe, accomplished by software disconnect and reconnect of the monitor, occurs upon HPD. Change-Id: Ib25d9257f98aaf054d7629f91aaac826abb58f3b Signed-off-by: Marcus Cooksey <mcooksey@ti.com>
-rw-r--r--drivers/gpu/drm/drm_crtc_helper.c3
-rw-r--r--drivers/gpu/drm/omapdrm/omap_encoder.c23
2 files changed, 25 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index ea92b827e78..ba4991c3d70 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -194,7 +194,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
194 } 194 }
195 195
196prune: 196prune:
197 drm_mode_prune_invalid(dev, &connector->modes, verbose_prune); 197 if (!connector->force)
198 drm_mode_prune_invalid(dev, &connector->modes, verbose_prune);
198 199
199 if (list_empty(&connector->modes)) 200 if (list_empty(&connector->modes))
200 return 0; 201 return 0;
diff --git a/drivers/gpu/drm/omapdrm/omap_encoder.c b/drivers/gpu/drm/omapdrm/omap_encoder.c
index 7445fb1491a..a56e867af4d 100644
--- a/drivers/gpu/drm/omapdrm/omap_encoder.c
+++ b/drivers/gpu/drm/omapdrm/omap_encoder.c
@@ -144,8 +144,31 @@ int omap_encoder_set_enabled(struct drm_encoder *encoder, bool enabled)
144 struct omap_encoder *omap_encoder = to_omap_encoder(encoder); 144 struct omap_encoder *omap_encoder = to_omap_encoder(encoder);
145 struct omap_dss_device *dssdev = omap_encoder->dssdev; 145 struct omap_dss_device *dssdev = omap_encoder->dssdev;
146 struct omap_dss_driver *dssdrv = dssdev->driver; 146 struct omap_dss_driver *dssdrv = dssdev->driver;
147 struct drm_device *dev = encoder->dev;
148 struct drm_connector *connector;
149 bool hdmi_mode;
150
151 hdmi_mode = false;
152 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
153 if (connector->encoder == encoder) {
154 hdmi_mode = omap_connector_get_hdmi_mode(connector);
155 break;
156 }
157 }
147 158
148 if (enabled) { 159 if (enabled) {
160 if (connector->force) {
161 /* This is needed when the connector is forced on. */
162 /* The connector is configured with default modes */
163 /* even if HDMI cable is not connected. This */
164 /* toggle sequence forces a probe of the monitor for */
165 /* valid modes before enablin the monitor */
166 dssdrv->enable(dssdev);
167 connector->funcs->fill_modes(connector,
168 dev->mode_config.max_width,
169 dev->mode_config.max_height);
170 dssdrv->disable(dssdev);
171 }
149 return dssdrv->enable(dssdev); 172 return dssdrv->enable(dssdev);
150 } else { 173 } else {
151 dssdrv->disable(dssdev); 174 dssdrv->disable(dssdev);