summaryrefslogtreecommitdiff
path: root/include/linux/mei_cl_bus.h
diff options
context:
space:
mode:
authorVitaly Lubart <vitaly.lubart@intel.com>2022-09-28 03:41:34 +0300
committerDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>2022-10-03 21:29:10 +0300
commit2266e58a1c08efacc97a46fd3793a3b1a9323741 (patch)
tree0402908944a001647955f8bb65a7bca59ee7b12e /include/linux/mei_cl_bus.h
parent2af56dde08a1ae9ef8cfb1186d78d2b9620dc997 (diff)
downloadlinux-2266e58a1c08efacc97a46fd3793a3b1a9323741.tar.xz
mei: bus: extend bus API to support command streamer API
Add mei bus API for sending gsc commands: mei_cldev_send_gsc_command() The GSC commands are originated in the graphics stack and are in form of SGL DMA buffers. The GSC commands are synchronous, the response is received in the same call on the out sg list buffers. The function setups pointers for in and out sg lists in the mei sgl extended header and sends it to the firmware. Signed-off-by: Vitaly Lubart <vitaly.lubart@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-5-daniele.ceraolospurio@intel.com
Diffstat (limited to 'include/linux/mei_cl_bus.h')
-rw-r--r--include/linux/mei_cl_bus.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mei_cl_bus.h b/include/linux/mei_cl_bus.h
index df1fab44ea5c..fd6e0620658d 100644
--- a/include/linux/mei_cl_bus.h
+++ b/include/linux/mei_cl_bus.h
@@ -11,6 +11,7 @@
struct mei_cl_device;
struct mei_device;
+struct scatterlist;
typedef void (*mei_cldev_cb_t)(struct mei_cl_device *cldev);
@@ -116,6 +117,11 @@ void mei_cldev_set_drvdata(struct mei_cl_device *cldev, void *data);
int mei_cldev_enable(struct mei_cl_device *cldev);
int mei_cldev_disable(struct mei_cl_device *cldev);
bool mei_cldev_enabled(const struct mei_cl_device *cldev);
+ssize_t mei_cldev_send_gsc_command(struct mei_cl_device *cldev,
+ u8 client_id, u32 fence_id,
+ struct scatterlist *sg_in,
+ size_t total_in_len,
+ struct scatterlist *sg_out);
void *mei_cldev_dma_map(struct mei_cl_device *cldev, u8 buffer_id, size_t size);
int mei_cldev_dma_unmap(struct mei_cl_device *cldev);