mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 14:23:49 +01:00
drm/amd/display: Fix 64-bit division for 32-bit builds
[Why] 32-bit builds break when doing 64-bit division directly. [How] Use the div_u64() function instead to perform the division. Fixes: https://lists.freedesktop.org/archives/dri-devel/2018-December/201008.html Signed-off-by: Ken Chalmers <[email protected]> Reviewed-by: Leo Li <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
This commit is contained in:
1 parent
785fd44c25
commit
32e61361b8
1 file changed
+1
-1
@@ -94,7 +94,7 @@ static void program_pix_dur(struct timing_generator *tg, uint32_t pix_clk_100hz)
|
||||
if (pix_clk_100hz == 0)
|
||||
return;
|
||||
|
||||
pix_dur = 10000000000ull / pix_clk_100hz;
|
||||
pix_dur = div_u64(10000000000ull, pix_clk_100hz);
|
||||
|
||||
set_reg_field_value(
|
||||
value,
|
||||
|
||||
Reference in new issue
Block a user