[PATCH] radeon: si_dpm.c: avoid a signed 64-bit divide

Deucher, Alexander Alexander.Deucher at amd.com
Fri Aug 2 10:14:52 PDT 2013


The fix is already queued in my tree:
http://lists.freedesktop.org/archives/dri-devel/2013-August/042668.html


> -----Original Message-----
> From: Kyle McMartin [mailto:kmcmarti at redhat.com]
> Sent: Friday, August 02, 2013 1:13 PM
> To: jglisse at redhat.com
> Cc: Deucher, Alexander; airlied at redhat.com; dri-
> devel at lists.freedesktop.org; jwboyer at redhat.com
> Subject: [PATCH] radeon: si_dpm.c: avoid a signed 64-bit divide
> 
> Hit a compile failure here referencing divdi3 on i686.
> 
> Signed-off-by: Kyle McMartin <kyle at redhat.com>
> 
> --- a/drivers/gpu/drm/radeon/si_dpm.c
> +++ b/drivers/gpu/drm/radeon/si_dpm.c
> @@ -1767,7 +1767,7 @@ static void
> si_calculate_leakage_for_v_and_t_formula(const struct ni_leakage_coe
>  	s64 temperature, t_slope, t_intercept, av, bv, t_ref;
>  	s64 tmp;
> 
> -	i_leakage = drm_int2fixp(ileakage) / 100;
> +	i_leakage = div64_s64(drm_int2fixp(ileakage), 100);
>  	vddc = div64_s64(drm_int2fixp(v), 1000);
>  	temperature = div64_s64(drm_int2fixp(t), 1000);
> 




More information about the dri-devel mailing list