diff options
author | Mark yao <mark.yao@rock-chips.com> | 2017-07-31 17:49:46 +0800 |
---|---|---|
committer | Mark Yao <mark.yao@rock-chips.com> | 2017-08-04 16:09:39 +0800 |
commit | 0b12e9c0e4d5138289a7a9d875ce655842b60b03 (patch) | |
tree | d3303c2734100681bfcd7bbcfdd843df7e922d12 /drivers/gpu/drm/rockchip/rockchip_drm_vop.h | |
parent | 64d77564692aa863340e7d6bec868ec4549121f8 (diff) |
drm/rockchip: vop: fix NV12 video display error
fixup the scale calculation formula on the case
src_height == (dst_height/2).
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/1501494586-6984-1-git-send-email-mark.yao@rock-chips.com
Diffstat (limited to 'drivers/gpu/drm/rockchip/rockchip_drm_vop.h')
-rw-r--r-- | drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h index af1091f51a80..56bbd2e2a8ef 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h @@ -299,6 +299,9 @@ static inline uint16_t scl_get_bili_dn_vskip(int src_h, int dst_h, act_height = (src_h + vskiplines - 1) / vskiplines; + if (act_height == dst_h) + return GET_SCL_FT_BILI_DN(src_h, dst_h) / vskiplines; + return GET_SCL_FT_BILI_DN(act_height, dst_h); } |