Re: [RFC 26/28] drm/i915: Store ggtt pointer in intel_gt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tvrtko Ursulin (2019-06-13 16:19:02)
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> This will become useful in the following patch.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/gt/intel_gt_types.h | 2 ++
>  drivers/gpu/drm/i915/i915_gem_gtt.c      | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_types.h b/drivers/gpu/drm/i915/gt/intel_gt_types.h
> index 99e30f8cfbe0..c909aae6e4b3 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_types.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_types.h
> @@ -18,11 +18,13 @@
>  #include "intel_wakeref.h"
>  
>  struct drm_i915_private;
> +struct i915_ggtt;
>  struct intel_uncore;
>  
>  struct intel_gt {
>         struct drm_i915_private *i915;
>         struct intel_uncore *uncore;
> +       struct i915_ggtt *ggtt;

But not moving i915->ggtt itself?

>         struct i915_gt_timelines {
>                 struct mutex mutex; /* protects list, tainted by GPU */
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index ea276ed9021a..9aa25770081c 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -3618,6 +3618,7 @@ static int ggtt_init_hw(struct i915_ggtt *ggtt)
>         i915_address_space_init(vm, VM_CLASS_GGTT);
>  
>         vm->is_ggtt = true;
> +       vm->gt->ggtt = ggtt;

This looks very much to be a layer violation.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux