drm/i915/bios: gracefully disable dual eDP for now
For the time being, neither the power sequencer nor the backlight code properly support two eDP panels simultaneously. While the software states will be independent, the same sets of registers will be used for both eDP panels, clobbering the hardware state and leading to errors. Gracefully disable dual eDP until proper support has been added. Cc: José Roberto de Souza <jose.souza@intel.com> Cc: Uma Shankar <uma.shankar@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Swati Sharma <swati2.sharma@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Tested-by: Swati Sharma <swati2.sharma@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211005175636.24669-1-jani.nikula@intel.com
This commit is contained in:
parent
1eecf31e3c
commit
05734ca2a8
|
@ -1930,6 +1930,50 @@ static int _intel_bios_max_tmds_clock(const struct intel_bios_encoder_data *devd
|
|||
}
|
||||
}
|
||||
|
||||
static enum port get_edp_port(struct drm_i915_private *i915)
|
||||
{
|
||||
const struct intel_bios_encoder_data *devdata;
|
||||
enum port port;
|
||||
|
||||
for_each_port(port) {
|
||||
devdata = i915->vbt.ports[port];
|
||||
|
||||
if (devdata && intel_bios_encoder_supports_edp(devdata))
|
||||
return port;
|
||||
}
|
||||
|
||||
return PORT_NONE;
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME: The power sequencer and backlight code currently do not support more
|
||||
* than one set registers, at least not on anything other than VLV/CHV. It will
|
||||
* clobber the registers. As a temporary workaround, gracefully prevent more
|
||||
* than one eDP from being registered.
|
||||
*/
|
||||
static void sanitize_dual_edp(struct intel_bios_encoder_data *devdata,
|
||||
enum port port)
|
||||
{
|
||||
struct drm_i915_private *i915 = devdata->i915;
|
||||
struct child_device_config *child = &devdata->child;
|
||||
enum port p;
|
||||
|
||||
/* CHV might not clobber PPS registers. */
|
||||
if (IS_CHERRYVIEW(i915))
|
||||
return;
|
||||
|
||||
p = get_edp_port(i915);
|
||||
if (p == PORT_NONE)
|
||||
return;
|
||||
|
||||
drm_dbg_kms(&i915->drm, "both ports %c and %c configured as eDP, "
|
||||
"disabling port %c eDP\n", port_name(p), port_name(port),
|
||||
port_name(port));
|
||||
|
||||
child->device_type &= ~DEVICE_TYPE_DISPLAYPORT_OUTPUT;
|
||||
child->device_type &= ~DEVICE_TYPE_INTERNAL_CONNECTOR;
|
||||
}
|
||||
|
||||
static bool is_port_valid(struct drm_i915_private *i915, enum port port)
|
||||
{
|
||||
/*
|
||||
|
@ -1987,6 +2031,9 @@ static void parse_ddi_port(struct drm_i915_private *i915,
|
|||
supports_typec_usb, supports_tbt,
|
||||
devdata->dsc != NULL);
|
||||
|
||||
if (is_edp)
|
||||
sanitize_dual_edp(devdata, port);
|
||||
|
||||
if (is_dvi)
|
||||
sanitize_ddc_pin(devdata, port);
|
||||
|
||||
|
|
Loading…
Reference in New Issue