Lines Matching full:v3d

5  * DOC: Broadcom V3D Graphics Driver
7 * This driver supports the Broadcom V3D 3.3 and 4.1 OpenGL ES GPUs.
8 * For V3D 2.x support, see the VC4 driver.
10 * The V3D GPU includes a tiled render (composed of a bin and render
32 #define DRIVER_NAME "v3d"
33 #define DRIVER_DESC "Broadcom V3D graphics"
42 struct v3d_dev *v3d = to_v3d_dev(dev); in v3d_get_param_ioctl() local
83 args->value = v3d_has_csd(v3d); in v3d_get_param_ioctl()
89 args->value = (v3d->ver >= 40); in v3d_get_param_ioctl()
98 args->value = v3d->perfmon_info.max_counters; in v3d_get_param_ioctl()
109 struct v3d_dev *v3d = to_v3d_dev(dev); in v3d_open() local
118 v3d_priv->v3d = v3d; in v3d_open()
121 sched = &v3d->queue[i].sched; in v3d_open()
184 drm_printf(p, "v3d-jobs-%s: \t%llu jobs\n", in v3d_show_fdinfo()
248 { .compatible = "brcm,2711-v3d" },
249 { .compatible = "brcm,2712-v3d" },
250 { .compatible = "brcm,7268-v3d" },
251 { .compatible = "brcm,7278-v3d" },
257 map_regs(struct v3d_dev *v3d, void __iomem **regs, const char *name) in map_regs() argument
259 *regs = devm_platform_ioremap_resource_byname(v3d_to_pdev(v3d), name); in map_regs()
267 struct v3d_dev *v3d; in v3d_platform_drm_probe() local
273 v3d = devm_drm_dev_alloc(dev, &v3d_drm_driver, struct v3d_dev, drm); in v3d_platform_drm_probe()
274 if (IS_ERR(v3d)) in v3d_platform_drm_probe()
275 return PTR_ERR(v3d); in v3d_platform_drm_probe()
277 drm = &v3d->drm; in v3d_platform_drm_probe()
281 ret = map_regs(v3d, &v3d->hub_regs, "hub"); in v3d_platform_drm_probe()
285 ret = map_regs(v3d, &v3d->core_regs[0], "core0"); in v3d_platform_drm_probe()
295 v3d->va_width = 30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_VA_WIDTH); in v3d_platform_drm_probe()
298 v3d->ver = (V3D_GET_FIELD(ident1, V3D_HUB_IDENT1_TVER) * 10 + in v3d_platform_drm_probe()
300 v3d->cores = V3D_GET_FIELD(ident1, V3D_HUB_IDENT1_NCORES); in v3d_platform_drm_probe()
301 WARN_ON(v3d->cores > 1); /* multicore not yet implemented */ in v3d_platform_drm_probe()
304 v3d->rev = V3D_GET_FIELD(ident3, V3D_HUB_IDENT3_IPREV); in v3d_platform_drm_probe()
306 v3d_perfmon_init(v3d); in v3d_platform_drm_probe()
308 v3d->reset = devm_reset_control_get_exclusive(dev, NULL); in v3d_platform_drm_probe()
309 if (IS_ERR(v3d->reset)) { in v3d_platform_drm_probe()
310 ret = PTR_ERR(v3d->reset); in v3d_platform_drm_probe()
315 v3d->reset = NULL; in v3d_platform_drm_probe()
316 ret = map_regs(v3d, &v3d->bridge_regs, "bridge"); in v3d_platform_drm_probe()
324 if (v3d->ver < 41) { in v3d_platform_drm_probe()
325 ret = map_regs(v3d, &v3d->gca_regs, "gca"); in v3d_platform_drm_probe()
330 v3d->mmu_scratch = dma_alloc_wc(dev, 4096, &v3d->mmu_scratch_paddr, in v3d_platform_drm_probe()
332 if (!v3d->mmu_scratch) { in v3d_platform_drm_probe()
341 ret = v3d_irq_init(v3d); in v3d_platform_drm_probe()
358 v3d_irq_disable(v3d); in v3d_platform_drm_probe()
362 dma_free_wc(dev, 4096, v3d->mmu_scratch, v3d->mmu_scratch_paddr); in v3d_platform_drm_probe()
369 struct v3d_dev *v3d = to_v3d_dev(drm); in v3d_platform_drm_remove() local
378 dma_free_wc(v3d->drm.dev, 4096, v3d->mmu_scratch, in v3d_platform_drm_remove()
379 v3d->mmu_scratch_paddr); in v3d_platform_drm_remove()
386 .name = "v3d",
393 MODULE_ALIAS("platform:v3d-drm");
394 MODULE_DESCRIPTION("Broadcom V3D DRM Driver");