]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915: Initialize dig_port->aux_ch to NONE to be sure
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 30 Jun 2023 15:58:41 +0000 (18:58 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 5 Jul 2023 21:14:03 +0000 (00:14 +0300)
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
drivers/gpu/drm/i915/display/g4x_dp.c
drivers/gpu/drm/i915/display/g4x_hdmi.c
drivers/gpu/drm/i915/display/intel_ddi.c

index c58a3f249a01168974d6a534f3ee15a08ab12f57..0cab5992e3da57de22b4455609c4e5dd573f57fb 100644 (file)
@@ -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;
index 8c71e3ede6802f293a4dbe43cfd18a10b122ee10..c1fd13bdc9d2eb49673297eb68835b62aa69b926 100644 (file)
@@ -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);
index 61722556bb472c8e1be613705447fd7324849340..6cb24a472a9bb15ad61ba58774ce9319fe9115fa 100644 (file)
@@ -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;