From b4df3ba0d76823cb5e548505de104837d89aa5a9 Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 30 Jul 2018 11:52:34 +0100 Subject: 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 --- drivers/gpu/drm/armada/armada_overlay.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/drm/armada/armada_overlay.c') 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 | -- cgit v1.2.3