Skip to content

Commit 4cca967

Browse files
committed
drm/i915: Initialize dig_port->aux_ch to NONE to be sure
Make sure dig_port->aux_ch is trustworthy by initializing it to NONE (-1) at the start. The encoder init will later fill in the actual value, if appropriate. Reviewed-by: Jani Nikula <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent a122243 commit 4cca967

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

drivers/gpu/drm/i915/display/g4x_dp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,6 +1273,8 @@ bool g4x_dp_init(struct drm_i915_private *dev_priv,
12731273
if (!dig_port)
12741274
return false;
12751275

1276+
dig_port->aux_ch = AUX_CH_NONE;
1277+
12761278
intel_connector = intel_connector_alloc();
12771279
if (!intel_connector)
12781280
goto err_connector_alloc;

drivers/gpu/drm/i915/display/g4x_hdmi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,8 @@ void g4x_hdmi_init(struct drm_i915_private *dev_priv,
698698
if (!dig_port)
699699
return;
700700

701+
dig_port->aux_ch = AUX_CH_NONE;
702+
701703
intel_connector = intel_connector_alloc();
702704
if (!intel_connector) {
703705
kfree(dig_port);

drivers/gpu/drm/i915/display/intel_ddi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4747,6 +4747,8 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
47474747
if (!dig_port)
47484748
return;
47494749

4750+
dig_port->aux_ch = AUX_CH_NONE;
4751+
47504752
encoder = &dig_port->base;
47514753
encoder->devdata = devdata;
47524754

0 commit comments

Comments
 (0)