5 #include "pipe/p_compiler.h"
13 enum drm_create_screen_mode
{
14 DRM_CREATE_NORMAL
= 0,
17 DRM_CREATE_DRIVER
= 1024,
21 #define DRM_API_HANDLE_TYPE_SHARED 0
22 #define DRM_API_HANDLE_TYPE_KMS 1
25 * For use with pipe_screen::{texture_from_handle|texture_get_handle}.
30 * Unused for texture_from_handle, always
31 * DRM_API_HANDLE_TYPE_SHARED. Input to texture_get_handle,
32 * use TEXTURE_USAGE to select handle for kms or ipc.
36 * Input to texture_from_handle.
37 * Output for texture_get_handle.
41 * Input to texture_from_handle.
42 * Output for texture_get_handle.
48 * Modes other than DRM_CREATE_NORMAL derive from this struct.
51 struct drm_create_screen_arg
{
52 enum drm_create_screen_mode mode
;
58 void (*destroy
)(struct drm_api
*api
);
63 * Kernel driver name, as accepted by drmOpenByName.
65 const char *driver_name
;
68 * Create a pipe srcreen.
70 struct pipe_screen
* (*create_screen
)(struct drm_api
*api
, int drm_fd
,
71 struct drm_create_screen_arg
*arg
);
74 extern struct drm_api
* drm_api_create(void);