Skip to content

Commit

Permalink
drm/i915: Initialize dig_port->aux_ch to NONE to be sure
Browse files Browse the repository at this point in the history
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 <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230630155846.29931-2-ville.syrjala@linux.intel.com
  • Loading branch information
Ville Syrjälä committed Jul 5, 2023
1 parent a122243 commit 4cca967
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/display/g4x_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,8 @@ bool g4x_dp_init(struct drm_i915_private *dev_priv,
if (!dig_port)
return false;

dig_port->aux_ch = AUX_CH_NONE;

intel_connector = intel_connector_alloc();
if (!intel_connector)
goto err_connector_alloc;
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/display/g4x_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,8 @@ void g4x_hdmi_init(struct drm_i915_private *dev_priv,
if (!dig_port)
return;

dig_port->aux_ch = AUX_CH_NONE;

intel_connector = intel_connector_alloc();
if (!intel_connector) {
kfree(dig_port);
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/display/intel_ddi.c
Original file line number Diff line number Diff line change
Expand Up @@ -4747,6 +4747,8 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
if (!dig_port)
return;

dig_port->aux_ch = AUX_CH_NONE;

encoder = &dig_port->base;
encoder->devdata = devdata;

Expand Down

0 comments on commit 4cca967

Please sign in to comment.