On Wed, 20 Dec 2017 19:55:58 +0100, Chris Wilson
<chris@xxxxxxxxxxxxxxxxxx> wrote:
Quoting Michal Wajdeczko (2017-12-20 18:36:03)
Our uint_fixed_16_16_t definition and related helper functions
deserve dedicated header. While here cleanup types and indent.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
---
drivers/gpu/drm/i915/i915_drv.h | 139 +------------------------------
drivers/gpu/drm/i915/i915_types.h | 168
++++++++++++++++++++++++++++++++++++++
2 files changed, 169 insertions(+), 138 deletions(-)
create mode 100644 drivers/gpu/drm/i915/i915_types.h
diff --git a/drivers/gpu/drm/i915/i915_drv.h
b/drivers/gpu/drm/i915/i915_drv.h
index ca2a619..1e2217c 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -55,6 +55,7 @@
#include "i915_params.h"
#include "i915_reg.h"
#include "i915_utils.h"
+#include "i915_types.h"
#include "intel_uncore.h"
#include "intel_bios.h"
@@ -105,144 +106,6 @@
#define i915_inject_load_failure() \
__i915_inject_load_failure(__func__, __LINE__)
-typedef struct {
- uint32_t val;
-} uint_fixed_16_16_t;
I would throw this into its own header (not something as generic as
i915_types.h, preferably not something that even ties this to i915) and
1) uint_fixed_16_16.h (like drm/amd/display/include/fixed31_32.h)
2) i915_fixed.h (like include/drm_fixed.h)
refuse to include it directly from i915_drv.h.
But we have to do this as uint_fixed_16_16_t is used by struct
skl_wm_params
(which is still defined in this header)
Michal
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx