Re: [PATCH v3 07/21] drm/i915/tgl: rename TRANSCODER_EDP_VDSC to use on transcoder A

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 11, 2019 at 10:31:01AM -0700, Lucas De Marchi wrote:
> From: José Roberto de Souza <jose.souza@xxxxxxxxx>
> 
> On TGL the special EDP transcoder is gone and it should be handled by
> transcoder A.
> 
> v2 (Lucas):
>   - Reuse POWER_DOMAIN_TRANSCODER_EDP_VDSC (suggested by Ville)
>   - Use crtc->dev since new_crtc_state->state may be NULL on atomic
>     commit (suggested by Maarten)
> v3 (Lucas):
>   - Rename power domain so it's clear it can also be used for transcoder
>     A in TGL (requested by José and Manasi)
> 
> Cc: Imre Deak <imre.deak@xxxxxxxxx>
> Signed-off-by: José Roberto de Souza <jose.souza@xxxxxxxxx>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
> Acked-by: José Roberto de Souza <jose.souza@xxxxxxxxx>

With the name change it looks good to me

Reviewed-by: Manasi Navare <manasi.d.navare@xxxxxxxxx>

Manasi

> ---
>  drivers/gpu/drm/i915/display/intel_display_power.c |  6 +++---
>  drivers/gpu/drm/i915/display/intel_display_power.h |  3 ++-
>  drivers/gpu/drm/i915/display/intel_vdsc.c          | 14 ++++++++++----
>  3 files changed, 15 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
> index 7e22a2704843..6a5e0d0724cb 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> @@ -48,8 +48,8 @@ intel_display_power_domain_str(enum intel_display_power_domain domain)
>  		return "TRANSCODER_C";
>  	case POWER_DOMAIN_TRANSCODER_EDP:
>  		return "TRANSCODER_EDP";
> -	case POWER_DOMAIN_TRANSCODER_EDP_VDSC:
> -		return "TRANSCODER_EDP_VDSC";
> +	case POWER_DOMAIN_TRANSCODER_VDSC_PW2:
> +		return "TRANSCODER_VDSC_PW2";
>  	case POWER_DOMAIN_TRANSCODER_DSI_A:
>  		return "TRANSCODER_DSI_A";
>  	case POWER_DOMAIN_TRANSCODER_DSI_C:
> @@ -2450,7 +2450,7 @@ void intel_display_power_put(struct drm_i915_private *dev_priv,
>  	 */
>  #define ICL_PW_2_POWER_DOMAINS (			\
>  	ICL_PW_3_POWER_DOMAINS |			\
> -	BIT_ULL(POWER_DOMAIN_TRANSCODER_EDP_VDSC) |		\
> +	BIT_ULL(POWER_DOMAIN_TRANSCODER_VDSC_PW2) |		\
>  	BIT_ULL(POWER_DOMAIN_INIT))
>  	/*
>  	 * - KVMR (HW control)
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.h b/drivers/gpu/drm/i915/display/intel_display_power.h
> index 8f43f7051a16..cc6956132ebc 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.h
> @@ -25,7 +25,8 @@ enum intel_display_power_domain {
>  	POWER_DOMAIN_TRANSCODER_B,
>  	POWER_DOMAIN_TRANSCODER_C,
>  	POWER_DOMAIN_TRANSCODER_EDP,
> -	POWER_DOMAIN_TRANSCODER_EDP_VDSC,
> +	/* VDSC/joining for TRANSCODER_EDP (ICL) or TRANSCODER_A (TGL) */
> +	POWER_DOMAIN_TRANSCODER_VDSC_PW2,
>  	POWER_DOMAIN_TRANSCODER_DSI_A,
>  	POWER_DOMAIN_TRANSCODER_DSI_C,
>  	POWER_DOMAIN_PORT_DDI_A_LANES,
> diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i915/display/intel_vdsc.c
> index ffec807b8960..4ab19c432ef5 100644
> --- a/drivers/gpu/drm/i915/display/intel_vdsc.c
> +++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
> @@ -459,17 +459,23 @@ int intel_dp_compute_dsc_params(struct intel_dp *intel_dp,
>  enum intel_display_power_domain
>  intel_dsc_power_domain(const struct intel_crtc_state *crtc_state)
>  {
> +	struct drm_i915_private *i915 = to_i915(crtc_state->base.crtc->dev);
>  	enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
>  
>  	/*
> -	 * On ICL VDSC/joining for eDP transcoder uses a separate power well PW2
> -	 * This requires POWER_DOMAIN_TRANSCODER_EDP_VDSC power domain.
> +	 * On ICL VDSC/joining for eDP transcoder uses a separate power well,
> +	 * PW2. This requires POWER_DOMAIN_TRANSCODER_VDSC_PW2 power domain.
>  	 * For any other transcoder, VDSC/joining uses the power well associated
>  	 * with the pipe/transcoder in use. Hence another reference on the
>  	 * transcoder power domain will suffice.
> +	 *
> +	 * On TGL we have the same mapping, but for transcoder A (the special
> +	 * TRANSCODER_EDP is gone).
>  	 */
> -	if (cpu_transcoder == TRANSCODER_EDP)
> -		return POWER_DOMAIN_TRANSCODER_EDP_VDSC;
> +	if (INTEL_GEN(i915) >= 12 && cpu_transcoder == TRANSCODER_A)
> +		return POWER_DOMAIN_TRANSCODER_VDSC_PW2;
> +	else if (cpu_transcoder == TRANSCODER_EDP)
> +		return POWER_DOMAIN_TRANSCODER_VDSC_PW2;
>  	else
>  		return POWER_DOMAIN_TRANSCODER(cpu_transcoder);
>  }
> -- 
> 2.21.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux