Commit 570fe6ef authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Pimp AUX CH names

Let's make the AUX CH names match the spec (AUX A-F for pre-tgl,
AUX A-C or AUX USBC1-6 for tgl+). And while at it let's include
the full encoder name in the AUX CH name as well (as opposed to
just using port_name() which wouldn't give us the right thing on
tgl+).
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-6-ville.syrjala@linux.intel.com
parent df034b97
...@@ -1859,6 +1859,7 @@ intel_dp_aux_init(struct intel_dp *intel_dp) ...@@ -1859,6 +1859,7 @@ intel_dp_aux_init(struct intel_dp *intel_dp)
struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
struct intel_encoder *encoder = &dig_port->base; struct intel_encoder *encoder = &dig_port->base;
enum aux_ch aux_ch = dig_port->aux_ch;
if (INTEL_GEN(dev_priv) >= 12) { if (INTEL_GEN(dev_priv) >= 12) {
intel_dp->aux_ch_ctl_reg = tgl_aux_ctl_reg; intel_dp->aux_ch_ctl_reg = tgl_aux_ctl_reg;
...@@ -1891,9 +1892,15 @@ intel_dp_aux_init(struct intel_dp *intel_dp) ...@@ -1891,9 +1892,15 @@ intel_dp_aux_init(struct intel_dp *intel_dp)
drm_dp_aux_init(&intel_dp->aux); drm_dp_aux_init(&intel_dp->aux);
/* Failure to allocate our preferred name is not critical */ /* Failure to allocate our preferred name is not critical */
intel_dp->aux.name = kasprintf(GFP_KERNEL, "AUX %c/port %c", if (INTEL_GEN(dev_priv) >= 12 && aux_ch >= AUX_CH_USBC1)
aux_ch_name(dig_port->aux_ch), intel_dp->aux.name = kasprintf(GFP_KERNEL, "AUX USBC%c/%s",
port_name(encoder->port)); aux_ch - AUX_CH_USBC1 + '1',
encoder->base.name);
else
intel_dp->aux.name = kasprintf(GFP_KERNEL, "AUX %c/%s",
aux_ch_name(aux_ch),
encoder->base.name);
intel_dp->aux.transfer = intel_dp_aux_transfer; intel_dp->aux.transfer = intel_dp_aux_transfer;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment