Skip to content

Commit

Permalink
drm/imx/dcss: Fix 64bit divisions
Browse files Browse the repository at this point in the history
Use the appropriate 64bit division helpers to make the code
build on 32bit architectures.

Cc: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241003111851.10453-7-ville.syrjala@linux.intel.com
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
  • Loading branch information
Ville Syrjälä committed Oct 25, 2024
1 parent 8a8fed6 commit f2cab5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/imx/dcss/dcss-scaler.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static int div_q(int A, int B)
else
temp -= B / 2;

result = (int)(temp / B);
result = div_s64(temp, B);
return result;
}

Expand Down Expand Up @@ -239,7 +239,7 @@ static void dcss_scaler_gaussian_filter(int fc_q, bool use_5_taps,
ll_temp = coef[phase][i];
ll_temp <<= PSC_COEFF_PRECISION;
ll_temp += sum >> 1;
ll_temp /= sum;
ll_temp = div_s64(ll_temp, sum);
coef[phase][i] = (int)ll_temp;
}
}
Expand Down

0 comments on commit f2cab5a

Please sign in to comment.