5 #include "pipe/p_compiler.h"
11 #define DRM_API_HANDLE_TYPE_SHARED 0
12 #define DRM_API_HANDLE_TYPE_KMS 1
15 * For use with pipe_screen::{texture_from_handle|texture_get_handle}.
20 * Unused for texture_from_handle, always
21 * DRM_API_HANDLE_TYPE_SHARED. Input to texture_get_handle,
22 * use TEXTURE_USAGE to select handle for kms or ipc.
26 * Input to texture_from_handle.
27 * Output for texture_get_handle.
31 * Input to texture_from_handle.
32 * Output for texture_get_handle.
40 * Configuration queries.
43 /* How many frames to allow before throttling. Or -1 to indicate any number */
44 DRM_CONF_THROTTLE
, /* DRM_CONF_INT. */
49 * Type of configuration answer
59 * Return value from the configuration function.
62 enum drm_conf_type type
;
71 struct drm_driver_descriptor
74 * Identifying sufix/prefix of the binary, used by egl.
79 * Kernel driver name, as accepted by drmOpenByName.
81 const char *driver_name
;
84 * Create a pipe srcreen.
86 * This function does any wrapping of the screen.
87 * For example wrapping trace or rbug debugging drivers around it.
89 struct pipe_screen
* (*create_screen
)(int drm_fd
);
93 * Return a configuration value.
95 * If this function is NULL, or if it returns NULL
96 * the state tracker- or state
97 * tracker manager should provide a reasonable default value.
99 const struct drm_conf_ret
*(*configuration
) (enum drm_conf conf
);
102 extern struct drm_driver_descriptor driver_descriptor
;
105 * Instantiate a drm_driver_descriptor struct.
107 #define DRM_DRIVER_DESCRIPTOR(name_str, driver_name_str, func, conf) \
108 struct drm_driver_descriptor driver_descriptor = { \
110 .driver_name = driver_name_str, \
111 .create_screen = func, \
112 .configuration = (conf), \