aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/platform (follow)
Commit message (Collapse)AuthorAgeFilesLines
* media: apple: isp: Support system sleepEileen Yoon2024-09-165-12/+84
| | | | Signed-off-by: Eileen Yoon <eyn@gmx.com>
* media: apple: isp: Use a mutex instead of a spinlock for channelsHector Martin2024-09-163-4/+4
| | | | | | | Fixes lockdep splats because we do surface stuff with this held, which takes a mutex. Signed-off-by: Hector Martin <marcan@marcan.st>
* media: apple: isp: implement ENUM_FRAMEINTERVALS triviallyHector Martin2024-09-161-0/+13
| | | | Signed-off-by: Hector Martin <marcan@marcan.st>
* media: apple: isp: Enable IMX364 sensorHector Martin2024-09-161-1/+2
| | | | | | This is used on j45[67]. Signed-off-by: Hector Martin <marcan@marcan.st>
* media: apple: isp: Show camera presets even for unsupported sensorsHector Martin2024-09-161-4/+4
| | | | | | This makes adding support easier. Signed-off-by: Hector Martin <marcan@marcan.st>
* media: apple: isp: Parse firmware version from device treeJanne Grunau2024-09-163-1/+81
| | | | | | | Required since t8112-isp uses a 32-bit address in the CISP_CMD_CH_SET_FILE_LOAD command with the macOS 12.4 firmware. Signed-off-by: Janne Grunau <j@jannau.net>
* media: apple: isp: Use a more user-friendly device nameHector Martin2024-09-162-1/+2
| | | | Signed-off-by: Hector Martin <marcan@marcan.st>
* media: apple: isp: Option to use CMD_STOP (ifdeffed out)Asahi Lina2024-09-161-2/+17
| | | | Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Only reset coproc when necessary, fix minor raceAsahi Lina2024-09-161-4/+9
| | | | Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: VMap only what is necessary, remove redundant logging ↵Asahi Lina2024-09-161-26/+15
| | | | | | state bit Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Add a missing read barrier (possibly?)Asahi Lina2024-09-161-0/+2
| | | | Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Clear IRQs when resetting coprocAsahi Lina2024-09-161-0/+13
| | | | | | XXX this might be wrong on some chips? Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Rework meta surface handling & buffer returnAsahi Lina2024-09-166-111/+176
| | | | | | | | | Now we keep track of meta surfaces independently, and always allocate 16 of them, plus handle buffer return messages more correctly. Fixes t8112 asserts (for some reason). Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Use cached IOMMU mappingsAsahi Lina2024-09-161-2/+2
| | | | Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Zero out pages allocated to ISPAsahi Lina2024-09-161-1/+1
| | | | Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Make sub-pmdomain handling explicitAsahi Lina2024-09-163-3/+54
| | | | Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Minor changes to cam flowAsahi Lina2024-09-162-14/+23
| | | | Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Add flicker_sensor_set cmdAsahi Lina2024-09-162-0/+17
| | | | Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: t8112 fixes...Asahi Lina2024-09-165-7/+17
| | | | Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Limit maximal number of buffersJanne Grunau2024-09-163-1/+12
| | | | | | | | | ISP (FW 12.3) on t6001 times out if more buffers than count in the buffer pool config are submitted before streaming is started. To avoid keeping track of the number of submitted buffers limit the number. 16 buffers / frames should be more than enough. Signed-off-by: Janne Grunau <j@jannau.net>
* media: apple: isp: t8112 HW configJanne Grunau2024-09-161-9/+5
| | | | | | Not yet working. Signed-off-by: Janne Grunau <j@jannau.net>
* media: apple: isp: Use a second region for MBOX_IRQ_{DOORBELL,ACK}Janne Grunau2024-09-165-7/+19
| | | | | | t8112 uses a different register layout. Signed-off-by: Janne Grunau <j@jannau.net>
* media: apple: isp: Make channel sends not interruptibleAsahi Lina2024-09-162-5/+4
| | | | | | Otherwise processes receiving a signal will break our command flows. Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Maybe fix some DMA ordering issuesAsahi Lina2024-09-162-4/+11
| | | | | | Maybe. Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Add STOP and POWER_DOWN commandsAsahi Lina2024-09-162-0/+31
| | | | | | | Not sure if these work properly yet, but worth having them to experiment. Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Implement posted commandsAsahi Lina2024-09-162-5/+9
| | | | | | Useful for shutdown type commands which may not be acked... Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Propagate EINTR from firmware loadsAsahi Lina2024-09-161-0/+4
| | | | Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Remove ioread/iowrite and stop doing raw address translationAsahi Lina2024-09-169-89/+130
| | | | | | | | | | | | | Translating IOVAs via the DART and then trying to access physical memory directly is slow and error-prone. We know what surfaces IOVAs are supposed to be part of, so we can use the surface vmap to access the contents. Where we get an IOVA from the firmware, assert that it is within the expected range before accessing it. Since we're using threaded IRQs now, this also lets us get rid of the deferred vmap. Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Switch to threaded IRQsAsahi Lina2024-09-161-1/+9
| | | | | | | There's no reason to run all the command handling in hard IRQ context. Let's switch to threaded IRQs, which should simplify some things. Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Always enable singleplane API, make multiple a module paramAsahi Lina2024-09-161-17/+32
| | | | | | | | | | This requires modifying the vbq type when set_format is called, depending on the style... this is ugly, but it should work? Multiplane is still quite broken, but this enables testing it with gstreamer. Still lots of things to fix to make this actually work. Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Working t602x and multiple formats and more fixesAsahi Lina2024-09-168-335/+706
| | | | | | Sorry for the horrible big commit... Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: t602x hw configAsahi Lina2024-09-161-0/+24
| | | | Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: Support >32bit VAs for t602xAsahi Lina2024-09-162-5/+11
| | | | Signed-off-by: Asahi Lina <lina@asahilina.net>
* media: apple: isp: fix copyrightEileen Yoon2024-09-161-4/+0
| | | | | | Not really anymore. Signed-off-by: Eileen Yoon <eyn@gmx.com>
* media: apple: isp: alloc static surfaces only onceEileen Yoon2024-09-163-23/+43
| | | | Signed-off-by: Eileen Yoon <eyn@gmx.com>
* media: apple: isp: misc isp-fw.c improvementsEileen Yoon2024-09-162-12/+15
| | | | Signed-off-by: Eileen Yoon <eyn@gmx.com>
* media: apple: isp: rm old isp_resv structEileen Yoon2024-09-161-6/+0
| | | | Signed-off-by: Eileen Yoon <eyn@gmx.com>
* media: apple: isp: rm unused bootargs membersEileen Yoon2024-09-161-3/+0
| | | | Signed-off-by: Eileen Yoon <eyn@gmx.com>
* media: apple: isp: s/asc/coproc/Eileen Yoon2024-09-164-43/+43
| | | | Signed-off-by: Eileen Yoon <eyn@gmx.com>
* media: apple: isp: wmb() before GPIO writeEileen Yoon2024-09-161-0/+1
| | | | Signed-off-by: Eileen Yoon <eyn@gmx.com>
* media: apple: isp: Don't use define for bootargs sizeEileen Yoon2024-09-161-4/+2
| | | | Signed-off-by: Eileen Yoon <eyn@gmx.com>
* media: apple: isp: Better document info struct fieldsEileen Yoon2024-09-161-9/+55
| | | | | | "Document". I also counted wrong multiple times. Signed-off-by: Eileen Yoon <eyn@gmx.com>
* media: apple: isp: Set platform_id in bootargsEileen Yoon2024-09-163-3/+6
| | | | Signed-off-by: Eileen Yoon <eyn@gmx.com>
* media: apple: WIP: t6000 haxHector Martin2024-09-162-2/+6
|
* media: apple: isp: Do not defer on failure to initialize DARTHector Martin2024-09-161-1/+1
| | | | | | | This can fail for non-DEFER reasons. If this can happen due to probe defers, we need to figure out some way to signal that specifically... Signed-off-by: Hector Martin <marcan@marcan.st>
* media: apple: isp: Drop the DART mirroring stuffHector Martin2024-09-164-87/+0
| | | | Signed-off-by: Hector Martin <marcan@marcan.st>
* media: apple: isp: Split gpio/mbox MMIO rangeEileen Yoon2024-09-165-69/+75
| | | | | | | Offsets differ across socs. Makes more sense than "core" too. Signed-off-by: Eileen Yoon <eyn@gmx.com>
* media: apple: isp: Enable t6000Hector Martin2024-09-161-0/+1
| | | | Signed-off-by: Hector Martin <marcan@marcan.st>
* media: apple: isp: Fixup shared region argHector Martin2024-09-161-4/+4
| | | | Signed-off-by: Hector Martin <marcan@marcan.st>
* media: apple: isp: Use preallocated heapHector Martin2024-09-162-24/+29
| | | | Signed-off-by: Hector Martin <marcan@marcan.st>