public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fixing eDP detection on certain platforms
@ 2016-04-07 10:33 Shubhangi Shrivastava
  2016-04-07 11:12 ` Ander Conselvan De Oliveira
  0 siblings, 1 reply; 7+ messages in thread
From: Shubhangi Shrivastava @ 2016-04-07 10:33 UTC (permalink / raw)
  To: intel-gfx; +Cc: Shubhangi Shrivastava

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@intel.com>
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.

Fixes: 30d9aa4265fe ("drm/i915: Read sink_count dpcd always")
Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
---
 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)) {
 
 		return intel_dp->sink_count ?
 		connector_status_connected : connector_status_disconnected;
-- 
2.6.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] drm/i915: Fixing eDP detection on certain platforms
@ 2016-04-12  6:53 Shubhangi Shrivastava
  2016-04-12  7:09 ` Ander Conselvan De Oliveira
  0 siblings, 1 reply; 7+ messages in thread
From: Shubhangi Shrivastava @ 2016-04-12  6:53 UTC (permalink / raw)
  To: intel-gfx; +Cc: Shubhangi Shrivastava

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(-)

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;
-- 
2.6.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] drm/i915: Fixing eDP detection on certain platforms
@ 2016-04-07 11:42 Shubhangi Shrivastava
  2016-04-07 12:13 ` Tvrtko Ursulin
  0 siblings, 1 reply; 7+ messages in thread
From: Shubhangi Shrivastava @ 2016-04-07 11:42 UTC (permalink / raw)
  To: intel-gfx; +Cc: Shubhangi Shrivastava

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")
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>
---
 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;
-- 
2.6.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] drm/i915: Fixing eDP detection on certain platforms
@ 2016-04-07 10:08 Shubhangi Shrivastava
  0 siblings, 0 replies; 7+ messages in thread
From: Shubhangi Shrivastava @ 2016-04-07 10:08 UTC (permalink / raw)
  To: intel-gfx; +Cc: Shubhangi Shrivastava

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@intel.com>
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.

Fixes: 30d9aa4265fe ("drm/i915: Read sink_count dpcd always")
Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index da0c3d2..8cf5db3 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 */
-- 
2.6.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-04-12  7:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-07 10:33 [PATCH] drm/i915: Fixing eDP detection on certain platforms Shubhangi Shrivastava
2016-04-07 11:12 ` Ander Conselvan De Oliveira
  -- strict thread matches above, loose matches on Subject: below --
2016-04-12  6:53 Shubhangi Shrivastava
2016-04-12  7:09 ` Ander Conselvan De Oliveira
2016-04-07 11:42 Shubhangi Shrivastava
2016-04-07 12:13 ` Tvrtko Ursulin
2016-04-07 10:08 Shubhangi Shrivastava

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox