drm/vmwgfx: Allow prime fds in the surface reference ioctls
Allow prime fds and at the same time block legacy handles for render-nodes in the surface reference ioctls. This means these ioctls can be used directly from prime-aware clients, and that they can be called from render-nodes. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -89,6 +89,15 @@
|
||||
#define DRM_VMW_PARAM_MAX_MOB_MEMORY 9
|
||||
#define DRM_VMW_PARAM_MAX_MOB_SIZE 10
|
||||
|
||||
/**
|
||||
* enum drm_vmw_handle_type - handle type for ref ioctls
|
||||
*
|
||||
*/
|
||||
enum drm_vmw_handle_type {
|
||||
DRM_VMW_HANDLE_LEGACY = 0,
|
||||
DRM_VMW_HANDLE_PRIME = 1
|
||||
};
|
||||
|
||||
/**
|
||||
* struct drm_vmw_getparam_arg
|
||||
*
|
||||
@@ -177,6 +186,7 @@ struct drm_vmw_surface_create_req {
|
||||
* struct drm_wmv_surface_arg
|
||||
*
|
||||
* @sid: Surface id of created surface or surface to destroy or reference.
|
||||
* @handle_type: Handle type for DRM_VMW_REF_SURFACE Ioctl.
|
||||
*
|
||||
* Output data from the DRM_VMW_CREATE_SURFACE Ioctl.
|
||||
* Input argument to the DRM_VMW_UNREF_SURFACE Ioctl.
|
||||
@@ -185,7 +195,7 @@ struct drm_vmw_surface_create_req {
|
||||
|
||||
struct drm_vmw_surface_arg {
|
||||
int32_t sid;
|
||||
uint32_t pad64;
|
||||
enum drm_vmw_handle_type handle_type;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user