Lines Matching refs:hwrt

43 			   struct pvr_hwrt_dataset *hwrt)  in hwrt_init_kernel_structure()  argument
48 hwrt->pvr_dev = pvr_dev; in hwrt_init_kernel_structure()
49 hwrt->max_rts = args->layers; in hwrt_init_kernel_structure()
52 for (int i = 0; i < ARRAY_SIZE(hwrt->free_lists); i++) { in hwrt_init_kernel_structure()
53 hwrt->free_lists[i] = pvr_free_list_lookup(pvr_file, args->free_list_handles[i]); in hwrt_init_kernel_structure()
54 if (!hwrt->free_lists[i]) { in hwrt_init_kernel_structure()
60 if (hwrt->free_lists[ROGUE_FW_LOCAL_FREELIST]->current_pages < in hwrt_init_kernel_structure()
69 for (int i = 0; i < ARRAY_SIZE(hwrt->free_lists); i++) { in hwrt_init_kernel_structure()
70 pvr_free_list_put(hwrt->free_lists[i]); in hwrt_init_kernel_structure()
71 hwrt->free_lists[i] = NULL; in hwrt_init_kernel_structure()
78 hwrt_fini_kernel_structure(struct pvr_hwrt_dataset *hwrt) in hwrt_fini_kernel_structure() argument
80 for (int i = 0; i < ARRAY_SIZE(hwrt->free_lists); i++) { in hwrt_fini_kernel_structure()
81 pvr_free_list_put(hwrt->free_lists[i]); in hwrt_fini_kernel_structure()
82 hwrt->free_lists[i] = NULL; in hwrt_fini_kernel_structure()
87 hwrt_fini_common_fw_structure(struct pvr_hwrt_dataset *hwrt) in hwrt_fini_common_fw_structure() argument
89 pvr_fw_object_destroy(hwrt->common_fw_obj); in hwrt_fini_common_fw_structure()
223 struct pvr_hwrt_dataset *hwrt = priv; in hwrtdata_common_init() local
225 memcpy(cpu_ptr, &hwrt->common, sizeof(hwrt->common)); in hwrtdata_common_init()
231 struct pvr_hwrt_dataset *hwrt) in hwrt_init_common_fw_structure() argument
283 hwrt->common.geom_caches_need_zeroing = false; in hwrt_init_common_fw_structure()
285 hwrt->common.isp_merge_lower_x = args->isp_merge_lower_x; in hwrt_init_common_fw_structure()
286 hwrt->common.isp_merge_lower_y = args->isp_merge_lower_y; in hwrt_init_common_fw_structure()
287 hwrt->common.isp_merge_upper_x = args->isp_merge_upper_x; in hwrt_init_common_fw_structure()
288 hwrt->common.isp_merge_upper_y = args->isp_merge_upper_y; in hwrt_init_common_fw_structure()
289 hwrt->common.isp_merge_scale_x = args->isp_merge_scale_x; in hwrt_init_common_fw_structure()
290 hwrt->common.isp_merge_scale_y = args->isp_merge_scale_y; in hwrt_init_common_fw_structure()
293 &hwrt->common.multi_sample_ctl); in hwrt_init_common_fw_structure()
298 &hwrt->common.flipped_multi_sample_ctl); in hwrt_init_common_fw_structure()
302 hwrt->common.mtile_stride = info.mtile_x[0] * info.mtile_y[0]; in hwrt_init_common_fw_structure()
304 err = get_cr_te_aa_val(pvr_dev, args->samples, &hwrt->common.teaa); in hwrt_init_common_fw_structure()
308 hwrt->common.screen_pixel_max = in hwrt_init_common_fw_structure()
314 hwrt->common.te_screen = in hwrt_init_common_fw_structure()
319 hwrt->common.te_mtile1 = in hwrt_init_common_fw_structure()
323 hwrt->common.te_mtile2 = in hwrt_init_common_fw_structure()
329 &hwrt->common.isp_mtile_size); in hwrt_init_common_fw_structure()
333 hwrt->common.tpc_stride = geom_data_args->tpc_stride; in hwrt_init_common_fw_structure()
334 hwrt->common.tpc_size = geom_data_args->tpc_size; in hwrt_init_common_fw_structure()
336 hwrt->common.rgn_header_size = args->region_header_size; in hwrt_init_common_fw_structure()
339 PVR_BO_FW_FLAGS_DEVICE_UNCACHED, hwrtdata_common_init, hwrt, in hwrt_init_common_fw_structure()
340 &hwrt->common_fw_obj); in hwrt_init_common_fw_structure()
355 struct pvr_hwrt_dataset *hwrt, in hwrt_data_init_fw_structure() argument
365 pvr_fw_object_get_fw_addr(hwrt->common_fw_obj, in hwrt_data_init_fw_structure()
368 for (int free_list_i = 0; free_list_i < ARRAY_SIZE(hwrt->free_lists); free_list_i++) { in hwrt_data_init_fw_structure()
369 pvr_fw_object_get_fw_addr(hwrt->free_lists[free_list_i]->fw_obj, in hwrt_data_init_fw_structure()
413 pvr_free_list_add_hwrt(hwrt->free_lists[0], hwrt_data); in hwrt_data_init_fw_structure()
429 hwrt_data_fini_fw_structure(struct pvr_hwrt_dataset *hwrt, int hwrt_nr) in hwrt_data_fini_fw_structure() argument
431 struct pvr_hwrt_data *hwrt_data = &hwrt->data[hwrt_nr]; in hwrt_data_fini_fw_structure()
433 pvr_free_list_remove_hwrt(hwrt->free_lists[0], hwrt_data); in hwrt_data_fini_fw_structure()
435 if (hwrt->max_rts > 1) { in hwrt_data_fini_fw_structure()
456 struct pvr_hwrt_dataset *hwrt; in pvr_hwrt_dataset_create() local
460 hwrt = kzalloc(sizeof(*hwrt), GFP_KERNEL); in pvr_hwrt_dataset_create()
462 if (!hwrt) in pvr_hwrt_dataset_create()
465 err = hwrt_init_kernel_structure(pvr_file, args, hwrt); in pvr_hwrt_dataset_create()
469 err = hwrt_init_common_fw_structure(pvr_file, args, hwrt); in pvr_hwrt_dataset_create()
473 for (; i < ARRAY_SIZE(hwrt->data); i++) { in pvr_hwrt_dataset_create()
474 err = hwrt_data_init_fw_structure(pvr_file, hwrt, args, in pvr_hwrt_dataset_create()
476 &hwrt->data[i]); in pvr_hwrt_dataset_create()
480 hwrt->data[i].hwrt_dataset = hwrt; in pvr_hwrt_dataset_create()
483 kref_init(&hwrt->ref_count); in pvr_hwrt_dataset_create()
484 return hwrt; in pvr_hwrt_dataset_create()
488 hwrt_data_fini_fw_structure(hwrt, i); in pvr_hwrt_dataset_create()
491 hwrt_fini_kernel_structure(hwrt); in pvr_hwrt_dataset_create()
494 kfree(hwrt); in pvr_hwrt_dataset_create()
502 struct pvr_hwrt_dataset *hwrt = in pvr_hwrt_dataset_release() local
505 for (int i = ARRAY_SIZE(hwrt->data) - 1; i >= 0; i--) { in pvr_hwrt_dataset_release()
506 WARN_ON(pvr_fw_structure_cleanup(hwrt->pvr_dev, ROGUE_FWIF_CLEANUP_HWRTDATA, in pvr_hwrt_dataset_release()
507 hwrt->data[i].fw_obj, 0)); in pvr_hwrt_dataset_release()
508 hwrt_data_fini_fw_structure(hwrt, i); in pvr_hwrt_dataset_release()
511 hwrt_fini_common_fw_structure(hwrt); in pvr_hwrt_dataset_release()
512 hwrt_fini_kernel_structure(hwrt); in pvr_hwrt_dataset_release()
514 kfree(hwrt); in pvr_hwrt_dataset_release()
528 struct pvr_hwrt_dataset *hwrt; in pvr_destroy_hwrt_datasets_for_file() local
531 xa_for_each(&pvr_file->hwrt_handles, handle, hwrt) { in pvr_destroy_hwrt_datasets_for_file()
532 (void)hwrt; in pvr_destroy_hwrt_datasets_for_file()
542 pvr_hwrt_dataset_put(struct pvr_hwrt_dataset *hwrt) in pvr_hwrt_dataset_put() argument
544 if (hwrt) in pvr_hwrt_dataset_put()
545 kref_put(&hwrt->ref_count, pvr_hwrt_dataset_release); in pvr_hwrt_dataset_put()