• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include "target-helpers/inline_debug_helper.h"
2 #include "state_tracker/drm_driver.h"
3 #include "intel/drm/intel_drm_public.h"
4 #include "ilo/ilo_public.h"
5 
6 static struct pipe_screen *
create_screen(int fd)7 create_screen(int fd)
8 {
9    struct intel_winsys *iws;
10    struct pipe_screen *screen;
11 
12    iws = intel_winsys_create_for_fd(fd);
13    if (!iws)
14       return NULL;
15 
16    screen = ilo_screen_create(iws);
17    if (!screen)
18       return NULL;
19 
20    screen = debug_screen_wrap(screen);
21 
22    return screen;
23 }
24 static const struct drm_conf_ret throttle_ret = {
25    .type = DRM_CONF_INT,
26    .val.val_int = 2,
27 };
28 
29 static const struct drm_conf_ret share_fd_ret = {
30    .type = DRM_CONF_BOOL,
31    .val.val_int = true,
32 };
33 
drm_configuration(enum drm_conf conf)34 static 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    case DRM_CONF_SHARE_FD:
40       return &share_fd_ret;
41    default:
42       break;
43    }
44    return NULL;
45 }
46 PUBLIC
47 DRM_DRIVER_DESCRIPTOR("i965", create_screen, drm_configuration)
48