diff options
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_connector.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_connector.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c index b58d9a0bb53d..302f2ed245d0 100644 --- a/drivers/gpu/drm/omapdrm/omap_connector.c +++ b/drivers/gpu/drm/omapdrm/omap_connector.c | |||
@@ -252,7 +252,7 @@ static int omap_connector_mode_valid(struct drm_connector *connector, | |||
252 | struct drm_display_mode *mode) | 252 | struct drm_display_mode *mode) |
253 | { | 253 | { |
254 | struct omap_connector *omap_connector = to_omap_connector(connector); | 254 | struct omap_connector *omap_connector = to_omap_connector(connector); |
255 | struct omap_dss_device *dssdev = omap_connector->display; | 255 | struct omap_dss_device *dssdev; |
256 | struct videomode vm = {0}; | 256 | struct videomode vm = {0}; |
257 | struct drm_device *dev = connector->dev; | 257 | struct drm_device *dev = connector->dev; |
258 | struct drm_display_mode *new_mode; | 258 | struct drm_display_mode *new_mode; |
@@ -261,21 +261,27 @@ static int omap_connector_mode_valid(struct drm_connector *connector, | |||
261 | drm_display_mode_to_videomode(mode, &vm); | 261 | drm_display_mode_to_videomode(mode, &vm); |
262 | mode->vrefresh = drm_mode_vrefresh(mode); | 262 | mode->vrefresh = drm_mode_vrefresh(mode); |
263 | 263 | ||
264 | r = dssdev->ops->check_timings(dssdev, &vm); | 264 | for (dssdev = omap_connector->output; dssdev; dssdev = dssdev->next) { |
265 | if (!r) { | 265 | if (!dssdev->ops->check_timings) |
266 | /* check if vrefresh is still valid */ | 266 | continue; |
267 | new_mode = drm_mode_duplicate(dev, mode); | ||
268 | |||
269 | if (!new_mode) | ||
270 | return MODE_BAD; | ||
271 | 267 | ||
272 | new_mode->clock = vm.pixelclock / 1000; | 268 | r = dssdev->ops->check_timings(dssdev, &vm); |
273 | new_mode->vrefresh = 0; | 269 | if (r) |
274 | if (mode->vrefresh == drm_mode_vrefresh(new_mode)) | 270 | goto done; |
275 | ret = MODE_OK; | ||
276 | drm_mode_destroy(dev, new_mode); | ||
277 | } | 271 | } |
278 | 272 | ||
273 | /* check if vrefresh is still valid */ | ||
274 | new_mode = drm_mode_duplicate(dev, mode); | ||
275 | if (!new_mode) | ||
276 | return MODE_BAD; | ||
277 | |||
278 | new_mode->clock = vm.pixelclock / 1000; | ||
279 | new_mode->vrefresh = 0; | ||
280 | if (mode->vrefresh == drm_mode_vrefresh(new_mode)) | ||
281 | ret = MODE_OK; | ||
282 | drm_mode_destroy(dev, new_mode); | ||
283 | |||
284 | done: | ||
279 | DBG("connector: mode %s: " | 285 | DBG("connector: mode %s: " |
280 | "%d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", | 286 | "%d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", |
281 | (ret == MODE_OK) ? "valid" : "invalid", | 287 | (ret == MODE_OK) ? "valid" : "invalid", |