Lines Matching refs:screen

120 	struct fd_screen *screen = fd_screen(pscreen);  in fd_screen_get_timestamp()  local
122 if (screen->has_timestamp) { in fd_screen_get_timestamp()
124 fd_pipe_get_param(screen->pipe, FD_TIMESTAMP, &n); in fd_screen_get_timestamp()
125 debug_assert(screen->max_freq > 0); in fd_screen_get_timestamp()
126 return n * 1000000000 / screen->max_freq; in fd_screen_get_timestamp()
129 return cpu_time + screen->cpu_gpu_time_delta; in fd_screen_get_timestamp()
137 struct fd_screen *screen = fd_screen(pscreen); in fd_screen_destroy() local
139 if (screen->pipe) in fd_screen_destroy()
140 fd_pipe_del(screen->pipe); in fd_screen_destroy()
142 if (screen->dev) in fd_screen_destroy()
143 fd_device_del(screen->dev); in fd_screen_destroy()
145 fd_bc_fini(&screen->batch_cache); in fd_screen_destroy()
147 slab_destroy_parent(&screen->transfer_pool); in fd_screen_destroy()
149 mtx_destroy(&screen->lock); in fd_screen_destroy()
151 ralloc_free(screen->compiler); in fd_screen_destroy()
153 free(screen); in fd_screen_destroy()
163 struct fd_screen *screen = fd_screen(pscreen); in fd_screen_get_param() local
191 return is_a3xx(screen) || is_a4xx(screen); in fd_screen_get_param()
194 return has_compute(screen); in fd_screen_get_param()
221 return is_a3xx(screen) || is_a4xx(screen) || is_a5xx(screen); in fd_screen_get_param()
224 return is_a3xx(screen) || is_a4xx(screen); in fd_screen_get_param()
227 return is_a5xx(screen); in fd_screen_get_param()
232 if (is_a3xx(screen)) return 16; in fd_screen_get_param()
233 if (is_a4xx(screen)) return 32; in fd_screen_get_param()
234 if (is_a5xx(screen)) return 32; in fd_screen_get_param()
240 if (is_a3xx(screen)) return 8192; in fd_screen_get_param()
241 if (is_a4xx(screen)) return 16384; in fd_screen_get_param()
242 if (is_a5xx(screen)) return 16384; in fd_screen_get_param()
249 return is_a4xx(screen) || is_a5xx(screen); in fd_screen_get_param()
257 return is_a4xx(screen); in fd_screen_get_param()
265 return is_ir3(screen) ? 140 : 120; in fd_screen_get_param()
268 if (is_a5xx(screen)) in fd_screen_get_param()
273 if (is_a4xx(screen) || is_a5xx(screen)) in fd_screen_get_param()
342 return screen->priority_mask; in fd_screen_get_param()
345 if (is_a4xx(screen) || is_a5xx(screen)) in fd_screen_get_param()
350 if (is_a4xx(screen) || is_a5xx(screen)) in fd_screen_get_param()
356 if (is_ir3(screen)) in fd_screen_get_param()
368 if (is_ir3(screen)) in fd_screen_get_param()
374 if (is_ir3(screen)) in fd_screen_get_param()
379 if (is_ir3(screen)) in fd_screen_get_param()
384 if (is_ir3(screen)) in fd_screen_get_param()
405 return (is_a3xx(screen) || is_a4xx(screen) || is_a5xx(screen)) ? 256 : 0; in fd_screen_get_param()
409 return screen->max_rts; in fd_screen_get_param()
411 return is_a3xx(screen) ? 1 : 0; in fd_screen_get_param()
417 return is_a3xx(screen) || is_a4xx(screen) || is_a5xx(screen); in fd_screen_get_param()
421 return (screen->max_freq > 0) && (is_a4xx(screen) || is_a5xx(screen)); in fd_screen_get_param()
449 return fd_device_version(screen->dev) >= FD_VERSION_FENCE_FD; in fd_screen_get_param()
493 struct fd_screen *screen = fd_screen(pscreen); in fd_screen_get_shader_param() local
501 if (has_compute(screen)) in fd_screen_get_shader_param()
531 return ((is_a3xx(screen) || is_a4xx(screen) || is_a5xx(screen)) ? 4096 : 64) * sizeof(float[4]); in fd_screen_get_shader_param()
533 return is_ir3(screen) ? 16 : 1; in fd_screen_get_shader_param()
547 return is_ir3(screen) ? 1 : 0; in fd_screen_get_shader_param()
560 return is_ir3(screen) ? 1 : 0; in fd_screen_get_shader_param()
569 if (is_ir3(screen)) in fd_screen_get_shader_param()
573 if (is_ir3(screen)) { in fd_screen_get_shader_param()
588 if (is_a5xx(screen)) { in fd_screen_get_shader_param()
633 struct fd_screen *screen = fd_screen(pscreen); in fd_get_compute_param() local
636 if (!has_compute(screen)) in fd_get_compute_param()
645 if (is_a5xx(screen)) in fd_get_compute_param()
718 struct fd_screen *screen = fd_screen(pscreen); in fd_get_compiler_options() local
720 if (is_ir3(screen)) in fd_get_compiler_options()
721 return ir3_get_compiler_options(screen->compiler); in fd_get_compiler_options()
751 struct fd_screen *screen = fd_screen(pscreen); in fd_screen_bo_from_handle() local
755 bo = fd_bo_from_name(screen->dev, whandle->handle); in fd_screen_bo_from_handle()
757 bo = fd_bo_from_handle(screen->dev, whandle->handle, 0); in fd_screen_bo_from_handle()
759 bo = fd_bo_from_dmabuf(screen->dev, whandle->handle); in fd_screen_bo_from_handle()
776 struct fd_screen *screen = CALLOC_STRUCT(fd_screen); in fd_screen_create() local
787 if (!screen) in fd_screen_create()
790 pscreen = &screen->base; in fd_screen_create()
792 screen->dev = dev; in fd_screen_create()
793 screen->refcnt = 1; in fd_screen_create()
796 screen->pipe = fd_pipe_new(screen->dev, FD_PIPE_3D); in fd_screen_create()
797 if (!screen->pipe) { in fd_screen_create()
802 if (fd_pipe_get_param(screen->pipe, FD_GMEM_SIZE, &val)) { in fd_screen_create()
806 screen->gmemsize_bytes = val; in fd_screen_create()
808 if (fd_pipe_get_param(screen->pipe, FD_DEVICE_ID, &val)) { in fd_screen_create()
812 screen->device_id = val; in fd_screen_create()
814 if (fd_pipe_get_param(screen->pipe, FD_MAX_FREQ, &val)) { in fd_screen_create()
819 screen->max_freq = 0; in fd_screen_create()
821 screen->max_freq = val; in fd_screen_create()
822 if (fd_pipe_get_param(screen->pipe, FD_TIMESTAMP, &val) == 0) in fd_screen_create()
823 screen->has_timestamp = true; in fd_screen_create()
826 if (fd_pipe_get_param(screen->pipe, FD_GPU_ID, &val)) { in fd_screen_create()
830 screen->gpu_id = val; in fd_screen_create()
832 if (fd_pipe_get_param(screen->pipe, FD_CHIP_ID, &val)) { in fd_screen_create()
835 unsigned core = screen->gpu_id / 100; in fd_screen_create()
836 unsigned major = (screen->gpu_id % 100) / 10; in fd_screen_create()
837 unsigned minor = screen->gpu_id % 10; in fd_screen_create()
842 screen->chip_id = val; in fd_screen_create()
844 if (fd_pipe_get_param(screen->pipe, FD_NR_RINGS, &val)) { in fd_screen_create()
846 screen->priority_mask = 0; in fd_screen_create()
849 screen->priority_mask = (1 << val) - 1; in fd_screen_create()
853 DBG(" GPU-id: %d", screen->gpu_id); in fd_screen_create()
854 DBG(" Chip-id: 0x%08x", screen->chip_id); in fd_screen_create()
855 DBG(" GMEM size: 0x%08x", screen->gmemsize_bytes); in fd_screen_create()
868 switch (screen->gpu_id) { in fd_screen_create()
886 debug_printf("unsupported GPU: a%03d\n", screen->gpu_id); in fd_screen_create()
890 if (screen->gpu_id >= 500) { in fd_screen_create()
891 screen->gmem_alignw = 64; in fd_screen_create()
892 screen->gmem_alignh = 32; in fd_screen_create()
893 screen->num_vsc_pipes = 16; in fd_screen_create()
895 screen->gmem_alignw = 32; in fd_screen_create()
896 screen->gmem_alignh = 32; in fd_screen_create()
897 screen->num_vsc_pipes = 8; in fd_screen_create()
905 if ((screen->gpu_id >= 300) && (fd_device_version(dev) >= FD_VERSION_UNLIMITED_CMDS)) in fd_screen_create()
906 screen->reorder = !(fd_mesa_debug & FD_DBG_INORDER); in fd_screen_create()
908 fd_bc_init(&screen->batch_cache); in fd_screen_create()
910 (void) mtx_init(&screen->lock, mtx_plain); in fd_screen_create()
932 slab_create_parent(&screen->transfer_pool, sizeof(struct fd_transfer), 16); in fd_screen_create()