Re: [PATCH] drm/i915: Fixing eDP detection on certain platforms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2016-04-07 at 16:03 +0530, Shubhangi Shrivastava wrote:
> Sink count was read for eDP as well as DP. But in some cases
> the sink count for eDP is received as zero, as against the
> expected non zero value. This is seen in:
> 
> commit 30d9aa4265fe4b2b28239934770b2c2d59858df3
> Author: Shubhangi Shrivastava <shubhangi.shrivastava@xxxxxxxxx>
> Date: Wed Mar 30 18:05:25 2016 +0530
> 	drm/i915: Read sink_count dpcd always
> 
> This patch fixes the issue by removing the sink count check
> for both DP and eDP and allows it to be checked only for DP.

I found that commit message a bit confusing. How about the following instead?

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.

> Fixes: 30d9aa4265fe ("drm/i915: Read sink_count dpcd always")
> Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@xxxxxxxxx>
> Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index da0c3d2..bd5287b 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3806,7 +3806,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 */
> @@ -4345,7 +4345,8 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
>  
>  	/* If we're HPD-aware, SINK_COUNT changes dynamically */
>  	if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11 &&
> -	    intel_dp->downstream_ports[0] & DP_DS_PORT_HPD) {
> +	    intel_dp->downstream_ports[0] & DP_DS_PORT_HPD &&
> +	    !is_edp(intel_dp)) {

Is there such an eDP panel that would have downstream facing ports? I don't
think this code could be reached otherwise. Anyway, it is probably better to be
paranoid when it comes to this.

Reviewed-by: Ander Conselvan de Oliveira <conselvan2@xxxxxxxxx>

Tvrtko, can you confirm this fixes the problem for you?

>  
>  		return intel_dp->sink_count ?
>  		connector_status_connected : connector_status_disconnected;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux