summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/omap3isp
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds2014-12-141-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
| * media: platform: omap3isp: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | | | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* | [media] platform: Make use of media_bus_format enumBoris BREZILLON2014-11-147-181/+175
|/ | | | | | | | | | | | | | | | In order to have subsytem agnostic media bus format definitions we've moved media bus definition to include/uapi/linux/media-bus-format.h and prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT. Reference new definitions in all platform drivers. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] omap3isp: use true/false for boolean varsMauro Carvalho Chehab2014-09-031-1/+1
| | | | | | | Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: resizer: Protect against races when updating cropLaurent Pinchart2014-08-212-12/+34
| | | | | | | | | | | | | | When updating the crop rectangle during streaming, the IRQ handler will reprogram the resizer after the current frame. A race condition currently exists between the set selection operation and the IRQ handler: if the set selection operation is called twice in a row and the IRQ handler runs only during the second call, it could reprogram the hardware with partially updated values. Use a spinlock to protect against that. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: resizer: Remove slow debugging message from interrupt handlerLaurent Pinchart2014-08-211-8/+9
| | | | | | | | | | | | | | | | | The resizer_set_input_size() function prints a debugging message with the input width and height values. As the function is called from interrupt context, printing that message to the serial console could slow down the interrupt handler and cause it to miss the start of the next frame, causing image corruption. Fix this by reorganizing the resizer debug messages. The driver now prints the input size, the crop rectangle and the output size in the set selection handler instead of scattering debug messages in various places. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: resizer: Remove needless variable initializationsLaurent Pinchart2014-08-211-6/+6
| | | | | | | | | | There's no need to initialize local variables to zero when they're explicitly assigned another value right after. Remove the needless initializations. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Restart the CCDC immediately after an underrun in BT.656Laurent Pinchart2014-08-211-2/+15
| | | | | | | | | | As the CCDC doesn't generate interrupts when stopped in BT.656 mode, restart it immediately when the next buffer after an underrun is queued instead of relying on the interrupt handler to restart the CCDC. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Don't timeout on stream off when the CCDC is stoppedLaurent Pinchart2014-08-212-0/+6
| | | | | | | | | | | When the CCDC is already stopped due to a buffer underrun, the stop state machine won't advance in BT.656 mode as no interrupt are generated by the stopped CCDC in that mode. Handle this case explicitly in the ccdc_disable() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Fix freeze when a short frame is receivedLaurent Pinchart2014-08-211-0/+29
| | | | | | | | | | | | | | | In BT.656 mode the synchronization signals are generated by the CCDC from the embedded sync codes. The VD0 and VD1 interrupts are thus only triggered when the CCDC is enabled, unlike external sync mode where the line counter runs even when the CCDC is stopped. We can't disable the CCDC at VD1 time, as no VD0 interrupt would be generated for a short frame, which would result in the CCDC being stopped and no VD interrupt generated anymore. The CCDC is stopped from the VD0 interrupt handler instead for BT.656. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Increment the frame number at VD0 time for BT.656Laurent Pinchart2014-08-211-10/+10
| | | | | | | | | We will stop using VD1 in BT.656 mode, move frame number increment to the VD0 interrupt handler. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Simplify ccdc_lsc_is_configured()Laurent Pinchart2014-08-211-5/+4
| | | | | | | | | Use a local variable to avoid the duplicate spin_unlock_irqrestore() call. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Rename __ccdc_handle_stopping to ccdc_handle_stoppingLaurent Pinchart2014-08-211-5/+5
| | | | | | | | There's no need for a double underscore in the function name, remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Only complete buffer when all fields are capturedLaurent Pinchart2014-08-212-27/+58
| | | | | | | | | | | | | | | Checking that the captured field corresponds to the last required field depending on the requested field order before completing the buffer isn't enough. When the first field at stream start corresponds to the last required field, this would result in returning an interlaced buffer containing a single field. Fix this by keeping track of the fields captured in the buffer, and make sure that both fields are present for alternate field orders. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Disable the video port when unusedLaurent Pinchart2014-08-211-41/+29
| | | | | | | | | | | | | | The video port doesn't support YUV formats. Disable it when the CCDC sink pad format is set to YUV instead of leaving it enabled and relying on downstream modules not to process data they receive from the video port. Experiments showed that this fixes some of the CCDC failures to stop, especially in BT.656 mode. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Add support for BT.656 YUV format at the CCDC inputLaurent Pinchart2014-08-212-16/+80
| | | | | | | | | | | Query the CCDC input media bus type from the subdev connected to the CCDC sink pad and configure the CCDC accordingly to support BT.656 synchronization. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Support the interlaced field orders at the CCDC outputLaurent Pinchart2014-08-213-60/+122
| | | | | | | | | | The CCDC can interleave fields into a single buffer when writing to memory. Support it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Add basic support for interlaced videoLaurent Pinchart2014-08-213-1/+28
| | | | | | | | | | | When the CCDC input is interlaced enable the alternate field order on the CCDC output video node. The field signal polarity is specified through platform data. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Simplify the ccdc_isr_buffer() functionLaurent Pinchart2014-08-211-10/+5
| | | | | | | | | | Instead of using goto statements to a single line return, return the correct value immediately. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Simplify the configuration functionLaurent Pinchart2014-08-211-5/+4
| | | | | | | | | | | Assign the format variable to the sink pad format earlier and use it instead of accessing the sink pad format directly from the ISP structure. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: video: Validate the video node field orderLaurent Pinchart2014-08-211-2/+3
| | | | | | | | | | The field order requested on the video node must match the field order at the connected subdevice source pad. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: Default to progressive field order when setting the formatLaurent Pinchart2014-08-211-0/+9
| | | | | | | | | | If the requested field order is not supported default to progressive as we can't guess how the user will configure the pipeline later on. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: Move non-critical code out of the mutex-protected sectionLaurent Pinchart2014-08-211-3/+2
| | | | | | | | | | | The isp_video_pix_to_mbus() and isp_video_mbus_to_pix() calls in isp_video_set_format() only access static fields of the isp_video structure. They don't need to be protected by a mutex. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: Remove boilerplate disclaimer and FSF addressLaurent Pinchart2014-08-2128-280/+0
| | | | | | | | | We don't want to modify all source files the day the FSF moves. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: Don't ignore subdev streamoff failuresLaurent Pinchart2014-08-211-6/+4
| | | | | | | | | | Record the value returned by subdevs from s_stream(0) and handle stop failures when an error occurs. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: Rename isp_buffer isp_addr field to dmaLaurent Pinchart2014-05-257-17/+17
| | | | | | | | No functional changes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: Move to videobuf2Laurent Pinchart2014-05-255-1286/+108
| | | | | | | | Replace the custom buffers queue implementation with a videobuf2 queue. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: Cancel all queued buffers when stopping the video streamLaurent Pinchart2014-05-251-0/+2
| | | | | | | | | | | | | | When stopping a video stream the driver waits for ongoing DMA opeations to complete for the currently active buffer, but doesn't release the non-active queued buffers. This isn't a problem in most cases as the video device is usually closed after the stream is stopped, which will release all the buffers. However the problem would generate a warning when switching to videobuf2. Fix it by cancelling all buffers after DMA operations have completed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: Move buffer irqlist to isp_buffer structureLaurent Pinchart2014-05-253-21/+22
| | | | | | | | This prepares for the move to videobuf2. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: Move queue irqlock to isp_video structureLaurent Pinchart2014-05-255-27/+19
| | | | | | | | This prepares for the move to videobuf2. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: Move queue mutex to isp_video structureLaurent Pinchart2014-05-254-91/+86
| | | | | | | | This prepares for the move to videobuf2. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: queue: Don't build scatterlist for kernel bufferLaurent Pinchart2014-05-252-25/+7
| | | | | | | | The scatterlist is not needed for those buffers, don't build it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: Use the ARM DMA IOMMU-aware operationsLaurent Pinchart2014-05-254-60/+86
| | | | | | | | | | Attach an ARM DMA I/O virtual address space to the ISP device. This switches to the IOMMU-aware ARM DMA backend, we can thus remove the explicit calls to the OMAP IOMMU map and unmap functions. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: queue: Use sg_alloc_table_from_pages()Laurent Pinchart2014-05-251-14/+2
| | | | | | | | | Replace the custom implementation with a call to the scatterlist helper function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: queue: Map PFNMAP buffers to deviceLaurent Pinchart2014-05-252-18/+23
| | | | | | | | | | | Userspace PFNMAP buffers need to be mapped to the device like the userspace non-PFNMAP buffers in order for the DMA mapping implementation to create IOMMU mappings when we'll switch to the IOMMU-aware DMA mapping backend. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: queue: Fix the dma_map_sg() return value checkLaurent Pinchart2014-05-251-1/+1
| | | | | | | | | | dma_map_sg() can merge sglist entries, and can thus return a number of mapped entries different than the original value. Don't consider this as an error. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: queue: Allocate kernel buffers with dma_alloc_coherentLaurent Pinchart2014-05-252-32/+27
| | | | | | | | And retrieve the related sg table using dma_get_sgtable(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: queue: Inline the ispmmu_v(un)map functionsLaurent Pinchart2014-05-251-32/+4
| | | | | | | | | The ispmmu_vmap() and ispmmu_vunmap() functions are just wrappers around omap_iommu_vmap() and omap_iommu_vunmap(). Inline them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: queue: Merge the prepare and sglist functionsLaurent Pinchart2014-05-252-104/+69
| | | | | | | | | | In preparation for the switch to the DMA API merge the two functions that handle buffer preparation for the USERPTR cases (both page-backed and non page-backed memory). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: queue: Use sg_table structureLaurent Pinchart2014-05-252-74/+40
| | | | | | | | | Replace the sglen and sglist fields stored in the buffer structure with an sg_table. This allows using the sg table allocation helper function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: queue: Move IOMMU handling code to the queueLaurent Pinchart2014-05-253-83/+78
| | | | | | | | | | As a preparation for the switch from the OMAP IOMMU API to the DMA API move all IOMMU handling code from the video node implementation to the buffers queue implementation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: video: Set the buffer bytesused field at completion timeLaurent Pinchart2014-05-251-1/+4
| | | | | | | | | | | | The v4l buffer bytesused field is a value that will be returned to userspace when the buffer gets dequeued. As such it doesn't need to be set early at buffer queue time. Move the assignment to buffer completion in the omap3isp_video_buffer_next() function to prepare for the video buffers queue refactoring. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Use the DMA API for FPCLaurent Pinchart2014-05-252-24/+35
| | | | | | | | | | Replace the OMAP-specific IOMMU API usage by the DMA API for FPC. The table is now allocated using dma_alloc_coherent() and the related sg table is retrieved using dma_get_sgtable() for sync operations. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: ccdc: Use the DMA API for LSCLaurent Pinchart2014-05-252-31/+29
| | | | | | | | | | Replace the OMAP-specific IOMMU API usage by the DMA API for LSC. The table is now allocated using dma_alloc_coherent() and the related sg table is retrieved using dma_get_sgtable() for sync operations. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: stat: Use the DMA APILaurent Pinchart2014-05-252-72/+53
| | | | | | | | | | Replace the OMAP-specific IOMMU API usage by the DMA API. All buffers are now allocated using dma_alloc_coherent() and the related sg table is retrieved using dma_get_sgtable() for sync operations. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: stat: Store sg table in ispstat_bufferLaurent Pinchart2014-05-252-11/+10
| | | | | | | | | | The driver stores the IOMMU mapped iovm struct pointer in the buffer structure but only needs the iovm sg table. Store the sg table instead to prepare the migration to the DMA API. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: stat: Merge dma_addr and iommu_addr fieldsLaurent Pinchart2014-05-254-15/+11
| | | | | | | | | | The fields store buffer addresses as seen from the device. The first one is used with an external DMA engine while the second one is used with the ISP DMA engine. As they're never used together, merge them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: stat: Share common code for buffer allocationLaurent Pinchart2014-05-251-60/+54
| | | | | | | | | Move code common between the isp_stat_bufs_alloc_dma() and isp_stat_bufs_alloc_iommu() functions to isp_stat_bufs_alloc(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: stat: Remove impossible WARN_ONLaurent Pinchart2014-05-251-2/+0
| | | | | | | | | | | The WARN_ON statements in the buffer allocation functions try to catch conditions where buffers would have already been allocated. As the buffers are explicitly freed right before being allocated this can't happen. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] omap3isp: stat: Rename IS_COHERENT_BUF to ISP_STAT_USES_DMAENGINELaurent Pinchart2014-05-251-7/+7
| | | | | | | | | | | The macro is meant to test whether the statistics engine uses an external DMA engine to transfer data or supports DMA directly. As both cases will be supported by DMA coherent buffers rename the macro to ISP_STAT_USES_DMAENGINE for improved clarity. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
OpenPOWER on IntegriCloud