[Intel-gfx] [PATCH 04/12] drm/i915/bios: limit default outputs to ports A through F

Jani Nikula jani.nikula at intel.com
Wed Feb 17 17:03:34 UTC 2021


With the defaults limited to non-TypeC ports in commit 828ccb31cf41
("drm/i915/icl: Add TypeC ports only if VBT is present"), this should be
a no-op, but clarifies the code and prepares for subsequent changes.

Cc: Lucas De Marchi <lucas.demarchi at intel.com>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index e9cb15aa2f5a..b9d99324d66d 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -2057,11 +2057,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);
-- 
2.20.1



More information about the Intel-gfx mailing list