Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5564 | serge | 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 "radeon/radeon_winsys.h" |
||
5 | #include "radeonsi/si_public.h" |
||
6 | |||
7 | static struct pipe_screen * |
||
8 | create_screen(int fd) |
||
9 | { |
||
10 | struct radeon_winsys *rw; |
||
11 | |||
12 | rw = radeon_drm_winsys_create(fd, radeonsi_screen_create); |
||
13 | return rw ? debug_screen_wrap(rw->screen) : NULL; |
||
14 | } |
||
15 | |||
16 | static const struct drm_conf_ret throttle_ret = { |
||
17 | .type = DRM_CONF_INT, |
||
18 | .val.val_int = 2, |
||
19 | }; |
||
20 | |||
21 | static const struct drm_conf_ret share_fd_ret = { |
||
22 | .type = DRM_CONF_BOOL, |
||
23 | .val.val_int = true, |
||
24 | }; |
||
25 | |||
26 | static const struct drm_conf_ret *drm_configuration(enum drm_conf conf) |
||
27 | { |
||
28 | switch (conf) { |
||
29 | case DRM_CONF_THROTTLE: |
||
30 | return &throttle_ret; |
||
31 | case DRM_CONF_SHARE_FD: |
||
32 | return &share_fd_ret; |
||
33 | default: |
||
34 | break; |
||
35 | } |
||
36 | return NULL; |
||
37 | } |
||
38 | |||
39 | PUBLIC |
||
40 | DRM_DRIVER_DESCRIPTOR("radeonsi", "radeon", create_screen, drm_configuration) |