| /kernel/linux/linux-5.10/drivers/media/v4l2-core/ |
| D | videobuf-dma-sg.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * helper functions for SG DMA video4linux capture buffers 12 * Highly based on video-buf written originally by: 26 #include <linux/dma-mapping.h> 32 #include <media/videobuf-dma-sg.h> 47 MODULE_DESCRIPTION("helper module to manage video4linux dma sg buffers"); 53 printk(KERN_DEBUG "vbuf-sg: " fmt , ## arg) 55 /* --------------------------------------------------------------------- */ 58 * Return a scatterlist for some page-aligned vmalloc()'ed memory 106 /* DMA to highmem pages might not work */ in videobuf_pages_to_sg() [all …]
|
| D | videobuf-dma-contig.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 * Based on videobuf-vmalloc.c, 18 #include <linux/dma-mapping.h> 21 #include <media/videobuf-dma-contig.h> 38 struct videobuf_dma_contig_memory *mem, in __videobuf_dc_alloc() argument 41 mem->size = size; in __videobuf_dc_alloc() 42 mem->vaddr = dma_alloc_coherent(dev, mem->size, &mem->dma_handle, in __videobuf_dc_alloc() 44 if (!mem->vaddr) { in __videobuf_dc_alloc() 45 dev_err(dev, "memory alloc size %ld failed\n", mem->size); in __videobuf_dc_alloc() 46 return -ENOMEM; in __videobuf_dc_alloc() [all …]
|
| /kernel/linux/linux-6.6/drivers/media/v4l2-core/ |
| D | videobuf-dma-sg.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * helper functions for SG DMA video4linux capture buffers 12 * Highly based on video-buf written originally by: 26 #include <linux/dma-mapping.h> 32 #include <media/videobuf-dma-sg.h> 47 MODULE_DESCRIPTION("helper module to manage video4linux dma sg buffers"); 53 printk(KERN_DEBUG "vbuf-sg: " fmt , ## arg) 55 /* --------------------------------------------------------------------- */ 58 * Return a scatterlist for some page-aligned vmalloc()'ed memory 106 /* DMA to highmem pages might not work */ in videobuf_pages_to_sg() [all …]
|
| D | videobuf-dma-contig.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 * Based on videobuf-vmalloc.c, 18 #include <linux/dma-mapping.h> 21 #include <media/videobuf-dma-contig.h> 38 struct videobuf_dma_contig_memory *mem, in __videobuf_dc_alloc() argument 41 mem->size = size; in __videobuf_dc_alloc() 42 mem->vaddr = dma_alloc_coherent(dev, mem->size, &mem->dma_handle, in __videobuf_dc_alloc() 44 if (!mem->vaddr) { in __videobuf_dc_alloc() 45 dev_err(dev, "memory alloc size %ld failed\n", mem->size); in __videobuf_dc_alloc() 46 return -ENOMEM; in __videobuf_dc_alloc() [all …]
|
| /kernel/linux/linux-5.10/drivers/infiniband/sw/rxe/ |
| D | rxe_mr.c | 1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB 27 int mem_check_range(struct rxe_mem *mem, u64 iova, size_t length) in mem_check_range() argument 29 switch (mem->type) { in mem_check_range() 35 if (iova < mem->iova || in mem_check_range() 36 length > mem->length || in mem_check_range() 37 iova > mem->iova + mem->length - length) in mem_check_range() 38 return -EFAULT; in mem_check_range() 42 return -EFAULT; in mem_check_range() 50 static void rxe_mem_init(int access, struct rxe_mem *mem) in rxe_mem_init() argument 52 u32 lkey = mem->pelem.index << 8 | rxe_get_key(); in rxe_mem_init() [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
| D | mem.c | 23 #include "mem.h" 35 struct page **mem; member 38 dma_addr_t *dma; member 45 return nvkm_mem(memory)->target; in nvkm_mem_target() 57 struct nvkm_mem *mem = nvkm_mem(memory); in nvkm_mem_addr() local 58 if (mem->pages == 1 && mem->mem) in nvkm_mem_addr() 59 return mem->dma[0]; in nvkm_mem_addr() 66 return nvkm_mem(memory)->pages << PAGE_SHIFT; in nvkm_mem_size() 73 struct nvkm_mem *mem = nvkm_mem(memory); in nvkm_mem_map_dma() local 75 .memory = &mem->memory, in nvkm_mem_map_dma() [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
| D | mem.c | 23 #include "mem.h" 35 struct page **mem; member 38 dma_addr_t *dma; member 45 return nvkm_mem(memory)->target; in nvkm_mem_target() 57 struct nvkm_mem *mem = nvkm_mem(memory); in nvkm_mem_addr() local 58 if (mem->pages == 1 && mem->mem) in nvkm_mem_addr() 59 return mem->dma[0]; in nvkm_mem_addr() 66 return nvkm_mem(memory)->pages << PAGE_SHIFT; in nvkm_mem_size() 73 struct nvkm_mem *mem = nvkm_mem(memory); in nvkm_mem_map_dma() local 75 .memory = &mem->memory, in nvkm_mem_map_dma() [all …]
|
| /kernel/linux/linux-6.6/kernel/dma/ |
| D | coherent.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Coherent per-device memory handling. 10 #include <linux/dma-direct.h> 11 #include <linux/dma-map-ops.h> 25 if (dev && dev->dma_mem) in dev_get_coherent_memory() 26 return dev->dma_mem; in dev_get_coherent_memory() 31 struct dma_coherent_mem * mem) in dma_get_device_base() argument 33 if (mem->use_dev_dma_pfn_offset) in dma_get_device_base() 34 return phys_to_dma(dev, PFN_PHYS(mem->pfn_base)); in dma_get_device_base() 35 return mem->device_base; in dma_get_device_base() [all …]
|
| D | swiotlb.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Dynamic DMA mapping support. 6 * I/O TLBs (aka DMA address translation hardware). 9 * Copyright (C) 2000, 2003 Hewlett-Packard Co 10 * David Mosberger-Tang <davidm@hpl.hp.com> 12 * 03/05/07 davidm Switch from PCI-DMA to generic device DMA API. 14 * unnecessary i-cache flushing. 27 #include <linux/dma-direct.h> 28 #include <linux/dma-map-ops.h> 33 #include <linux/iommu-helper.h> [all …]
|
| /kernel/linux/linux-5.10/kernel/dma/ |
| D | coherent.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Coherent per-device memory handling. 10 #include <linux/dma-direct.h> 11 #include <linux/dma-map-ops.h> 27 if (dev && dev->dma_mem) in dev_get_coherent_memory() 28 return dev->dma_mem; in dev_get_coherent_memory() 33 struct dma_coherent_mem * mem) in dma_get_device_base() argument 35 if (mem->use_dev_dma_pfn_offset) in dma_get_device_base() 36 return phys_to_dma(dev, PFN_PHYS(mem->pfn_base)); in dma_get_device_base() 37 return mem->device_base; in dma_get_device_base() [all …]
|
| /kernel/linux/linux-5.10/drivers/net/ethernet/huawei/hinic/ |
| D | hinic_common.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 * hinic_cpu_to_be32 - convert data to big endian 32 bit format 20 u32 *mem = data; in hinic_cpu_to_be32() local 26 *mem = cpu_to_be32(*mem); in hinic_cpu_to_be32() 27 mem++; in hinic_cpu_to_be32() 32 * hinic_be32_to_cpu - convert data from big endian 32 bit format 38 u32 *mem = data; in hinic_be32_to_cpu() local 44 *mem = be32_to_cpu(*mem); in hinic_be32_to_cpu() 45 mem++; in hinic_be32_to_cpu() 50 * hinic_set_sge - set dma area in scatter gather entry [all …]
|
| /kernel/linux/linux-6.6/drivers/net/ethernet/huawei/hinic/ |
| D | hinic_common.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 * hinic_cpu_to_be32 - convert data to big endian 32 bit format 20 u32 *mem = data; in hinic_cpu_to_be32() local 26 *mem = cpu_to_be32(*mem); in hinic_cpu_to_be32() 27 mem++; in hinic_cpu_to_be32() 32 * hinic_be32_to_cpu - convert data from big endian 32 bit format 38 u32 *mem = data; in hinic_be32_to_cpu() local 44 *mem = be32_to_cpu(*mem); in hinic_be32_to_cpu() 45 mem++; in hinic_be32_to_cpu() 50 * hinic_set_sge - set dma area in scatter gather entry [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/dma/ |
| D | renesas,nbpfaxi.txt | 1 * Renesas "Type-AXI" NBPFAXI* DMA controllers 3 * DMA controller 7 - compatible: must be one of 17 - #dma-cells: must be 2: the first integer is a terminal number, to which this 26 - max-burst-mem-read: limit burst size for memory reads 29 - max-burst-mem-write: limit burst size for memory writes 32 If both max-burst-mem-read and max-burst-mem-write are set, DMA_MEM_TO_MEM 35 You can use dma-channels and dma-requests as described in dma.txt, although they 40 dma: dma-controller@48000000 { 51 #dma-cells = <2>; [all …]
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/dma/ |
| D | renesas,nbpfaxi.txt | 1 * Renesas "Type-AXI" NBPFAXI* DMA controllers 3 * DMA controller 7 - compatible: must be one of 17 - #dma-cells: must be 2: the first integer is a terminal number, to which this 26 - max-burst-mem-read: limit burst size for memory reads 29 - max-burst-mem-write: limit burst size for memory writes 32 If both max-burst-mem-read and max-burst-mem-write are set, DMA_MEM_TO_MEM 35 You can use dma-channels and dma-requests as described in dma.txt, although they 40 dma: dma-controller@48000000 { 51 #dma-cells = <2>; [all …]
|
| /kernel/linux/linux-5.10/drivers/net/ipa/ |
| D | ipa_table.c | 1 // SPDX-License-Identifier: GPL-2.0 3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. 4 * Copyright (C) 2018-2020 Linaro Ltd. 15 #include <linux/dma-mapping.h> 30 * The IPA has tables defined in its local (IPA-resident) memory that define 32 * endian 64-bit "slot" that holds the address of a rule definition. (The 33 * size of these slots is 64 bits regardless of the host DMA address size.) 41 * an object (such as a route or filter table) in IPA-resident memory must 42 * 128-byte aligned. An object in system memory (such as a route or filter 43 * rule) must be at an 8-byte aligned address. We currently only place [all …]
|
| /kernel/linux/linux-6.6/drivers/pnp/ |
| D | support.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * support.c - standard functions for the use of pnp protocol drivers 6 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P. 16 * pnp_is_active - Determines if a device is active based on its current 24 * only clears out auto-assigned resources. in pnp_is_active() 28 pnp_irq(dev, 0) == -1 && pnp_dma(dev, 0) == -1) in pnp_is_active() 44 * According to the specs, the first three characters are five-bit in pnp_eisa_id_to_string() 45 * compressed ASCII, and the left-over high order bit should be zero. in pnp_eisa_id_to_string() 51 str[0] = 'A' + ((id >> 26) & 0x3f) - 1; in pnp_eisa_id_to_string() 52 str[1] = 'A' + ((id >> 21) & 0x1f) - 1; in pnp_eisa_id_to_string() [all …]
|
| D | resource.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * resource.c - Contains functions for registering and analyzing resource information 7 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P. 17 #include <asm/dma.h> 27 static int pnp_reserve_irq[16] = {[0 ... 15] = -1 }; /* reserve (don't use) some IRQ */ 28 static int pnp_reserve_dma[8] = {[0 ... 7] = -1 }; /* reserve (don't use) some DMA */ 29 static int pnp_reserve_io[16] = {[0 ... 15] = -1 }; /* reserve (don't use) some I/O region */ 30 static int pnp_reserve_mem[16] = {[0 ... 15] = -1 }; /* reserve (don't use) some memory region */ 45 option->flags = option_flags; in pnp_build_option() 46 option->type = type; in pnp_build_option() [all …]
|
| /kernel/linux/linux-5.10/drivers/pnp/ |
| D | support.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * support.c - standard functions for the use of pnp protocol drivers 6 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P. 16 * pnp_is_active - Determines if a device is active based on its current 24 * only clears out auto-assigned resources. in pnp_is_active() 28 pnp_irq(dev, 0) == -1 && pnp_dma(dev, 0) == -1) in pnp_is_active() 45 * According to the specs, the first three characters are five-bit in pnp_eisa_id_to_string() 46 * compressed ASCII, and the left-over high order bit should be zero. in pnp_eisa_id_to_string() 52 str[0] = 'A' + ((id >> 26) & 0x3f) - 1; in pnp_eisa_id_to_string() 53 str[1] = 'A' + ((id >> 21) & 0x1f) - 1; in pnp_eisa_id_to_string() [all …]
|
| D | resource.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * resource.c - Contains functions for registering and analyzing resource information 7 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P. 17 #include <asm/dma.h> 26 static int pnp_reserve_irq[16] = {[0 ... 15] = -1 }; /* reserve (don't use) some IRQ */ 27 static int pnp_reserve_dma[8] = {[0 ... 7] = -1 }; /* reserve (don't use) some DMA */ 28 static int pnp_reserve_io[16] = {[0 ... 15] = -1 }; /* reserve (don't use) some I/O region */ 29 static int pnp_reserve_mem[16] = {[0 ... 15] = -1 }; /* reserve (don't use) some memory region */ 44 option->flags = option_flags; in pnp_build_option() 45 option->type = type; in pnp_build_option() [all …]
|
| D | interface.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * interface.c - contains everything related to the user interface 7 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P. 41 if (buffer->stop || buffer->error) in pnp_printf() 44 res = vsnprintf(buffer->curr, buffer->len - buffer->size, fmt, args); in pnp_printf() 46 if (buffer->size + res >= buffer->len) { in pnp_printf() 47 buffer->stop = 1; in pnp_printf() 50 buffer->curr += res; in pnp_printf() 51 buffer->size += res; in pnp_printf() 58 pnp_printf(buffer, "%sport %#llx-%#llx, align %#llx, size %#llx, " in pnp_print_port() [all …]
|
| /kernel/linux/linux-6.6/drivers/media/platform/mediatek/vcodec/decoder/vdec/ |
| D | vdec_vp8_req_if.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <media/v4l2-mem2mem.h> 9 #include <media/videobuf2-dma-contig.h> 10 #include <uapi/linux/v4l2-controls.h> 28 * struct vdec_vp8_slice_info - decode misc information 30 * @vld_wrapper_dma: vld wrapper dma address 31 * @seg_id_buf_dma: seg id dma address 32 * @wrap_y_dma: wrap y dma address 33 * @wrap_c_dma: wrap y dma address 34 * @cur_y_fb_dma: current plane Y frame buffer dma address [all …]
|
| /kernel/linux/linux-6.6/drivers/remoteproc/ |
| D | rcar_rproc.c | 1 // SPDX-License-Identifier: GPL-2.0 14 #include <linux/soc/renesas/rcar-rst.h> 23 struct rproc_mem_entry *mem) in rcar_rproc_mem_alloc() argument 25 struct device *dev = &rproc->dev; in rcar_rproc_mem_alloc() 28 dev_dbg(dev, "map memory: %pa+%zx\n", &mem->dma, mem->len); in rcar_rproc_mem_alloc() 29 va = ioremap_wc(mem->dma, mem->len); in rcar_rproc_mem_alloc() 32 &mem->dma, mem->len); in rcar_rproc_mem_alloc() 33 return -ENOMEM; in rcar_rproc_mem_alloc() 37 mem->va = va; in rcar_rproc_mem_alloc() 43 struct rproc_mem_entry *mem) in rcar_rproc_mem_release() argument [all …]
|
| /kernel/linux/linux-6.6/drivers/spi/ |
| D | spi-mem.c | 1 // SPDX-License-Identifier: GPL-2.0+ 12 #include <linux/spi/spi-mem.h> 20 * spi_controller_dma_map_mem_op_data() - DMA-map the buffer attached to a 24 * @sgt: a pointer to a non-initialized sg_table that will be filled by this 27 * Some controllers might want to do DMA on the data buffer embedded in @op. 28 * This helper prepares everything for you and provides a ready-to-use 32 * op->data.buf.{in,out} is DMA-able before calling this function. 42 if (!op->data.nbytes) in spi_controller_dma_map_mem_op_data() 43 return -EINVAL; in spi_controller_dma_map_mem_op_data() 45 if (op->data.dir == SPI_MEM_DATA_OUT && ctlr->dma_tx) in spi_controller_dma_map_mem_op_data() [all …]
|
| /kernel/linux/linux-6.6/arch/mips/include/asm/sgi/ |
| D | mc.h | 22 #define SGIMC_CCTRL0_EPERRMEM 0x00000040 /* Main mem parity error enable */ 32 #define SGIMC_CCTRL0_WRESETPMEM 0x00010000 /* Perform warm reset, preserves mem */ 33 #define SGIMC_CCTRL0_LENDIAN 0x00020000 /* Put MC in little-endian mode */ 34 #define SGIMC_CCTRL0_WRESETDMEM 0x00040000 /* Warm reset, destroys mem contents */ 35 #define SGIMC_CCTRL0_CMEMBADPAR 0x02000000 /* Generate bad perr from cpu to mem */ 36 #define SGIMC_CCTRL0_R4KNOCHKPARR 0x04000000 /* Don't chk parity on mem data reads */ 64 #define SGIMC_EEPROM_SDATAO 0x00000008 /* Serial EEPROM data-out */ 65 #define SGIMC_EEPROM_SDATAI 0x00000010 /* Serial EEPROM data-in */ 75 #define SGIMC_GIOPAR_HPC64 0x00000001 /* HPC talks to GIO using 64-bits */ 76 #define SGIMC_GIOPAR_GFX64 0x00000002 /* GFX talks to GIO using 64-bits */ [all …]
|
| /kernel/linux/linux-5.10/arch/mips/include/asm/sgi/ |
| D | mc.h | 22 #define SGIMC_CCTRL0_EPERRMEM 0x00000040 /* Main mem parity error enable */ 32 #define SGIMC_CCTRL0_WRESETPMEM 0x00010000 /* Perform warm reset, preserves mem */ 33 #define SGIMC_CCTRL0_LENDIAN 0x00020000 /* Put MC in little-endian mode */ 34 #define SGIMC_CCTRL0_WRESETDMEM 0x00040000 /* Warm reset, destroys mem contents */ 35 #define SGIMC_CCTRL0_CMEMBADPAR 0x02000000 /* Generate bad perr from cpu to mem */ 36 #define SGIMC_CCTRL0_R4KNOCHKPARR 0x04000000 /* Don't chk parity on mem data reads */ 64 #define SGIMC_EEPROM_SDATAO 0x00000008 /* Serial EEPROM data-out */ 65 #define SGIMC_EEPROM_SDATAI 0x00000010 /* Serial EEPROM data-in */ 75 #define SGIMC_GIOPAR_HPC64 0x00000001 /* HPC talks to GIO using 64-bits */ 76 #define SGIMC_GIOPAR_GFX64 0x00000002 /* GFX talks to GIO using 64-bits */ [all …]
|