drm/i915: Fixing eDP detection on certain platforms

Submitted by Shubhangi Shrivastava on April 12, 2016, 6:53 a.m.

Details

Message ID 1460444034-22320-1-git-send-email-shubhangi.shrivastava@intel.com
State New
Headers show
Series "drm/i915: Fixing eDP detection on certain platforms" ( rev: 4 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Shubhangi Shrivastava April 12, 2016, 6:53 a.m.
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>
---
 drivers/gpu/drm/i915/intel_dp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index da0c3d2..bdc7e12 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 */
@@ -4339,6 +4339,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;

Comments

On Tue, 2016-04-12 at 12:23 +0530, Shubhangi Shrivastava wrote:
> 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>

> ---
>  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 da0c3d2..bdc7e12 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 */
> @@ -4339,6 +4339,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;
On 12/04/16 09:16, Patchwork wrote:
> == Series Details ==
>
> Series: drm/i915: Fixing eDP detection on certain platforms (rev4)
> URL   : https://patchwork.freedesktop.org/series/5408/
> State : failure
>
> == Summary ==
>
> Series 5408v4 drm/i915: Fixing eDP detection on certain platforms
> http://patchwork.freedesktop.org/api/1.0/series/5408/revisions/4/mbox/
>
> Test drv_module_reload_basic:
>                  pass       -> INCOMPLETE (snb-dellxps)

Don't know what to think of this - resend? Or this machine generally has 
issues?

> Test gem_basic:
>          Subgroup create-fd-close:
>                  incomplete -> PASS       (bsw-nuc-2)
> Test gem_ctx_param_basic:
>          Subgroup invalid-param-get:
>                  incomplete -> PASS       (bsw-nuc-2)
> Test gem_exec_basic:
>          Subgroup basic-bsd1:
>                  incomplete -> SKIP       (bsw-nuc-2)
> Test gem_exec_store:
>          Subgroup basic-bsd1:
>                  incomplete -> SKIP       (bsw-nuc-2)
>          Subgroup basic-bsd2:
>                  incomplete -> SKIP       (bsw-nuc-2)
> Test gem_ringfill:
>          Subgroup basic-default-hang:
>                  dmesg-warn -> PASS       (bsw-nuc-2)
> Test gem_storedw_loop:
>          Subgroup basic-bsd2:
>                  incomplete -> SKIP       (bsw-nuc-2)
> Test kms_addfb_basic:
>          Subgroup bad-pitch-1024:
>                  dmesg-warn -> PASS       (bsw-nuc-2)
>          Subgroup basic-y-tiled:
>                  incomplete -> PASS       (bsw-nuc-2)
>          Subgroup small-bo:
>                  incomplete -> PASS       (bsw-nuc-2)
>          Subgroup unused-handle:
>                  incomplete -> PASS       (bsw-nuc-2)
> Test kms_flip:
>          Subgroup basic-flip-vs-dpms:
>                  pass       -> DMESG-WARN (ilk-hp8440p) UNSTABLE

FIFO underrun on ILK: https://bugs.freedesktop.org/show_bug.cgi?id=93787

>          Subgroup basic-flip-vs-wf_vblank:
>                  pass       -> FAIL       (bsw-nuc-2)

Another know unrelated: https://bugs.freedesktop.org/show_bug.cgi?id=94294

> Test kms_pipe_crc_basic:
>          Subgroup read-crc-pipe-a:
>                  incomplete -> SKIP       (bsw-nuc-2)
>          Subgroup read-crc-pipe-b:
>                  incomplete -> SKIP       (bsw-nuc-2)
> Test pm_rpm:
>          Subgroup basic-pci-d3-state:
>                  pass       -> DMESG-WARN (byt-nuc)

Unclaimed access prior to suspending: 
https://bugs.freedesktop.org/show_bug.cgi?id=94164

> Test prime_self_import:
>          Subgroup basic-with_one_bo:
>                  incomplete -> PASS       (bsw-nuc-2)
>          Subgroup basic-with_two_bos:
>                  incomplete -> PASS       (bsw-nuc-2)
>
> bdw-nuci7        total:202  pass:190  dwarn:0   dfail:0   fail:0   skip:12
> bdw-ultra        total:202  pass:179  dwarn:0   dfail:0   fail:0   skip:23
> bsw-nuc-2        total:201  pass:161  dwarn:0   dfail:0   fail:1   skip:39
> byt-nuc          total:201  pass:162  dwarn:1   dfail:0   fail:0   skip:38
> hsw-brixbox      total:202  pass:178  dwarn:0   dfail:0   fail:0   skip:24
> ilk-hp8440p      total:202  pass:133  dwarn:1   dfail:0   fail:0   skip:68
> ivb-t430s        total:202  pass:174  dwarn:0   dfail:0   fail:0   skip:28
> skl-i7k-2        total:202  pass:177  dwarn:0   dfail:0   fail:0   skip:25
> snb-dellxps      total:75   pass:59   dwarn:0   dfail:0   fail:1   skip:14
> snb-x220t        total:202  pass:164  dwarn:0   dfail:0   fail:1   skip:37
>
> Results at /archive/results/CI_IGT_test/Patchwork_1867/
>
> dc5380b5263ebb0bf251bb09db542585702b528b drm-intel-nightly: 2016y-04m-11d-19h-43m-10s UTC integration manifest
> 09154b99a2f86c5ae5061f82dee7f1cc8953a847 drm/i915: Fixing eDP detection on certain platforms

Regards,

Tvrtko