drm/i915/guc: Implement response handling in send_ct()
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 27 Mar 2018 12:14:39 +0000 (12:14 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 28 Mar 2018 19:35:16 +0000 (20:35 +0100)
commit9ef4c75e06006eb041c0bcc578548e3cdb8f9e03
treeaa6c7f294854f397c7e98546d9eb73869a5887d0
parent24827cd0dd86a3158abc90ee64dcaf18aa843970
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
drivers/gpu/drm/i915/intel_guc_ct.c
drivers/gpu/drm/i915/intel_guc_ct.h
drivers/gpu/drm/i915/intel_guc_fwif.h