imgu 96 drivers/staging/media/ipu3/ipu3-css-fw.c struct imgu_device *imgu = dev_get_drvdata(css->dev); imgu 102 drivers/staging/media/ipu3/ipu3-css-fw.c imgu_dmamap_free(imgu, &css->binary[i]); imgu 115 drivers/staging/media/ipu3/ipu3-css-fw.c struct imgu_device *imgu = dev_get_drvdata(css->dev); imgu 247 drivers/staging/media/ipu3/ipu3-css-fw.c if (!imgu_dmamap_alloc(imgu, &css->binary[i], size)) { imgu 10 drivers/staging/media/ipu3/ipu3-css-pool.c int imgu_css_dma_buffer_resize(struct imgu_device *imgu, imgu 14 drivers/staging/media/ipu3/ipu3-css-pool.c dev_warn(&imgu->pci_dev->dev, "dma buf resized from %zu to %zu", imgu 17 drivers/staging/media/ipu3/ipu3-css-pool.c imgu_dmamap_free(imgu, map); imgu 18 drivers/staging/media/ipu3/ipu3-css-pool.c if (!imgu_dmamap_alloc(imgu, map, size)) imgu 25 drivers/staging/media/ipu3/ipu3-css-pool.c void imgu_css_pool_cleanup(struct imgu_device *imgu, struct imgu_css_pool *pool) imgu 30 drivers/staging/media/ipu3/ipu3-css-pool.c imgu_dmamap_free(imgu, &pool->entry[i].param); imgu 33 drivers/staging/media/ipu3/ipu3-css-pool.c int imgu_css_pool_init(struct imgu_device *imgu, struct imgu_css_pool *pool, imgu 45 drivers/staging/media/ipu3/ipu3-css-pool.c if (!imgu_dmamap_alloc(imgu, &pool->entry[i].param, size)) imgu 54 drivers/staging/media/ipu3/ipu3-css-pool.c imgu_css_pool_cleanup(imgu, pool); imgu 44 drivers/staging/media/ipu3/ipu3-css-pool.h int imgu_css_dma_buffer_resize(struct imgu_device *imgu, imgu 46 drivers/staging/media/ipu3/ipu3-css-pool.h void imgu_css_pool_cleanup(struct imgu_device *imgu, imgu 48 drivers/staging/media/ipu3/ipu3-css-pool.h int imgu_css_pool_init(struct imgu_device *imgu, struct imgu_css_pool *pool, imgu 664 drivers/staging/media/ipu3/ipu3-css.c struct imgu_device *imgu = dev_get_drvdata(css->dev); imgu 667 drivers/staging/media/ipu3/ipu3-css.c imgu_css_pool_cleanup(imgu, imgu 669 drivers/staging/media/ipu3/ipu3-css.c imgu_css_pool_cleanup(imgu, &css->pipes[pipe].pool.acc); imgu 670 drivers/staging/media/ipu3/ipu3-css.c imgu_css_pool_cleanup(imgu, &css->pipes[pipe].pool.gdc); imgu 671 drivers/staging/media/ipu3/ipu3-css.c imgu_css_pool_cleanup(imgu, &css->pipes[pipe].pool.obgrid); imgu 674 drivers/staging/media/ipu3/ipu3-css.c imgu_css_pool_cleanup(imgu, imgu 722 drivers/staging/media/ipu3/ipu3-css.c struct imgu_device *imgu = dev_get_drvdata(css->dev); imgu 1071 drivers/staging/media/ipu3/ipu3-css.c if (imgu_css_pool_init(imgu, &css_pipe->pool.parameter_set_info, imgu 1073 drivers/staging/media/ipu3/ipu3-css.c imgu_css_pool_init(imgu, &css_pipe->pool.acc, imgu 1075 drivers/staging/media/ipu3/ipu3-css.c imgu_css_pool_init(imgu, &css_pipe->pool.gdc, imgu 1079 drivers/staging/media/ipu3/ipu3-css.c imgu_css_pool_init(imgu, &css_pipe->pool.obgrid, imgu 1085 drivers/staging/media/ipu3/ipu3-css.c if (imgu_css_pool_init(imgu, imgu 1203 drivers/staging/media/ipu3/ipu3-css.c struct imgu_device *imgu = dev_get_drvdata(css->dev); imgu 1210 drivers/staging/media/ipu3/ipu3-css.c imgu_dmamap_free(imgu, imgu 1215 drivers/staging/media/ipu3/ipu3-css.c imgu_dmamap_free(imgu, imgu 1220 drivers/staging/media/ipu3/ipu3-css.c imgu_dmamap_free(imgu, imgu 1226 drivers/staging/media/ipu3/ipu3-css.c struct imgu_device *imgu = dev_get_drvdata(css->dev); imgu 1234 drivers/staging/media/ipu3/ipu3-css.c if (!imgu_dmamap_alloc(imgu, imgu 1240 drivers/staging/media/ipu3/ipu3-css.c if (!imgu_dmamap_alloc(imgu, imgu 1246 drivers/staging/media/ipu3/ipu3-css.c if (!imgu_dmamap_alloc(imgu, imgu 1263 drivers/staging/media/ipu3/ipu3-css.c struct imgu_device *imgu = dev_get_drvdata(css->dev); imgu 1273 drivers/staging/media/ipu3/ipu3-css.c imgu, imgu 1296 drivers/staging/media/ipu3/ipu3-css.c imgu, imgu 1317 drivers/staging/media/ipu3/ipu3-css.c imgu, imgu 1468 drivers/staging/media/ipu3/ipu3-css.c struct imgu_device *imgu = dev_get_drvdata(css->dev); imgu 1475 drivers/staging/media/ipu3/ipu3-css.c if (!imgu_dmamap_alloc(imgu, imgu 1480 drivers/staging/media/ipu3/ipu3-css.c if (!imgu_dmamap_alloc(imgu, imgu 1487 drivers/staging/media/ipu3/ipu3-css.c if (!imgu_dmamap_alloc(imgu, &css_pipe->sp_ddr_ptrs, imgu 1496 drivers/staging/media/ipu3/ipu3-css.c if (!imgu_dmamap_alloc(imgu, imgu 1512 drivers/staging/media/ipu3/ipu3-css.c struct imgu_device *imgu = dev_get_drvdata(css->dev); imgu 1521 drivers/staging/media/ipu3/ipu3-css.c imgu_dmamap_free(imgu, &css_pipe->abi_buffers[q][i]); imgu 1526 drivers/staging/media/ipu3/ipu3-css.c imgu_dmamap_free(imgu, imgu 1528 drivers/staging/media/ipu3/ipu3-css.c imgu_dmamap_free(imgu, imgu 1532 drivers/staging/media/ipu3/ipu3-css.c imgu_dmamap_free(imgu, &css_pipe->sp_ddr_ptrs); imgu 1537 drivers/staging/media/ipu3/ipu3-css.c struct imgu_device *imgu = dev_get_drvdata(css->dev); imgu 1543 drivers/staging/media/ipu3/ipu3-css.c imgu_dmamap_free(imgu, &css->xmem_sp_group_ptrs); imgu 1550 drivers/staging/media/ipu3/ipu3-css.c struct imgu_device *imgu = dev_get_drvdata(dev); imgu 1576 drivers/staging/media/ipu3/ipu3-css.c if (!imgu_dmamap_alloc(imgu, &css->xmem_sp_group_ptrs, imgu 93 drivers/staging/media/ipu3/ipu3-dmamap.c void *imgu_dmamap_alloc(struct imgu_device *imgu, struct imgu_css_map *map, imgu 96 drivers/staging/media/ipu3/ipu3-dmamap.c unsigned long shift = iova_shift(&imgu->iova_domain); imgu 97 drivers/staging/media/ipu3/ipu3-dmamap.c struct device *dev = &imgu->pci_dev->dev; imgu 106 drivers/staging/media/ipu3/ipu3-dmamap.c iova = alloc_iova(&imgu->iova_domain, size >> shift, imgu 107 drivers/staging/media/ipu3/ipu3-dmamap.c imgu->mmu->aperture_end >> shift, 0); imgu 116 drivers/staging/media/ipu3/ipu3-dmamap.c iovaddr = iova_dma_addr(&imgu->iova_domain, iova); imgu 118 drivers/staging/media/ipu3/ipu3-dmamap.c rval = imgu_mmu_map(imgu->mmu, iovaddr, imgu 137 drivers/staging/media/ipu3/ipu3-dmamap.c map->daddr = iova_dma_addr(&imgu->iova_domain, iova); imgu 150 drivers/staging/media/ipu3/ipu3-dmamap.c imgu_mmu_unmap(imgu->mmu, iova_dma_addr(&imgu->iova_domain, iova), imgu 155 drivers/staging/media/ipu3/ipu3-dmamap.c __free_iova(&imgu->iova_domain, iova); imgu 160 drivers/staging/media/ipu3/ipu3-dmamap.c void imgu_dmamap_unmap(struct imgu_device *imgu, struct imgu_css_map *map) imgu 164 drivers/staging/media/ipu3/ipu3-dmamap.c iova = find_iova(&imgu->iova_domain, imgu 165 drivers/staging/media/ipu3/ipu3-dmamap.c iova_pfn(&imgu->iova_domain, map->daddr)); imgu 169 drivers/staging/media/ipu3/ipu3-dmamap.c imgu_mmu_unmap(imgu->mmu, iova_dma_addr(&imgu->iova_domain, iova), imgu 170 drivers/staging/media/ipu3/ipu3-dmamap.c iova_size(iova) << iova_shift(&imgu->iova_domain)); imgu 172 drivers/staging/media/ipu3/ipu3-dmamap.c __free_iova(&imgu->iova_domain, iova); imgu 178 drivers/staging/media/ipu3/ipu3-dmamap.c void imgu_dmamap_free(struct imgu_device *imgu, struct imgu_css_map *map) imgu 182 drivers/staging/media/ipu3/ipu3-dmamap.c dev_dbg(&imgu->pci_dev->dev, "%s: freeing %zu @ IOVA %pad @ VA %p\n", imgu 188 drivers/staging/media/ipu3/ipu3-dmamap.c imgu_dmamap_unmap(imgu, map); imgu 198 drivers/staging/media/ipu3/ipu3-dmamap.c int imgu_dmamap_map_sg(struct imgu_device *imgu, struct scatterlist *sglist, imgu 201 drivers/staging/media/ipu3/ipu3-dmamap.c unsigned long shift = iova_shift(&imgu->iova_domain); imgu 217 drivers/staging/media/ipu3/ipu3-dmamap.c size = iova_align(&imgu->iova_domain, size); imgu 218 drivers/staging/media/ipu3/ipu3-dmamap.c dev_dbg(&imgu->pci_dev->dev, "dmamap: mapping sg %d entries, %zu pages\n", imgu 221 drivers/staging/media/ipu3/ipu3-dmamap.c iova = alloc_iova(&imgu->iova_domain, size >> shift, imgu 222 drivers/staging/media/ipu3/ipu3-dmamap.c imgu->mmu->aperture_end >> shift, 0); imgu 226 drivers/staging/media/ipu3/ipu3-dmamap.c dev_dbg(&imgu->pci_dev->dev, "dmamap: iova low pfn %lu, high pfn %lu\n", imgu 229 drivers/staging/media/ipu3/ipu3-dmamap.c if (imgu_mmu_map_sg(imgu->mmu, iova_dma_addr(&imgu->iova_domain, iova), imgu 234 drivers/staging/media/ipu3/ipu3-dmamap.c map->daddr = iova_dma_addr(&imgu->iova_domain, iova); imgu 240 drivers/staging/media/ipu3/ipu3-dmamap.c __free_iova(&imgu->iova_domain, iova); imgu 245 drivers/staging/media/ipu3/ipu3-dmamap.c int imgu_dmamap_init(struct imgu_device *imgu) imgu 254 drivers/staging/media/ipu3/ipu3-dmamap.c base_pfn = max_t(unsigned long, 1, imgu->mmu->aperture_start >> order); imgu 255 drivers/staging/media/ipu3/ipu3-dmamap.c init_iova_domain(&imgu->iova_domain, 1UL << order, base_pfn); imgu 260 drivers/staging/media/ipu3/ipu3-dmamap.c void imgu_dmamap_exit(struct imgu_device *imgu) imgu 262 drivers/staging/media/ipu3/ipu3-dmamap.c put_iova_domain(&imgu->iova_domain); imgu 11 drivers/staging/media/ipu3/ipu3-dmamap.h void *imgu_dmamap_alloc(struct imgu_device *imgu, struct imgu_css_map *map, imgu 13 drivers/staging/media/ipu3/ipu3-dmamap.h void imgu_dmamap_free(struct imgu_device *imgu, struct imgu_css_map *map); imgu 15 drivers/staging/media/ipu3/ipu3-dmamap.h int imgu_dmamap_map_sg(struct imgu_device *imgu, struct scatterlist *sglist, imgu 17 drivers/staging/media/ipu3/ipu3-dmamap.h void imgu_dmamap_unmap(struct imgu_device *imgu, struct imgu_css_map *map); imgu 19 drivers/staging/media/ipu3/ipu3-dmamap.h int imgu_dmamap_init(struct imgu_device *imgu); imgu 20 drivers/staging/media/ipu3/ipu3-dmamap.h void imgu_dmamap_exit(struct imgu_device *imgu); imgu 23 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = v4l2_get_subdevdata(sd); imgu 24 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[imgu_sd->pipe]; imgu 58 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = v4l2_get_subdevdata(sd); imgu 63 drivers/staging/media/ipu3/ipu3-v4l2.c struct device *dev = &imgu->pci_dev->dev; imgu 66 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_css_pipe *css_pipe = &imgu->css.pipes[pipe]; imgu 67 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 86 drivers/staging/media/ipu3/ipu3-v4l2.c node = imgu_map_node(imgu, i); imgu 110 drivers/staging/media/ipu3/ipu3-v4l2.c r = imgu_css_fmt_set(&imgu->css, fmts, rects, pipe); imgu 126 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = v4l2_get_subdevdata(sd); imgu 135 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 151 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = v4l2_get_subdevdata(sd); imgu 160 drivers/staging/media/ipu3/ipu3-v4l2.c dev_dbg(&imgu->pci_dev->dev, "set subdev %u pad %u fmt to [%ux%u]", imgu 163 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 229 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = v4l2_get_subdevdata(sd); imgu 235 drivers/staging/media/ipu3/ipu3-v4l2.c dev_dbg(&imgu->pci_dev->dev, imgu 273 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = v4l2_get_subdevdata(sd); imgu 282 drivers/staging/media/ipu3/ipu3-v4l2.c dev_dbg(&imgu->pci_dev->dev, "pipe %u pad %u is %s", pipe, pad, imgu 285 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 293 drivers/staging/media/ipu3/ipu3-v4l2.c __set_bit(pipe, imgu->css.enabled_pipes); imgu 295 drivers/staging/media/ipu3/ipu3-v4l2.c __clear_bit(pipe, imgu->css.enabled_pipes); imgu 297 drivers/staging/media/ipu3/ipu3-v4l2.c dev_dbg(&imgu->pci_dev->dev, "pipe %u is %s", pipe, imgu 308 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = vb2_get_drv_priv(vb->vb2_queue); imgu 318 drivers/staging/media/ipu3/ipu3-v4l2.c return imgu_dmamap_map_sg(imgu, sg->sgl, sg->nents, &buf->map); imgu 324 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = vb2_get_drv_priv(vb->vb2_queue); imgu 334 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_dmamap_unmap(imgu, &buf->map); imgu 340 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = vb2_get_drv_priv(vb->vb2_queue); imgu 356 drivers/staging/media/ipu3/ipu3-v4l2.c dev_err(&imgu->pci_dev->dev, "invalid data size for params."); imgu 361 drivers/staging/media/ipu3/ipu3-v4l2.c mutex_lock(&imgu->lock); imgu 366 drivers/staging/media/ipu3/ipu3-v4l2.c mutex_unlock(&imgu->lock); imgu 370 drivers/staging/media/ipu3/ipu3-v4l2.c if (imgu->streaming) imgu 371 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_queue_buffers(imgu, false, node->pipe); imgu 373 drivers/staging/media/ipu3/ipu3-v4l2.c dev_dbg(&imgu->pci_dev->dev, "%s for pipe %u node %u", __func__, imgu 383 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = vb2_get_drv_priv(vq); imgu 390 drivers/staging/media/ipu3/ipu3-v4l2.c alloc_devs[0] = &imgu->pci_dev->dev; imgu 414 drivers/staging/media/ipu3/ipu3-v4l2.c static bool imgu_all_nodes_streaming(struct imgu_device *imgu, imgu 419 drivers/staging/media/ipu3/ipu3-v4l2.c struct device *dev = &imgu->pci_dev->dev; imgu 422 drivers/staging/media/ipu3/ipu3-v4l2.c if (!test_bit(pipe, imgu->css.enabled_pipes)) { imgu 423 drivers/staging/media/ipu3/ipu3-v4l2.c dev_warn(&imgu->pci_dev->dev, imgu 428 drivers/staging/media/ipu3/ipu3-v4l2.c for_each_set_bit(p, imgu->css.enabled_pipes, IMGU_MAX_PIPE_NUM) { imgu 430 drivers/staging/media/ipu3/ipu3-v4l2.c node = &imgu->imgu_pipe[p].nodes[i]; imgu 443 drivers/staging/media/ipu3/ipu3-v4l2.c static void imgu_return_all_buffers(struct imgu_device *imgu, imgu 450 drivers/staging/media/ipu3/ipu3-v4l2.c mutex_lock(&imgu->lock); imgu 455 drivers/staging/media/ipu3/ipu3-v4l2.c mutex_unlock(&imgu->lock); imgu 461 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = vb2_get_drv_priv(vq); imgu 462 drivers/staging/media/ipu3/ipu3-v4l2.c struct device *dev = &imgu->pci_dev->dev; imgu 471 drivers/staging/media/ipu3/ipu3-v4l2.c if (imgu->streaming) { imgu 483 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 489 drivers/staging/media/ipu3/ipu3-v4l2.c if (!imgu_all_nodes_streaming(imgu, node)) imgu 492 drivers/staging/media/ipu3/ipu3-v4l2.c for_each_set_bit(pipe, imgu->css.enabled_pipes, IMGU_MAX_PIPE_NUM) { imgu 493 drivers/staging/media/ipu3/ipu3-v4l2.c r = v4l2_subdev_call(&imgu->imgu_pipe[pipe].imgu_sd.subdev, imgu 501 drivers/staging/media/ipu3/ipu3-v4l2.c r = imgu_s_stream(imgu, true); imgu 503 drivers/staging/media/ipu3/ipu3-v4l2.c imgu->streaming = true; imgu 510 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_return_all_buffers(imgu, node, VB2_BUF_STATE_QUEUED); imgu 518 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = vb2_get_drv_priv(vq); imgu 519 drivers/staging/media/ipu3/ipu3-v4l2.c struct device *dev = &imgu->pci_dev->dev; imgu 529 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 532 drivers/staging/media/ipu3/ipu3-v4l2.c dev_err(&imgu->pci_dev->dev, imgu 536 drivers/staging/media/ipu3/ipu3-v4l2.c if (imgu->streaming && imgu_all_nodes_streaming(imgu, node)) { imgu 539 drivers/staging/media/ipu3/ipu3-v4l2.c r = imgu_s_stream(imgu, false); imgu 541 drivers/staging/media/ipu3/ipu3-v4l2.c imgu->streaming = false; imgu 544 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_return_all_buffers(imgu, node, VB2_BUF_STATE_ERROR); imgu 649 drivers/staging/media/ipu3/ipu3-v4l2.c static int imgu_fmt(struct imgu_device *imgu, unsigned int pipe, int node, imgu 652 drivers/staging/media/ipu3/ipu3-v4l2.c struct device *dev = &imgu->pci_dev->dev; imgu 658 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_css_pipe *css_pipe = &imgu->css.pipes[pipe]; imgu 659 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 679 drivers/staging/media/ipu3/ipu3-v4l2.c unsigned int inode = imgu_map_node(imgu, i); imgu 729 drivers/staging/media/ipu3/ipu3-v4l2.c ret = imgu_css_fmt_try(&imgu->css, fmts, rects, pipe); imgu 731 drivers/staging/media/ipu3/ipu3-v4l2.c ret = imgu_css_fmt_set(&imgu->css, fmts, rects, pipe); imgu 774 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = video_drvdata(file); imgu 775 drivers/staging/media/ipu3/ipu3-v4l2.c struct device *dev = &imgu->pci_dev->dev; imgu 787 drivers/staging/media/ipu3/ipu3-v4l2.c return imgu_fmt(imgu, node->pipe, node->id, f, true); imgu 792 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = video_drvdata(file); imgu 793 drivers/staging/media/ipu3/ipu3-v4l2.c struct device *dev = &imgu->pci_dev->dev; imgu 805 drivers/staging/media/ipu3/ipu3-v4l2.c return imgu_fmt(imgu, node->pipe, node->id, f, false); imgu 1018 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_device *imgu = v4l2_get_subdevdata(&imgu_sd->subdev); imgu 1019 drivers/staging/media/ipu3/ipu3-v4l2.c struct device *dev = &imgu->pci_dev->dev; imgu 1092 drivers/staging/media/ipu3/ipu3-v4l2.c static int imgu_v4l2_subdev_register(struct imgu_device *imgu, imgu 1098 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 1104 drivers/staging/media/ipu3/ipu3-v4l2.c dev_err(&imgu->pci_dev->dev, imgu 1122 drivers/staging/media/ipu3/ipu3-v4l2.c v4l2_set_subdevdata(&imgu_sd->subdev, imgu); imgu 1129 drivers/staging/media/ipu3/ipu3-v4l2.c dev_err(&imgu->pci_dev->dev, imgu 1133 drivers/staging/media/ipu3/ipu3-v4l2.c r = v4l2_device_register_subdev(&imgu->v4l2_dev, &imgu_sd->subdev); imgu 1135 drivers/staging/media/ipu3/ipu3-v4l2.c dev_err(&imgu->pci_dev->dev, imgu 1150 drivers/staging/media/ipu3/ipu3-v4l2.c static int imgu_v4l2_node_setup(struct imgu_device *imgu, unsigned int pipe, imgu 1157 drivers/staging/media/ipu3/ipu3-v4l2.c struct device *dev = &imgu->pci_dev->dev; imgu 1158 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 1222 drivers/staging/media/ipu3/ipu3-v4l2.c if (imgu->buf_struct_size <= 0) imgu 1223 drivers/staging/media/ipu3/ipu3-v4l2.c imgu->buf_struct_size = imgu 1225 drivers/staging/media/ipu3/ipu3-v4l2.c vbq->buf_struct_size = imgu->buf_struct_size; imgu 1229 drivers/staging/media/ipu3/ipu3-v4l2.c vbq->drv_priv = imgu; imgu 1244 drivers/staging/media/ipu3/ipu3-v4l2.c vdev->v4l2_dev = &imgu->v4l2_dev; imgu 1247 drivers/staging/media/ipu3/ipu3-v4l2.c video_set_drvdata(vdev, imgu); imgu 1275 drivers/staging/media/ipu3/ipu3-v4l2.c static void imgu_v4l2_nodes_cleanup_pipe(struct imgu_device *imgu, imgu 1279 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 1288 drivers/staging/media/ipu3/ipu3-v4l2.c static int imgu_v4l2_nodes_setup_pipe(struct imgu_device *imgu, int pipe) imgu 1293 drivers/staging/media/ipu3/ipu3-v4l2.c r = imgu_v4l2_node_setup(imgu, pipe, i); imgu 1301 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_v4l2_nodes_cleanup_pipe(imgu, pipe, i); imgu 1305 drivers/staging/media/ipu3/ipu3-v4l2.c static void imgu_v4l2_subdev_cleanup(struct imgu_device *imgu, unsigned int i) imgu 1307 drivers/staging/media/ipu3/ipu3-v4l2.c struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[i]; imgu 1314 drivers/staging/media/ipu3/ipu3-v4l2.c static void imgu_v4l2_cleanup_pipes(struct imgu_device *imgu, unsigned int pipe) imgu 1319 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_v4l2_nodes_cleanup_pipe(imgu, i, IMGU_NODE_NUM); imgu 1320 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_v4l2_subdev_cleanup(imgu, i); imgu 1324 drivers/staging/media/ipu3/ipu3-v4l2.c static int imgu_v4l2_register_pipes(struct imgu_device *imgu) imgu 1330 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_pipe = &imgu->imgu_pipe[i]; imgu 1331 drivers/staging/media/ipu3/ipu3-v4l2.c r = imgu_v4l2_subdev_register(imgu, &imgu_pipe->imgu_sd, i); imgu 1333 drivers/staging/media/ipu3/ipu3-v4l2.c dev_err(&imgu->pci_dev->dev, imgu 1337 drivers/staging/media/ipu3/ipu3-v4l2.c r = imgu_v4l2_nodes_setup_pipe(imgu, i); imgu 1339 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_v4l2_subdev_cleanup(imgu, i); imgu 1347 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_v4l2_cleanup_pipes(imgu, i); imgu 1351 drivers/staging/media/ipu3/ipu3-v4l2.c int imgu_v4l2_register(struct imgu_device *imgu) imgu 1356 drivers/staging/media/ipu3/ipu3-v4l2.c imgu->streaming = false; imgu 1359 drivers/staging/media/ipu3/ipu3-v4l2.c media_device_pci_init(&imgu->media_dev, imgu->pci_dev, IMGU_NAME); imgu 1362 drivers/staging/media/ipu3/ipu3-v4l2.c imgu->v4l2_dev.mdev = &imgu->media_dev; imgu 1363 drivers/staging/media/ipu3/ipu3-v4l2.c imgu->v4l2_dev.ctrl_handler = NULL; imgu 1364 drivers/staging/media/ipu3/ipu3-v4l2.c r = v4l2_device_register(&imgu->pci_dev->dev, &imgu->v4l2_dev); imgu 1366 drivers/staging/media/ipu3/ipu3-v4l2.c dev_err(&imgu->pci_dev->dev, imgu 1371 drivers/staging/media/ipu3/ipu3-v4l2.c r = imgu_v4l2_register_pipes(imgu); imgu 1373 drivers/staging/media/ipu3/ipu3-v4l2.c dev_err(&imgu->pci_dev->dev, imgu 1378 drivers/staging/media/ipu3/ipu3-v4l2.c r = v4l2_device_register_subdev_nodes(&imgu->v4l2_dev); imgu 1380 drivers/staging/media/ipu3/ipu3-v4l2.c dev_err(&imgu->pci_dev->dev, imgu 1385 drivers/staging/media/ipu3/ipu3-v4l2.c r = media_device_register(&imgu->media_dev); imgu 1387 drivers/staging/media/ipu3/ipu3-v4l2.c dev_err(&imgu->pci_dev->dev, imgu 1395 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_v4l2_cleanup_pipes(imgu, IMGU_MAX_PIPE_NUM); imgu 1397 drivers/staging/media/ipu3/ipu3-v4l2.c v4l2_device_unregister(&imgu->v4l2_dev); imgu 1399 drivers/staging/media/ipu3/ipu3-v4l2.c media_device_cleanup(&imgu->media_dev); imgu 1404 drivers/staging/media/ipu3/ipu3-v4l2.c int imgu_v4l2_unregister(struct imgu_device *imgu) imgu 1406 drivers/staging/media/ipu3/ipu3-v4l2.c media_device_unregister(&imgu->media_dev); imgu 1407 drivers/staging/media/ipu3/ipu3-v4l2.c imgu_v4l2_cleanup_pipes(imgu, IMGU_MAX_PIPE_NUM); imgu 1408 drivers/staging/media/ipu3/ipu3-v4l2.c v4l2_device_unregister(&imgu->v4l2_dev); imgu 1409 drivers/staging/media/ipu3/ipu3-v4l2.c media_device_cleanup(&imgu->media_dev); imgu 56 drivers/staging/media/ipu3/ipu3.c unsigned int imgu_map_node(struct imgu_device *imgu, unsigned int css_queue) imgu 69 drivers/staging/media/ipu3/ipu3.c static void imgu_dummybufs_cleanup(struct imgu_device *imgu, unsigned int pipe) imgu 72 drivers/staging/media/ipu3/ipu3.c struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 75 drivers/staging/media/ipu3/ipu3.c imgu_dmamap_free(imgu, imgu 79 drivers/staging/media/ipu3/ipu3.c static int imgu_dummybufs_preallocate(struct imgu_device *imgu, imgu 84 drivers/staging/media/ipu3/ipu3.c struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 96 drivers/staging/media/ipu3/ipu3.c if (!imgu_dmamap_alloc(imgu, imgu 98 drivers/staging/media/ipu3/ipu3.c imgu_dummybufs_cleanup(imgu, pipe); imgu 106 drivers/staging/media/ipu3/ipu3.c static int imgu_dummybufs_init(struct imgu_device *imgu, unsigned int pipe) imgu 112 drivers/staging/media/ipu3/ipu3.c struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 116 drivers/staging/media/ipu3/ipu3.c node = imgu_map_node(imgu, i); imgu 136 drivers/staging/media/ipu3/ipu3.c if (imgu_css_dma_buffer_resize(imgu, imgu 139 drivers/staging/media/ipu3/ipu3.c imgu_dummybufs_cleanup(imgu, pipe); imgu 152 drivers/staging/media/ipu3/ipu3.c static struct imgu_css_buffer *imgu_dummybufs_get(struct imgu_device *imgu, imgu 156 drivers/staging/media/ipu3/ipu3.c struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 181 drivers/staging/media/ipu3/ipu3.c static bool imgu_dummybufs_check(struct imgu_device *imgu, imgu 186 drivers/staging/media/ipu3/ipu3.c struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 195 drivers/staging/media/ipu3/ipu3.c static void imgu_buffer_done(struct imgu_device *imgu, struct vb2_buffer *vb, imgu 198 drivers/staging/media/ipu3/ipu3.c mutex_lock(&imgu->lock); imgu 200 drivers/staging/media/ipu3/ipu3.c mutex_unlock(&imgu->lock); imgu 203 drivers/staging/media/ipu3/ipu3.c static struct imgu_css_buffer *imgu_queue_getbuf(struct imgu_device *imgu, imgu 208 drivers/staging/media/ipu3/ipu3.c struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 220 drivers/staging/media/ipu3/ipu3.c return imgu_dummybufs_get(imgu, imgu_node_map[node].css_queue, pipe); imgu 227 drivers/staging/media/ipu3/ipu3.c int imgu_queue_buffers(struct imgu_device *imgu, bool initial, unsigned int pipe) imgu 231 drivers/staging/media/ipu3/ipu3.c struct imgu_media_pipe *imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 233 drivers/staging/media/ipu3/ipu3.c if (!imgu_css_is_streaming(&imgu->css)) imgu 236 drivers/staging/media/ipu3/ipu3.c dev_dbg(&imgu->pci_dev->dev, "Queue buffers to pipe %d", pipe); imgu 237 drivers/staging/media/ipu3/ipu3.c mutex_lock(&imgu->lock); imgu 239 drivers/staging/media/ipu3/ipu3.c if (!imgu_css_pipe_queue_empty(&imgu->css, pipe)) { imgu 240 drivers/staging/media/ipu3/ipu3.c mutex_unlock(&imgu->lock); imgu 246 drivers/staging/media/ipu3/ipu3.c imgu_queue_getbuf(imgu, IMGU_NODE_IN, pipe); imgu 250 drivers/staging/media/ipu3/ipu3.c dev_warn(&imgu->pci_dev->dev, imgu 265 drivers/staging/media/ipu3/ipu3.c r = imgu_css_set_parameters(&imgu->css, pipe, imgu 269 drivers/staging/media/ipu3/ipu3.c dev_warn(&imgu->pci_dev->dev, imgu 275 drivers/staging/media/ipu3/ipu3.c dev_dbg(&imgu->pci_dev->dev, imgu 280 drivers/staging/media/ipu3/ipu3.c imgu_queue_getbuf(imgu, node, pipe); imgu 287 drivers/staging/media/ipu3/ipu3.c r = imgu_css_buf_queue(&imgu->css, pipe, buf); imgu 290 drivers/staging/media/ipu3/ipu3.c dummy = imgu_dummybufs_check(imgu, buf, pipe); imgu 294 drivers/staging/media/ipu3/ipu3.c dev_dbg(&imgu->pci_dev->dev, imgu 302 drivers/staging/media/ipu3/ipu3.c mutex_unlock(&imgu->lock); imgu 314 drivers/staging/media/ipu3/ipu3.c dev_err(&imgu->pci_dev->dev, imgu 328 drivers/staging/media/ipu3/ipu3.c mutex_lock(&imgu->lock); imgu 339 drivers/staging/media/ipu3/ipu3.c mutex_unlock(&imgu->lock); imgu 345 drivers/staging/media/ipu3/ipu3.c static int imgu_powerup(struct imgu_device *imgu) imgu 349 drivers/staging/media/ipu3/ipu3.c r = imgu_css_set_powerup(&imgu->pci_dev->dev, imgu->base); imgu 353 drivers/staging/media/ipu3/ipu3.c imgu_mmu_resume(imgu->mmu); imgu 357 drivers/staging/media/ipu3/ipu3.c static void imgu_powerdown(struct imgu_device *imgu) imgu 359 drivers/staging/media/ipu3/ipu3.c imgu_mmu_suspend(imgu->mmu); imgu 360 drivers/staging/media/ipu3/ipu3.c imgu_css_set_powerdown(&imgu->pci_dev->dev, imgu->base); imgu 363 drivers/staging/media/ipu3/ipu3.c int imgu_s_stream(struct imgu_device *imgu, int enable) imgu 365 drivers/staging/media/ipu3/ipu3.c struct device *dev = &imgu->pci_dev->dev; imgu 372 drivers/staging/media/ipu3/ipu3.c atomic_set(&imgu->qbuf_barrier, 1); imgu 373 drivers/staging/media/ipu3/ipu3.c imgu_css_stop_streaming(&imgu->css); imgu 374 drivers/staging/media/ipu3/ipu3.c synchronize_irq(imgu->pci_dev->irq); imgu 375 drivers/staging/media/ipu3/ipu3.c atomic_set(&imgu->qbuf_barrier, 0); imgu 376 drivers/staging/media/ipu3/ipu3.c imgu_powerdown(imgu); imgu 377 drivers/staging/media/ipu3/ipu3.c pm_runtime_put(&imgu->pci_dev->dev); imgu 390 drivers/staging/media/ipu3/ipu3.c r = imgu_powerup(imgu); imgu 398 drivers/staging/media/ipu3/ipu3.c r = imgu_css_start_streaming(&imgu->css); imgu 404 drivers/staging/media/ipu3/ipu3.c for_each_set_bit(pipe, imgu->css.enabled_pipes, IMGU_MAX_PIPE_NUM) { imgu 406 drivers/staging/media/ipu3/ipu3.c r = imgu_dummybufs_init(imgu, pipe); imgu 413 drivers/staging/media/ipu3/ipu3.c r = imgu_queue_buffers(imgu, true, pipe); imgu 422 drivers/staging/media/ipu3/ipu3.c for_each_set_bit(pipe, imgu->css.enabled_pipes, IMGU_MAX_PIPE_NUM) imgu 423 drivers/staging/media/ipu3/ipu3.c imgu_dummybufs_cleanup(imgu, pipe); imgu 425 drivers/staging/media/ipu3/ipu3.c imgu_css_stop_streaming(&imgu->css); imgu 432 drivers/staging/media/ipu3/ipu3.c static int imgu_video_nodes_init(struct imgu_device *imgu) imgu 440 drivers/staging/media/ipu3/ipu3.c imgu->buf_struct_size = sizeof(struct imgu_buffer); imgu 443 drivers/staging/media/ipu3/ipu3.c imgu_pipe = &imgu->imgu_pipe[j]; imgu 457 drivers/staging/media/ipu3/ipu3.c r = imgu_v4l2_register(imgu); imgu 463 drivers/staging/media/ipu3/ipu3.c imgu_pipe = &imgu->imgu_pipe[j]; imgu 467 drivers/staging/media/ipu3/ipu3.c imgu_css_fmt_set(&imgu->css, fmts, rects, j); imgu 470 drivers/staging/media/ipu3/ipu3.c r = imgu_dummybufs_preallocate(imgu, j); imgu 472 drivers/staging/media/ipu3/ipu3.c dev_err(&imgu->pci_dev->dev, imgu 482 drivers/staging/media/ipu3/ipu3.c imgu_dummybufs_cleanup(imgu, j); imgu 484 drivers/staging/media/ipu3/ipu3.c imgu_v4l2_unregister(imgu); imgu 489 drivers/staging/media/ipu3/ipu3.c static void imgu_video_nodes_exit(struct imgu_device *imgu) imgu 494 drivers/staging/media/ipu3/ipu3.c imgu_dummybufs_cleanup(imgu, i); imgu 496 drivers/staging/media/ipu3/ipu3.c imgu_v4l2_unregister(imgu); imgu 503 drivers/staging/media/ipu3/ipu3.c struct imgu_device *imgu = imgu_ptr; imgu 516 drivers/staging/media/ipu3/ipu3.c mutex_lock(&imgu->lock); imgu 517 drivers/staging/media/ipu3/ipu3.c b = imgu_css_buf_dequeue(&imgu->css); imgu 518 drivers/staging/media/ipu3/ipu3.c mutex_unlock(&imgu->lock); imgu 523 drivers/staging/media/ipu3/ipu3.c dev_err(&imgu->pci_dev->dev, imgu 529 drivers/staging/media/ipu3/ipu3.c node = imgu_map_node(imgu, b->queue); imgu 531 drivers/staging/media/ipu3/ipu3.c dummy = imgu_dummybufs_check(imgu, b, pipe); imgu 534 drivers/staging/media/ipu3/ipu3.c dev_dbg(&imgu->pci_dev->dev, imgu 546 drivers/staging/media/ipu3/ipu3.c imgu_pipe = &imgu->imgu_pipe[pipe]; imgu 553 drivers/staging/media/ipu3/ipu3.c dev_dbg(&imgu->pci_dev->dev, "vb2 buffer sequence %d", imgu 556 drivers/staging/media/ipu3/ipu3.c imgu_buffer_done(imgu, &buf->vid_buf.vbb.vb2_buf, imgu 561 drivers/staging/media/ipu3/ipu3.c mutex_lock(&imgu->lock); imgu 562 drivers/staging/media/ipu3/ipu3.c if (imgu_css_queue_empty(&imgu->css)) imgu 563 drivers/staging/media/ipu3/ipu3.c wake_up_all(&imgu->buf_drain_wq); imgu 564 drivers/staging/media/ipu3/ipu3.c mutex_unlock(&imgu->lock); imgu 572 drivers/staging/media/ipu3/ipu3.c if (!atomic_read(&imgu->qbuf_barrier)) imgu 573 drivers/staging/media/ipu3/ipu3.c for_each_set_bit(p, imgu->css.enabled_pipes, IMGU_MAX_PIPE_NUM) imgu 574 drivers/staging/media/ipu3/ipu3.c imgu_queue_buffers(imgu, false, p); imgu 581 drivers/staging/media/ipu3/ipu3.c struct imgu_device *imgu = imgu_ptr; imgu 584 drivers/staging/media/ipu3/ipu3.c if (imgu_css_irq_ack(&imgu->css) < 0) imgu 611 drivers/staging/media/ipu3/ipu3.c struct imgu_device *imgu; imgu 617 drivers/staging/media/ipu3/ipu3.c imgu = devm_kzalloc(&pci_dev->dev, sizeof(*imgu), GFP_KERNEL); imgu 618 drivers/staging/media/ipu3/ipu3.c if (!imgu) imgu 621 drivers/staging/media/ipu3/ipu3.c imgu->pci_dev = pci_dev; imgu 649 drivers/staging/media/ipu3/ipu3.c imgu->base = iomap[IMGU_PCI_BAR]; imgu 651 drivers/staging/media/ipu3/ipu3.c pci_set_drvdata(pci_dev, imgu); imgu 665 drivers/staging/media/ipu3/ipu3.c mutex_init(&imgu->lock); imgu 666 drivers/staging/media/ipu3/ipu3.c atomic_set(&imgu->qbuf_barrier, 0); imgu 667 drivers/staging/media/ipu3/ipu3.c init_waitqueue_head(&imgu->buf_drain_wq); imgu 669 drivers/staging/media/ipu3/ipu3.c r = imgu_css_set_powerup(&pci_dev->dev, imgu->base); imgu 676 drivers/staging/media/ipu3/ipu3.c imgu->mmu = imgu_mmu_init(&pci_dev->dev, imgu->base); imgu 677 drivers/staging/media/ipu3/ipu3.c if (IS_ERR(imgu->mmu)) { imgu 678 drivers/staging/media/ipu3/ipu3.c r = PTR_ERR(imgu->mmu); imgu 683 drivers/staging/media/ipu3/ipu3.c r = imgu_dmamap_init(imgu); imgu 691 drivers/staging/media/ipu3/ipu3.c r = imgu_css_init(&pci_dev->dev, &imgu->css, imgu->base, phys_len); imgu 698 drivers/staging/media/ipu3/ipu3.c r = imgu_video_nodes_init(imgu); imgu 707 drivers/staging/media/ipu3/ipu3.c IRQF_SHARED, IMGU_NAME, imgu); imgu 719 drivers/staging/media/ipu3/ipu3.c imgu_video_nodes_exit(imgu); imgu 721 drivers/staging/media/ipu3/ipu3.c imgu_css_cleanup(&imgu->css); imgu 723 drivers/staging/media/ipu3/ipu3.c imgu_dmamap_exit(imgu); imgu 725 drivers/staging/media/ipu3/ipu3.c imgu_mmu_exit(imgu->mmu); imgu 727 drivers/staging/media/ipu3/ipu3.c imgu_css_set_powerdown(&pci_dev->dev, imgu->base); imgu 729 drivers/staging/media/ipu3/ipu3.c mutex_destroy(&imgu->lock); imgu 736 drivers/staging/media/ipu3/ipu3.c struct imgu_device *imgu = pci_get_drvdata(pci_dev); imgu 741 drivers/staging/media/ipu3/ipu3.c imgu_video_nodes_exit(imgu); imgu 742 drivers/staging/media/ipu3/ipu3.c imgu_css_cleanup(&imgu->css); imgu 743 drivers/staging/media/ipu3/ipu3.c imgu_css_set_powerdown(&pci_dev->dev, imgu->base); imgu 744 drivers/staging/media/ipu3/ipu3.c imgu_dmamap_exit(imgu); imgu 745 drivers/staging/media/ipu3/ipu3.c imgu_mmu_exit(imgu->mmu); imgu 746 drivers/staging/media/ipu3/ipu3.c mutex_destroy(&imgu->lock); imgu 752 drivers/staging/media/ipu3/ipu3.c struct imgu_device *imgu = pci_get_drvdata(pci_dev); imgu 755 drivers/staging/media/ipu3/ipu3.c imgu->suspend_in_stream = imgu_css_is_streaming(&imgu->css); imgu 756 drivers/staging/media/ipu3/ipu3.c if (!imgu->suspend_in_stream) imgu 759 drivers/staging/media/ipu3/ipu3.c atomic_set(&imgu->qbuf_barrier, 1); imgu 766 drivers/staging/media/ipu3/ipu3.c if (!wait_event_timeout(imgu->buf_drain_wq, imgu 767 drivers/staging/media/ipu3/ipu3.c imgu_css_queue_empty(&imgu->css), msecs_to_jiffies(1000))) imgu 770 drivers/staging/media/ipu3/ipu3.c imgu_css_stop_streaming(&imgu->css); imgu 771 drivers/staging/media/ipu3/ipu3.c atomic_set(&imgu->qbuf_barrier, 0); imgu 772 drivers/staging/media/ipu3/ipu3.c imgu_powerdown(imgu); imgu 781 drivers/staging/media/ipu3/ipu3.c struct imgu_device *imgu = dev_get_drvdata(dev); imgu 787 drivers/staging/media/ipu3/ipu3.c if (!imgu->suspend_in_stream) imgu 792 drivers/staging/media/ipu3/ipu3.c r = imgu_powerup(imgu); imgu 799 drivers/staging/media/ipu3/ipu3.c r = imgu_css_start_streaming(&imgu->css); imgu 805 drivers/staging/media/ipu3/ipu3.c for_each_set_bit(pipe, imgu->css.enabled_pipes, IMGU_MAX_PIPE_NUM) { imgu 806 drivers/staging/media/ipu3/ipu3.c r = imgu_queue_buffers(imgu, true, pipe); imgu 158 drivers/staging/media/ipu3/ipu3.h unsigned int imgu_map_node(struct imgu_device *imgu, unsigned int css_queue); imgu 159 drivers/staging/media/ipu3/ipu3.h int imgu_queue_buffers(struct imgu_device *imgu, bool initial, imgu 166 drivers/staging/media/ipu3/ipu3.h int imgu_s_stream(struct imgu_device *imgu, int enable);