summaryrefslogtreecommitdiff
path: root/lib/intel_batchbuffer.c
diff options
context:
space:
mode:
authorAlan Previn <alan.previn.teres.alexis@intel.com>2021-10-05 12:41:22 -0700
committerRodrigo Vivi <rodrigo.vivi@intel.com>2021-10-06 05:04:58 -0400
commitaabebab9995448d4c32e34b97512d34a3f2edc82 (patch)
tree4687252087718f33bdde2200e0f4d21c391dd133 /lib/intel_batchbuffer.c
parent9c5b1cc9199b4bd050ff82fd1b6d178e8d69cf88 (diff)
lib: Add PXP attribute support in batchbuffer and buffer_ops libs
Eventually when we get to testing PXP rendering capability, we shall reuse lib's rendercopy feature. Rendercopy libraries shall retrieve information about PXP-session-enablement and which buffers are protected from these new flags. Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'lib/intel_batchbuffer.c')
-rw-r--r--lib/intel_batchbuffer.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index e3e649ca..291d706b 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -2347,6 +2347,27 @@ uint64_t intel_bb_offset_reloc_to_object(struct intel_bb *ibb,
delta, offset, presumed_offset);
}
+/*
+ * @intel_bb_set_pxp:
+ * @ibb: pointer to intel_bb
+ * @new_state: enable or disable pxp session
+ * @apptype: pxp session input identifies what type of session to enable
+ * @appid: pxp session input provides which appid to use
+ *
+ * This function merely stores the pxp state and session information to
+ * be retrieved and programmed later by supporting libraries such as
+ * gen12_render_copy that must program the HW within the same dispatch
+ */
+void intel_bb_set_pxp(struct intel_bb *ibb, bool new_state,
+ uint32_t apptype, uint32_t appid)
+{
+ igt_assert(ibb);
+
+ ibb->pxp.enabled = new_state;
+ ibb->pxp.apptype = new_state ? apptype : 0;
+ ibb->pxp.appid = new_state ? appid : 0;
+}
+
static void intel_bb_dump_execbuf(struct intel_bb *ibb,
struct drm_i915_gem_execbuffer2 *execbuf)
{