summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h
diff options
context:
space:
mode:
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>2019-12-17 04:23:12 +0300
committerDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>2019-12-18 02:22:47 +0300
commit9ab28cd20c92bc121dbed64a11b75c5e68cb684b (patch)
treeb3fdee974b599fa807d79abe590b8a0b3329b5e9 /drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h
parent7f5390c433876a6baef1ee09c5442160ae03cde0 (diff)
downloadlinux-9ab28cd20c92bc121dbed64a11b75c5e68cb684b.tar.xz
drm/i915/guc/ct: Stop expecting multiple CT channels
The GuC supports having multiple CT buffer pairs and we designed our implementation with that in mind. However, the different channels are not processed in parallel within the GuC, so there is very little advantage in having multiple channels (independent locks?), compared to the drawbacks (one channel can starve the other if messages keep being submitted to it). Given this, it is unlikely we'll ever add a second channel and therefore we can simplify our code by removing the flexibility. v2: split substructure grouping to separate patch, improve docs (Michal) Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191217012316.13271-3-daniele.ceraolospurio@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h')
-rw-r--r--drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h43
1 files changed, 12 insertions, 31 deletions
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h
index 77c80d6cc25d..6e3d789b9f01 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h
@@ -35,44 +35,25 @@ struct intel_guc_ct_buffer {
u32 *cmds;
};
-/** Represents pair of command transport buffers.
- *
- * Buffers go in pairs to allow bi-directional communication.
- * To simplify the code we place both of them in the same vma.
- * Buffers from the same pair must share unique owner id.
- *
- * @vma: pointer to the vma with pair of CT buffers
- * @ctbs: buffers for sending(0) and receiving(1) commands
- * @owner: unique identifier
- * @next_fence: fence to be used with next send command
- */
-struct intel_guc_ct_channel {
- struct i915_vma *vma;
- struct intel_guc_ct_buffer ctbs[2];
- u32 owner;
- u32 next_fence;
- bool enabled;
-};
-/** Holds all command transport channels.
+/** Top-level structure for Command Transport related data
*
- * @host_channel: main channel used by the host
+ * Includes a pair of CT buffers for bi-directional communication and tracking
+ * for the H2G and G2H requests sent and received through the buffers.
*/
struct intel_guc_ct {
- struct intel_guc_ct_channel host_channel;
- /* other channels are tbd */
-
- /** @lock: protects pending requests list */
- spinlock_t lock;
+ struct i915_vma *vma;
+ bool enabled;
- /** @pending_requests: list of requests waiting for response */
- struct list_head pending_requests;
+ /* buffers for sending(0) and receiving(1) commands */
+ struct intel_guc_ct_buffer ctbs[2];
- /** @incoming_requests: list of incoming requests */
- struct list_head incoming_requests;
+ u32 next_fence; /* fence to be used with next send command */
- /** @worker: worker for handling incoming requests */
- struct work_struct worker;
+ spinlock_t lock; /* protects pending requests list */
+ struct list_head pending_requests; /* requests waiting for response */
+ struct list_head incoming_requests; /* incoming requests */
+ struct work_struct worker; /* handler for incoming requests */
};
void intel_guc_ct_init_early(struct intel_guc_ct *ct);