Commit 53c902b9 authored by Wambui Karuga's avatar Wambui Karuga Committed by Heiko Stuebner

drm/rockchip: use DIV_ROUND_UP macro for calculations.

Replace the open coded calculation with the more concise and readable
DIV_ROUND_UP macro.
Signed-off-by: default avatarWambui Karuga <wambui.karugax@gmail.com>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200109142057.10744-1-wambui.karugax@gmail.com
parent 8d6cb2f7
...@@ -328,7 +328,7 @@ static inline uint16_t scl_get_bili_dn_vskip(int src_h, int dst_h, ...@@ -328,7 +328,7 @@ static inline uint16_t scl_get_bili_dn_vskip(int src_h, int dst_h,
{ {
int act_height; int act_height;
act_height = (src_h + vskiplines - 1) / vskiplines; act_height = DIV_ROUND_UP(src_h, vskiplines);
if (act_height == dst_h) if (act_height == dst_h)
return GET_SCL_FT_BILI_DN(src_h, dst_h) / vskiplines; return GET_SCL_FT_BILI_DN(src_h, dst_h) / vskiplines;
......
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