Re: [PATCH v8 2/6] drm/i915/guc: Rename guc_ggtt_offset to intel_guc_ggtt_offset

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

 



Quoting Jackie Li (2018-02-06 00:02:38)
> diff --git a/drivers/gpu/drm/i915/intel_guc_ads.c b/drivers/gpu/drm/i915/intel_guc_ads.c
> index ac62753..7215594 100644
> --- a/drivers/gpu/drm/i915/intel_guc_ads.c
> +++ b/drivers/gpu/drm/i915/intel_guc_ads.c
> @@ -113,17 +113,6 @@ int intel_guc_ads_create(struct intel_guc *guc)
>                 blob->reg_state.white_list[engine->guc_id].count = 0;
>         }
>  
> -       /*
> -        * The GuC requires a "Golden Context" when it reinitialises
> -        * engines after a reset. Here we use the Render ring default
> -        * context, which must already exist and be pinned in the GGTT,
> -        * so its address won't change after we've told the GuC where
> -        * to find it. Note that we have to skip our header (1 page),
> -        * because our GuC shared data is there.
> -        */
> -       blob->ads.golden_context_lrca =
> -               guc_ggtt_offset(dev_priv->kernel_context->engine[RCS].state) +
> -               skipped_offset;

> +       vma = dev_priv->kernel_context->engine[RCS].state;
> +       blob->ads.golden_context_lrca = intel_guc_ggtt_offset(guc, vma) +
> +               skipped_offset;
> +

Please consider the visual grouping in line breaks carefully. The
alignment in the first stanza couples the ggtt_offset with the addition
of the skipped_offset. The lack of alignment in the second, makes the
skipped_offset appear an unrelated after thought.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux