[Intel-gfx] [PATCH 1/8] drm/i915: Move uint_fixed_16_16_t to i915_types.h

Chris Wilson chris at chris-wilson.co.uk
Thu Dec 21 11:54:59 UTC 2017


Quoting Michal Wajdeczko (2017-12-21 11:37:11)
> On Wed, 20 Dec 2017 19:55:58 +0100, Chris Wilson  
> <chris at chris-wilson.co.uk> 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 at intel.com>
> >> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> >> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> >> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> >> ---
> >>  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)

The type itself shouldn't be called uint_fixed_16_16_t.

Looking towards the future, include/linux/fixed16_16.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)

Boo. But not forever as skl_wm_values isn't used by i915_drv.h!
-Chris


More information about the Intel-gfx mailing list