Lines Matching +full:bcm2835 +full:- +full:txp
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2014-2015 Broadcom
11 * OpenGL ES 2.0-compatible 3D engine called V3D, and a highly
16 * compute shader-style jobs using the same shader processor as is
26 #include <linux/dma-mapping.h>
39 #include <soc/bcm2835/raspberrypi-firmware.h>
67 int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8); in vc4_dumb_fixup_args()
69 if (args->pitch < min_pitch) in vc4_dumb_fixup_args()
70 args->pitch = min_pitch; in vc4_dumb_fixup_args()
72 if (args->size < args->pitch * args->height) in vc4_dumb_fixup_args()
73 args->size = args->pitch * args->height; in vc4_dumb_fixup_args()
98 if (args->pad != 0) in vc4_get_param_ioctl()
99 return -EINVAL; in vc4_get_param_ioctl()
101 if (WARN_ON_ONCE(vc4->is_vc5)) in vc4_get_param_ioctl()
102 return -ENODEV; in vc4_get_param_ioctl()
104 if (!vc4->v3d) in vc4_get_param_ioctl()
105 return -ENODEV; in vc4_get_param_ioctl()
107 switch (args->param) { in vc4_get_param_ioctl()
112 args->value = V3D_READ(V3D_IDENT0); in vc4_get_param_ioctl()
119 args->value = V3D_READ(V3D_IDENT1); in vc4_get_param_ioctl()
126 args->value = V3D_READ(V3D_IDENT2); in vc4_get_param_ioctl()
135 args->value = true; in vc4_get_param_ioctl()
138 DRM_DEBUG("Unknown parameter %d\n", args->param); in vc4_get_param_ioctl()
139 return -EINVAL; in vc4_get_param_ioctl()
150 if (WARN_ON_ONCE(vc4->is_vc5)) in vc4_open()
151 return -ENODEV; in vc4_open()
155 return -ENOMEM; in vc4_open()
156 vc4file->dev = vc4; in vc4_open()
159 file->driver_priv = vc4file; in vc4_open()
166 struct vc4_file *vc4file = file->driver_priv; in vc4_close()
168 if (WARN_ON_ONCE(vc4->is_vc5)) in vc4_close()
171 if (vc4file->bin_bo_used) in vc4_close()
257 struct device_driver *drv = &drivers[i]->driver; in vc4_match_add_drivers()
273 component_unbind_all(vc4->dev, &vc4->base); in vc4_component_unbind_all()
277 { .compatible = "brcm,bcm2711-hvs" },
278 { .compatible = "brcm,bcm2835-hvs" },
279 { .compatible = "brcm,bcm2835-v3d" },
280 { .compatible = "brcm,cygnus-v3d" },
281 { .compatible = "brcm,vc4-v3d" },
297 dev->coherent_dma_mask = DMA_BIT_MASK(32); in vc4_drm_bind()
299 is_vc5 = of_device_is_compatible(dev->of_node, "brcm,bcm2711-vc5"); in vc4_drm_bind()
318 vc4->is_vc5 = is_vc5; in vc4_drm_bind()
319 vc4->dev = dev; in vc4_drm_bind()
321 drm = &vc4->base; in vc4_drm_bind()
325 ret = drmm_mutex_init(drm, &vc4->bin_bo_lock); in vc4_drm_bind()
344 node = of_find_compatible_node(NULL, NULL, "raspberrypi,bcm2835-firmware"); in vc4_drm_bind()
350 ret = -EPROBE_DEFER; in vc4_drm_bind()
418 * - The TXP driver needs to be bound before the PixelValves (CRTC)
420 * - The HDMI driver needs to be bound after the HVS so that we can
438 struct device *dev = &pdev->dev; in vc4_platform_drm_probe()
448 component_master_del(&pdev->dev, &vc4_drm_ops); in vc4_platform_drm_remove()
457 { .compatible = "brcm,bcm2711-vc5", },
458 { .compatible = "brcm,bcm2835-vc4", },
459 { .compatible = "brcm,cygnus-vc4", },
469 .name = "vc4-drm",
479 return -ENODEV; in vc4_drm_register()
504 MODULE_ALIAS("platform:vc4-drm");
505 MODULE_SOFTDEP("pre: snd-soc-hdmi-codec");