drm/rockchip: vop: round_up pitches to word align
authorMark yao <mark.yao@rock-chips.com>
Mon, 31 Jul 2017 09:49:50 +0000 (17:49 +0800)
committerMark Yao <mark.yao@rock-chips.com>
Fri, 4 Aug 2017 08:09:41 +0000 (16:09 +0800)
commitda709a7b27082421289e264f3491a8f43cd4d2f7
tree8df7be0945a6bf80e8967b548fd875cadf09b14f
parent0b12e9c0e4d5138289a7a9d875ce655842b60b03
drm/rockchip: vop: round_up pitches to word align

VOP pitch register is word align, need align to word.

VOP_WIN0_VIR:
  bit[31:16] win0_vir_stride_uv
    Number of words of Win0 uv Virtual width
  bit[15:0] win0_vir_width
    Number of words of Win0 yrgb Virtual width
    ARGB888 : win0_vir_width
    RGB888 : (win0_vir_width*3/4) + (win0_vir_width%3)
    RGB565 : ceil(win0_vir_width/2)
    YUV : ceil(win0_vir_width/4)

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Reviewed-by: Sandy huang <sandy.huang@rock-chips.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1501494591-7034-1-git-send-email-mark.yao@rock-chips.com
drivers/gpu/drm/rockchip/rockchip_drm_vop.c