[Intel-gfx] [PATCH 3/4] drm/i915: Fix platform default aux ch for skl
Nautiyal, Ankit K
ankit.k.nautiyal at intel.com
Fri Feb 17 09:45:59 UTC 2023
On 2/17/2023 4:43 AM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> SKL/derivatives have DDI E but no AUX E, so we need to pick
> another aux ch as the platform default. DDI E is more or less
> the other half of DDI A, so we pick AUX A.
>
> In all other cases we should have a corresponding aux ch for
> each DDI.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp_aux.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux.c b/drivers/gpu/drm/i915/display/intel_dp_aux.c
> index 57eb3ff187fa..96967e21c94c 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux.c
> @@ -739,10 +739,20 @@ void intel_dp_aux_init(struct intel_dp *intel_dp)
> cpu_latency_qos_add_request(&intel_dp->pm_qos, PM_QOS_DEFAULT_VALUE);
> }
>
> +static enum aux_ch default_aux_ch(struct intel_encoder *encoder)
> +{
> + struct drm_i915_private *i915 = to_i915(encoder->base.dev);
> +
> + /* SKL has DDI E but no AUX E */
> + if (DISPLAY_VER(i915) == 9 && encoder->port == PORT_E)
> + return AUX_CH_A;
> +
I guess we might need to fix intel_dp_aux_init also. Wont we have
dig_port->aux_ch and intel_dp->aux_ch pointing to different things?
For example for SKL and DDI E, intel_dp->aux.name will be derived from
dig_port->aux_ch i.e. AUX_CH_A but intel_dp->aux_ctl/data reg will still
point to DP_AUX_CH_CTL/DATA_E.
Am I missing something?
Regards,
Ankit
> + return (enum aux_ch)encoder->port;
> +}
> +
> enum aux_ch intel_dp_aux_ch(struct intel_encoder *encoder)
> {
> struct drm_i915_private *i915 = to_i915(encoder->base.dev);
> - enum port port = encoder->port;
> enum aux_ch aux_ch;
>
> aux_ch = intel_bios_dp_aux_ch(encoder->devdata);
> @@ -753,7 +763,7 @@ enum aux_ch intel_dp_aux_ch(struct intel_encoder *encoder)
> return aux_ch;
> }
>
> - aux_ch = (enum aux_ch)port;
> + aux_ch = default_aux_ch(encoder);
>
> drm_dbg_kms(&i915->drm,
> "[ENCODER:%d:%s] using AUX %c (platform default)\n",
More information about the Intel-gfx
mailing list