aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/armada
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2018-07-30 06:53:06 -0400
committerRussell King <rmk+kernel@armlinux.org.uk>2018-07-30 06:53:06 -0400
commitdae2155bb07bb2063ce604049e9aa4e862b6db0a (patch)
treeb6dbc5d98b87eabea5a6922e49812ea88f1e6074 /drivers/gpu/drm/armada
parent3cb13ac97bdfda5b301609256e3e0b59bc94f10a (diff)
drm/armada: update primary framebuffer parameters on mode change
The framebuffer base address and toggling mode needs to be updated when the interlaced flag for mode changes is updated. Arrange to reprogram these parameters when only the mode has changed. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/gpu/drm/armada')
-rw-r--r--drivers/gpu/drm/armada/armada_plane.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/armada/armada_plane.c b/drivers/gpu/drm/armada/armada_plane.c
index 39c9ba3ee57e..bed2dca83a37 100644
--- a/drivers/gpu/drm/armada/armada_plane.c
+++ b/drivers/gpu/drm/armada/armada_plane.c
@@ -184,11 +184,13 @@ static void armada_drm_primary_plane_atomic_update(struct drm_plane *plane,
184 armada_reg_queue_set(regs, idx, val, LCD_SPU_GZM_HPXL_VLN); 184 armada_reg_queue_set(regs, idx, val, LCD_SPU_GZM_HPXL_VLN);
185 if (old_state->src.x1 != state->src.x1 || 185 if (old_state->src.x1 != state->src.x1 ||
186 old_state->src.y1 != state->src.y1 || 186 old_state->src.y1 != state->src.y1 ||
187 old_state->fb != state->fb) { 187 old_state->fb != state->fb ||
188 state->crtc->state->mode_changed) {
188 idx += armada_drm_crtc_calc_fb(state, regs + idx, 189 idx += armada_drm_crtc_calc_fb(state, regs + idx,
189 dcrtc->interlaced); 190 dcrtc->interlaced);
190 } 191 }
191 if (old_state->fb != state->fb) { 192 if (old_state->fb != state->fb ||
193 state->crtc->state->mode_changed) {
192 cfg = CFG_GRA_FMT(drm_fb_to_armada_fb(state->fb)->fmt) | 194 cfg = CFG_GRA_FMT(drm_fb_to_armada_fb(state->fb)->fmt) |
193 CFG_GRA_MOD(drm_fb_to_armada_fb(state->fb)->mod); 195 CFG_GRA_MOD(drm_fb_to_armada_fb(state->fb)->mod);
194 if (drm_fb_to_armada_fb(state->fb)->fmt > CFG_420) 196 if (drm_fb_to_armada_fb(state->fb)->fmt > CFG_420)