summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/armada/armada_overlay.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2018-07-30 11:52:34 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2018-07-30 11:52:34 +0100
commitb4df3ba0d76823cb5e548505de104837d89aa5a9 (patch)
tree37072f803ff03ab6c709946f3cbfc17b524c4a86 /drivers/gpu/drm/armada/armada_overlay.c
parent3382a6b999415d1f78cee3f483957651d7e1f8a4 (diff)
downloadlinux-b4df3ba0d76823cb5e548505de104837d89aa5a9.tar.bz2
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.c6
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 |