[Intel-gfx] [PATCH v4 2/2] drm/i915/tgl: Fix the read of the DDI that transcoder is attached to

Chris Wilson chris at chris-wilson.co.uk
Sat Aug 10 16:08:21 UTC 2019


Quoting José Roberto de Souza (2019-08-08 01:49:35)
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index d760830cfd7b..3d1c30a82302 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -9432,6 +9432,8 @@ enum skl_power_gate {
>  #define  TGL_TRANS_DDI_PORT_MASK       (0xf << TGL_TRANS_DDI_PORT_SHIFT)
>  #define  TRANS_DDI_SELECT_PORT(x)      ((x) << TRANS_DDI_PORT_SHIFT)
>  #define  TGL_TRANS_DDI_SELECT_PORT(x)  (((x) + 1) << TGL_TRANS_DDI_PORT_SHIFT)
> +#define  TRANS_DDI_FUNC_CTL_VAL_TO_PORT(val)    (((val) & TRANS_DDI_PORT_MASK) >> TRANS_DDI_PORT_SHIFT)
> +#define  TGL_TRANS_DDI_FUNC_CTL_VAL_TO_PORT(val) (((val) & TGL_TRANS_DDI_PORT_MASK >> TGL_TRANS_DDI_PORT_SHIFT) - 1)

drivers/gpu/drm/i915/display/intel_display.c:10361 haswell_get_ddi_port_state() warn: shift has higher precedence than mask

I presume you wanted (((val) & mask) >> shift) - 1) but I'm not sure.
-Chris


More information about the Intel-gfx mailing list