All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/rockchip: use DIV_ROUND_UP macro for calculations.
@ 2020-01-09 14:20 ` Wambui Karuga
  0 siblings, 0 replies; 7+ messages in thread
From: Wambui Karuga @ 2020-01-09 14:20 UTC (permalink / raw)
  To: hjc, heiko, airlied, daniel
  Cc: dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel

Replace the open coded calculation with the more concise and readable
DIV_ROUND_UP macro.

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index 0b3d18c457b2..cc672620d6e0 100644
--- 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;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] drm/rockchip: use DIV_ROUND_UP macro for calculations.
@ 2020-01-09 14:20 ` Wambui Karuga
  0 siblings, 0 replies; 7+ messages in thread
From: Wambui Karuga @ 2020-01-09 14:20 UTC (permalink / raw)
  To: hjc, heiko, airlied, daniel
  Cc: linux-rockchip, linux-arm-kernel, dri-devel, linux-kernel

Replace the open coded calculation with the more concise and readable
DIV_ROUND_UP macro.

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index 0b3d18c457b2..cc672620d6e0 100644
--- 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;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] drm/rockchip: use DIV_ROUND_UP macro for calculations.
@ 2020-01-09 14:20 ` Wambui Karuga
  0 siblings, 0 replies; 7+ messages in thread
From: Wambui Karuga @ 2020-01-09 14:20 UTC (permalink / raw)
  To: hjc, heiko, airlied, daniel
  Cc: linux-rockchip, linux-arm-kernel, dri-devel, linux-kernel

Replace the open coded calculation with the more concise and readable
DIV_ROUND_UP macro.

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index 0b3d18c457b2..cc672620d6e0 100644
--- 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;
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] drm/rockchip: use DIV_ROUND_UP macro for calculations.
@ 2020-01-09 14:20 ` Wambui Karuga
  0 siblings, 0 replies; 7+ messages in thread
From: Wambui Karuga @ 2020-01-09 14:20 UTC (permalink / raw)
  To: hjc, heiko, airlied, daniel
  Cc: linux-rockchip, linux-arm-kernel, dri-devel, linux-kernel

Replace the open coded calculation with the more concise and readable
DIV_ROUND_UP macro.

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index 0b3d18c457b2..cc672620d6e0 100644
--- 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;
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/rockchip: use DIV_ROUND_UP macro for calculations.
  2020-01-09 14:20 ` Wambui Karuga
  (?)
@ 2020-01-13 13:38   ` Heiko Stuebner
  -1 siblings, 0 replies; 7+ messages in thread
From: Heiko Stuebner @ 2020-01-13 13:38 UTC (permalink / raw)
  To: Wambui Karuga
  Cc: hjc, airlied, daniel, dri-devel, linux-arm-kernel,
	linux-rockchip, linux-kernel

Am Donnerstag, 9. Januar 2020, 15:20:57 CET schrieb Wambui Karuga:
> Replace the open coded calculation with the more concise and readable
> DIV_ROUND_UP macro.
> 
> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>

applied to drm-misc-next

Thanks
Heiko



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/rockchip: use DIV_ROUND_UP macro for calculations.
@ 2020-01-13 13:38   ` Heiko Stuebner
  0 siblings, 0 replies; 7+ messages in thread
From: Heiko Stuebner @ 2020-01-13 13:38 UTC (permalink / raw)
  To: Wambui Karuga
  Cc: airlied, hjc, dri-devel, linux-kernel, linux-rockchip, daniel,
	linux-arm-kernel

Am Donnerstag, 9. Januar 2020, 15:20:57 CET schrieb Wambui Karuga:
> Replace the open coded calculation with the more concise and readable
> DIV_ROUND_UP macro.
> 
> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>

applied to drm-misc-next

Thanks
Heiko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/rockchip: use DIV_ROUND_UP macro for calculations.
@ 2020-01-13 13:38   ` Heiko Stuebner
  0 siblings, 0 replies; 7+ messages in thread
From: Heiko Stuebner @ 2020-01-13 13:38 UTC (permalink / raw)
  To: Wambui Karuga
  Cc: airlied, hjc, dri-devel, linux-kernel, linux-rockchip, linux-arm-kernel

Am Donnerstag, 9. Januar 2020, 15:20:57 CET schrieb Wambui Karuga:
> Replace the open coded calculation with the more concise and readable
> DIV_ROUND_UP macro.
> 
> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>

applied to drm-misc-next

Thanks
Heiko


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-01-13 13:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 14:20 [PATCH] drm/rockchip: use DIV_ROUND_UP macro for calculations Wambui Karuga
2020-01-09 14:20 ` Wambui Karuga
2020-01-09 14:20 ` Wambui Karuga
2020-01-09 14:20 ` Wambui Karuga
2020-01-13 13:38 ` Heiko Stuebner
2020-01-13 13:38   ` Heiko Stuebner
2020-01-13 13:38   ` Heiko Stuebner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.