summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_guc_ct.h
diff options
context:
space:
mode:
authorMichal Wajdeczko2018-03-27 14:14:39 +0200
committerChris Wilson2018-03-28 21:35:16 +0200
commit9ef4c75e06006eb041c0bcc578548e3cdb8f9e03 (patch)
treeaa6c7f294854f397c7e98546d9eb73869a5887d0 /drivers/gpu/drm/i915/intel_guc_ct.h
parentdrm/i915/guc: Use better name for helper wait function (diff)
downloadkernel-qcow2-linux-9ef4c75e06006eb041c0bcc578548e3cdb8f9e03.tar.gz
kernel-qcow2-linux-9ef4c75e06006eb041c0bcc578548e3cdb8f9e03.tar.xz
kernel-qcow2-linux-9ef4c75e06006eb041c0bcc578548e3cdb8f9e03.zip
drm/i915/guc: Implement response handling in send_ct()
Instead of returning small data in response status dword, GuC may append longer data as response message payload. If caller provides response buffer, we will copy received data and use number of received data dwords as new success return value. We will WARN if response from GuC does not match caller expectation. v2: fix timeout and checkpatch warnings (Michal) v3: fix checkpatch again (Michel) update wait function name (Michal) no need for spinlock_irqsave (MichalWi) no magic numbers (MichalWi) must check before use (Jani) add some more documentation (Michal) v4: update documentation (Michal) Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Oscar Mateo <oscar.mateo@intel.com> Cc: Michel Thierry <michel.thierry@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Michel Thierry <michel.thierry@intel.com> #2.5 Cc: Michal Winiarski <michal.winiarski@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20180327121439.70096-1-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_guc_ct.h')
-rw-r--r--drivers/gpu/drm/i915/intel_guc_ct.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_guc_ct.h b/drivers/gpu/drm/i915/intel_guc_ct.h
index 595c8ad5bd4a..fac6e53194c6 100644
--- a/drivers/gpu/drm/i915/intel_guc_ct.h
+++ b/drivers/gpu/drm/i915/intel_guc_ct.h
@@ -75,6 +75,12 @@ struct intel_guc_ct_channel {
struct intel_guc_ct {
struct intel_guc_ct_channel host_channel;
/* other channels are tbd */
+
+ /** @lock: protects pending requests list */
+ spinlock_t lock;
+
+ /** @pending_requests: list of requests waiting for response */
+ struct list_head pending_requests;
};
void intel_guc_ct_init_early(struct intel_guc_ct *ct);