diff mbox

[RESEND,FOR,CI,2/2] drm/i915: Fixing eDP detection on certain platforms

Message ID 1460533675-6773-2-git-send-email-ander.conselvan.de.oliveira@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ander Conselvan de Oliveira April 13, 2016, 7:47 a.m. UTC
From: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>

Since commit 30d9aa4265fe ("drm/i915: Read sink_count dpcd always"),
the status of a DP connector depends on its sink count value.
However, some eDP panels don't set that value appropriately,
causing them to be reported as disconnected.
Fix this by ignoring sink count for eDP.

v2: Rephrased commit message. (Ander)
    In case of eDP, returning status as connected if DPCD
    read succeeds to avoid any further operations.

Fixes: 30d9aa4265fe ("drm/i915: Read sink_count dpcd always")
Cc: Ander Conselvan De Oliveira <conselvan2@gmail.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Reported-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
Tested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1460444034-22320-1-git-send-email-shubhangi.shrivastava@intel.com
---
 drivers/gpu/drm/i915/intel_dp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

cpaul@redhat.com April 21, 2016, 8:59 p.m. UTC | #1
Ping. Any chance we could get these pushed upstream soon?

On Wed, 2016-04-13 at 10:47 +0300, Ander Conselvan de Oliveira wrote:
> From: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
> 
> Since commit 30d9aa4265fe ("drm/i915: Read sink_count dpcd always"),
> the status of a DP connector depends on its sink count value.
> However, some eDP panels don't set that value appropriately,
> causing them to be reported as disconnected.
> Fix this by ignoring sink count for eDP.
> 
> v2: Rephrased commit message. (Ander)
>     In case of eDP, returning status as connected if DPCD
>     read succeeds to avoid any further operations.
> 
> Fixes: 30d9aa4265fe ("drm/i915: Read sink_count dpcd always")
> Cc: Ander Conselvan De Oliveira <conselvan2@gmail.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Reported-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
> Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
> Tested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.
> com>
> Link: http://patchwork.freedesktop.org/patch/msgid/1460444034-22320-1-git-send
> -email-shubhangi.shrivastava@intel.com
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 6c6f95a2..460c421 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3776,7 +3776,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
>  	 * downstream port information. So, an early return here saves
>  	 * time from performing other operations which are not required.
>  	 */
> -	if (!intel_dp->sink_count)
> +	if (!is_edp(intel_dp) && !intel_dp->sink_count)
>  		return false;
>  
>  	/* Check if the panel supports PSR */
> @@ -4309,6 +4309,9 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
>  	if (!intel_dp_get_dpcd(intel_dp))
>  		return connector_status_disconnected;
>  
> +	if (is_edp(intel_dp))
> +		return connector_status_connected;
> +
>  	/* if there's no downstream port, we're done */
>  	if (!(dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT))
>  		return connector_status_connected;
Ander Conselvan de Oliveira April 22, 2016, 5:35 a.m. UTC | #2
On Thu, 2016-04-21 at 16:59 -0400, Lyude wrote:
> Ping. Any chance we could get these pushed upstream soon?

They were pushed to dinq Tuesday.

Ander

> 
> On Wed, 2016-04-13 at 10:47 +0300, Ander Conselvan de Oliveira wrote:
> > From: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
> > 
> > Since commit 30d9aa4265fe ("drm/i915: Read sink_count dpcd always"),
> > the status of a DP connector depends on its sink count value.
> > However, some eDP panels don't set that value appropriately,
> > causing them to be reported as disconnected.
> > Fix this by ignoring sink count for eDP.
> > 
> > v2: Rephrased commit message. (Ander)
> >     In case of eDP, returning status as connected if DPCD
> >     read succeeds to avoid any further operations.
> > 
> > Fixes: 30d9aa4265fe ("drm/i915: Read sink_count dpcd always")
> > Cc: Ander Conselvan De Oliveira <conselvan2@gmail.com>
> > Cc: Jani Nikula <jani.nikula@linux.intel.com>
> > Reported-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> > Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
> > Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
> > Tested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
> > Signed-off-by: Ander Conselvan de Oliveira <
> > ander.conselvan.de.oliveira@intel.
> > com>
> > Link: 
> > http://patchwork.freedesktop.org/patch/msgid/1460444034-22320-1-git-send
> > -email-shubhangi.shrivastava@intel.com
> > ---
> >  drivers/gpu/drm/i915/intel_dp.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c
> > b/drivers/gpu/drm/i915/intel_dp.c
> > index 6c6f95a2..460c421 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -3776,7 +3776,7 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
> >  	 * downstream port information. So, an early return here saves
> >  	 * time from performing other operations which are not required.
> >  	 */
> > -	if (!intel_dp->sink_count)
> > +	if (!is_edp(intel_dp) && !intel_dp->sink_count)
> >  		return false;
> >  
> >  	/* Check if the panel supports PSR */
> > @@ -4309,6 +4309,9 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
> >  	if (!intel_dp_get_dpcd(intel_dp))
> >  		return connector_status_disconnected;
> >  
> > +	if (is_edp(intel_dp))
> > +		return connector_status_connected;
> > +
> >  	/* if there's no downstream port, we're done */
> >  	if (!(dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT))
> >  		return connector_status_connected;
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 6c6f95a2..460c421 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3776,7 +3776,7 @@  intel_dp_get_dpcd(struct intel_dp *intel_dp)
 	 * downstream port information. So, an early return here saves
 	 * time from performing other operations which are not required.
 	 */
-	if (!intel_dp->sink_count)
+	if (!is_edp(intel_dp) && !intel_dp->sink_count)
 		return false;
 
 	/* Check if the panel supports PSR */
@@ -4309,6 +4309,9 @@  intel_dp_detect_dpcd(struct intel_dp *intel_dp)
 	if (!intel_dp_get_dpcd(intel_dp))
 		return connector_status_disconnected;
 
+	if (is_edp(intel_dp))
+		return connector_status_connected;
+
 	/* if there's no downstream port, we're done */
 	if (!(dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT))
 		return connector_status_connected;