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