drm/i915: Move some utility functions to i915_util.h
authorMichal Wajdeczko <[email protected]>
Thu, 21 Dec 2017 21:57:29 +0000 (21:57 +0000)
committerChris Wilson <[email protected]>
Fri, 22 Dec 2017 09:13:47 +0000 (09:13 +0000)
We have dedicated header file for utility functions and macros.

Signed-off-by: Michal Wajdeczko <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Acked-by: Rodrigo Vivi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Chris Wilson <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_utils.h

index ca2a61966a231fc40ffb8d26c0c00ea7991b9cb0..381696839e2f359b73852607f358e6f5ed0d854e 100644 (file)
@@ -243,21 +243,6 @@ static inline uint_fixed_16_16_t add_fixed16_u32(uint_fixed_16_16_t add1,
        return clamp_u64_to_fixed16(interm_sum);
 }
 
-static inline const char *yesno(bool v)
-{
-       return v ? "yes" : "no";
-}
-
-static inline const char *onoff(bool v)
-{
-       return v ? "on" : "off";
-}
-
-static inline const char *enableddisabled(bool v)
-{
-       return v ? "enabled" : "disabled";
-}
-
 enum pipe {
        INVALID_PIPE = -1,
        PIPE_A = 0,
index 8d07764887ec2c74e6760313898f2ff7d5ea1496..51dbfe5bb4181feec51591b909553a0e3172c38a 100644 (file)
@@ -140,4 +140,19 @@ static inline void drain_delayed_work(struct delayed_work *dw)
        } while (delayed_work_pending(dw));
 }
 
+static inline const char *yesno(bool v)
+{
+       return v ? "yes" : "no";
+}
+
+static inline const char *onoff(bool v)
+{
+       return v ? "on" : "off";
+}
+
+static inline const char *enableddisabled(bool v)
+{
+       return v ? "enabled" : "disabled";
+}
+
 #endif /* !__I915_UTILS_H */