[Intel-gfx] [PATCH 11/11] drm/i915: Add port A HPD support for SPT
Paulo Zanoni
przanoni at gmail.com
Thu Aug 27 13:26:18 PDT 2015
2015-08-12 12:44 GMT-03:00 <ville.syrjala at linux.intel.com>:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> On SKL the port A HPD has moved to the PCH. Hook it up.
Today is Déjà vu day.
Reviewed-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_irq.c | 21 +++++++++++++++++++--
> drivers/gpu/drm/i915/i915_reg.h | 4 +++-
> 2 files changed, 22 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index aefa6c4..ec739e6 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -74,6 +74,7 @@ static const u32 hpd_cpt[HPD_NUM_PINS] = {
> };
>
> static const u32 hpd_spt[HPD_NUM_PINS] = {
> + [HPD_PORT_A] = SDE_PORTA_HOTPLUG_SPT,
> [HPD_PORT_B] = SDE_PORTB_HOTPLUG_CPT,
> [HPD_PORT_C] = SDE_PORTC_HOTPLUG_CPT,
> [HPD_PORT_D] = SDE_PORTD_HOTPLUG_CPT,
> @@ -1312,6 +1313,22 @@ static bool spt_port_hotplug2_long_detect(enum port port, u32 val)
> }
> }
>
> +static bool spt_port_hotplug_long_detect(enum port port, u32 val)
> +{
> + switch (port) {
> + case PORT_A:
> + return val & PORTA_HOTPLUG_LONG_DETECT;
> + case PORT_B:
> + return val & PORTB_HOTPLUG_LONG_DETECT;
> + case PORT_C:
> + return val & PORTC_HOTPLUG_LONG_DETECT;
> + case PORT_D:
> + return val & PORTD_HOTPLUG_LONG_DETECT;
> + default:
> + return false;
> + }
> +}
> +
> static bool ilk_port_hotplug_long_detect(enum port port, u32 val)
> {
> switch (port) {
> @@ -1891,7 +1908,7 @@ static void spt_irq_handler(struct drm_device *dev, u32 pch_iir)
>
> intel_get_hpd_pins(&pin_mask, &long_mask, hotplug_trigger,
> dig_hotplug_reg, hpd_spt,
> - pch_port_hotplug_long_detect);
> + spt_port_hotplug_long_detect);
> intel_hpd_irq_handler(dev, pin_mask, long_mask);
> }
>
> @@ -3190,7 +3207,7 @@ static void spt_hpd_irq_setup(struct drm_device *dev)
> /* Enable digital hotplug on the PCH */
> hotplug = I915_READ(PCH_PORT_HOTPLUG);
> hotplug |= PORTD_HOTPLUG_ENABLE | PORTC_HOTPLUG_ENABLE |
> - PORTB_HOTPLUG_ENABLE;
> + PORTB_HOTPLUG_ENABLE | PORTA_HOTPLUG_ENABLE;
> I915_WRITE(PCH_PORT_HOTPLUG, hotplug);
>
> hotplug = I915_READ(PCH_PORT_HOTPLUG2);
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 0e9990b..3224c97 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -5953,6 +5953,7 @@ enum skl_disp_power_wells {
> #define SDE_AUXB_CPT (1 << 25)
> #define SDE_AUX_MASK_CPT (7 << 25)
> #define SDE_PORTE_HOTPLUG_SPT (1 << 25)
> +#define SDE_PORTA_HOTPLUG_SPT (1 << 24)
> #define SDE_PORTD_HOTPLUG_CPT (1 << 23)
> #define SDE_PORTC_HOTPLUG_CPT (1 << 22)
> #define SDE_PORTB_HOTPLUG_CPT (1 << 21)
> @@ -5966,7 +5967,8 @@ enum skl_disp_power_wells {
> #define SDE_HOTPLUG_MASK_SPT (SDE_PORTE_HOTPLUG_SPT | \
> SDE_PORTD_HOTPLUG_CPT | \
> SDE_PORTC_HOTPLUG_CPT | \
> - SDE_PORTB_HOTPLUG_CPT)
> + SDE_PORTB_HOTPLUG_CPT | \
> + SDE_PORTA_HOTPLUG_SPT)
> #define SDE_GMBUS_CPT (1 << 17)
> #define SDE_ERROR_CPT (1 << 16)
> #define SDE_AUDIO_CP_REQ_C_CPT (1 << 10)
> --
> 2.4.6
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Paulo Zanoni
More information about the Intel-gfx
mailing list