Lines Matching refs:screen

80         struct vc4_screen *screen = vc4_screen(pscreen);  in vc4_screen_get_name()  local
82 if (!screen->name) { in vc4_screen_get_name()
83 screen->name = ralloc_asprintf(screen, in vc4_screen_get_name()
85 screen->v3d_ver / 10, in vc4_screen_get_name()
86 screen->v3d_ver % 10); in vc4_screen_get_name()
89 return screen->name; in vc4_screen_get_name()
101 struct vc4_screen *screen = vc4_screen(pscreen); in vc4_screen_destroy() local
103 util_hash_table_destroy(screen->bo_handles); in vc4_screen_destroy()
105 slab_destroy_parent(&screen->transfer_pool); in vc4_screen_destroy()
106 free(screen->ro); in vc4_screen_destroy()
109 vc4_simulator_destroy(screen); in vc4_screen_destroy()
112 close(screen->fd); in vc4_screen_destroy()
117 vc4_has_feature(struct vc4_screen *screen, uint32_t feature) in vc4_has_feature() argument
122 int ret = vc4_ioctl(screen->fd, DRM_IOCTL_VC4_GET_PARAM, &p); in vc4_has_feature()
133 struct vc4_screen *screen = vc4_screen(pscreen); in vc4_screen_get_param() local
152 return vc4_has_feature(screen, in vc4_screen_get_param()
469 struct vc4_screen *screen = vc4_screen(pscreen); in vc4_screen_is_format_supported() local
540 (format != PIPE_FORMAT_ETC1_RGB8 || screen->has_etc1)) { in vc4_screen_is_format_supported()
580 struct vc4_screen *screen = vc4_screen(pscreen); in vc4_screen_query_dmabuf_modifiers() local
581 int num_modifiers = screen->has_tiling_ioctl ? 2 : 1; in vc4_screen_query_dmabuf_modifiers()
589 m = screen->has_tiling_ioctl ? 0 : 1; in vc4_screen_query_dmabuf_modifiers()
614 vc4_get_chip_info(struct vc4_screen *screen) in vc4_get_chip_info() argument
624 ret = vc4_ioctl(screen->fd, DRM_IOCTL_VC4_GET_PARAM, &ident0); in vc4_get_chip_info()
630 screen->v3d_ver = 21; in vc4_get_chip_info()
638 ret = vc4_ioctl(screen->fd, DRM_IOCTL_VC4_GET_PARAM, &ident1); in vc4_get_chip_info()
647 screen->v3d_ver = major * 10 + minor; in vc4_get_chip_info()
649 if (screen->v3d_ver != 21 && screen->v3d_ver != 26) { in vc4_get_chip_info()
652 screen->v3d_ver / 10, in vc4_get_chip_info()
653 screen->v3d_ver % 10); in vc4_get_chip_info()
663 struct vc4_screen *screen = rzalloc(NULL, struct vc4_screen); in vc4_screen_create() local
666 pscreen = &screen->base; in vc4_screen_create()
675 screen->fd = fd; in vc4_screen_create()
677 screen->ro = renderonly_dup(ro); in vc4_screen_create()
678 if (!screen->ro) { in vc4_screen_create()
680 ralloc_free(screen); in vc4_screen_create()
685 list_inithead(&screen->bo_cache.time_list); in vc4_screen_create()
686 (void) mtx_init(&screen->bo_handles_mutex, mtx_plain); in vc4_screen_create()
687 screen->bo_handles = util_hash_table_create(handle_hash, handle_compare); in vc4_screen_create()
689 screen->has_control_flow = in vc4_screen_create()
690 vc4_has_feature(screen, DRM_VC4_PARAM_SUPPORTS_BRANCHES); in vc4_screen_create()
691 screen->has_etc1 = in vc4_screen_create()
692 vc4_has_feature(screen, DRM_VC4_PARAM_SUPPORTS_ETC1); in vc4_screen_create()
693 screen->has_threaded_fs = in vc4_screen_create()
694 vc4_has_feature(screen, DRM_VC4_PARAM_SUPPORTS_THREADED_FS); in vc4_screen_create()
695 screen->has_madvise = in vc4_screen_create()
696 vc4_has_feature(screen, DRM_VC4_PARAM_SUPPORTS_MADVISE); in vc4_screen_create()
698 if (!vc4_get_chip_info(screen)) in vc4_screen_create()
703 slab_create_parent(&screen->transfer_pool, sizeof(struct vc4_transfer), 16); in vc4_screen_create()
705 vc4_fence_init(screen); in vc4_screen_create()
712 vc4_simulator_init(screen); in vc4_screen_create()