1
0
Fork 0
Commit Graph

7 Commits (761cab513d5e9079ec8ace48ab05d84b0083653b)

Author SHA1 Message Date
Jani Nikula c75299aea2 drm/i915: make i915_fixed.h self-contained
Add the minimal includes/declarations to make the header self-contained,
and ensure it stays that way.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190626144020.2155-4-jani.nikula@intel.com
2019-06-27 10:50:24 +03:00
Ville Syrjälä d492a29d8c drm/i915: Use mul_u32_u32() more
We have a lot of '(u64)foo * bar' everywhere. Replace with
mul_u32_u32() to avoid gcc failing to use a regular 32x32->64
multiply for this.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190408152702.4153-1-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-05-03 20:09:51 +03:00
Jani Nikula f48cc647f3 drm/i915/fixed: cosmetic cleanup
Clean up fixed point temp variable initialization, use the more
conventional tmp name for temp variables, add empty lines before
return. No functional changes.

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181116120729.7580-5-jani.nikula@intel.com
2018-11-20 12:49:24 +02:00
Jani Nikula f1eea8910b drm/i915/fixed: simplify is_fixed16_zero()
Simply return the condition. No functional changes.

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181116120729.7580-4-jani.nikula@intel.com
2018-11-20 12:49:24 +02:00
Jani Nikula e7a2381691 drm/i915/fixed: simplify FP_16_16_MAX definition
No need to use a compound statement enclosed in parenthesis where a C99
compound literal will do. No functional changes.

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181116120729.7580-3-jani.nikula@intel.com
2018-11-20 12:49:24 +02:00
Jani Nikula 3122b9c527 drm/i915/fixed: prefer kernel types over stdint types
While at it, conform to kernel spacing (i.e. no space) after cast. No
functional changes.

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181116120729.7580-2-jani.nikula@intel.com
2018-11-20 12:42:33 +02:00
Jani Nikula 2d332ee123 drm/i915: extract fixed point math to i915_fixed.h
Reduce bloat in one of the bigger header files. Fix some indentation
while at it. No functional changes.

v2: Add include guards (Joonas)

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181116120729.7580-1-jani.nikula@intel.com
2018-11-20 12:42:26 +02:00