diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-09-12 14:18:12 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-09-26 17:09:22 +0300 |
commit | bde544e1d7017f3169b4d97b2e19c2d28066d87c (patch) | |
tree | a8634983979de049c5734ff492332873f90d5133 | |
parent | 8648c6048d4dc4d9294b7e7617c220bf446be0e7 (diff) | |
download | linux-bde544e1d7017f3169b4d97b2e19c2d28066d87c.tar.gz linux-bde544e1d7017f3169b4d97b2e19c2d28066d87c.tar.bz2 linux-bde544e1d7017f3169b4d97b2e19c2d28066d87c.zip |
drm/i915: Don't init eDP if we can't find a fixed mode
In the unlikely case of not finding a fixed mode don't register
the eDP connector. I think there are some places where we'd oops
if we didn't have a fixed mode for eDP so presumable this doesn't
typically happen. But better safe than sorry.
Also pimp the debugs with the encoder id+name. I think dumping
the encoder rather than the connector provides more information
here (eg. to match against the port information in the VBT).
We can also drop the extra check from intel_edp_add_properties().
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220912111814.17466-14-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_dp.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index ecde1fd41726..e12231b8d3a3 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -5186,9 +5186,6 @@ intel_edp_add_properties(struct intel_dp *intel_dp) intel_attach_scaling_mode_property(&connector->base); - if (!fixed_mode) - return; - drm_connector_set_panel_orientation_with_quirk(&connector->base, i915->display.vbt.orientation, fixed_mode->hdisplay, @@ -5261,7 +5258,8 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, if (!has_dpcd) { /* if this fails, presume the device is a ghost */ drm_info(&dev_priv->drm, - "failed to retrieve link info, disabling eDP\n"); + "[ENCODER:%d:%s] failed to retrieve link info, disabling eDP\n", + encoder->base.base.id, encoder->base.name); goto out_vdd_off; } @@ -5307,6 +5305,13 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, mutex_unlock(&dev->mode_config.mutex); + if (!intel_panel_preferred_fixed_mode(intel_connector)) { + drm_info(&dev_priv->drm, + "[ENCODER:%d:%s] failed to find fixed mode for the panel, disabling eDP\n", + encoder->base.base.id, encoder->base.name); + goto out_vdd_off; + } + intel_panel_init(intel_connector); intel_edp_backlight_setup(intel_dp, intel_connector); |