Lines Matching refs:v3d

49 	struct v3d_dev *v3d = to_v3d_dev(dev);  in v3d_get_param_ioctl()  local
90 args->value = v3d_has_csd(v3d); in v3d_get_param_ioctl()
96 args->value = (v3d->ver >= 40); in v3d_get_param_ioctl()
105 args->value = v3d->perfmon_info.max_counters; in v3d_get_param_ioctl()
108 args->value = !!v3d->gemfs; in v3d_get_param_ioctl()
119 struct v3d_dev *v3d = to_v3d_dev(dev); in v3d_open() local
128 v3d_priv->v3d = v3d; in v3d_open()
131 sched = &v3d->queue[i].sched; in v3d_open()
267 map_regs(struct v3d_dev *v3d, void __iomem **regs, const char *name) in map_regs() argument
269 *regs = devm_platform_ioremap_resource_byname(v3d_to_pdev(v3d), name); in map_regs()
277 struct v3d_dev *v3d; in v3d_platform_drm_probe() local
283 v3d = devm_drm_dev_alloc(dev, &v3d_drm_driver, struct v3d_dev, drm); in v3d_platform_drm_probe()
284 if (IS_ERR(v3d)) in v3d_platform_drm_probe()
285 return PTR_ERR(v3d); in v3d_platform_drm_probe()
287 drm = &v3d->drm; in v3d_platform_drm_probe()
291 ret = map_regs(v3d, &v3d->hub_regs, "hub"); in v3d_platform_drm_probe()
295 ret = map_regs(v3d, &v3d->core_regs[0], "core0"); in v3d_platform_drm_probe()
305 v3d->va_width = 30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_VA_WIDTH); in v3d_platform_drm_probe()
308 v3d->ver = (V3D_GET_FIELD(ident1, V3D_HUB_IDENT1_TVER) * 10 + in v3d_platform_drm_probe()
310 v3d->cores = V3D_GET_FIELD(ident1, V3D_HUB_IDENT1_NCORES); in v3d_platform_drm_probe()
311 WARN_ON(v3d->cores > 1); /* multicore not yet implemented */ in v3d_platform_drm_probe()
314 v3d->rev = V3D_GET_FIELD(ident3, V3D_HUB_IDENT3_IPREV); in v3d_platform_drm_probe()
316 v3d_perfmon_init(v3d); in v3d_platform_drm_probe()
318 v3d->reset = devm_reset_control_get_exclusive(dev, NULL); in v3d_platform_drm_probe()
319 if (IS_ERR(v3d->reset)) { in v3d_platform_drm_probe()
320 ret = PTR_ERR(v3d->reset); in v3d_platform_drm_probe()
325 v3d->reset = NULL; in v3d_platform_drm_probe()
326 ret = map_regs(v3d, &v3d->bridge_regs, "bridge"); in v3d_platform_drm_probe()
334 if (v3d->ver < 41) { in v3d_platform_drm_probe()
335 ret = map_regs(v3d, &v3d->gca_regs, "gca"); in v3d_platform_drm_probe()
340 v3d->mmu_scratch = dma_alloc_wc(dev, 4096, &v3d->mmu_scratch_paddr, in v3d_platform_drm_probe()
342 if (!v3d->mmu_scratch) { in v3d_platform_drm_probe()
351 ret = v3d_irq_init(v3d); in v3d_platform_drm_probe()
368 v3d_irq_disable(v3d); in v3d_platform_drm_probe()
372 dma_free_wc(dev, 4096, v3d->mmu_scratch, v3d->mmu_scratch_paddr); in v3d_platform_drm_probe()
379 struct v3d_dev *v3d = to_v3d_dev(drm); in v3d_platform_drm_remove() local
388 dma_free_wc(v3d->drm.dev, 4096, v3d->mmu_scratch, in v3d_platform_drm_remove()
389 v3d->mmu_scratch_paddr); in v3d_platform_drm_remove()