diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2020-12-22 16:31:00 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-01-05 19:34:09 +0300 |
commit | b89a5218143496e62cebb39f862b53095f908eb0 (patch) | |
tree | d11f3359f403a89833942327d3a96aee26b4fff9 /drivers/gpu/drm/radeon/r600_cs.c | |
parent | 062ccc240e35706b667dbe8560c1ee49692830a8 (diff) | |
download | linux-b89a5218143496e62cebb39f862b53095f908eb0.tar.xz |
gpu/drm/radeon: use DIV_ROUND_UP macro to do calculation
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>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600_cs.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600_cs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index dc68e538d5a9..34b7c6f16479 100644 --- 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 { |