[v2] drm/i915: Ignore TMDS clock limit for DP++ when EDID override is set

Submitted by Abdiel Janulgue on Dec. 15, 2017, 10:20 a.m.

Details

Message ID 20171215102055.11729-1-abdiel.janulgue@linux.intel.com
State Accepted
Commit 3019062905533ccd71b535f6e5c3ed7e9bb195e0
Headers show
Series "drm/i915: Ignore TMDS clock limit for DP++ when EDID override is set" ( rev: 2 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Abdiel Janulgue Dec. 15, 2017, 10:20 a.m.
4K modes testing by using dummy EDID data has never been working
properly on boxes with DP++ (dual-mode) adaptors. The reason for
this is that those modes got pruned during hdmi mode validation.
intel_hdmi_mode_valid returns CLOCK_HIGH because the pixel clock
reported by the 4k mode is higher than dual port TMDS clock limit.

However 4k injection does work properly on machines that don't have
DP++ adapters because the mode is never validated against the DP++
TMDS clock limit.

v2: Don't detect the DP++ limits when we're testing using overridden
    EDIDs. Make sure to check for the override condition after
    respecting the value of drm_dp_dual_mode_detect (Jani Nikula).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101649
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index bced7b9..9834690 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1567,7 +1567,10 @@  intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
 	 * there's nothing connected to the port.
 	 */
 	if (type == DRM_DP_DUAL_MODE_UNKNOWN) {
-		if (has_edid &&
+		/* An overridden EDID imply that we want this port for testing.
+		 * Make sure not to set limits for that port.
+		 */
+		if (has_edid && !connector->override_edid &&
 		    intel_bios_is_port_dp_dual_mode(dev_priv, port)) {
 			DRM_DEBUG_KMS("Assuming DP dual mode adaptor presence based on VBT\n");
 			type = DRM_DP_DUAL_MODE_TYPE1_DVI;

Comments

On Fri, 15 Dec 2017, Abdiel Janulgue <abdiel.janulgue@linux.intel.com> wrote:
> 4K modes testing by using dummy EDID data has never been working
> properly on boxes with DP++ (dual-mode) adaptors. The reason for
> this is that those modes got pruned during hdmi mode validation.
> intel_hdmi_mode_valid returns CLOCK_HIGH because the pixel clock
> reported by the 4k mode is higher than dual port TMDS clock limit.
>
> However 4k injection does work properly on machines that don't have
> DP++ adapters because the mode is never validated against the DP++
> TMDS clock limit.
>
> v2: Don't detect the DP++ limits when we're testing using overridden
>     EDIDs. Make sure to check for the override condition after
>     respecting the value of drm_dp_dual_mode_detect (Jani Nikula).
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101649
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>

I have this vague wish we had a better way to do this, but at the same
time I have no reason to block this patch either. It's debugfs, not an
ABI, and we can change this again if we come up with something better.

Pushed, thanks for the patch and for your patience with my
procrastination.

BR,
Jani.



> ---
>  drivers/gpu/drm/i915/intel_hdmi.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index bced7b9..9834690 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -1567,7 +1567,10 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)
>  	 * there's nothing connected to the port.
>  	 */
>  	if (type == DRM_DP_DUAL_MODE_UNKNOWN) {
> -		if (has_edid &&
> +		/* An overridden EDID imply that we want this port for testing.
> +		 * Make sure not to set limits for that port.
> +		 */
> +		if (has_edid && !connector->override_edid &&
>  		    intel_bios_is_port_dp_dual_mode(dev_priv, port)) {
>  			DRM_DEBUG_KMS("Assuming DP dual mode adaptor presence based on VBT\n");
>  			type = DRM_DP_DUAL_MODE_TYPE1_DVI;