VA-API  2.19.0
va_prot.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Intel Corporation. All Rights Reserved.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sub license, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject to
10  * the following conditions:
11  *
12  * The above copyright notice and this permission notice (including the
13  * next paragraph) shall be included in all copies or substantial portions
14  * of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19  * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
20  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 
32 #ifndef VA_PROT_H
33 #define VA_PROT_H
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
403 
405 typedef enum _VA_TEE_EXEC_FUNCTION_ID {
406  VA_TEE_EXECUTE_FUNCTION_ID_PASS_THROUGH = 0x00000001,
407  VA_TEE_EXECUTE_FUNCTION_ID_GET_FIRMWARE_VERSION = 0x00000002,
408 
410 
412 typedef struct _VAProtectedSessionBuffer {
413  /*
414  * This is used when this buffer refer to output buffer. The maximum size of
415  * data that the driver can return in the output buffer. It is not used for
416  * input buffer.
417  */
418  uint32_t max_data_size;
419  /*
420  * If it is used for input buffer, it is the size of the input data. If it is
421  * used for output buffer, it is the returns size of the output data written
422  * by the driver.
423  */
424  uint32_t data_size;
425  /*
426  * data pointer of this buffer
427  */
428  void *data;
429  uint32_t va_reserved[VA_PADDING_LOW];
431 
433 typedef struct _VAProtectedSessionExecuteBuffer {
436  uint32_t function_id;
443  uint32_t status;
452  uint64_t vtag;
454  uint32_t va_reserved[VA_PADDING_LOW - 2];
456 
466 VAStatus vaCreateProtectedSession(VADisplay dpy, VAConfigID config_id,
467  VAProtectedSessionID *protected_session);
468 
478  VAProtectedSessionID protected_session);
479 
491  VAProtectedSessionID protected_session);
492 
503 
516  VAProtectedSessionID protected_session,
517  VABufferID buf_id);
518 
521 #ifdef __cplusplus
522 }
523 #endif
524 
525 #endif /* VA_PROT_H */
uint32_t function_id
Specify the function to execute. It is IHV's implementation specific.
Definition: va_prot.h:436
Buffer for vaProtectedSessionExecute()
Definition: va_prot.h:433
VAStatus vaDetachProtectedSession(VADisplay dpy, VAGenericID id)
Detach the protected content session from the VA context.
VAProtectedSessionBuffer output
Output buffer.
Definition: va_prot.h:440
VAGenericID VAProtectedSessionID
Definition: va_prot.h:402
Input/Output buffer of VAProtectedSessionExecuteBuffer.
Definition: va_prot.h:412
uint64_t vtag
vtag represents TEE sandbox identification for multiple playback scenario
Definition: va_prot.h:452
VAStatus vaCreateProtectedSession(VADisplay dpy, VAConfigID config_id, VAProtectedSessionID *protected_session)
Create a protected session.
VAStatus vaAttachProtectedSession(VADisplay dpy, VAGenericID id, VAProtectedSessionID protected_session)
Attach a protected content session to VA context.
VAGenericID VABufferID
Definition: va.h:1977
VAStatus vaProtectedSessionExecute(VADisplay dpy, VAProtectedSessionID protected_session, VABufferID buf_id)
Execute provides a general mechanism for TEE client tasks execution.
VAProtectedSessionBuffer input
Input buffer.
Definition: va_prot.h:438
VAStatus vaDestroyProtectedSession(VADisplay dpy, VAProtectedSessionID protected_session)
Destroy a protected session.
#define VA_PADDING_LOW
Definition: va.h:359
VA_TEE_EXECUTE_FUNCTION_ID
TEE Execucte Function ID.
Definition: va_prot.h:405
unsigned int VAGenericID
Definition: va.h:1538
uint32_t status
Return the result of this function. The status result is IHV's implementation specific.
Definition: va_prot.h:443
void * VADisplay
Definition: va.h:259