[3/3] drm/i915/bxt: WA for swapped HPD pins in A stepping
diff mbox

Message ID 1439183136-23798-4-git-send-email-sonika.jindal@intel.com
State New
Headers show

Commit Message

sonika.jindal@intel.com Aug. 10, 2015, 5:05 a.m. UTC
WA for BXT A0/A1, where DDIB's HPD pin is swapped to DDIA, so enabling
DDIA HPD pin in place of DDIB.

v2: For DP, irq_port is used to determine the encoder instead of
hpd_pin and removing the edp HPD logic because port A HPD is not
present(Imre)
v3: Rebased on top of Imre's patchset for enabling HPD on PORT A.
Added hpd_pin swapping for intel_dp_init_connector, setting encoder
for PORT_A as per the WA in irq_port (Imre)
v4: Dont enable interrupt for edp, also reframe the description (Siva)
v5: Don’t check for PORT_A in intel_ddi_init to update dig_port,
instead avoid setting hpd_pin itself (Imre)

Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c  |   10 +++++++++-
 drivers/gpu/drm/i915/intel_dp.c   |    2 ++
 drivers/gpu/drm/i915/intel_hdmi.c |    9 ++++++++-
 3 files changed, 19 insertions(+), 2 deletions(-)

Comments

Sivakumar Thulasimani Aug. 10, 2015, 5:28 a.m. UTC | #1
Reviewed-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>

On 8/10/2015 10:35 AM, Sonika Jindal wrote:
> WA for BXT A0/A1, where DDIB's HPD pin is swapped to DDIA, so enabling
> DDIA HPD pin in place of DDIB.
>
> v2: For DP, irq_port is used to determine the encoder instead of
> hpd_pin and removing the edp HPD logic because port A HPD is not
> present(Imre)
> v3: Rebased on top of Imre's patchset for enabling HPD on PORT A.
> Added hpd_pin swapping for intel_dp_init_connector, setting encoder
> for PORT_A as per the WA in irq_port (Imre)
> v4: Dont enable interrupt for edp, also reframe the description (Siva)
> v5: Don’t check for PORT_A in intel_ddi_init to update dig_port,
> instead avoid setting hpd_pin itself (Imre)
>
> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_ddi.c  |   10 +++++++++-
>   drivers/gpu/drm/i915/intel_dp.c   |    2 ++
>   drivers/gpu/drm/i915/intel_hdmi.c |    9 ++++++++-
>   3 files changed, 19 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index e2c6f73..777e3a3 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -3225,7 +3225,15 @@ void intel_ddi_init(struct drm_device *dev, enum port port)
>   			goto err;
>   
>   		intel_dig_port->hpd_pulse = intel_dp_hpd_pulse;
> -		dev_priv->hotplug.irq_port[port] = intel_dig_port;
> +		/*
> +		 * On BXT A0/A1, sw needs to activate DDIA HPD logic and
> +		 * interrupts to check the external panel connection.
> +		 */
> +		if (IS_BROXTON(dev_priv) && (INTEL_REVID(dev) < BXT_REVID_B0)
> +					 && port == PORT_B)
> +			dev_priv->hotplug.irq_port[PORT_A] = intel_dig_port;
> +		else
> +			dev_priv->hotplug.irq_port[port] = intel_dig_port;
>   	}
>   
>   	/* In theory we don't need the encoder->type check, but leave it just in
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 5a614c9..7fab3e5 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -5788,6 +5788,8 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
>   		break;
>   	case PORT_B:
>   		intel_encoder->hpd_pin = HPD_PORT_B;
> +		if (IS_BROXTON(dev_priv) && (INTEL_REVID(dev) < BXT_REVID_B0))
> +			intel_encoder->hpd_pin = HPD_PORT_A;
>   		break;
>   	case PORT_C:
>   		intel_encoder->hpd_pin = HPD_PORT_C;
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 70bad5b..94fa716 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>   			intel_hdmi->ddc_bus = GMBUS_PIN_1_BXT;
>   		else
>   			intel_hdmi->ddc_bus = GMBUS_PIN_DPB;
> -		intel_encoder->hpd_pin = HPD_PORT_B;
> +		/*
> +		 * On BXT A0/A1, sw needs to activate DDIA HPD logic and
> +		 * interrupts to check the external panel connection.
> +		 */
> +		if (IS_BROXTON(dev_priv) && (INTEL_REVID(dev) < BXT_REVID_B0))
> +			intel_encoder->hpd_pin = HPD_PORT_A;
> +		else
> +			intel_encoder->hpd_pin = HPD_PORT_B;
>   		break;
>   	case PORT_C:
>   		if (IS_BROXTON(dev_priv))
Daniel Vetter Aug. 12, 2015, 12:58 p.m. UTC | #2
On Mon, Aug 10, 2015 at 10:58:55AM +0530, Sivakumar Thulasimani wrote:
> Reviewed-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
> 
> On 8/10/2015 10:35 AM, Sonika Jindal wrote:
> >WA for BXT A0/A1, where DDIB's HPD pin is swapped to DDIA, so enabling
> >DDIA HPD pin in place of DDIB.
> >
> >v2: For DP, irq_port is used to determine the encoder instead of
> >hpd_pin and removing the edp HPD logic because port A HPD is not
> >present(Imre)
> >v3: Rebased on top of Imre's patchset for enabling HPD on PORT A.
> >Added hpd_pin swapping for intel_dp_init_connector, setting encoder
> >for PORT_A as per the WA in irq_port (Imre)
> >v4: Dont enable interrupt for edp, also reframe the description (Siva)
> >v5: Don’t check for PORT_A in intel_ddi_init to update dig_port,
> >instead avoid setting hpd_pin itself (Imre)
> >
> >Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>

