Revert "amdgpu/dc: inline dml_round_to_multiple"
authorHarry Wentland <harry.wentland@amd.com>
Tue, 17 Oct 2017 02:10:19 +0000 (22:10 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 21 Oct 2017 20:44:42 +0000 (16:44 -0400)
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>
drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c
drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h
drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h

index df2d5099b90e78232befb7dcbb7054a3ab4b2e73..7c0eb52b91b87aa28e82c710c445fdd87216c1ac 100644 (file)
@@ -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);
+}
index 81c53d879a16b309f5e3638a9b452ed6e1bee976..a2da3da5ef8f05eeae0a891f787a20aaa33f19d4 100644 (file)
@@ -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__ */
index a91b4a6c61543eaba697ab7644f7e32fa8c59a8c..1c6c631daad40aeb46a964a0868ad101f0414139 100644 (file)
@@ -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