minigbm: Update external i915 header
This updates it to keep it in sync with the latest i915 driver code in the v5.4 kernel where protected buffer allocation is used. BUG=b:153111783,b:155511259 TEST=Protected buffers work w/ latest kernel Change-Id: I0a511371bf69d4009ddfa0f951c7d16ba6b2c8d3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2585681 Commit-Queue: Jeffrey Kardatzke <jkardatzke@google.com> Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Jeffrey Kardatzke <jkardatzke@google.com> Auto-Submit: Jeffrey Kardatzke <jkardatzke@google.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
This commit is contained in:
parent
cea0b84e41
commit
4ddd342334
1 changed files with 81 additions and 91 deletions
172
external/i915_drm.h
vendored
172
external/i915_drm.h
vendored
|
|
@ -359,6 +359,7 @@ typedef struct _drm_i915_sarea {
|
|||
#define DRM_I915_QUERY 0x39
|
||||
#define DRM_I915_GEM_VM_CREATE 0x3a
|
||||
#define DRM_I915_GEM_VM_DESTROY 0x3b
|
||||
#define DRM_I915_PXP_OPS 0x3c
|
||||
/* Must be kept compact -- no holes */
|
||||
|
||||
#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
|
||||
|
|
@ -391,7 +392,7 @@ typedef struct _drm_i915_sarea {
|
|||
#define DRM_IOCTL_I915_GEM_ENTERVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_ENTERVT)
|
||||
#define DRM_IOCTL_I915_GEM_LEAVEVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_LEAVEVT)
|
||||
#define DRM_IOCTL_I915_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE, struct drm_i915_gem_create)
|
||||
#define DRM_IOCTL_I915_GEM_CREATE_EXT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE, struct drm_i915_gem_create_ext)
|
||||
#define DRM_IOCTL_I915_GEM_CREATE_EXT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE, struct drm_i915_gem_create_ext)
|
||||
#define DRM_IOCTL_I915_GEM_PREAD DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_PREAD, struct drm_i915_gem_pread)
|
||||
#define DRM_IOCTL_I915_GEM_PWRITE DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_PWRITE, struct drm_i915_gem_pwrite)
|
||||
#define DRM_IOCTL_I915_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP, struct drm_i915_gem_mmap)
|
||||
|
|
@ -423,6 +424,7 @@ typedef struct _drm_i915_sarea {
|
|||
#define DRM_IOCTL_I915_QUERY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_QUERY, struct drm_i915_query)
|
||||
#define DRM_IOCTL_I915_GEM_VM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_VM_CREATE, struct drm_i915_gem_vm_control)
|
||||
#define DRM_IOCTL_I915_GEM_VM_DESTROY DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_VM_DESTROY, struct drm_i915_gem_vm_control)
|
||||
#define DRM_IOCTL_I915_PXP_OPS DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_PXP_OPS, struct drm_i915_pxp_ops)
|
||||
|
||||
/* Allow drivers to submit batchbuffers directly to hardware, relying
|
||||
* on the security mechanisms provided by hardware.
|
||||
|
|
@ -724,7 +726,6 @@ struct drm_i915_gem_create {
|
|||
};
|
||||
|
||||
struct drm_i915_gem_create_ext {
|
||||
|
||||
/**
|
||||
* Requested size for the object.
|
||||
*
|
||||
|
|
@ -742,6 +743,7 @@ struct drm_i915_gem_create_ext {
|
|||
#define I915_GEM_CREATE_EXT_FLAGS_UNKNOWN \
|
||||
(-(I915_GEM_CREATE_EXT_SETPARAM << 1))
|
||||
__u64 extensions;
|
||||
|
||||
};
|
||||
|
||||
struct drm_i915_gem_pread {
|
||||
|
|
@ -1642,24 +1644,14 @@ struct drm_i915_gem_context_param {
|
|||
*/
|
||||
#define I915_CONTEXT_PARAM_PERSISTENCE 0xb
|
||||
|
||||
/*
|
||||
* I915_CONTEXT_PARAM_ACC:
|
||||
*
|
||||
* To be able to change the access counter thresholds and configurations.
|
||||
*
|
||||
* By default: access counter feature is disabled.
|
||||
*/
|
||||
#define I915_CONTEXT_PARAM_ACC 0xd
|
||||
|
||||
/*
|
||||
* I915_CONTEXT_PARAM_PROTECTED_CONTENT:
|
||||
*
|
||||
* If set to true (1) PXP content protection is enabled.
|
||||
* If set to true (1) PAVP content protection is enabled.
|
||||
* When enabled, the context is marked unrecoverable and may
|
||||
* become invalid due to PXP teardown event or other error.
|
||||
* become invalid due to PAVP teardown event or other error.
|
||||
*/
|
||||
#define I915_CONTEXT_PARAM_PROTECTED_CONTENT 0xe
|
||||
|
||||
#define I915_CONTEXT_PARAM_PROTECTED_CONTENT 0xd
|
||||
/* Must be kept compact -- no holes and well documented */
|
||||
|
||||
__u64 value;
|
||||
|
|
@ -1679,29 +1671,15 @@ struct drm_i915_gem_object_param {
|
|||
*/
|
||||
#define I915_OBJECT_PARAM (1ull<<32)
|
||||
|
||||
/*
|
||||
* I915_PARAM_MEMORY_REGIONS:
|
||||
*
|
||||
* Set the data pointer with the desired set of placements in priority
|
||||
* order(each entry must be unique and supported by the device), as an array of
|
||||
* drm_i915_gem_memory_class_instance, or an equivalent layout of class:instance
|
||||
* pair encodings. See DRM_I915_QUERY_MEMORY_REGIONS for how to query the
|
||||
* supported regions.
|
||||
*
|
||||
* Note that this requires the I915_OBJECT_PARAM namespace:
|
||||
* .param = I915_OBJECT_PARAM | I915_PARAM_MEMORY_REGIONS
|
||||
*/
|
||||
#define I915_PARAM_MEMORY_REGIONS 0x1
|
||||
|
||||
/*
|
||||
* I915_PARAM_PROTECTED_CONTENT:
|
||||
*
|
||||
* If set to true (1) buffer contents is expected to be protected by
|
||||
* PXP encryption and requires decryption for scan out and processing.
|
||||
* Protected buffers can only be used in PXP protected contexts.
|
||||
* A protected buffer may become invalid as a result of PXP teardown.
|
||||
* PAVP encryption and requires decryption for scan out and processing.
|
||||
* Protected buffers can only be used in PAVP protected contexts.
|
||||
* A protected buffer may become invalid as a result of PAVP teardown.
|
||||
*/
|
||||
#define I915_PARAM_PROTECTED_CONTENT 0x2
|
||||
#define I915_PARAM_PROTECTED_CONTENT 0x1
|
||||
|
||||
__u64 param;
|
||||
|
||||
|
|
@ -1914,6 +1892,76 @@ struct drm_i915_gem_vm_control {
|
|||
__u32 vm_id;
|
||||
};
|
||||
|
||||
/*
|
||||
* struct pxp_sm_query_pxp_tag - Params to query the PXP tag of specified
|
||||
* session id and whether the session is alive from PXP state machine.
|
||||
*/
|
||||
struct pxp_sm_query_pxp_tag {
|
||||
__u32 session_is_alive;
|
||||
__u32 pxp_tag; /* in - Session ID, out pxp tag */
|
||||
};
|
||||
|
||||
/*
|
||||
* struct pxp_set_session_status_params - Params to reserved, set or destroy
|
||||
* the session from the PXP state machine.
|
||||
*/
|
||||
struct pxp_set_session_status_params {
|
||||
__u32 pxp_tag; /* in [optional], for Arbitrator session, out pxp tag */
|
||||
__u32 session_type; /* in, session type */
|
||||
__u32 session_mode; /* in, session mode */
|
||||
__u32 req_session_state; /* in, new session state */
|
||||
};
|
||||
|
||||
/*
|
||||
* struct pxp_tee_io_message_params - Params to send/receive message to/from TEE.
|
||||
*/
|
||||
struct pxp_tee_io_message_params {
|
||||
__u8 *msg_in; /* in - message input */
|
||||
__u32 msg_in_size; /* in - message input size */
|
||||
__u8 *msg_out; /* in - message output buffer */
|
||||
__u32 msg_out_size; /* out- message output size from TEE */
|
||||
__u32 msg_out_buf_size; /* in - message output buffer size */
|
||||
};
|
||||
|
||||
/*
|
||||
* struct pxp_info - Params for PXP operation.
|
||||
*/
|
||||
struct pxp_info {
|
||||
__u32 action; /* in - specified action of this operation */
|
||||
__u32 sm_status; /* out - status output for this operation */
|
||||
|
||||
union {
|
||||
/* in - action params to query PXP tag */
|
||||
struct pxp_sm_query_pxp_tag query_pxp_tag;
|
||||
/* in - action params to set the PXP session state */
|
||||
struct pxp_set_session_status_params set_session_status;
|
||||
/* in - action params to send TEE commands */
|
||||
struct pxp_tee_io_message_params tee_io_message;
|
||||
|
||||
/* in - action params to set user space context */
|
||||
__u32 set_user_ctx;
|
||||
};
|
||||
} __attribute__((packed));
|
||||
|
||||
/*
|
||||
* DRM_I915_PXP_OPS -
|
||||
*
|
||||
* PXP is an i915 componment, that helps user space to establish the hardware
|
||||
* protected session and manage the status of each alive software session,
|
||||
* as well as the life cycle of each session.
|
||||
*
|
||||
* This ioctl is to allow user space driver to create, set, and destroy each
|
||||
* session. It also provides the communication chanel to TEE (Trusted
|
||||
* Execution Environment) for the protected hardware session creation.
|
||||
*/
|
||||
struct drm_i915_pxp_ops {
|
||||
/* in - user space pointer to struct pxp_info */
|
||||
struct pxp_info *info_ptr;
|
||||
|
||||
/* in - memory size that info_ptr points to */
|
||||
__u32 info_size;
|
||||
};
|
||||
|
||||
struct drm_i915_reg_read {
|
||||
/*
|
||||
* Register offset.
|
||||
|
|
@ -2167,7 +2215,6 @@ struct drm_i915_query_item {
|
|||
#define DRM_I915_QUERY_TOPOLOGY_INFO 1
|
||||
#define DRM_I915_QUERY_ENGINE_INFO 2
|
||||
#define DRM_I915_QUERY_PERF_CONFIG 3
|
||||
#define DRM_I915_QUERY_MEMORY_REGIONS 4
|
||||
/* Must be kept compact -- no holes and well documented */
|
||||
|
||||
/*
|
||||
|
|
@ -2368,63 +2415,6 @@ struct drm_i915_query_perf_config {
|
|||
__u8 data[];
|
||||
};
|
||||
|
||||
enum drm_i915_gem_memory_class {
|
||||
I915_MEMORY_CLASS_SYSTEM = 0,
|
||||
I915_MEMORY_CLASS_DEVICE,
|
||||
I915_MEMORY_CLASS_STOLEN_SYSTEM,
|
||||
I915_MEMORY_CLASS_STOLEN_DEVICE,
|
||||
};
|
||||
|
||||
struct drm_i915_gem_memory_class_instance {
|
||||
__u16 memory_class; /* see enum drm_i915_gem_memory_class */
|
||||
__u16 memory_instance;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct drm_i915_memory_region_info
|
||||
*
|
||||
* Describes one region as known to the driver.
|
||||
*/
|
||||
struct drm_i915_memory_region_info {
|
||||
/** class:instance pair encoding */
|
||||
struct drm_i915_gem_memory_class_instance region;
|
||||
|
||||
/** MBZ */
|
||||
__u32 rsvd0;
|
||||
|
||||
/** MBZ */
|
||||
__u64 caps;
|
||||
|
||||
/** MBZ */
|
||||
__u64 flags;
|
||||
|
||||
/** Memory probed by the driver (-1 = unknown) */
|
||||
__u64 probed_size;
|
||||
|
||||
/** Estimate of memory remaining (-1 = unknown) */
|
||||
__u64 unallocated_size;
|
||||
|
||||
/** MBZ */
|
||||
__u64 rsvd1[8];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct drm_i915_query_memory_regions
|
||||
*
|
||||
* Region info query enumerates all regions known to the driver by filling in
|
||||
* an array of struct drm_i915_memory_region_info structures.
|
||||
*/
|
||||
struct drm_i915_query_memory_regions {
|
||||
/** Number of supported regions */
|
||||
__u32 num_regions;
|
||||
|
||||
/** MBZ */
|
||||
__u32 rsvd[3];
|
||||
|
||||
/* Info about each supported region */
|
||||
struct drm_i915_memory_region_info regions[];
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue