summaryrefslogtreecommitdiff
path: root/drivers/dma
AgeCommit message (Collapse)Author
2014-04-17ENGR00308770-2 : dma: sdma: add new sdma scripts for qspi/canfdRobin Gong
update sdma script and the script number. Signed-off-by: Robin Gong <b38343@freescale.com>
2014-04-17ENGR00307014-01 dma: pxp: Add YUV444 csc supportSandor Yu
Add YUV444 csc support in pxp driver. Signed-off-by: Sandor Yu <R01008@freescale.com>
2014-04-16ENGR00308001 dma: imx-sdma: add support for sdma memory copyRobin Gong
This patch use more common dma interface , including "device_prep_dma_memcpy" and "device_prep_dma_sg". The way in v3.0.35 reuse "device_prep_slave_sg" and need call twice to tell dest dma address in one memory copy(ENGR00233569). It looks tricky something, so give up the original patch. In this patch,"device_prep_dma_memcpy" support memory copy by buffer and "device_prep_dma_sg" support memory copy by scatter-list. You can get the example code from 'linux-test/module_test/mxc_sdma_memcopy_test.' Signed-off-by: Robin Gong <b38343@freescale.com>
2014-04-16ENGR00307635-2 dmaengine: imx-sdma: Add imx6sx platform supportNicolin Chen
The new Solo X has more requirements for SDMA events. So it creates a event mux to remap most of event numbers in GPR (General Purpose Register). If we want to use SDMA support for those module who do not get the even number as default, we need to configure GPR first. Thus this patch adds this support of GPR event remapping configuration to the SDMA driver. Acked-by: Robin Gong <b38343@freescale.com> Acked-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ENGR00304418 [V4l2][PXP] Add some rotation cases support for V4L app.Fancy Fang
Some V4L2 apps require that playing rotated fullscreen video on the screen. In recent PXP driver, this is not supported yet. So this patch adds it on through combining rotation and resize together. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
2014-04-16dma: of: Remove restriction that #dma-cells can't be 0Lars-Peter Clausen
There is no sensible reason why #dma-cells shouldn't be allowed to be 0. It is completely up to the DMA controller how many additional parameters, besides the phandle, it needs to identify a channel. E.g. for DMA controller with only one channel or for DMA controllers which don't have a restriction on which channel can be used for which peripheral it completely legitimate to not require any additional parameters. Also fixes the following warning: drivers/dma/of-dma.c: In function 'of_dma_controller_register': drivers/dma/of-dma.c:67:7: warning: 'nbcells' may be used uninitialized in this function Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com> (cherry picked from commit ff0e0f4f568e8d7593e0035c0c58067bcaf4ab07)
2014-04-16ENGR00305648-8 dma: imx-sdma: Add SAI script supportNicolin Chen
This patch adds SAI script support to imx-sdma. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ENGR00304574-2 dma: mxs-dma: add the dependency for SOC_IMX6SXHuang Shijie
Add the dependency for imx6sx. Signed-off-by: Huang Shijie <b32955@freescale.com>
2014-04-16ENGR00299748-1 imx: pxp: add display_axi_clock handling for imx6sxRobby Cai
The display axi clock is a clock gating newly added on imx6sx. It need to be enabled for lcdif/pxp/csi/pcie to work. It should be set as a placeholder on other SoCs. Signed-off-by: Robby Cai <R63905@freescale.com>
2014-04-16ENGR00298631 PXP: remove pxp_hw_init() when do pxp probeFancy Fang
Since the pxp registers have been already set to default values after hardware reset, it is not necessary to re-initialize them again. And this can accelerate the system booting procedure. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
2014-04-16ENGR00298338 PXP: fix hang issue due to read pxp reg when clk disabledFancy Fang
The function dump_pxp_reg() may be called when the pxp clock is disabled. So this will cause system hang issue. Now add clock enable/disable pair to this function call. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
2014-04-16ENGR00298315 PXP: PXP registers should be reset to default after each task ↵Fancy Fang
finished The PXP registers should be cleared to its default values after each task done to avoid affecting the other later tasks status. And PXP CTRL register provide a SFTRST bit to do this on hardware level. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
2014-04-16ENGR00294115 PXP: correct the pxp_dispatch thread exit logicFancy Fang
We should add thread stop checking before handle pxp task, since the wait condition includes this check. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00294114 PXP: correct the PS U/V buffer settings when format is YVU420PFancy Fang
The PXP itself doesn't support YVU420P default. But we can get the U and V address according to the format when we try to set PS_UBUF and PS_VBUF registers. So the YVU420P can be supported indirectly. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00293898 PXP: set the pxp_dispatch kernel thread to be freezable to ↵Fancy Fang
avoid hang By default, the kernel thread cannot be freezed during pm suspend. So during pm suspend, the pxp_dipatch thread is still handling pxp task and setting pxp registers. And in some time, this pxp register setting may happen after the pxp_suspend done. So the hang issue happens. This patch set the thread to be freezable to freeze it before pxp_suspend called to avoid this hang issue. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00293323 PXP: add WC and cacheable dma buffer support for PXP deviceFancy Fang
This change add support for new dma buffer type(writecombine and cacheable) which allows user application has more choices for the buffer type. And if the dma buffer is cacheable, then add flush interfaces to make it cache coherent when necessary. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00293292 PXP: enhance channel and buffer reclaim for PXP deviceFancy Fang
Enhance channel and buffer reclaim to make sure that all the allocated resources which are not freed yet to be freed when the device file descriptor release() function called. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00293234 PXP: let irq_pending variable to be atomicFancy Fang
Change irq_pending field in struct pxp_irq_info to a atomic type. So the spin lock in pxp_irq_info is unnecessary. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00293211 PXP: bind allocated DMA channels to opened device file descriptorFancy Fang
The allocated DMA channels via some opened file descriptor is better to be bound to this descriptor. Since this can avoid some application to fake a channel id which may be requested by other applications to request PXP service. And also, this make it easier to release the dma channel when application exists abnormally or forgets to release it explicitly. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00293170 PXP: remove cpu_addr field from struct pxp_mem_descFancy Fang
The cpu_addr field in struct pxp_mem_desc cannot be used by user application, so it is not necessary to pass this field data to user. Now the similar field 'virtual' in struct pxp_buf_obj is used to store the kernel space virtual addr for allocated dma buffer. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00293119 PXP: change the dma buffer lists management for PXP deviceFancy Fang
Create pxp_info struct data for each opened device file descriptor. And bind all the allocated dma buffers to this struct for each opened file. This makes the dma buffer lists management safer, more effective and more flexible. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00292816 PXP: move two struct definitions to pxp_device.hFancy Fang
Move two struct definitions defined in pxp_device.c to pxp_device.h. Now the pxp_device.h has been created for PXP device driver. So all the type definition should stay in header file not c source file. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00292607 PXP: define a static dma_chan array to record channel statusFancy Fang
Since the number of dma channels is constant, it is more efficient to use an array to record all the channels alloc/free status. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00292562 PXP: move the definitions used only by PXP device to a new ↵Fancy Fang
header file Some definitions used only by PXP device driver should not stay in pxp_dma.h which is shared by PXP, EPDC and V4L2. So the patch creates a new header file pxp_device.h to hold these definitions. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00292398 PXP: refine two spin locks usage in PXP dma driverFancy Fang
This patch provides the following refinements: 1. For pxp channel lock, use spin_lock() instead of spin_lock_irqsave(). Since this lock is not used in any ISR. Moreover, this can increase the driver's concurrency with no local irq disabled. 2. Narrow down the pxp lock's locking range in pxp_issue_pending(). Since this lock is also used in PXP ISR, so its hold time should be as few as possible to reduce the time when local irq disabled. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00292369 PXP: remove unnecessary head list empty checkFancy Fang
The head list empty check in function pxpdma_dostart_work() is meaningless, since this function only can be called when there is some pxp task in the head list, that is to say head list is not empty. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00292129 PXP: remove some unnecessary code from PXP dma driverFancy Fang
There is no need to use spin lock in pxp_prep_slave_sg() after dynamic descriptors allocation enabled. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00291731 PXP: move pxp_irq_info definition from PXP dma to PXP deviceFancy Fang
struct pxp_irq_info is only used by PXP device driver, so it is unreasonable to define it in pxp_dma.h which will be included by EPDC, V4L2 PXP and PXP device driver. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00291729 PXP: remove a mutex lock from pxp channelFancy Fang
This mutex lock is no longer necessary in PXP dma driver. After the commit "ENGR00291400 PXP: Organize PXP task queue to be FIFO", protection fields can be protected by the spin lock in PXP channel now. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00291658 PXP: allow PXP device users to submit multiple tasks before ↵Fancy Fang
start PXP After the commit "ffcad666548417ef21937e0a755d85ab922313a9" pushed, adding this support in PXP device driver is also necessary. This change allows users to submit more than one PXP tasks followd by only one wait for finished ioctl. It means that users can wait for more than one tasks done by calling one PXP_IOC_WAIT4CMPLT ioctl. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00291400 PXP: Organize PXP task queue to be FIFOFancy Fang
The requested PXP tasks were handled based on channel unit. All the tasks in one channel were handled one by one, and the tasks in another channel only can get chance after all the tasks in previous channel were finished. So this may allow some channel occupies PXP hardware exclusively all the time, and other channels may never get PXP services. So this change makes the PXP task queue to be a FIFO to avoid this kind of unfair usage for PXP. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00290664 PXP: allocate DMA TX descriptors on demand instead of in PXP ↵Fancy Fang
initialization In previous PXP driver, the number of tx descriptors allocated for each channel is a constant 16 and they can only be allocated during PXP initialization. But since the driver allows users to queue more than one PXP tasks for each channel before issuing pending tasks, so in this case the descriptors may be not enough for some cases. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00290613 PXP: add asynchronous multi instances support for PXPFancy Fang
Move PXP registers setting from pxp_issue_pending() to a seperate kernel thread. This change will avoid the multi instances hang issues solved in previous commits. And also the pxp users won't be blocked when it call dma_async_issue_pending() function. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00290236 PXP: Correct PXP settings when s0 format is PXP_PIX_FMT_YUV422PFancy Fang
When the s0 format is PXP_PIX_FMT_YUV422P, the s0 pitch and U/V buffer address cannot be set correctly. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00289859 PXP: fix that multi users may access PXP hardware simultaneouslyFancy Fang
After the patch 6320ada11093ef0a4ded9065d6ae284a9129f7d6, there still exists some cases that more than one user would set PXP hardware registers before the previous task done. Now use another mutex lock to make sure that registers settings can only happen when PXP hardware is idle. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00289237 PXP: fix a multiple instances hang issueFancy Fang
In pxp_issue_pending(), the wait for pxp done processes will be woken up together in PXP ISR. So there will be some situations that one process will set PXP hardware registers after another process's setting but before the first PXP task done. So the PXP hardware may be corrupted and hang maybe happen. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00285283 PXP: make pxp driver compatible for G2DFancy Fang
Use stride to set AS and PS pitch by default, if stride is 0, then use width to set AS and PS pitch instead. This will make PXP driver both work for PXP kernel users and G2D applications. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00284411-1 PXP: Enhance YUV, alpha blend and rotationFancy Fang
Support YUV formats like: I420, NV12, NV21, UYVY, YUYV, VYUY, YVYU, NV16, NV61 and YV12. Support rotation in both stages before and after alpha blending. Signed-off-by: Fancy Fang <B47543@freescale.com>
2014-04-16ENGR00286273-1 dma: imx-sdma: allocate memory from iramNicolin Chen
We try to allocate memory from SoC internal SRAM so that we can turn off voltage of external DDR to save power. Surely, if we failed to get the iram DT node or allocate memory due to no enough SRAM space, we would allow SDMA driver to allocate memory in a traditional way. Signed-off-by: Nicolin Chen <b42378@freescale.com>
2014-04-16ENGR00283216 media: imx6sl: add runtime pm support for busfreqRobby Cai
add runtime pm implementation for eLCDIF/EPDC/PxP Signed-off-by: Robby Cai <R63905@freescale.com>
2014-04-16ENGR00281186 dmaengine: pxp: not fetch data from AS buffer if it's not usedRobby Cai
There's no explicit BIT in PxP register to disable AS buffer. The right way to disable AS is to set ULC to a higher value than the LRC. It has been done once in probe time, but not in run time. This could cause one potential problem because even when ULC, LRC and buffer address is set to 0 PxP will still fetch one pixel data from addr 0. This patch fixes it by set ULC higher than LRC for AS if it's not used (i.e., no alpha-blending) at run time. Signed-off-by: Robby Cai <R63905@freescale.com>
2014-04-16ENGR00281859-3 ASoC: fsl: Prepare dmaengine before submit itNicolin Chen
ASRC and HDMI audio might meet unexpected stop, 'ctrl+z' for example, and then disable its sdma channel. But after 'fg' resume, because sdma channel's status has already been set into DMA_ERROR, we need to prepare dmaengine again to clear its error state, otherwise sdma driver would bypass its channel enabling and 'Input/Output error' would happen to ALSA lib. The combined prepare and submit are also being used in soc-dmaengine, the common ASoC dmaengine driver. And since we already use a proper way to handle sdma channel status, there's no need to make an exception for HDMI any more, so drop it. Signed-off-by: Nicolin Chen <b42378@freescale.com>
2014-04-16ENGR00280852-9 mxc: asrc: Use threshold to clear dma requestNicolin Chen
Previously, we used sdma's event pending to forcibly re-schedule sdma for work round, because sdma channel for ASRC input task would fail to be opened due to its dma request always keeping high after ASRC opens the pair, which cause sdma miss the trigger point of dma request. Now, instead of using event pending, we clear the dma request on ASRC driver side by setting its thresholds to an impossible trigger area during its stall state. Since ASRC would stall its process when input fifo is near empty or output fifo is near full, during the stall state, the specific thresholds, 0 for input fifo and 63 for output fifo, would never let asrc meet this condition. So dma request can be cleared and raised again after we restore the true required thresholds. Accordingly, since we don't need event pending any more, we dropped the code from the sdma driver. Signed-off-by: Nicolin Chen <b42378@freescale.com>
2014-04-16ENGR00277299-1 dma: imx-sdma: Add other script for hdmi audio supportNicolin Chen
There's a missing script for hdmi audio support in current sdma driver, thus add it. This HDMI script doesn't use bd to copy memory like a normal one does but only to update the memory address for HDMI internal AHB DMA and then trigger its procedure automatically. Signed-off-by: Nicolin Chen <b42378@freescale.com>
2014-04-16ENGR00274585-1 dma: imx-sdma: update sdma to support p2pShengjiu Wang
For the sake of support asrc p2p, the sdma driver need to be updated. 1. Add another dma_request, p2p need two dma_request. 2. There are some cases which need to change the config after the dma_request_channel. add dma_request config in dmaengine_slave_config(). 3. add dma_request0 and dma_request1 in dma_slave_config for runtime config in dmaengine_slave_config. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-04-16ENGR00274412-1 dma: pxp: Port ePxP driver to 3.10Robby Cai
It's ported from v3.5.7, which contains ePxP DMAENGINE driver and a client driver named pxp_device. This patch also includes the changes: - use uapi header file - remove VM_RESERVED since it's deprecated, and drop redundant VM_IO flag since it's automatically set in remap_pfn_range() - use <linux/platform_data/dma-imx.h> instead of <mach/dma.h> - use devm_kzalloc() instead in pxp_probe() - use macro __KERNEL__ in pxp_dma uapi header to avoid definition conflict Signed-off-by: Robby Cai <R63905@freescale.com>
2014-04-16ENGR00274286-1 dma: imx-sdma: Use correct sdma script for asrcNicolin Chen
Use correct sdma script for ASRC. Signed-off-by: Nicolin Chen <b42378@freescale.com>
2014-04-16ENGR00273673-3 dma: imx-sdma: Add event pending trigger interfaceNicolin Chen
Add interface to allow other modules, like ASRC for example, to trigger a dma request manually. Signed-off-by: Nicolin Chen <b42378@freescale.com>
2014-04-16ENGR00273673-2 dma: imx-sdma: Add dual-fifo script for ssiNicolin Chen
To support SSI dual-fifo mode, we need to add dual-fifo script for sdma. Signed-off-by: Nicolin Chen <b42378@freescale.com>
2014-04-16ENGR00273673-1 dma: imx-sdma: Fix wrong total script numberNicolin Chen
The total number should be 35. Thus fix it. Signed-off-by: Nicolin Chen <b42378@freescale.com>