summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dml
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2017-10-16 22:10:19 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-10-21 16:44:42 -0400
commit07e9266593e64f6897996c37dcfb28cb21a612c6 (patch)
tree3e8e8a2c28f88e9bc16af06d991b5c85389628d0 /drivers/gpu/drm/amd/display/dc/dml
parentc73b046f86d0ceac52bfa0a035796c8c017a2de5 (diff)
Revert "amdgpu/dc: inline dml_round_to_multiple"
This reverts commit d8c893b44b2199f5935fe8667708253c38353782. Unfortunately these clash with our DML update from the HW guys. Will attempt to reroll them after. 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_common_defs.c19
-rw-r--r--drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h2
-rw-r--r--drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h19
3 files changed, 21 insertions, 19 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c b/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c
index df2d5099b90e..7c0eb52b91b8 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c
@@ -39,4 +39,23 @@ double dml_round(double a)
return floor;
}
+unsigned int dml_round_to_multiple(
+ unsigned int num,
+ unsigned int multiple,
+ bool up)
+{
+ unsigned int remainder;
+
+ if (multiple == 0)
+ return num;
+
+ remainder = num % multiple;
+ if (remainder == 0)
+ return num;
+
+ if (up)
+ return (num + multiple - remainder);
+ else
+ return (num - remainder);
+}
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h b/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h
index 81c53d879a16..a2da3da5ef8f 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h
+++ b/drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h
@@ -33,5 +33,7 @@
#define DTRACE(str, ...) dm_logger_write(mode_lib->logger, LOG_DML, str, ##__VA_ARGS__);
double dml_round(double a);
+unsigned int dml_round_to_multiple(
+ unsigned int num, unsigned int multiple, bool up);
#endif /* __DC_COMMON_DEFS_H__ */
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 a91b4a6c6154..1c6c631daad4 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
@@ -58,23 +58,4 @@ static inline double dml_log(double x, double base)
return (double) dcn_bw_log(x, base);
}
-static inline unsigned int dml_round_to_multiple(unsigned int num,
- unsigned int multiple,
- bool up)
-{
- unsigned int remainder;
-
- if (multiple == 0)
- return num;
-
- remainder = num % multiple;
-
- if (remainder == 0)
- return num;
-
- if (up)
- return (num + multiple - remainder);
- else
- return (num - remainder);
-}
#endif