@@ -60,6 +60,13 @@
* ELSP context descriptor dword into Work Item.
* See guc_wq_item_append()
*
+ * Addon object:
+ * The additional data struct (ADS) has pointers for different buffers used by
+ * the GuC. One single gem object, the "addon" object, contains the ADS itself\
+ * (guc_ads), the scheduling policies (guc_policies), a structure describing
+ * a collection of register sets (guc_mmio_reg_state) and some extra
+ * pages for the GuC to save its internal state for sleep.
+ *
*/
static inline bool is_high_priority(struct i915_guc_client* client)
@@ -846,9 +853,8 @@ static int guc_addon_create(struct intel_guc *guc)
struct page *page;
u32 size;
- GEM_BUG_ON(guc->ads_vma);
+ GEM_BUG_ON(guc->addon);
- /* The ads obj includes the struct itself and buffers passed to GuC */
size = sizeof(struct guc_ads) + sizeof(struct guc_policies) +
sizeof(struct guc_mmio_reg_state) +
GUC_S3_SAVE_SPACE_PAGES * PAGE_SIZE;
@@ -857,7 +863,7 @@ static int guc_addon_create(struct intel_guc *guc)
if (IS_ERR(vma))
return PTR_ERR(vma);
- guc->ads_vma = vma;
+ guc->addon = vma;
page = i915_vma_first_page(vma);
ads = kmap(page);
@@ -906,7 +912,7 @@ static int guc_addon_create(struct intel_guc *guc)
static void guc_addon_destroy(struct intel_guc *guc)
{
- i915_vma_unpin_and_release(&guc->ads_vma);
+ i915_vma_unpin_and_release(&guc->addon);
}
/*
@@ -167,8 +167,8 @@ static void guc_params_init(struct drm_i915_private *dev_priv)
} else
params[GUC_CTL_DEBUG] = GUC_LOG_DISABLED;
- if (guc->ads_vma) {
- u32 ads = guc_ggtt_offset(guc->ads_vma) >> PAGE_SHIFT;
+ if (guc->addon) {
+ u32 ads = guc_ggtt_offset(guc->addon) >> PAGE_SHIFT;
params[GUC_CTL_DEBUG] |= ads << GUC_ADS_ADDR_SHIFT;
params[GUC_CTL_DEBUG] |= GUC_ADS_ENABLED;
}
@@ -152,7 +152,7 @@ struct intel_guc {
/* intel_guc_recv interrupt related state */
bool interrupts_enabled;
- struct i915_vma *ads_vma;
+ struct i915_vma *addon;
struct i915_vma *ctx_pool;
void *ctx_pool_vaddr;
struct ida ctx_ids;