diff mbox

[28/28] drm/i915/dp: add pre-PCH eDP checking to DP detect for VLV

Message ID 1362172471-7643-29-git-send-email-jbarnes@virtuousgeek.org (mailing list archive)
State New, archived
Headers show

Commit Message

Jesse Barnes March 1, 2013, 9:14 p.m. UTC
Allows us to detect eDP panels that may not have the hotplug pin wired up.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_dp.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Daniel Vetter March 6, 2013, 7:05 p.m. UTC | #1
On Fri, Mar 01, 2013 at 01:14:31PM -0800, Jesse Barnes wrote:
> Allows us to detect eDP panels that may not have the hotplug pin wired up.
> 
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Historically the lid status is horribly broken which is why it's disabled
by default. What changed to now enable it unconditionally? Is this a
requirement on vlv?
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_dp.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 05e1000..c127cb7 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2413,6 +2413,16 @@ g4x_dp_detect(struct intel_dp *intel_dp)
>  	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
>  	uint32_t bit;
>  
> +	/* Can't disconnect eDP, but you can close the lid... */
> +	if (is_edp(intel_dp)) {
> +		enum drm_connector_status status;
> +
> +		status = intel_panel_detect(dev);
> +		if (status == connector_status_unknown)
> +			status = connector_status_connected;
> +		return status;
> +	}
> +
>  	switch (intel_dig_port->port) {
>  	case PORT_B:
>  		bit = PORTB_HOTPLUG_LIVE_STATUS;
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jesse Barnes March 6, 2013, 8:55 p.m. UTC | #2
On Wed, 6 Mar 2013 20:05:59 +0100
Daniel Vetter <daniel@ffwll.ch> wrote:

> On Fri, Mar 01, 2013 at 01:14:31PM -0800, Jesse Barnes wrote:
> > Allows us to detect eDP panels that may not have the hotplug pin wired up.
> > 
> > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> 
> Historically the lid status is horribly broken which is why it's disabled
> by default. What changed to now enable it unconditionally? Is this a
> requirement on vlv?
> -Daniel
> 
> > ---
> >  drivers/gpu/drm/i915/intel_dp.c |   10 ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 05e1000..c127cb7 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -2413,6 +2413,16 @@ g4x_dp_detect(struct intel_dp *intel_dp)
> >  	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> >  	uint32_t bit;
> >  
> > +	/* Can't disconnect eDP, but you can close the lid... */
> > +	if (is_edp(intel_dp)) {
> > +		enum drm_connector_status status;
> > +
> > +		status = intel_panel_detect(dev);
> > +		if (status == connector_status_unknown)
> > +			status = connector_status_connected;
> > +		return status;
> > +	}
> > +

Well this doesn't touch the panel_detect() stuff at all, where we have
the hacks to avoid using _LID...
Daniel Vetter March 6, 2013, 9:02 p.m. UTC | #3
On Wed, Mar 6, 2013 at 9:55 PM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> On Wed, 6 Mar 2013 20:05:59 +0100
> Daniel Vetter <daniel@ffwll.ch> wrote:
>
>> On Fri, Mar 01, 2013 at 01:14:31PM -0800, Jesse Barnes wrote:
>> > Allows us to detect eDP panels that may not have the hotplug pin wired up.
>> >
>> > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
>>
>> Historically the lid status is horribly broken which is why it's disabled
>> by default. What changed to now enable it unconditionally? Is this a
>> requirement on vlv?
>> -Daniel
>>
>> > ---
>> >  drivers/gpu/drm/i915/intel_dp.c |   10 ++++++++++
>> >  1 file changed, 10 insertions(+)
>> >
>> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>> > index 05e1000..c127cb7 100644
>> > --- a/drivers/gpu/drm/i915/intel_dp.c
>> > +++ b/drivers/gpu/drm/i915/intel_dp.c
>> > @@ -2413,6 +2413,16 @@ g4x_dp_detect(struct intel_dp *intel_dp)
>> >     struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
>> >     uint32_t bit;
>> >
>> > +   /* Can't disconnect eDP, but you can close the lid... */
>> > +   if (is_edp(intel_dp)) {
>> > +           enum drm_connector_status status;
>> > +
>> > +           status = intel_panel_detect(dev);
>> > +           if (status == connector_status_unknown)
>> > +                   status = connector_status_connected;
>> > +           return status;
>> > +   }
>> > +
>
> Well this doesn't touch the panel_detect() stuff at all, where we have
> the hacks to avoid using _LID...

Oh right, patch looks good to me now ;-) Merget to dinq, thanks.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 05e1000..c127cb7 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2413,6 +2413,16 @@  g4x_dp_detect(struct intel_dp *intel_dp)
 	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
 	uint32_t bit;
 
+	/* Can't disconnect eDP, but you can close the lid... */
+	if (is_edp(intel_dp)) {
+		enum drm_connector_status status;
+
+		status = intel_panel_detect(dev);
+		if (status == connector_status_unknown)
+			status = connector_status_connected;
+		return status;
+	}
+
 	switch (intel_dig_port->port) {
 	case PORT_B:
 		bit = PORTB_HOTPLUG_LIVE_STATUS;