diff mbox series

drm/i915/adlp: Extend PSR2 support in transcoder B

Message ID 20211026223329.116104-1-jose.souza@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/adlp: Extend PSR2 support in transcoder B | expand

Commit Message

Souza, Jose Oct. 26, 2021, 10:33 p.m. UTC
PSR2 is supported in transcoder A and B on Alderlake-P.

BSpec: 49185
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Jouni Hogander <jouni.hogander@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/display/intel_psr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Hogander, Jouni Oct. 27, 2021, 7:28 a.m. UTC | #1
On Tue, 2021-10-26 at 15:33 -0700, José Roberto de Souza wrote:
> PSR2 is supported in transcoder A and B on Alderlake-P.
> 
> BSpec: 49185
> Cc: Mika Kahola <mika.kahola@intel.com>
> Cc: Jouni Hogander <jouni.hogander@intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>

LGTM

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index d35db50ef967a..710b911b065b9 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -588,7 +588,9 @@ static void hsw_activate_psr2(struct intel_dp
> *intel_dp)
>  static bool
>  transcoder_has_psr2(struct drm_i915_private *dev_priv, enum
> transcoder trans)
>  {
> -	if (DISPLAY_VER(dev_priv) >= 12)
> +	if (IS_ALDERLAKE_P(dev_priv))
> +		return trans <= TRANSCODER_B;
> +	else if (DISPLAY_VER(dev_priv) >= 12)
>  		return trans == TRANSCODER_A;
>  	else
>  		return trans == TRANSCODER_EDP;
Jani Nikula Oct. 27, 2021, 2:42 p.m. UTC | #2
On Wed, 27 Oct 2021, "Hogander, Jouni" <jouni.hogander@intel.com> wrote:
> On Tue, 2021-10-26 at 15:33 -0700, José Roberto de Souza wrote:
>> PSR2 is supported in transcoder A and B on Alderlake-P.
>> 
>> BSpec: 49185
>> Cc: Mika Kahola <mika.kahola@intel.com>
>> Cc: Jouni Hogander <jouni.hogander@intel.com>
>> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
>
> LGTM
>
> Reviewed-by: Jouni Högander <jouni.hogander@intel.com>

Since INVALID_TRANSCODER is a thing, I'd actually prefer:

	trans == TRANSCODER_A || trans == TRANSCODER_B

It's not likely INVALID_TRANSCODER will ever end up here, but I tried to
look and it's actually not trivial to say this will never happen. I
prefer the defensive approach.

BR,
Jani.


>
>> ---
>>  drivers/gpu/drm/i915/display/intel_psr.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
>> b/drivers/gpu/drm/i915/display/intel_psr.c
>> index d35db50ef967a..710b911b065b9 100644
>> --- a/drivers/gpu/drm/i915/display/intel_psr.c
>> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
>> @@ -588,7 +588,9 @@ static void hsw_activate_psr2(struct intel_dp
>> *intel_dp)
>>  static bool
>>  transcoder_has_psr2(struct drm_i915_private *dev_priv, enum
>> transcoder trans)
>>  {
>> -	if (DISPLAY_VER(dev_priv) >= 12)
>> +	if (IS_ALDERLAKE_P(dev_priv))
>> +		return trans <= TRANSCODER_B;
>> +	else if (DISPLAY_VER(dev_priv) >= 12)
>>  		return trans == TRANSCODER_A;
>>  	else
>>  		return trans == TRANSCODER_EDP;
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index d35db50ef967a..710b911b065b9 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -588,7 +588,9 @@  static void hsw_activate_psr2(struct intel_dp *intel_dp)
 static bool
 transcoder_has_psr2(struct drm_i915_private *dev_priv, enum transcoder trans)
 {
-	if (DISPLAY_VER(dev_priv) >= 12)
+	if (IS_ALDERLAKE_P(dev_priv))
+		return trans <= TRANSCODER_B;
+	else if (DISPLAY_VER(dev_priv) >= 12)
 		return trans == TRANSCODER_A;
 	else
 		return trans == TRANSCODER_EDP;