diff options
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_crtc.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_crtc.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index 197d05312306..6e7a777907f5 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c | |||
@@ -419,12 +419,12 @@ static enum drm_mode_status omap_crtc_mode_valid(struct drm_crtc *crtc, | |||
419 | static void omap_crtc_mode_set_nofb(struct drm_crtc *crtc) | 419 | static void omap_crtc_mode_set_nofb(struct drm_crtc *crtc) |
420 | { | 420 | { |
421 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); | 421 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); |
422 | struct omap_dss_device *display = omap_crtc->pipe->display; | ||
422 | struct drm_display_mode *mode = &crtc->state->adjusted_mode; | 423 | struct drm_display_mode *mode = &crtc->state->adjusted_mode; |
423 | struct omap_drm_private *priv = crtc->dev->dev_private; | ||
424 | const u32 flags_mask = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_DE_LOW | | 424 | const u32 flags_mask = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_DE_LOW | |
425 | DISPLAY_FLAGS_PIXDATA_POSEDGE | DISPLAY_FLAGS_PIXDATA_NEGEDGE | | 425 | DISPLAY_FLAGS_PIXDATA_POSEDGE | DISPLAY_FLAGS_PIXDATA_NEGEDGE | |
426 | DISPLAY_FLAGS_SYNC_POSEDGE | DISPLAY_FLAGS_SYNC_NEGEDGE; | 426 | DISPLAY_FLAGS_SYNC_POSEDGE | DISPLAY_FLAGS_SYNC_NEGEDGE; |
427 | unsigned int i; | 427 | struct videomode vm = {0}; |
428 | 428 | ||
429 | DBG("%s: set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", | 429 | DBG("%s: set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", |
430 | omap_crtc->name, mode->base.id, mode->name, | 430 | omap_crtc->name, mode->base.id, mode->name, |
@@ -447,25 +447,8 @@ static void omap_crtc_mode_set_nofb(struct drm_crtc *crtc) | |||
447 | * has been changed to the DRM model. | 447 | * has been changed to the DRM model. |
448 | */ | 448 | */ |
449 | 449 | ||
450 | for (i = 0; i < priv->num_pipes; ++i) { | 450 | display->ops->get_timings(display, &vm); |
451 | struct drm_encoder *encoder = priv->pipes[i].encoder; | 451 | omap_crtc->vm.flags |= vm.flags & flags_mask; |
452 | |||
453 | if (encoder->crtc == crtc) { | ||
454 | struct omap_dss_device *dssdev; | ||
455 | |||
456 | dssdev = omap_encoder_get_dssdev(encoder); | ||
457 | |||
458 | if (dssdev) { | ||
459 | struct videomode vm = {0}; | ||
460 | |||
461 | dssdev->ops->get_timings(dssdev, &vm); | ||
462 | |||
463 | omap_crtc->vm.flags |= vm.flags & flags_mask; | ||
464 | } | ||
465 | |||
466 | break; | ||
467 | } | ||
468 | } | ||
469 | } | 452 | } |
470 | 453 | ||
471 | static int omap_crtc_atomic_check(struct drm_crtc *crtc, | 454 | static int omap_crtc_atomic_check(struct drm_crtc *crtc, |