diff mbox

drm/i915: only hook up hpd pulse for DP setups.

Message ID 1406926030-13124-1-git-send-email-airlied@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dave Airlie Aug. 1, 2014, 8:47 p.m. UTC
From: Dave Airlie <airlied@redhat.com>

On HSW/BDW the VBT can tell us if we need to have DP support for a port,
if we don't have DP this caused an oops in the hpd handling.

Don't hook up the DP hpd handling if we don't have a DP port.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81856
Reported-by: Intel QA Team.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Paulo Zanoni Aug. 1, 2014, 9:38 p.m. UTC | #1
2014-08-01 17:47 GMT-03:00 Dave Airlie <airlied@gmail.com>:
> From: Dave Airlie <airlied@redhat.com>
>
> On HSW/BDW the VBT can tell us if we need to have DP support for a port,
> if we don't have DP this caused an oops in the hpd handling.
>
> Don't hook up the DP hpd handling if we don't have a DP port.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81856
> Reported-by: Intel QA Team.
> Signed-off-by: Dave Airlie <airlied@redhat.com>

The patch looks correct, but AFAIK we didn't need it in the past, so I
am curious about why is it needed now. What changed that caused the
need for it?

> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 9b1542f..42d4dce 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -1557,11 +1557,13 @@ void intel_ddi_init(struct drm_device *dev, enum port port)
>         intel_encoder->cloneable = 0;
>         intel_encoder->hot_plug = intel_ddi_hot_plug;
>
> -       intel_dig_port->hpd_pulse = intel_dp_hpd_pulse;
> -       dev_priv->hpd_irq_port[port] = intel_dig_port;
> +       if (init_dp) {
> +               /* only hook up hpd processing for DP */
> +               intel_dig_port->hpd_pulse = intel_dp_hpd_pulse;
> +               dev_priv->hpd_irq_port[port] = intel_dig_port;
>
> -       if (init_dp)
>                 dp_connector = intel_ddi_init_dp_connector(intel_dig_port);
> +       }
>
>         /* In theory we don't need the encoder->type check, but leave it just in
>          * case we have some really bad VBTs... */
> --
> 1.9.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Dave Airlie Aug. 1, 2014, 10:16 p.m. UTC | #2
On 2 August 2014 07:38, Paulo Zanoni <przanoni@gmail.com> wrote:
> 2014-08-01 17:47 GMT-03:00 Dave Airlie <airlied@gmail.com>:
>> From: Dave Airlie <airlied@redhat.com>
>>
>> On HSW/BDW the VBT can tell us if we need to have DP support for a port,
>> if we don't have DP this caused an oops in the hpd handling.
>>
>> Don't hook up the DP hpd handling if we don't have a DP port.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81856
>> Reported-by: Intel QA Team.
>> Signed-off-by: Dave Airlie <airlied@redhat.com>
>
> The patch looks correct, but AFAIK we didn't need it in the past, so I
> am curious about why is it needed now. What changed that caused the
> need for it?

Well the pulse handling is only new and I think we should have hit
this prior to MST, since hpd_pulse called intel_dp_check_link_status.

Prior to the pulse irq, intel_ddi check if the port was eDP or DP
before proceeding.

Dave
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 9b1542f..42d4dce 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1557,11 +1557,13 @@  void intel_ddi_init(struct drm_device *dev, enum port port)
 	intel_encoder->cloneable = 0;
 	intel_encoder->hot_plug = intel_ddi_hot_plug;
 
-	intel_dig_port->hpd_pulse = intel_dp_hpd_pulse;
-	dev_priv->hpd_irq_port[port] = intel_dig_port;
+	if (init_dp) {
+		/* only hook up hpd processing for DP */
+		intel_dig_port->hpd_pulse = intel_dp_hpd_pulse;
+		dev_priv->hpd_irq_port[port] = intel_dig_port;
 
-	if (init_dp)
 		dp_connector = intel_ddi_init_dp_connector(intel_dig_port);
+	}
 
 	/* In theory we don't need the encoder->type check, but leave it just in
 	 * case we have some really bad VBTs... */