Commit ce91d373 authored by Jeffy Chen's avatar Jeffy Chen Committed by Heiko Stuebner

drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale()

Currently we are calling scl_vop_cal_scale() to get vskiplines for yrgb
and cbcr. So the cbcr's vskiplines might be an unexpected value if the
second scl_vop_cal_scale() didn't update it.

Init vskiplines in scl_vop_cal_scale() to avoid that.
Signed-off-by: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20180223062250.10470-1-jeffy.chen@rock-chips.com
parent 7d4e981d
...@@ -256,6 +256,9 @@ static uint16_t scl_vop_cal_scale(enum scale_mode mode, uint32_t src, ...@@ -256,6 +256,9 @@ static uint16_t scl_vop_cal_scale(enum scale_mode mode, uint32_t src,
{ {
uint16_t val = 1 << SCL_FT_DEFAULT_FIXPOINT_SHIFT; uint16_t val = 1 << SCL_FT_DEFAULT_FIXPOINT_SHIFT;
if (vskiplines)
*vskiplines = 0;
if (is_horizontal) { if (is_horizontal) {
if (mode == SCALE_UP) if (mode == SCALE_UP)
val = GET_SCL_FT_BIC(src, dst); val = GET_SCL_FT_BIC(src, dst);
...@@ -296,7 +299,7 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win, ...@@ -296,7 +299,7 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win,
uint16_t vsu_mode; uint16_t vsu_mode;
uint16_t lb_mode; uint16_t lb_mode;
uint32_t val; uint32_t val;
int vskiplines = 0; int vskiplines;
if (dst_w > 3840) { if (dst_w > 3840) {
DRM_DEV_ERROR(vop->dev, "Maximum dst width (3840) exceeded\n"); DRM_DEV_ERROR(vop->dev, "Maximum dst width (3840) exceeded\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment