[Intel-gfx] [PATCH 2/7] drm/i915/guc: Kill USES_GUC_SUBMISSION macro
Michal Wajdeczko
michal.wajdeczko at intel.com
Thu Jan 16 22:49:40 UTC 2020
>>> - 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(>->uc);
}
and use it where we operate at gt level
Michal
More information about the Intel-gfx
mailing list