diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2015-01-14 17:31:11 -0500 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2015-03-20 08:30:20 -0400 |
commit | 297767b68146f2355dfb10cb57185bef7769dfd9 (patch) | |
tree | fcf6d94a7acca02a6312e014aaf9dde819daefbd /drivers/gpu/drm/omapdrm/omap_crtc.c | |
parent | 5a35876e2830511cb8110667fc426c6a6165a593 (diff) |
drm: omapdrm: Remove omap_crtc->full_update field
The full_update field is always set to true before calling
omap_crtc_appy(), resulting in its value always being true in the single
location where it is tested, in omap_crtc_pre_apply(). Remove it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_crtc.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_crtc.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index 3f811186c891..e04782489224 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c | |||
@@ -45,7 +45,6 @@ struct omap_crtc { | |||
45 | 45 | ||
46 | struct omap_video_timings timings; | 46 | struct omap_video_timings timings; |
47 | bool enabled; | 47 | bool enabled; |
48 | bool full_update; | ||
49 | 48 | ||
50 | struct omap_drm_apply apply; | 49 | struct omap_drm_apply apply; |
51 | 50 | ||
@@ -148,7 +147,6 @@ static void omap_crtc_set_timings(struct omap_overlay_manager *mgr, | |||
148 | struct omap_crtc *omap_crtc = omap_crtcs[mgr->id]; | 147 | struct omap_crtc *omap_crtc = omap_crtcs[mgr->id]; |
149 | DBG("%s", omap_crtc->name); | 148 | DBG("%s", omap_crtc->name); |
150 | omap_crtc->timings = *timings; | 149 | omap_crtc->timings = *timings; |
151 | omap_crtc->full_update = true; | ||
152 | } | 150 | } |
153 | 151 | ||
154 | static void omap_crtc_set_lcd_config(struct omap_overlay_manager *mgr, | 152 | static void omap_crtc_set_lcd_config(struct omap_overlay_manager *mgr, |
@@ -213,7 +211,6 @@ static void omap_crtc_dpms(struct drm_crtc *crtc, int mode) | |||
213 | 211 | ||
214 | if (enabled != omap_crtc->enabled) { | 212 | if (enabled != omap_crtc->enabled) { |
215 | omap_crtc->enabled = enabled; | 213 | omap_crtc->enabled = enabled; |
216 | omap_crtc->full_update = true; | ||
217 | omap_crtc_apply(crtc, &omap_crtc->apply); | 214 | omap_crtc_apply(crtc, &omap_crtc->apply); |
218 | 215 | ||
219 | /* Enable/disable all planes associated with the CRTC. */ | 216 | /* Enable/disable all planes associated with the CRTC. */ |
@@ -252,7 +249,6 @@ static int omap_crtc_mode_set(struct drm_crtc *crtc, | |||
252 | mode->type, mode->flags); | 249 | mode->type, mode->flags); |
253 | 250 | ||
254 | copy_timings_drm_to_omap(&omap_crtc->timings, mode); | 251 | copy_timings_drm_to_omap(&omap_crtc->timings, mode); |
255 | omap_crtc->full_update = true; | ||
256 | 252 | ||
257 | /* | 253 | /* |
258 | * The primary plane CRTC can be reset if the plane is disabled directly | 254 | * The primary plane CRTC can be reset if the plane is disabled directly |
@@ -597,19 +593,16 @@ static void omap_crtc_pre_apply(struct omap_drm_apply *apply) | |||
597 | struct omap_crtc *omap_crtc = | 593 | struct omap_crtc *omap_crtc = |
598 | container_of(apply, struct omap_crtc, apply); | 594 | container_of(apply, struct omap_crtc, apply); |
599 | struct drm_crtc *crtc = &omap_crtc->base; | 595 | struct drm_crtc *crtc = &omap_crtc->base; |
596 | struct omap_drm_private *priv = crtc->dev->dev_private; | ||
600 | struct drm_encoder *encoder = NULL; | 597 | struct drm_encoder *encoder = NULL; |
598 | unsigned int i; | ||
601 | 599 | ||
602 | DBG("%s: enabled=%d, full=%d", omap_crtc->name, | 600 | DBG("%s: enabled=%d", omap_crtc->name, omap_crtc->enabled); |
603 | omap_crtc->enabled, omap_crtc->full_update); | ||
604 | 601 | ||
605 | if (omap_crtc->full_update) { | 602 | for (i = 0; i < priv->num_encoders; i++) { |
606 | struct omap_drm_private *priv = crtc->dev->dev_private; | 603 | if (priv->encoders[i]->crtc == crtc) { |
607 | int i; | 604 | encoder = priv->encoders[i]; |
608 | for (i = 0; i < priv->num_encoders; i++) { | 605 | break; |
609 | if (priv->encoders[i]->crtc == crtc) { | ||
610 | encoder = priv->encoders[i]; | ||
611 | break; | ||
612 | } | ||
613 | } | 606 | } |
614 | } | 607 | } |
615 | 608 | ||
@@ -629,8 +622,6 @@ static void omap_crtc_pre_apply(struct omap_drm_apply *apply) | |||
629 | omap_encoder_set_enabled(encoder, true); | 622 | omap_encoder_set_enabled(encoder, true); |
630 | } | 623 | } |
631 | } | 624 | } |
632 | |||
633 | omap_crtc->full_update = false; | ||
634 | } | 625 | } |
635 | 626 | ||
636 | static void omap_crtc_post_apply(struct omap_drm_apply *apply) | 627 | static void omap_crtc_post_apply(struct omap_drm_apply *apply) |