Merged patches 2&3 from this series, thanks.
-Daniel

> >---
> >  drivers/gpu/drm/i915/intel_ddi.c  |   10 +++++++++-
> >  drivers/gpu/drm/i915/intel_dp.c   |    2 ++
> >  drivers/gpu/drm/i915/intel_hdmi.c |    9 ++++++++-
> >  3 files changed, 19 insertions(+), 2 deletions(-)
> >
> >diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> >index e2c6f73..777e3a3 100644
> >--- a/drivers/gpu/drm/i915/intel_ddi.c
> >+++ b/drivers/gpu/drm/i915/intel_ddi.c
> >@@ -3225,7 +3225,15 @@ void intel_ddi_init(struct drm_device *dev, enum port port)
> >  			goto err;
> >  		intel_dig_port->hpd_pulse = intel_dp_hpd_pulse;
> >-		dev_priv->hotplug.irq_port[port] = intel_dig_port;
> >+		/*
> >+		 * On BXT A0/A1, sw needs to activate DDIA HPD logic and
> >+		 * interrupts to check the external panel connection.
> >+		 */
> >+		if (IS_BROXTON(dev_priv) && (INTEL_REVID(dev) < BXT_REVID_B0)
> >+					 && port == PORT_B)
> >+			dev_priv->hotplug.irq_port[PORT_A] = intel_dig_port;
> >+		else
> >+			dev_priv->hotplug.irq_port[port] = intel_dig_port;
> >  	}
> >  	/* In theory we don't need the encoder->type check, but leave it just in
> >diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> >index 5a614c9..7fab3e5 100644
> >--- a/drivers/gpu/drm/i915/intel_dp.c
> >+++ b/drivers/gpu/drm/i915/intel_dp.c
> >@@ -5788,6 +5788,8 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
> >  		break;
> >  	case PORT_B:
> >  		intel_encoder->hpd_pin = HPD_PORT_B;
> >+		if (IS_BROXTON(dev_priv) && (INTEL_REVID(dev) < BXT_REVID_B0))
> >+			intel_encoder->hpd_pin = HPD_PORT_A;
> >  		break;
> >  	case PORT_C:
> >  		intel_encoder->hpd_pin = HPD_PORT_C;
> >diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> >index 70bad5b..94fa716 100644
> >--- a/drivers/gpu/drm/i915/intel_hdmi.c
> >+++ b/drivers/gpu/drm/i915/intel_hdmi.c
> >@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
> >  			intel_hdmi->ddc_bus = GMBUS_PIN_1_BXT;
> >  		else
> >  			intel_hdmi->ddc_bus = GMBUS_PIN_DPB;
> >-		intel_encoder->hpd_pin = HPD_PORT_B;
> >+		/*
> >+		 * On BXT A0/A1, sw needs to activate DDIA HPD logic and
> >+		 * interrupts to check the external panel connection.
> >+		 */
> >+		if (IS_BROXTON(dev_priv) && (INTEL_REVID(dev) < BXT_REVID_B0))
> >+			intel_encoder->hpd_pin = HPD_PORT_A;
> >+		else
> >+			intel_encoder->hpd_pin = HPD_PORT_B;
> >  		break;
> >  	case PORT_C:
> >  		if (IS_BROXTON(dev_priv))
> 
> -- 
> regards,
> Sivakumar
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Shuang He Aug. 13, 2015, 12:48 p.m. UTC | #3
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 7125
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
ILK                 -1              302/302              301/302
SNB                                  315/315              315/315
IVB                                  336/336              336/336
BYT                                  283/283              283/283
HSW                                  378/378              378/378
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
*ILK  igt@kms_flip@flip-vs-dpms-interruptible      PASS(1)      DMESG_WARN(1)
Note: You need to pay more attention to line start with '*'

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index e2c6f73..777e3a3 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -3225,7 +3225,15 @@  void intel_ddi_init(struct drm_device *dev, enum port port)
 			goto err;
 
 		intel_dig_port->hpd_pulse = intel_dp_hpd_pulse;
