mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-22 02:24:57 +08:00
drm/i915: Move some utility functions to i915_util.h
We have dedicated header file for utility functions and macros. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171221185334.17396-2-michal.wajdeczko@intel.com Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20171221215735.30314-1-chris@chris-wilson.co.uk
This commit is contained in:
parent
3138872ceb
commit
b74eeeb6b1
@ -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,
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user