projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
062ccc2
)
gpu/drm/radeon: use DIV_ROUND_UP macro to do calculation
author
Zheng Yongjun
<zhengyongjun3@huawei.com>
Tue, 22 Dec 2020 13:31:00 +0000
(21:31 +0800)
committer
Alex Deucher
<alexander.deucher@amd.com>
Tue, 5 Jan 2021 16:34:09 +0000
(11:34 -0500)
Don't open-code DIV_ROUND_UP() kernel macro.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/r600_cs.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/radeon/r600_cs.c
b/drivers/gpu/drm/radeon/r600_cs.c
index dc68e538d5a97c1317939fac97167a70a6ace643..34b7c6f1647985e5138dbbbe90a7ba8c0f5294ed 100644
(file)
--- a/
drivers/gpu/drm/radeon/r600_cs.c
+++ b/
drivers/gpu/drm/radeon/r600_cs.c
@@
-220,7
+220,7
@@
int r600_fmt_get_nblocksx(u32 format, u32 w)
if (bw == 0)
return 0;
- return
(w + bw - 1) / bw
;
+ return
DIV_ROUND_UP(w, bw)
;
}
int r600_fmt_get_nblocksy(u32 format, u32 h)
@@
-234,7
+234,7
@@
int r600_fmt_get_nblocksy(u32 format, u32 h)
if (bh == 0)
return 0;
- return
(h + bh - 1) / bh
;
+ return
DIV_ROUND_UP(h, bh)
;
}
struct array_mode_checker {