[igt-dev] [RFC i-g-t 03/11] Add PXP attributes into lib batchbuffer and buffer structs

Alan Previn alan.previn.teres.alexis at intel.com
Tue Mar 2 22:53:26 UTC 2021


Eventually when we get to testing PXP rendering capability,
we can reuse lib's rendercopy feature. However to do that,
we need to pass information about PXP-session-enablement
and which buffers are protected.

Signed-off-by: Alan Previn <alan.previn.teres.alexis at intel.com>
---
 lib/intel_batchbuffer.h | 7 +++++++
 lib/intel_bufops.h      | 3 +++
 2 files changed, 10 insertions(+)

diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h
index 76989eaa..3ef9e30d 100644
--- a/lib/intel_batchbuffer.h
+++ b/lib/intel_batchbuffer.h
@@ -437,6 +437,12 @@ typedef void (*igt_media_spinfunc_t)(int i915,
 igt_media_spinfunc_t igt_get_media_spinfunc(int devid);
 
 
+struct igt_pxp {
+	bool     enabled;
+	int      apptype;
+	uint32_t appid;
+};
+
 /*
  * Batchbuffer without libdrm dependency
  */
@@ -459,6 +465,7 @@ struct intel_bb {
 	bool supports_48b_address;
 
 	uint32_t ctx;
+	struct igt_pxp pxp;
 
 	/* Cache */
 	void *root;
diff --git a/lib/intel_bufops.h b/lib/intel_bufops.h
index 8debe7f2..0a272eaa 100644
--- a/lib/intel_bufops.h
+++ b/lib/intel_bufops.h
@@ -41,6 +41,9 @@ struct intel_buf {
 	uint32_t *ptr;
 	bool cpu_write;
 
+	/* Content Protection*/
+	bool is_protected;
+
 	/* For debugging purposes */
 	char name[INTEL_BUF_NAME_MAXSIZE + 1];
 };
-- 
2.25.1



More information about the igt-dev mailing list