[4/4] drm/i915/tgl: Report valid VDBoxes with SFC capability
diff mbox series

Message ID 20190731004902.34672-5-daniele.ceraolospurio@intel.com
State New
Headers show
Series
  • Initial TGL submission changes
Related show

Commit Message

Daniele Ceraolo Spurio July 31, 2019, 12:49 a.m. UTC
From: Michel Thierry <michel.thierry@intel.com>

In Gen11, only even numbered "logical" VDBoxes are hooked up to a SFC
(Scaler & Format Converter) unit. This is not the case in Tigerlake,
where each VDBox can access a SFC.

We will use this information to decide when the SFC units need to be reset
and also pass it to the GuC.

Bspec: 48077
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
---
 drivers/gpu/drm/i915/intel_device_info.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Tvrtko Ursulin July 31, 2019, 5:59 a.m. UTC | #1
On 31/07/2019 01:49, Daniele Ceraolo Spurio wrote:
> From: Michel Thierry <michel.thierry@intel.com>
> 
> In Gen11, only even numbered "logical" VDBoxes are hooked up to a SFC
> (Scaler & Format Converter) unit. This is not the case in Tigerlake,
> where each VDBox can access a SFC.
> 
> We will use this information to decide when the SFC units need to be reset
> and also pass it to the GuC.
> 
> Bspec: 48077
> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_device_info.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index f99c9fd497b2..2a39b52c3582 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -1022,8 +1022,9 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv)
>   		/*
>   		 * In Gen11, only even numbered logical VDBOXes are
>   		 * hooked up to an SFC (Scaler & Format Converter) unit.
> +		 * In TGL each VDBOX has access to an SFC.
>   		 */
> -		if (logical_vdbox++ % 2 == 0)
> +		if (IS_TIGERLAKE(dev_priv) || logical_vdbox++ % 2 == 0)
>   			RUNTIME_INFO(dev_priv)->vdbox_sfc_access |= BIT(i);
>   	}
>   	DRM_DEBUG_DRIVER("vdbox enable: %04x, instances: %04lx\n",
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Only uncertainty is if we want to code the condition as Icelake 
exception instead for more future proofing. Like if "!IS_ICELAKE ||" 
instead of "IS_TIGERLAKE ||"?

Regards,

Tvrtko
Daniele Ceraolo Spurio July 31, 2019, 5:09 p.m. UTC | #2
On 7/30/19 10:59 PM, Tvrtko Ursulin wrote:
> 
> On 31/07/2019 01:49, Daniele Ceraolo Spurio wrote:
>> From: Michel Thierry <michel.thierry@intel.com>
>>
>> In Gen11, only even numbered "logical" VDBoxes are hooked up to a SFC
>> (Scaler & Format Converter) unit. This is not the case in Tigerlake,
>> where each VDBox can access a SFC.
>>
>> We will use this information to decide when the SFC units need to be 
>> reset
>> and also pass it to the GuC.
>>
>> Bspec: 48077
>> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
>> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>> Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
>> ---
>>   drivers/gpu/drm/i915/intel_device_info.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_device_info.c 
>> b/drivers/gpu/drm/i915/intel_device_info.c
>> index f99c9fd497b2..2a39b52c3582 100644
>> --- a/drivers/gpu/drm/i915/intel_device_info.c
>> +++ b/drivers/gpu/drm/i915/intel_device_info.c
>> @@ -1022,8 +1022,9 @@ void intel_device_info_init_mmio(struct 
>> drm_i915_private *dev_priv)
>>           /*
>>            * In Gen11, only even numbered logical VDBOXes are
>>            * hooked up to an SFC (Scaler & Format Converter) unit.
>> +         * In TGL each VDBOX has access to an SFC.
>>            */
>> -        if (logical_vdbox++ % 2 == 0)
>> +        if (IS_TIGERLAKE(dev_priv) || logical_vdbox++ % 2 == 0)
>>               RUNTIME_INFO(dev_priv)->vdbox_sfc_access |= BIT(i);
>>       }
>>       DRM_DEBUG_DRIVER("vdbox enable: %04x, instances: %04lx\n",
>>
> 
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Only uncertainty is if we want to code the condition as Icelake 
> exception instead for more future proofing. Like if "!IS_ICELAKE ||" 
> instead of "IS_TIGERLAKE ||"?

If I'm understanding the specs correctly then this isn't going to apply 
to all future platform and we'll have some of them that behave like ICL 
instead. Maybe a device flag would work better? HAS_SFC_FOR_EACH_VCS()?

Daniele

> 
> Regards,
> 
> Tvrtko

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index f99c9fd497b2..2a39b52c3582 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -1022,8 +1022,9 @@  void intel_device_info_init_mmio(struct drm_i915_private *dev_priv)
 		/*
 		 * In Gen11, only even numbered logical VDBOXes are
 		 * hooked up to an SFC (Scaler & Format Converter) unit.
+		 * In TGL each VDBOX has access to an SFC.
 		 */
-		if (logical_vdbox++ % 2 == 0)
+		if (IS_TIGERLAKE(dev_priv) || logical_vdbox++ % 2 == 0)
 			RUNTIME_INFO(dev_priv)->vdbox_sfc_access |= BIT(i);
 	}
 	DRM_DEBUG_DRIVER("vdbox enable: %04x, instances: %04lx\n",