drm/i915/bxt: add support for HPD long/short pulse detection on HPD_PORT_A pin
This is a requirement for enabling display port HPD support on the port A HPD pin. This support is to be added by follow-up patches. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Sonika Jindal <sonika.jindal@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
cc24fcdcea
commit
63c88d2204
|
@ -1227,6 +1227,22 @@ static irqreturn_t gen8_gt_irq_handler(struct drm_i915_private *dev_priv,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static bool bxt_port_hotplug_long_detect(enum port port, u32 val)
|
||||
{
|
||||
switch (port) {
|
||||
case PORT_A:
|
||||
return val & BXT_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 pch_port_hotplug_long_detect(enum port port, u32 val)
|
||||
{
|
||||
switch (port) {
|
||||
|
@ -1964,7 +1980,7 @@ static void bxt_hpd_handler(struct drm_device *dev, uint32_t iir_status)
|
|||
I915_WRITE(BXT_HOTPLUG_CTL, hp_control);
|
||||
|
||||
intel_get_hpd_pins(&pin_mask, &long_mask, hp_trigger, hp_control,
|
||||
hpd_bxt, pch_port_hotplug_long_detect);
|
||||
hpd_bxt, bxt_port_hotplug_long_detect);
|
||||
intel_hpd_irq_handler(dev, pin_mask, long_mask);
|
||||
}
|
||||
|
||||
|
|
|
@ -5985,6 +5985,11 @@ enum skl_disp_power_wells {
|
|||
|
||||
/* digital port hotplug */
|
||||
#define PCH_PORT_HOTPLUG 0xc4030 /* SHOTPLUG_CTL */
|
||||
#define BXT_PORTA_HOTPLUG_ENABLE (1 << 28)
|
||||
#define BXT_PORTA_HOTPLUG_STATUS_MASK (0x3 << 24)
|
||||
#define BXT_PORTA_HOTPLUG_NO_DETECT (0 << 24)
|
||||
#define BXT_PORTA_HOTPLUG_SHORT_DETECT (1 << 24)
|
||||
#define BXT_PORTA_HOTPLUG_LONG_DETECT (2 << 24)
|
||||
#define PORTD_HOTPLUG_ENABLE (1 << 20)
|
||||
#define PORTD_PULSE_DURATION_2ms (0)
|
||||
#define PORTD_PULSE_DURATION_4_5ms (1 << 18)
|
||||
|
|
Loading…
Reference in New Issue