aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/display/intel_bios.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2021-03-17 18:36:45 +0200
committerJani Nikula <jani.nikula@intel.com>2021-03-18 14:43:39 +0200
commit3ae04c0c7e63d266b48b6dff8a9e2375f6120570 (patch)
tree5a734c1a0aa6c9e1adc63c2db1e317b6da70fe78 /drivers/gpu/drm/i915/display/intel_bios.c
parentdrm/i915/bios: limit default outputs by platform on missing VBT (diff)
downloadlinux-dev-3ae04c0c7e63d266b48b6dff8a9e2375f6120570.tar.xz
linux-dev-3ae04c0c7e63d266b48b6dff8a9e2375f6120570.zip
drm/i915/bios: limit default outputs to ports A through F
There are two main cases where the default outputs are useful when the VBT is missing: - There are some DDI-platform Chromebooks out there that do not have a VBT, which worked by coincidence because of the default outputs. The machines need to continue to work. - Early platform enabling when the VBT might not be available. (This could be circumvented by using the i915.vbt_firmware parameter.) Prepare for generating fake child devices for the default outputs by limiting the number of outputs. We don't want to generate excessive amounts of fake child devices. This could be perhaps be limited even more in the future, but match what's possible on all DDI platforms. Note that limiting the defaults to non-TypeC ports in commit 828ccb31cf41 ("drm/i915/icl: Add TypeC ports only if VBT is present") is a more strict limit, and makes this a no-op on recent platforms. v2: Rewrote commit message Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/5c9c9743af1c7265a2c976d582b7a6685ec0c414.1615998927.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_bios.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_bios.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index be3dc3363444..218e0dae3ece 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -2081,11 +2081,12 @@ static void
init_vbt_missing_defaults(struct drm_i915_private *i915)
{
enum port port;
+ int ports = PORT_A | PORT_B | PORT_C | PORT_D | PORT_E | PORT_F;
if (!HAS_DDI(i915) && !IS_CHERRYVIEW(i915))
return;
- for_each_port(port) {
+ for_each_port_masked(port, ports) {
struct ddi_vbt_port_info *info =
&i915->vbt.ddi_port_info[port];
enum phy phy = intel_port_to_phy(i915, port);