diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2018-07-30 11:52:34 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2018-07-30 11:52:34 +0100 |
commit | 0239520e0290e7d5f186f7fb7f7ce307c478a439 (patch) | |
tree | d19c62cc463847c3bf6f8e1d9ca03c488c3649d5 /drivers/gpu/drm/armada/armada_overlay.c | |
parent | 1729f56010a960f182a36e09ce8d6504fa637d76 (diff) |
drm/armada: add rectangle helpers
Add helpers to convert rectangle width/height and x/y to register
values.
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 | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c index afa7ded3ae31..2347811ccf1b 100644 --- a/drivers/gpu/drm/armada/armada_overlay.c +++ b/drivers/gpu/drm/armada/armada_overlay.c @@ -146,22 +146,21 @@ static void armada_ovl_plane_update_state(struct drm_plane_state *state, LCD_SPU_DMA_PITCH_UV); } - val = (drm_rect_height(&state->src) & 0xffff0000) | - drm_rect_width(&state->src) >> 16; + val = armada_rect_hw_fp(&state->src); if (dplane->base.state.src_hw != val) { dplane->base.state.src_hw = val; armada_reg_queue_set(regs, idx, val, LCD_SPU_DMA_HPXL_VLN); } - val = drm_rect_height(&state->dst) << 16 | drm_rect_width(&state->dst); + val = armada_rect_hw(&state->dst); if (dplane->base.state.dst_hw != val) { dplane->base.state.dst_hw = val; armada_reg_queue_set(regs, idx, val, LCD_SPU_DZM_HPXL_VLN); } - val = state->dst.y1 << 16 | state->dst.x1; + val = armada_rect_yx(&state->dst); if (dplane->base.state.dst_yx != val) { dplane->base.state.dst_yx = val; armada_reg_queue_set(regs, idx, val, |