forked from mirrors/linux
		
	drm/i915/edp: Do not do link training fallback or prune modes on EDP
In case of eDP because the panel has a fixed mode, the link rate
and lane count at which it is trained corresponds to the link BW
required to support the native resolution of the panel. In case of
panles with lower resolutions where fewer lanes are hooked up internally,
that number is reflected in the MAX_LANE_COUNT DPCD register of the panel.
So it is pointless to fallback to lower link rate/lane count in case
of link training failure on eDP connector since the lower link BW
will not support the native resolution of the panel and we cannot
prune the preferred mode on the eDP connector.
In case of Link training failure on the eDP panel, something is wrong
in the HW internally and hence driver errors out with a loud
and clear DRM_ERROR message.
v2:
* Fix the DEBUG_ERROR and add {} in else (Ville Syrjala)
Cc: Clinton Taylor <clinton.a.taylor@intel.com>
Cc: Jim Bride <jim.bride@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com>
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103369
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1507835618-23051-1-git-send-email-manasi.d.navare@intel.com
			
			
This commit is contained in:
		
							parent
							
								
									073cd78166
								
							
						
					
					
						commit
						c0cfb10d9e
					
				
					 1 changed files with 17 additions and 9 deletions
				
			
		| 
						 | 
					@ -328,14 +328,22 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)
 | 
				
			||||||
	return;
 | 
						return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 failure_handling:
 | 
					 failure_handling:
 | 
				
			||||||
	DRM_DEBUG_KMS("[CONNECTOR:%d:%s] Link Training failed at link rate = %d, lane count = %d",
 | 
						/* Dont fallback and prune modes if its eDP */
 | 
				
			||||||
		      intel_connector->base.base.id,
 | 
						if (!intel_dp_is_edp(intel_dp)) {
 | 
				
			||||||
		      intel_connector->base.name,
 | 
							DRM_DEBUG_KMS("[CONNECTOR:%d:%s] Link Training failed at link rate = %d, lane count = %d",
 | 
				
			||||||
		      intel_dp->link_rate, intel_dp->lane_count);
 | 
								      intel_connector->base.base.id,
 | 
				
			||||||
	if (!intel_dp_get_link_train_fallback_values(intel_dp,
 | 
								      intel_connector->base.name,
 | 
				
			||||||
						     intel_dp->link_rate,
 | 
								      intel_dp->link_rate, intel_dp->lane_count);
 | 
				
			||||||
						     intel_dp->lane_count))
 | 
							if (!intel_dp_get_link_train_fallback_values(intel_dp,
 | 
				
			||||||
		/* Schedule a Hotplug Uevent to userspace to start modeset */
 | 
												     intel_dp->link_rate,
 | 
				
			||||||
		schedule_work(&intel_connector->modeset_retry_work);
 | 
												     intel_dp->lane_count))
 | 
				
			||||||
 | 
								/* Schedule a Hotplug Uevent to userspace to start modeset */
 | 
				
			||||||
 | 
								schedule_work(&intel_connector->modeset_retry_work);
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							DRM_ERROR("[CONNECTOR:%d:%s] Link Training failed at link rate = %d, lane count = %d",
 | 
				
			||||||
 | 
								  intel_connector->base.base.id,
 | 
				
			||||||
 | 
								  intel_connector->base.name,
 | 
				
			||||||
 | 
								  intel_dp->link_rate, intel_dp->lane_count);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	return;
 | 
						return;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue