drm/i915/pxp: implement function for sending tee stream command
authorVitaly Lubart <vitaly.lubart@intel.com>
Wed, 28 Sep 2022 00:41:38 +0000 (17:41 -0700)
committerDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Mon, 3 Oct 2022 18:29:14 +0000 (11:29 -0700)
commit9058f9d795ea9ad59fd579249a6d724d78dfeaf8
tree1e9c5837d2dc13c24a1ca0d41e5a1eac6946a07f
parentc5be8fc973830675a6463836e32b9a6e47852447
drm/i915/pxp: implement function for sending tee stream command

Command to be sent via the stream interface are written to a local
memory page, whose address is then provided to the GSC.
The interface supports providing a full sg with multiple pages for both
input and output messages, but since for now we only aim to support short
and synchronous messages we can use a single page for both input and
output.

Note that the mei interface expects an sg of 4k pages, while our lmem pages
are 64k. If we ever need to support more than 4k we'll need to convert.
Added a TODO comment to the code to record this.

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: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-9-daniele.ceraolospurio@intel.com
drivers/gpu/drm/i915/pxp/intel_pxp_tee.c
drivers/gpu/drm/i915/pxp/intel_pxp_tee.h
drivers/gpu/drm/i915/pxp/intel_pxp_types.h