1bf215546Sopenharmony_ci 2bf215546Sopenharmony_ci#ifndef _DRM_DRIVER_H_ 3bf215546Sopenharmony_ci#define _DRM_DRIVER_H_ 4bf215546Sopenharmony_ci 5bf215546Sopenharmony_ci#include "pipe/p_compiler.h" 6bf215546Sopenharmony_ci 7bf215546Sopenharmony_ci#include "winsys_handle.h" 8bf215546Sopenharmony_ci 9bf215546Sopenharmony_cistruct pipe_screen; 10bf215546Sopenharmony_cistruct pipe_screen_config; 11bf215546Sopenharmony_cistruct pipe_context; 12bf215546Sopenharmony_cistruct pipe_resource; 13bf215546Sopenharmony_ci 14bf215546Sopenharmony_cistruct drm_driver_descriptor 15bf215546Sopenharmony_ci{ 16bf215546Sopenharmony_ci /** 17bf215546Sopenharmony_ci * Identifying prefix/suffix of the binary, used by the pipe-loader. 18bf215546Sopenharmony_ci */ 19bf215546Sopenharmony_ci const char *driver_name; 20bf215546Sopenharmony_ci 21bf215546Sopenharmony_ci /** 22bf215546Sopenharmony_ci * Optional pointer to the array of driOptionDescription describing 23bf215546Sopenharmony_ci * driver-specific driconf options. 24bf215546Sopenharmony_ci */ 25bf215546Sopenharmony_ci const struct driOptionDescription *driconf; 26bf215546Sopenharmony_ci 27bf215546Sopenharmony_ci /* Number of entries in the driconf array. */ 28bf215546Sopenharmony_ci unsigned driconf_count; 29bf215546Sopenharmony_ci 30bf215546Sopenharmony_ci /** 31bf215546Sopenharmony_ci * Create a pipe srcreen. 32bf215546Sopenharmony_ci * 33bf215546Sopenharmony_ci * This function does any wrapping of the screen. 34bf215546Sopenharmony_ci * For example wrapping trace or rbug debugging drivers around it. 35bf215546Sopenharmony_ci */ 36bf215546Sopenharmony_ci struct pipe_screen* (*create_screen)(int drm_fd, 37bf215546Sopenharmony_ci const struct pipe_screen_config *config); 38bf215546Sopenharmony_ci}; 39bf215546Sopenharmony_ci 40bf215546Sopenharmony_ciextern const struct drm_driver_descriptor driver_descriptor; 41bf215546Sopenharmony_ci 42bf215546Sopenharmony_ci#endif 43