diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2018-07-01 19:01:26 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2019-05-17 14:16:32 +0300 |
commit | 89e0c53ccfbcca4a492d98735d2eda307368f742 (patch) | |
tree | bdfeb10242479405eccb60f7da2553e2abb964a3 /drivers/gpu/drm/armada | |
parent | 1d1547ec12bc7d4d03c21704d4445aff8bcac8c1 (diff) | |
download | linux-89e0c53ccfbcca4a492d98735d2eda307368f742.tar.xz |
drm/armada: add missing interlaced support for overlay frame
Interlaced support has been missing from the overlay frame, which is
sub-optimal. Add support for this missing feature.
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_overlay.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c index 589cdb6a9dae..d8d6e4645c1f 100644 --- a/drivers/gpu/drm/armada/armada_overlay.c +++ b/drivers/gpu/drm/armada/armada_overlay.c @@ -106,12 +106,13 @@ static void armada_drm_overlay_plane_atomic_update(struct drm_plane *plane, /* FIXME: overlay on an interlaced display */ 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) { const struct drm_format_info *format; u16 src_x, pitches[3]; u32 addrs[2][3]; - armada_drm_plane_calc(state, addrs, pitches, false); + armada_drm_plane_calc(state, addrs, pitches, dcrtc->interlaced); armada_reg_queue_set(regs, idx, addrs[0][0], LCD_SPU_DMA_START_ADDR_Y0); @@ -146,6 +147,8 @@ static void armada_drm_overlay_plane_atomic_update(struct drm_plane *plane, src_x = state->src.x1 >> 16; if (format->num_planes == 1 && src_x & (format->hsub - 1)) cfg ^= CFG_DMA_MOD(CFG_SWAPUV); + if (dcrtc->interlaced) + cfg |= CFG_DMA_FTOGGLE; cfg_mask = CFG_CBSH_ENA | CFG_DMAFORMAT | CFG_DMA_MOD(CFG_SWAPRB | CFG_SWAPUV | CFG_SWAPYU | CFG_YUV2RGB) | |