Message ID | c8b45867cf37134ab40be23e22825ca45adc6041.1666614699.git.jani.nikula@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/edid: EDID override refactoring and fixes | expand |
On Mon, Oct 24, 2022 at 03:33:30PM +0300, Jani Nikula wrote: > The connector->override_edid flag is strictly for EDID override debugfs > management, and drivers have no business using it. > > The check for override_edid was added in commit 301906290553 ("drm/i915: > Ignore TMDS clock limit for DP++ when EDID override is set") to > facilitate mode list cross-checking against modes in override EDID when > the connector in question isn't even connected. The dual mode detect > fallback would do VBT based limiting in this case. > > Instead of override EDID, check for connector forcing in the fallback. > > v2: Simply use !connector->force (Ville) > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > --- > drivers/gpu/drm/i915/display/intel_hdmi.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c > index a332eaac86cd..02f8374ea51f 100644 > --- a/drivers/gpu/drm/i915/display/intel_hdmi.c > +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c > @@ -2374,10 +2374,7 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector) > * if the port is a dual mode capable DP port. > */ > if (type == DRM_DP_DUAL_MODE_UNKNOWN) { > - /* An overridden EDID imply that we want this port for testing. > - * Make sure not to set limits for that port. > - */ > - if (!connector->override_edid && > + if (!connector->force && > intel_bios_is_port_dp_dual_mode(dev_priv, port)) { > drm_dbg_kms(&dev_priv->drm, > "Assuming DP dual mode adaptor presence based on VBT\n"); > -- > 2.34.1
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c index a332eaac86cd..02f8374ea51f 100644 --- a/drivers/gpu/drm/i915/display/intel_hdmi.c +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c @@ -2374,10 +2374,7 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector) * if the port is a dual mode capable DP port. */ if (type == DRM_DP_DUAL_MODE_UNKNOWN) { - /* An overridden EDID imply that we want this port for testing. - * Make sure not to set limits for that port. - */ - if (!connector->override_edid && + if (!connector->force && intel_bios_is_port_dp_dual_mode(dev_priv, port)) { drm_dbg_kms(&dev_priv->drm, "Assuming DP dual mode adaptor presence based on VBT\n");
The connector->override_edid flag is strictly for EDID override debugfs management, and drivers have no business using it. The check for override_edid was added in commit 301906290553 ("drm/i915: Ignore TMDS clock limit for DP++ when EDID override is set") to facilitate mode list cross-checking against modes in override EDID when the connector in question isn't even connected. The dual mode detect fallback would do VBT based limiting in this case. Instead of override EDID, check for connector forcing in the fallback. v2: Simply use !connector->force (Ville) Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- drivers/gpu/drm/i915/display/intel_hdmi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)