[Intel-gfx] [Intel-xe] [PATCH 26/42] drm/i915/xe2lpd: Handle port AUX interrupts
Matt Roper
matthew.d.roper at intel.com
Wed Aug 23 20:10:29 UTC 2023
On Wed, Aug 23, 2023 at 10:07:24AM -0700, Lucas De Marchi wrote:
> From: Gustavo Sousa <gustavo.sousa at intel.com>
>
> Differently from previous version, Xe2_LPD groups all port AUX interrupt
> bits into PICA interrupt registers.
>
> BSpec: 68958, 69697
> Signed-off-by: Gustavo Sousa <gustavo.sousa at intel.com>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display_irq.c | 4 +++-
> drivers/gpu/drm/i915/display/intel_hotplug_irq.c | 3 +++
> drivers/gpu/drm/i915/i915_reg.h | 3 +++
> 3 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_irq.c b/drivers/gpu/drm/i915/display/intel_display_irq.c
> index 62ce55475554..bff4a76310c0 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_irq.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_irq.c
> @@ -792,7 +792,9 @@ static u32 gen8_de_port_aux_mask(struct drm_i915_private *dev_priv)
> {
> u32 mask;
>
> - if (DISPLAY_VER(dev_priv) >= 14)
> + if (DISPLAY_VER(dev_priv) >= 20)
> + return 0;
> + else if (DISPLAY_VER(dev_priv) >= 14)
> return TGL_DE_PORT_AUX_DDIA |
> TGL_DE_PORT_AUX_DDIB;
> else if (DISPLAY_VER(dev_priv) >= 13)
> diff --git a/drivers/gpu/drm/i915/display/intel_hotplug_irq.c b/drivers/gpu/drm/i915/display/intel_hotplug_irq.c
> index f95fa793fabb..f76b9deb64b4 100644
> --- a/drivers/gpu/drm/i915/display/intel_hotplug_irq.c
> +++ b/drivers/gpu/drm/i915/display/intel_hotplug_irq.c
> @@ -514,6 +514,9 @@ void xelpdp_pica_irq_handler(struct drm_i915_private *i915, u32 iir)
> u32 trigger_aux = iir & XELPDP_AUX_TC_MASK;
> u32 pin_mask = 0, long_mask = 0;
>
> + if (DISPLAY_VER(i915) >= 20)
> + trigger_aux |= iir & XE2LPD_AUX_DDI_MASK;
> +
> for (pin = HPD_PORT_TC1; pin <= HPD_PORT_TC4; pin++) {
> u32 val;
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 84c5a76065a0..e31a985b02d5 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -4520,6 +4520,9 @@
> #define XELPDP_AUX_TC(hpd_pin) REG_BIT(8 + _HPD_PIN_TC(hpd_pin))
> #define XELPDP_AUX_TC_MASK REG_GENMASK(11, 8)
>
> +#define XE2LPD_AUX_DDI(hpd_pin) REG_BIT(6 + _HPD_PIN_DDI(hpd_pin))
> +#define XE2LPD_AUX_DDI_MASK REG_GENMASK(7, 6)
> +
It seems like we have extra, atypical whitespace around the fields of
this register. I'd drop the blank line here, as well as the one above
the new definitions so that things are a bit more compact. Otherwise,
Reviewed-by: Matt Roper <matthew.d.roper at intel.com>
> #define XELPDP_TBT_HOTPLUG(hpd_pin) REG_BIT(_HPD_PIN_TC(hpd_pin))
> #define XELPDP_TBT_HOTPLUG_MASK REG_GENMASK(3, 0)
>
> --
> 2.40.1
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
More information about the Intel-gfx
mailing list