diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2018-07-30 13:52:34 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2018-07-30 13:52:34 +0300 |
commit | b4df3ba0d76823cb5e548505de104837d89aa5a9 (patch) | |
tree | 37072f803ff03ab6c709946f3cbfc17b524c4a86 /drivers/gpu/drm/armada/armada_overlay.c | |
parent | 3382a6b999415d1f78cee3f483957651d7e1f8a4 (diff) | |
download | linux-b4df3ba0d76823cb5e548505de104837d89aa5a9.tar.xz |
drm/armada: pass plane state into armada_drm_plane_calc_addrs()
armada_drm_plane_calc_addrs() gets all its information from the plane
state, so it makes sense to pass the plane state pointer down into this
function, rather than extracting the information in identical ways,
sometimes a couple of layers up.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/gpu/drm/armada/armada_overlay.c')
-rw-r--r-- | drivers/gpu/drm/armada/armada_overlay.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c index bc1b5b860141..e8c3bcc09d5c 100644 --- a/drivers/gpu/drm/armada/armada_overlay.c +++ b/drivers/gpu/drm/armada/armada_overlay.c @@ -130,11 +130,10 @@ static void armada_drm_overlay_plane_atomic_update(struct drm_plane *plane, old_state->src.y1 != state->src.y1 || old_state->fb != state->fb) { const struct drm_format_info *format; - u16 src_x = state->src.x1 >> 16; - u16 src_y = state->src.y1 >> 16; + u16 src_x; u32 addrs[3]; - armada_drm_plane_calc_addrs(addrs, state->fb, src_x, src_y); + armada_drm_plane_calc_addrs(state, addrs); armada_reg_queue_set(regs, idx, addrs[0], LCD_SPU_DMA_START_ADDR_Y0); @@ -166,6 +165,7 @@ static void armada_drm_overlay_plane_atomic_update(struct drm_plane *plane, * the UV swap. */ format = state->fb->format; + src_x = state->src.x1 >> 16; if (format->num_planes == 1 && src_x & (format->hsub - 1)) cfg ^= CFG_DMA_MOD(CFG_SWAPUV); cfg_mask = CFG_CBSH_ENA | CFG_DMAFORMAT | |