summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_uc.h
diff options
context:
space:
mode:
authorOscar Mateo2017-03-22 18:39:48 +0100
committerJoonas Lahtinen2017-03-23 13:58:02 +0100
commite74654738baf465c92f0eec37ce4be891bac36da (patch)
treecb2d1bb298c6a7f2a823112600a6522b9579d8a8 /drivers/gpu/drm/i915/intel_uc.h
parentdrm/i915/guc: The Additional Data Struct (ADS) should get enabled together wi... (diff)
downloadkernel-qcow2-linux-e74654738baf465c92f0eec37ce4be891bac36da.tar.gz
kernel-qcow2-linux-e74654738baf465c92f0eec37ce4be891bac36da.tar.xz
kernel-qcow2-linux-e74654738baf465c92f0eec37ce4be891bac36da.zip
drm/i915/guc: Break out the GuC log extras into their own "runtime" struct
When initializing the GuC log struct, there is an object we need to allocate always, since the GuC needs its address at fw load time. The rest is only needed during runtime, in the sense that we only create if we actually enable GuC logging. Make that distinction explicit by subdividing further the intel_guc_log struct. v2: Call the new struct "runtime", instead of "extras" (Joonas) v3: Check indent (Joonas) Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_uc.h')
-rw-r--r--drivers/gpu/drm/i915/intel_uc.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h
index eb30e7af255a..c6f880c365a0 100644
--- a/drivers/gpu/drm/i915/intel_uc.h
+++ b/drivers/gpu/drm/i915/intel_uc.h
@@ -132,11 +132,13 @@ struct intel_uc_fw {
struct intel_guc_log {
uint32_t flags;
struct i915_vma *vma;
- void *buf_addr;
- struct workqueue_struct *flush_wq;
- struct work_struct flush_work;
- struct rchan *relay_chan;
-
+ /* The runtime stuff gets created only when GuC logging gets enabled */
+ struct {
+ void *buf_addr;
+ struct workqueue_struct *flush_wq;
+ struct work_struct flush_work;
+ struct rchan *relay_chan;
+ } runtime;
/* logging related stats */
u32 capture_miss_count;
u32 flush_interrupt_count;