summaryrefslogtreecommitdiff
path: root/LICENSES/Apache-2.0.txt
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2024-06-03 13:12:58 +0200
committerKieran Bingham <kieran.bingham@ideasonboard.com>2024-06-04 16:19:33 +0100
commitea4baaacc3250eadb929fcef59bb9ddefb012952 (patch)
tree2bb3870c0da614a0d0a5f0c6f195f1a40ee62391 /LICENSES/Apache-2.0.txt
parent447da4a11f06f0d950fe75c20c7bb9f5d5408880 (diff)
libcamera: DmaBufAllocator: Support allocating from /dev/udmabuf
The dma-buf allocator currently allocates from CMA and system heaps. Extend the dma-buf allocator to support allocating dma-buffers by creating memfd-s and turning those into dma-buffers using /dev/udmabuf. The buffers allocated through memfd/udmabuf are not suitable for zero-copy buffer sharing with other devices. Co-developed-by: Harvey Yang <chenghaoyang@chromium.org> Signed-off-by: Harvey Yang <chenghaoyang@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # Lenovo-x13s Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'LICENSES/Apache-2.0.txt')
0 files changed, 0 insertions, 0 deletions
antage of free swizzle on load #define kE (kA.xywz) #define kF (kB.xywz) value += temp; // There are five filter patterns (identity, cross, checker, // theta, phi). Precompute the terms from all of them and then // use swizzles to assign to color channels. // // Channel Matches // x cross (e.g., EE G) // y checker (e.g., EE B) // z theta (e.g., EO R) // w phi (e.g., EO R) #define A (value[0]) #define B (value[1]) #define D (Dvec.x) #define E (value[2]) #define F (value[3]) // Avoid zero elements. On a scalar processor this saves two MADDs // and it has no effect on a vector processor. PATTERN.yzw += (kD.yz * D).xyy; PATTERN += (kA.xyz * A).xyzx + (kE.xyw * E).xyxz; PATTERN.xw += kB.xw * B; PATTERN.xz += kF.xz * F; gl_FragColor.rgb = (alternate.y == 0.0) ? ((alternate.x == 0.0) ? vec3(C, PATTERN.xy) : vec3(PATTERN.z, C, PATTERN.w)) : ((alternate.x == 0.0) ? vec3(PATTERN.w, C, PATTERN.z) : vec3(PATTERN.yx, C)); }