-		dev_priv->hotplug.irq_port[port] = intel_dig_port;
+		/*
+		 * On BXT A0/A1, sw needs to activate DDIA HPD logic and
+		 * interrupts to check the external panel connection.
+		 */
+		if (IS_BROXTON(dev_priv) && (INTEL_REVID(dev) < BXT_REVID_B0)
+					 && port == PORT_B)
+			dev_priv->hotplug.irq_port[PORT_A] = intel_dig_port;
+		else
+			dev_priv->hotplug.irq_port[port] = intel_dig_port;
 	}
 
 	/* In theory we don't need the encoder->type check, but leave it just in
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 5a614c9..7fab3e5 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -5788,6 +5788,8 @@  intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
 		break;
 	case PORT_B:
 		intel_encoder->hpd_pin = HPD_PORT_B;
+		if (IS_BROXTON(dev_priv) && (INTEL_REVID(dev) < BXT_REVID_B0))
+			intel_encoder->hpd_pin = HPD_PORT_A;
 		break;
 	case PORT_C:
 		intel_encoder->hpd_pin = HPD_PORT_C;
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 70bad5b..94fa716 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1973,7 +1973,14 @@  void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
 			intel_hdmi->ddc_bus = GMBUS_PIN_1_BXT;
 		else
 			intel_hdmi->ddc_bus = GMBUS_PIN_DPB;
-		intel_encoder->hpd_pin = HPD_PORT_B;
+		/*
+		 * On BXT A0/A1, sw needs to activate DDIA HPD logic and
+		 * interrupts to check the external panel connection.
+		 */
+		if (IS_BROXTON(dev_priv) && (INTEL_REVID(dev) < BXT_REVID_B0))
+			intel_encoder->hpd_pin = HPD_PORT_A;
+		else
+			intel_encoder->hpd_pin = HPD_PORT_B;
 		break;
 	case PORT_C:
 		if (IS_BROXTON(dev_priv))