projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d6cb2f
)
drm/rockchip: use DIV_ROUND_UP macro for calculations.
author
Wambui Karuga
<wambui.karugax@gmail.com>
Thu, 9 Jan 2020 14:20:57 +0000
(17:20 +0300)
committer
Heiko Stuebner
<heiko@sntech.de>
Mon, 13 Jan 2020 13:04:00 +0000
(14:04 +0100)
Replace the open coded calculation with the more concise and readable
DIV_ROUND_UP macro.
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link:
https://patchwork.freedesktop.org/patch/msgid/20200109142057.10744-1-wambui.karugax@gmail.com
drivers/gpu/drm/rockchip/rockchip_drm_vop.h
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index 0b3d18c457b29963ab7bda39c95af533b0af693f..cc672620d6e04c9f690c28d4836c7e162c1c7123 100644
(file)
--- a/
drivers/gpu/drm/rockchip/rockchip_drm_vop.h
+++ b/
drivers/gpu/drm/rockchip/rockchip_drm_vop.h
@@
-328,7
+328,7
@@
static inline uint16_t scl_get_bili_dn_vskip(int src_h, int dst_h,
{
int act_height;
- act_height =
(src_h + vskiplines - 1) / vskiplines
;
+ act_height =
DIV_ROUND_UP(src_h, vskiplines)
;
if (act_height == dst_h)
return GET_SCL_FT_BILI_DN(src_h, dst_h) / vskiplines;