Re: [Intel-gfx] [PATCH v6 10/11] drm/i915: Use to_gt() helper for GGTT accesses

Andi Shyti
2021-12-10T02:11:29Z

Hi Matt,

> > GGTT is currently available both through i915->ggtt and gt->ggtt, and we
> > eventually want to get rid of the i915->ggtt one.
> > Use to_gt() for all i915->ggtt accesses to help with the future
> > refactoring.
>
> I think we can also convert the two references in i915_drm_suspend() and
> i915_drm_resume(), right? With those converted, I think the only
> remaining use of i915->ggtt will be the call to intel_gt_init_hw_early()
> during startup that assigns the gt->ggtt pointer. Maybe we should just
> make that function assign a drmm_kzalloc() and drop the i915->ggtt
> completely?

I think calling directly drmm_kzalloc() and get rid of i915->ggtt
is a good idea.

Thanks,
Andi