5 #include "pipe/p_compiler.h"
12 #define DRM_API_HANDLE_TYPE_SHARED 0
13 #define DRM_API_HANDLE_TYPE_KMS 1
16 * For use with pipe_screen::{texture_from_handle|texture_get_handle}.
21 * Unused for texture_from_handle, always
22 * DRM_API_HANDLE_TYPE_SHARED. Input to texture_get_handle,
23 * use TEXTURE_USAGE to select handle for kms or ipc.
27 * Input to texture_from_handle.
28 * Output for texture_get_handle.
32 * Input to texture_from_handle.
33 * Output for texture_get_handle.
41 * Configuration queries.
44 /* How many frames to allow before throttling. Or -1 to indicate any number */
45 DRM_CONF_THROTTLE, /* DRM_CONF_INT. */
50 * Type of configuration answer
60 * Return value from the configuration function.
63 enum drm_conf_type type;
72 struct drm_driver_descriptor
75 * Identifying sufix/prefix of the binary, used by egl.
80 * Kernel driver name, as accepted by drmOpenByName.
82 const char *driver_name;
85 * Create a pipe srcreen.
87 * This function does any wrapping of the screen.
88 * For example wrapping trace or rbug debugging drivers around it.
90 struct pipe_screen* (*create_screen)(int drm_fd);
94 * Return a configuration value.
96 * If this function is NULL, or if it returns NULL
97 * the state tracker- or state
98 * tracker manager should provide a reasonable default value.
100 const struct drm_conf_ret *(*configuration) (enum drm_conf conf);
103 extern struct drm_driver_descriptor driver_descriptor;
106 * Instantiate a drm_driver_descriptor struct.
108 #define DRM_DRIVER_DESCRIPTOR(name_str, driver_name_str, func, conf) \
109 struct drm_driver_descriptor driver_descriptor = { \
111 .driver_name = driver_name_str, \
112 .create_screen = func, \
113 .configuration = (conf), \