[Intel-gfx] [PATCH 06/20] drm/i915: Pimp AUX CH names

Lucas De Marchi lucas.demarchi at intel.com
Wed Oct 7 23:01:36 UTC 2020


On Tue, Oct 06, 2020 at 05:33:35PM +0300, Ville Syrjälä wrote:
>From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
>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+).
>
>Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>


Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

Lucas De Marchi

>---
> drivers/gpu/drm/i915/display/intel_dp.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
>index a73c354c920e..299dc444a777 100644
>--- a/drivers/gpu/drm/i915/display/intel_dp.c
>+++ b/drivers/gpu/drm/i915/display/intel_dp.c
>@@ -1877,6 +1877,7 @@ intel_dp_aux_init(struct intel_dp *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_encoder *encoder = &dig_port->base;
>+	enum aux_ch aux_ch = dig_port->aux_ch;
>
> 	if (INTEL_GEN(dev_priv) >= 12) {
> 		intel_dp->aux_ch_ctl_reg = tgl_aux_ctl_reg;
>@@ -1909,9 +1910,15 @@ intel_dp_aux_init(struct intel_dp *intel_dp)
> 	drm_dp_aux_init(&intel_dp->aux);
>
> 	/* Failure to allocate our preferred name is not critical */
>-	intel_dp->aux.name = kasprintf(GFP_KERNEL, "AUX %c/port %c",
>-				       aux_ch_name(dig_port->aux_ch),
>-				       port_name(encoder->port));
>+	if (INTEL_GEN(dev_priv) >= 12 && aux_ch >= AUX_CH_USBC1)
>+		intel_dp->aux.name = kasprintf(GFP_KERNEL, "AUX USBC%c/%s",
>+					       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;
> }
>
>-- 
>2.26.2
>
>_______________________________________________
>Intel-gfx mailing list
>Intel-gfx at lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list