From: Oscar Mateo <oscar.mateo@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 3/4] drm/i915/guc: s/ads_vma/addon
Date: Fri, 24 Feb 2017 06:01:36 -0800 [thread overview]
Message-ID: <1487944897-31558-4-git-send-email-oscar.mateo@intel.com> (raw)
In-Reply-To: <1487944897-31558-1-git-send-email-oscar.mateo@intel.com>
This vma contains much more than just the additional data struct (ads)
and since we were already using the word "addon" as an object in
guc_addon_create, make it the preffered one. No need for the vma suffix
either, as that dependency is given by the type.
while at it, add an explanation of what things go inside the addon object.
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
---
drivers/gpu/drm/i915/i915_guc_submission.c | 12 ++++++++----
drivers/gpu/drm/i915/intel_guc_loader.c | 4 ++--
drivers/gpu/drm/i915/intel_uc.h | 2 +-
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 7562343c..e1922fe 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -834,9 +834,13 @@ 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 */
+ /* The additional data struct (ADS) has pointers for different buffers
+ * used by the GuC. 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 */
size = sizeof(struct guc_ads) + sizeof(struct guc_policies) +
sizeof(struct guc_mmio_reg_state) +
GUC_S3_SAVE_SPACE_PAGES * PAGE_SIZE;
@@ -845,7 +849,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);
@@ -894,7 +898,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);
}
/*
diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
index 1f9ec54..1eb0c51 100644
--- a/drivers/gpu/drm/i915/intel_guc_loader.c
+++ b/drivers/gpu/drm/i915/intel_guc_loader.c
@@ -213,8 +213,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;
}
diff --git a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h
index 330d08f..d8897b5 100644
--- a/drivers/gpu/drm/i915/intel_uc.h
+++ b/drivers/gpu/drm/i915/intel_uc.h
@@ -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;
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-02-24 22:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-24 14:01 [PATCH 0/4] Various improvements around the GuC topic Oscar Mateo
2017-02-24 14:01 ` [PATCH 1/4 v3] drm/i915/guc: Keep the ctx_pool_vaddr mapped, for easy access Oscar Mateo
2017-03-02 10:41 ` Joonas Lahtinen
2017-03-03 16:44 ` Oscar Mateo
2017-02-24 14:01 ` [PATCH 2/4 v2] drm/i915/guc: Add onion teardown to the GuC setup Oscar Mateo
2017-03-01 12:32 ` Joonas Lahtinen
2017-02-24 14:01 ` Oscar Mateo [this message]
2017-02-28 8:04 ` [PATCH 3/4] drm/i915/guc: s/ads_vma/addon Joonas Lahtinen
2017-03-07 15:07 ` Michal Wajdeczko
2017-03-08 13:48 ` Oscar Mateo
2017-02-24 14:01 ` [PATCH 4/4] drm/i915/guc: Break out the GuC log "extras" Oscar Mateo
2017-03-01 12:37 ` Joonas Lahtinen
2017-03-03 16:47 ` Oscar Mateo
2017-03-07 15:13 ` Michal Wajdeczko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487944897-31558-4-git-send-email-oscar.mateo@intel.com \
--to=oscar.mateo@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox