diff options
author | Charlene Liu | 2019-05-17 04:52:46 +0200 |
---|---|---|
committer | Alex Deucher | 2019-06-11 19:49:21 +0200 |
commit | 327e4f12104e01b2ebd995178d09438ec6c86858 (patch) | |
tree | 26d62f521671762b9334fda24d2deb02ff7b7b3d /drivers/gpu/drm/amd/display/dc/dml | |
parent | drm/amd/display: Copy stream updates onto streams (diff) | |
download | kernel-qcow2-linux-327e4f12104e01b2ebd995178d09438ec6c86858.tar.gz kernel-qcow2-linux-327e4f12104e01b2ebd995178d09438ec6c86858.tar.xz kernel-qcow2-linux-327e4f12104e01b2ebd995178d09438ec6c86858.zip |
drm/amd/display: add some math functions for dcn_calc_math
Implement floor, ceil, and fabs
Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dml')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h b/drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h index e8ce08567cd8..eca140da13d8 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h +++ b/drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h @@ -129,4 +129,12 @@ static inline unsigned int dml_round_to_multiple(unsigned int num, else return (num - remainder); } +static inline double dml_abs(double a) +{ + if (a > 0) + return a; + else + return (a*(-1)); +} + #endif |