[Intel-gfx] [PATCH 2/7] drm/i915/guc: Kill USES_GUC_SUBMISSION macro

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Thu Jan 16 23:09:24 UTC 2020



On 1/16/20 2:49 PM, Michal Wajdeczko wrote:
>>>> -    if (USES_GUC_SUBMISSION(dev_priv)) {
>>>> +    if (intel_uc_uses_guc_submission(&dev_priv->gt.uc)) {
>>>  nit: that old macro was helpful exactly in cases where only dev_priv
>>> is known and component might have no idea where to find uc
>>>  maybe we should have helper like:
>>>       #define to_intel_uc(i915) (&(i915)->gt.uc)
>>>  (but likely Jani will complain)
>>>
>>
>> IMO the problem here is that we shouldn't really be going down to the 
>> uc from the dev_priv level, as intel_uc is now a subfeature of the GT. 
>> We've already removed a lot of the existing checks at the dev_priv 
>> level and this series gets rid of a few more; I guess once they're 
>> reduced enough in number we can consider replacing them with a check 
>> at the GT level.
> 
> so maybe we should introduce right now:
> 
> static inline bool intel_gt_uses_guc_submission(struct intel_gt *gt)
> {
>      return intel_uc_uses_guc_submission(&gt->uc);
> }
> 
> and use it where we operate at gt level
> 

The problem is that with the gvt code is actually initialized before we 
commit to using GuC submission and patch 3 changes the check from uses 
to wants, so that's quite a specific case which I'm not sure is worth 
the helper yet. That's why I wanted to wait until things settle down a 
bit more to understand what was left before adding a high-level "wants" 
helper, which IMO is not the best suited for a GT level check.

Daniele

> Michal


More information about the Intel-gfx mailing list