Lines Matching +full:bcm2835 +full:- +full:hdmi
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
12 * configurable display output pipeline that supports HDMI, DSI, DPI,
16 * compute shader-style jobs using the same shader processor as is
27 #include <linux/dma-mapping.h>
41 #include <soc/bcm2835/raspberrypi-firmware.h>
69 int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8); in vc4_dumb_fixup_args()
71 if (args->pitch < min_pitch) in vc4_dumb_fixup_args()
72 args->pitch = min_pitch; in vc4_dumb_fixup_args()
74 if (args->size < args->pitch * args->height) in vc4_dumb_fixup_args()
75 args->size = args->pitch * args->height; in vc4_dumb_fixup_args()
100 if (args->pad != 0) in vc4_get_param_ioctl()
101 return -EINVAL; in vc4_get_param_ioctl()
103 if (WARN_ON_ONCE(vc4->gen > VC4_GEN_4)) in vc4_get_param_ioctl()
104 return -ENODEV; in vc4_get_param_ioctl()
106 if (!vc4->v3d) in vc4_get_param_ioctl()
107 return -ENODEV; in vc4_get_param_ioctl()
109 switch (args->param) { in vc4_get_param_ioctl()
114 args->value = V3D_READ(V3D_IDENT0); in vc4_get_param_ioctl()
121 args->value = V3D_READ(V3D_IDENT1); in vc4_get_param_ioctl()
128 args->value = V3D_READ(V3D_IDENT2); in vc4_get_param_ioctl()
137 args->value = true; in vc4_get_param_ioctl()
140 DRM_DEBUG("Unknown parameter %d\n", args->param); in vc4_get_param_ioctl()
141 return -EINVAL; in vc4_get_param_ioctl()
152 if (WARN_ON_ONCE(vc4->gen > VC4_GEN_4)) in vc4_open()
153 return -ENODEV; in vc4_open()
157 return -ENOMEM; in vc4_open()
158 vc4file->dev = vc4; in vc4_open()
161 file->driver_priv = vc4file; in vc4_open()
168 struct vc4_file *vc4file = file->driver_priv; in vc4_close()
170 if (WARN_ON_ONCE(vc4->gen > VC4_GEN_4)) in vc4_close()
173 if (vc4file->bin_bo_used) in vc4_close()
261 struct device_driver *drv = &drivers[i]->driver; in vc4_match_add_drivers()
277 component_unbind_all(vc4->dev, &vc4->base); in vc4_component_unbind_all()
281 { .compatible = "brcm,bcm2711-hvs" },
282 { .compatible = "brcm,bcm2835-hvs" },
283 { .compatible = "brcm,bcm2835-v3d" },
284 { .compatible = "brcm,cygnus-v3d" },
285 { .compatible = "brcm,vc4-v3d" },
301 dev->coherent_dma_mask = DMA_BIT_MASK(32); in vc4_drm_bind()
303 if (of_device_is_compatible(dev->of_node, "brcm,bcm2711-vc5")) in vc4_drm_bind()
326 vc4->gen = gen; in vc4_drm_bind()
327 vc4->dev = dev; in vc4_drm_bind()
329 drm = &vc4->base; in vc4_drm_bind()
333 ret = drmm_mutex_init(drm, &vc4->bin_bo_lock); in vc4_drm_bind()
352 node = of_find_compatible_node(NULL, NULL, "raspberrypi,bcm2835-firmware"); in vc4_drm_bind()
358 ret = -EPROBE_DEFER; in vc4_drm_bind()
363 ret = aperture_remove_all_conflicting_devices(driver->name); in vc4_drm_bind()
426 * - The TXP driver needs to be bound before the PixelValves (CRTC)
428 * - The HDMI driver needs to be bound after the HVS so that we can
446 struct device *dev = &pdev->dev; in vc4_platform_drm_probe()
456 component_master_del(&pdev->dev, &vc4_drm_ops); in vc4_platform_drm_remove()
465 { .compatible = "brcm,bcm2711-vc5", },
466 { .compatible = "brcm,bcm2835-vc4", },
467 { .compatible = "brcm,cygnus-vc4", },
477 .name = "vc4-drm",
487 return -ENODEV; in vc4_drm_register()
512 MODULE_ALIAS("platform:vc4-drm");
513 MODULE_SOFTDEP("pre: snd-soc-hdmi-codec");