diff options
author | Alan Previn <alan.previn.teres.alexis@intel.com> | 2021-10-05 12:41:22 -0700 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2021-10-06 05:04:58 -0400 |
commit | aabebab9995448d4c32e34b97512d34a3f2edc82 (patch) | |
tree | 4687252087718f33bdde2200e0f4d21c391dd133 /lib/intel_bufops.h | |
parent | 9c5b1cc9199b4bd050ff82fd1b6d178e8d69cf88 (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_bufops.h')
-rw-r--r-- | lib/intel_bufops.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/intel_bufops.h b/lib/intel_bufops.h index 8148750f..25b43073 100644 --- a/lib/intel_bufops.h +++ b/lib/intel_bufops.h @@ -52,6 +52,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]; }; @@ -163,6 +166,18 @@ struct intel_buf *intel_buf_create_using_handle_and_size(struct buf_ops *bops, int stride); void intel_buf_destroy(struct intel_buf *buf); +static inline void intel_buf_set_pxp(struct intel_buf *buf, bool new_pxp_state) +{ + igt_assert(buf); + buf->is_protected = new_pxp_state; +} + +static inline bool intel_buf_pxp(const struct intel_buf *buf) +{ + igt_assert(buf); + return buf->is_protected; +} + void *intel_buf_cpu_map(struct intel_buf *buf, bool write); void *intel_buf_device_map(struct intel_buf *buf, bool write); void intel_buf_unmap(struct intel_buf *buf); |