]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/armada: update primary framebuffer parameters on mode change
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 30 Jul 2018 10:53:06 +0000 (11:53 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Mon, 30 Jul 2018 10:53:06 +0000 (11:53 +0100)
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>
drivers/gpu/drm/armada/armada_plane.c

index 39c9ba3ee57ee8534e96b69d367f64b4ff15f361..bed2dca83a3754de30e8a680cf26d9e1a324a3cc 100644 (file)
@@ -184,11 +184,13 @@ static void armada_drm_primary_plane_atomic_update(struct drm_plane *plane,
                armada_reg_queue_set(regs, idx, val, LCD_SPU_GZM_HPXL_VLN);
        if (old_state->src.x1 != state->src.x1 ||
            old_state->src.y1 != state->src.y1 ||
-           old_state->fb != state->fb) {
+           old_state->fb != state->fb ||
+           state->crtc->state->mode_changed) {
                idx += armada_drm_crtc_calc_fb(state, regs + idx,
                                               dcrtc->interlaced);
        }
-       if (old_state->fb != state->fb) {
+       if (old_state->fb != state->fb ||
+           state->crtc->state->mode_changed) {
                cfg = CFG_GRA_FMT(drm_fb_to_armada_fb(state->fb)->fmt) |
                      CFG_GRA_MOD(drm_fb_to_armada_fb(state->fb)->mod);
                if (drm_fb_to_armada_fb(state->fb)->fmt > CFG_420)