summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h8
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