1 2#include "target-helpers/inline_wrapper_sw_helper.h" 3#include "target-helpers/inline_debug_helper.h" 4#include "state_tracker/drm_driver.h" 5#include "svga/drm/svga_drm_public.h" 6#include "svga/svga_public.h" 7 8static struct pipe_screen * 9create_screen(int fd) 10{ 11 struct svga_winsys_screen *sws; 12 struct pipe_screen *screen; 13 14 sws = svga_drm_winsys_screen_create(fd); 15 if (!sws) 16 return NULL; 17 18 screen = svga_screen_create(sws); 19 if (!screen) 20 return NULL; 21 22 screen = sw_screen_wrap(screen); 23 24 screen = debug_screen_wrap(screen); 25 26 return screen; 27} 28 29static const struct drm_conf_ret throttle_ret = { 30 .type = DRM_CONF_INT, 31 .val.val_int = 2, 32}; 33 34static const struct drm_conf_ret *drm_configuration(enum drm_conf conf) 35{ 36 switch (conf) { 37 case DRM_CONF_THROTTLE: 38 return &throttle_ret; 39 default: 40 break; 41 } 42 return NULL; 43} 44 45DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen, drm_configuration) 46