diff mbox series

drm/i915: Switch LSPCON to PCON mode if it's in LS mode

Message ID 20181107171821.27862-1-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Switch LSPCON to PCON mode if it's in LS mode | expand

Commit Message

Ville Syrjälä Nov. 7, 2018, 5:18 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We no longer change LSPCON into PCON mode if it boots up in
LS mode. This was broken by some code shuffling in
commit 96e35598cead ("drm/i915: Check LSPCON vendor OUI").

I actually can't see a reason why that code shuffling had
to be done. The commit msg notes it but doesn't justify it
in any way. But I guess we'll keep the code in its current
place anyway and just make the "switch to PCON mode" part
effective once again.

Cc: Shashank Sharma <shashank.sharma@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Tested-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Fixes: 96e35598cead ("drm/i915: Check LSPCON vendor OUI")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_lspcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sharma, Shashank Nov. 13, 2018, 9:38 a.m. UTC | #1
Regards

Shashank


On 11/7/2018 10:48 PM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> We no longer change LSPCON into PCON mode if it boots up in
> LS mode. This was broken by some code shuffling in
> commit 96e35598cead ("drm/i915: Check LSPCON vendor OUI").
>
> I actually can't see a reason why that code shuffling had
> to be done. The commit msg notes it but doesn't justify it
> in any way.
Its been some time, but AFAIR this shuffling was done because we wanted 
to make sure LSPCON is in DP/PCON personality, before we try to read 
DCPD and vendor OUI. I probably missed to add this reason in commit 
message. There were few LSPCON devices, which due to old FW version, or 
some one or other reason, were booting in LS mode. We wanted to make 
sure that probing, mode change and delay related stuff is all taken care 
in lspcon_probe function, and after probing, LSPCON is ready to be used 
in PCON personality.
>   But I guess we'll keep the code in its current
> place anyway and just make the "switch to PCON mode" part
> effective once again.
>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Tested-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Fixes: 96e35598cead ("drm/i915: Check LSPCON vendor OUI")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/intel_lspcon.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lspcon.c b/drivers/gpu/drm/i915/intel_lspcon.c
> index fff32b31c7df..96a8d9524b0c 100644
> --- a/drivers/gpu/drm/i915/intel_lspcon.c
> +++ b/drivers/gpu/drm/i915/intel_lspcon.c
> @@ -230,7 +230,7 @@ static bool lspcon_probe(struct intel_lspcon *lspcon)
>   	 * In this way, it will work with both HDMI 1.4 sinks as well as HDMI
>   	 * 2.0 sinks.
>   	 */
> -	if (lspcon->active && lspcon->mode != DRM_LSPCON_MODE_PCON) {
> +	if (lspcon->mode != DRM_LSPCON_MODE_PCON) {
Agree, this became irrelevant once we added the vendor detection code, 
and decided to call it active, only when probing, dpcd_read and 
vendor_detection is all good.
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
>   		if (lspcon_change_mode(lspcon, DRM_LSPCON_MODE_PCON) < 0) {
>   			DRM_ERROR("LSPCON mode change to PCON failed\n");
>   			return false;

- Shashank
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_lspcon.c b/drivers/gpu/drm/i915/intel_lspcon.c
index fff32b31c7df..96a8d9524b0c 100644
--- a/drivers/gpu/drm/i915/intel_lspcon.c
+++ b/drivers/gpu/drm/i915/intel_lspcon.c
@@ -230,7 +230,7 @@  static bool lspcon_probe(struct intel_lspcon *lspcon)
 	 * In this way, it will work with both HDMI 1.4 sinks as well as HDMI
 	 * 2.0 sinks.
 	 */
-	if (lspcon->active && lspcon->mode != DRM_LSPCON_MODE_PCON) {
+	if (lspcon->mode != DRM_LSPCON_MODE_PCON) {
 		if (lspcon_change_mode(lspcon, DRM_LSPCON_MODE_PCON) < 0) {
 			DRM_ERROR("LSPCON mode change to PCON failed\n");
 			return false;