Commit 10635917 authored by Sandy Huang's avatar Sandy Huang Committed by Heiko Stuebner

drm/rockchip: vop: fixup linebuffer mode calc error

linebuffer mode should be LB_YUV_3840X5 when width is bigger than 1280
in yuv mode.

Separate yuv and rgb case makes the scl_vop_cal_lb_mode() logic clearer.
Signed-off-by: default avatarSandy Huang <hjc@rock-chips.com>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/1530001004-25036-1-git-send-email-hjc@rock-chips.com
parent a3e77e16
...@@ -331,16 +331,19 @@ static inline int scl_vop_cal_lb_mode(int width, bool is_yuv) ...@@ -331,16 +331,19 @@ static inline int scl_vop_cal_lb_mode(int width, bool is_yuv)
{ {
int lb_mode; int lb_mode;
if (is_yuv) {
if (width > 1280)
lb_mode = LB_YUV_3840X5;
else
lb_mode = LB_YUV_2560X8;
} else {
if (width > 2560) if (width > 2560)
lb_mode = LB_RGB_3840X2; lb_mode = LB_RGB_3840X2;
else if (width > 1920) else if (width > 1920)
lb_mode = LB_RGB_2560X4; lb_mode = LB_RGB_2560X4;
else if (!is_yuv)
lb_mode = LB_RGB_1920X5;
else if (width > 1280)
lb_mode = LB_YUV_3840X5;
else else
lb_mode = LB_YUV_2560X8; lb_mode = LB_RGB_1920X5;
}
return lb_mode; return lb_mode;
} }
......
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