29 Jan, 2021
1 commit
-
For some tough multi channels test, the default priority of channel0 may
not be scheduled in 500us so that channel context can't be loaded as the
below warning, hence sdma channel transfer will be failed. So raise up
channel0 to the highest one since context load is important to all
channels. Besides, enlarge 500us to 5ms for safe since many highest channel
also may run at the same time like asrc/easrc tough test(8 channel run)."imx-sdma 30e10000.dma-controller: Timeout waiting for CH0 ready"
Signed-off-by: Robin Gong
Reviewed-by: Peng Zhang
21 Jan, 2021
1 commit
-
In case of long format of qDMA command descriptor, there are one frame
descriptor, three entries in the frame list and two data entries. So the
size of dma_pool_create for these three fields should be the same with
the total size of entries respectively, or the contents may be overwritten
by the next allocated descriptor.Signed-off-by: Guanhua Gao
20 Jan, 2021
2 commits
-
This is the 5.10.8 stable release
* tag 'v5.10.8': (104 commits)
Linux 5.10.8
tools headers UAPI: Sync linux/fscrypt.h with the kernel sources
drm/panfrost: Remove unused variables in panfrost_job_close()
...Signed-off-by: Jason Liu
-
This is the 5.10.7 stable release
* tag 'v5.10.7': (144 commits)
Linux 5.10.7
scsi: target: Fix XCOPY NAA identifier lookup
rtlwifi: rise completion at the last step of firmware callback
...Signed-off-by: Jason Liu
17 Jan, 2021
6 commits
-
commit 2d5efea64472469117dc1a9a39530069e95b21e9 upstream.
Typecast the fls(width -1) with (enum dmaengine_alignment) in
xilinx_dma_chan_probe function to fix the coverity warning.Addresses-Coverity: Event mixed_enum_type.
Fixes: 9cd4360de609 ("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support")
Signed-off-by: Shravya Kumbham
Signed-off-by: Radhey Shyam Pandey
Link: https://lore.kernel.org/r/1608722462-29519-4-git-send-email-radhey.shyam.pandey@xilinx.com
Signed-off-by: Vinod Koul
Signed-off-by: Greg Kroah-Hartman -
commit faeb0731be0a31e2246b21a85fa7dabbd750101d upstream.
In xilinx_dma_child_probe function, the nr_channels variable is
passed to of_property_read_u32() which expects an u32 return value
pointer. Modify the nr_channels variable type from int to u32 to
fix the incompatible parameter coverity warning.Addresses-Coverity: Event incompatible_param.
Fixes: 1a9e7a03c761 ("dmaengine: vdma: Add support for mulit-channel dma mode")
Signed-off-by: Shravya Kumbham
Signed-off-by: Radhey Shyam Pandey
Link: https://lore.kernel.org/r/1608722462-29519-3-git-send-email-radhey.shyam.pandey@xilinx.com
Signed-off-by: Vinod Koul
Signed-off-by: Greg Kroah-Hartman -
commit 99974aedbd73523969afb09f33c6e3047cd0ddae upstream.
dma_async_device_register() can return non-zero error code. Add
condition to check the return value of dma_async_device_register
function and handle the error path.Addresses-Coverity: Event check_return.
Fixes: 9cd4360de609 ("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support")
Signed-off-by: Shravya Kumbham
Signed-off-by: Radhey Shyam Pandey
Link: https://lore.kernel.org/r/1608722462-29519-2-git-send-email-radhey.shyam.pandey@xilinx.com
Signed-off-by: Vinod Koul
Signed-off-by: Greg Kroah-Hartman -
commit d645148cc82ca7fbacaa601414a552184e9c6dd3 upstream.
'disable_xdmac()' should be called in the error handling path of the
probe function to undo a previous 'enable_xdmac()' call, as already
done in the remove function.Fixes: a6e9be055d47 ("dmaengine: milbeaut-xdmac: Add XDMAC driver for Milbeaut platforms")
Signed-off-by: Christophe JAILLET
Link: https://lore.kernel.org/r/20201219132800.183254-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul
Signed-off-by: Greg Kroah-Hartman -
commit 33cbd54dc515cc04b5a603603414222b4bb1448d upstream.
'mtk_hsdma_hw_deinit()' should be called in the error handling path of the
probe function to undo a previous 'mtk_hsdma_hw_init()' call, as already
done in the remove function.Fixes: 548c4597e984 ("dmaengine: mediatek: Add MediaTek High-Speed DMA controller for MT7622 and MT7623 SoC")
Signed-off-by: Christophe JAILLET
Link: https://lore.kernel.org/r/20201219124718.182664-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul
Signed-off-by: Greg Kroah-Hartman -
commit 595a334148449bd1d27cf5d6fcb3b0d718cb1b9f upstream.
If the dw_edma_alloc_burst() function fails then we free "chunk" but
it's still on the "desc->chunk->list" list so it will lead to a use
after free. Also the "->chunks_alloc" count is incremented when it
shouldn't be.In current kernels small allocations are guaranteed to succeed and
dw_edma_alloc_burst() can't fail so this will not actually affect
runtime.Fixes: e63d79d1ffcd ("dmaengine: Add Synopsys eDMA IP core driver")
Signed-off-by: Dan Carpenter
Acked-by: Gustavo Pimentel
Link: https://lore.kernel.org/r/X9dTBFrUPEvvW7qc@mwanda
Signed-off-by: Vinod Koul
Signed-off-by: Greg Kroah-Hartman
13 Jan, 2021
1 commit
-
commit ff58f7dd0c1352a01de3a40327895bd51e03de3a upstream.
The clean up is off by one so this will start at "i" and it should start
with "i - 1" and then it doesn't unregister the zeroeth elements in the
array.Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver")
Signed-off-by: Dan Carpenter
Acked-by: Dave Jiang
Link: https://lore.kernel.org/r/X9nFeojulsNqUSnG@mwanda
Signed-off-by: Vinod Koul
Signed-off-by: Greg Kroah-Hartman
04 Jan, 2021
1 commit
-
This is the 5.10.4 stable release
* tag 'v5.10.4': (717 commits)
Linux 5.10.4
x86/CPU/AMD: Save AMD NodeId as cpu_die_id
drm/edid: fix objtool warning in drm_cvt_modes()
...Signed-off-by: Jason Liu
Conflicts:
drivers/gpu/drm/imx/dcss/dcss-plane.c
drivers/media/i2c/ov5640.c
30 Dec, 2020
2 commits
-
[ Upstream commit e2de925bbfe321ba0588c99f577c59386ab1f428 ]
According to different sections of the TRM, the hchan_cnt of CAP3 includes
the number of uchan in UDMA, thus the start offset of the normal channels
are hchan_cnt.Fixes: daf4ad0499aa4 ("dmaengine: ti: k3-udma: Query throughput level information from hardware")
Signed-off-by: Peter Ujfalusi
Link: https://lore.kernel.org/r/20201208090440.31792-2-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul
Signed-off-by: Sasha Levin -
[ Upstream commit c95e6515a8c065862361f7e0e452978ade7f94ec ]
Return the corresponding error code when first_msi_entry() returns
NULL in mv_xor_v2_probe().Fixes: 19a340b1a820430 ("dmaengine: mv_xor_v2: new driver")
Reported-by: Hulk Robot
Signed-off-by: Zhihao Cheng
Link: https://lore.kernel.org/r/20201124010813.1939095-1-chengzhihao1@huawei.com
Signed-off-by: Vinod Koul
Signed-off-by: Sasha Levin
18 Dec, 2020
5 commits
-
* pxp/next: (8 commits)
LF-1596 dma: pxp: add checking for out against NULL
LF-1595 dma: pxp: fix the typo for possible_inputs_s1 checking
LF-1594 dma: pxp: fix out-of-bounds access
LF-1162-19 media: mxc: pxp_v4l2: change to use VFL_TYPE_VIDEO
LF-105-1 dmaengine: pxp: fix build warning of fall through
... -
* origin/dma/sdma: (32 commits)
MLK-25116-2: dmaengine: imx-sdma: correct iram_pool check point
MLK-25116-1: dmaengine: imx-sdma: save iram pool for bd allocated
MLK-24483-1: dmaengine: imx-sdma: remove ecspi_fixed on imx8mq
MLK-23540 dmaengine: imx-sdma: restore DONEx_CONFIG register
MLK-23869-3: dmaengine: imx-sdma: add sdma_get_firmware_wait
... -
* origin/dma/qdma:
dmaengine: fsl-qdma: workaround for errata A-050265 -
* origin/dma/mxsdma:
LF-251-2: dma: mxs-dma: switch from dma_coherent to dma_pool
LF-251-1: dma: mxs-dma: enable runtime PM for mxs-dma
dma: mxs-dma: change the way to register the probe function
MLK-19897: dma: mxs-dma: filter out the unrelated dma channels -
* origin/dma/edma: (31 commits)
MLK-24825-2: dmaengine: fsl-edma: checking ACTIVE bit for channel stop
MLK-24825-1: dmaengine: fsl-edma-v3: checking ACTIVE bit for channel stop
MLK-24292: dmaengine: fsl-edma-v3: correct power domain attach checking
LF-631-2 dt-bindings: fsl-edma: Document support for S32V234
LF-631-4 dmaengine: fsl-edma: Add support for S32V234
...
16 Dec, 2020
2 commits
-
check iram_pool before sdma_init_sw() so that ccb/context could be
allocated from iram because DDR maybe in self-referesh in lower power
audio case while sdma still running.Signed-off-by: Robin Gong
Reviewed-by: Shengjiu Wang
(cherry picked from commit 6087a1b040c7df054efefd6eda7c031b49b80276) -
Save iram pool bd allocated in in i.mx6sll low power audio playback case,
including below refine points:
1. corrected to bd_size instead of page size for iram pool case.
2. use common DDR memory instead of iram for script loading.
3. channel0 also down to 1 bd size instead of page size.Signed-off-by: Robin Gong
Reviewed-by: Shengjiu Wang
(cherry picked from commit 0cc37c475172c5d91c20380acd737e198f8986ff)
14 Dec, 2020
19 commits
-
Coverity Issue ID: 414719
Signed-off-by: Robby Cai
Reviewed-by: Fancy Fang -
Coverity Issue ID: 379378
Signed-off-by: Robby Cai
Reviewed-by: Fancy Fang -
Coverity issue ID: 379372
As only one overlayer supported, the initialization for ol_param
need to be adjusted accordingly.Signed-off-by: Robby Cai
Reviewed-by: Fancy Fang -
Fix the following build warning:
../drivers/dma/pxp/pxp_dma_v3.c: In function 'pxp_store_shift_ctrl_config':
../drivers/dma/pxp/pxp_dma_v3.c:1700:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
shift_bypass = 1;
~~~~~~~~~~~~~^~~
../drivers/dma/pxp/pxp_dma_v3.c:1701:3: note: here
case PXP_PIX_FMT_YVYU:
^~~~
../drivers/dma/pxp/pxp_dma_v3.c:1705:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
shift_bypass = 1;
~~~~~~~~~~~~~^~~
../drivers/dma/pxp/pxp_dma_v3.c:1706:3: note: here
case PXP_PIX_FMT_NV61:
^~~~Signed-off-by: Robby Cai
Reviewed-by: Sandor Yu -
In 5.x, the first parameter of dma_alloc_coherent() can't be 0, otherwise
the following dump will arise when run the command:
`/unit_tests/Display/pxp_test.out -I "-o 1.yuv" '. This patch fixed this.
And also, use register_chrdev instead of misc_register to make it clean.[ 53.838653] Internal error: Oops: 17 [#1] SMP ARM
[ 53.844538] Modules linked in:
[ 53.847610] CPU: 0 PID: 754 Comm: pxp_test.out Not tainted 5.4.0-rc5-03564-g9792b86 #46
[ 53.855620] Hardware name: Freescale i.MX6 SoloX (Device Tree)
[ 53.861473] PC is at dma_alloc_attrs+0x10/0x114
[ 53.866015] LR is at pxp_device_ioctl+0x90c/0xe98
[ 53.870728] pc : [] lr : [] psr: a0070013
[ 53.877001] sp : ed4e7e74 ip : 00000001 fp : b6591f9c
[ 53.882232] r10: 00000000 r9 : e47efd40 r8 : ed4e7ecc
[ 53.887463] r7 : ed508cc0 r6 : c1408b08 r5 : 00000000 r4 : 00000051
[ 53.893997] r3 : 00000cc1 r2 : e47efd4c r1 : 00055000 r0 : 00000240
[ 53.900533] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 53.907675] Control: 10c5387d Table: ad14804a DAC: 00000051
[ 53.913428] Process pxp_test.out (pid: 754, stack limit = 0x(ptrval))
[ 53.919878] Stack: (0xed4e7e74 to 0xed4e8000)
[ 53.924245] 7e60: 00000051 b6591cf4 c1408b08
[ 53.932434] 7e80: ed508cc0 ed4e7ecc e47efd40 00000000 b6591f9c c05eb360 00000000 c0605e08
[ 53.940622] 7ea0: ed42ac00 c0607e3c 00000034 e47fe3c0 ed4e6000 00000034 c1408b08 c0605cc0
[ 53.948810] 7ec0: ed4e7f78 00000000 ed4e6000 00000000 00054600 00000000 00000000 00000000
[ 53.956998] 7ee0: c1408b08 0479b828 00000000 c1408b08 b6591cf4 e47fb640 c02b7b8c b6591cf4
[ 53.965187] 7f00: ed4e6000 eca65e00 b6591f9c c02b71e0 c02c4bbc c0192be8 ec2dc380 c018dc54
[ 53.973374] 7f20: c1408b08 00000001 00000000 0479b828 c15344fd 00000004 00004000 e47fb3c0
[ 53.981562] 7f40: c15344fd c112a1d4 c110a05c c02c4bcc 00000000 00000000 c02c4aa8 00000000
[ 53.989750] 7f60: e47fab41 0479b828 bee8aad0 e47fb641 e47fb640 00000004 c0145004 b6591cf4
[ 53.997938] 7f80: ed4e6000 00000036 b6591f9c c02b7b8c b6591cf4 bee8aad0 b6591ce8 00000036
[ 54.006125] 7fa0: c01011c4 c0101000 b6591cf4 bee8aad0 00000004 c0145004 b6591cf4 b6ee603c
[ 54.014313] 7fc0: b6591cf4 bee8aad0 b6591ce8 00000036 00077858 00000000 bee8aad0 b6591f9c
[ 54.022502] 7fe0: b6ee6018 b6591cac b6ed5848 b6e604bc 60070010 00000004 00000000 00000000
[ 54.030699] [] (dma_alloc_attrs) from [] (0x34)
[ 54.036981] Code: e92d4ff0 e1a05000 e2800d09 e59f60ec (e140a0d8)
[ 54.043222] ---[ end trace d872f4c07e2464bf ]---Signed-off-by: Robby Cai
-
Porting pxp dma drivers v2 and v3 from imx_4.19.y
Signed-off-by: Robby Cai
-
ERR009165 are not fix on i.mx8m family, so remove 'ecspi_fixed' on
sdma_imx8mq, otherwise, i.mx8mn ecspi not work in dma mode as below:[ 8163.444680] SPI transfer using DMA
[ 8163.448144] SPI DMA tx transfer timer: 500
[ 8165.468250] spi_imx 30820000.spi: I/O Error in DMA TX
[ 8165.473353] spidev spi0.0: SPI transfer failed: -110
[ 8165.478446] spi_master spi0: failed to transfer one message from queueSigned-off-by: Robin Gong
Reviewed-by: Clark Wang
(cherry picked from commit c18cc22344c003ad9b277c372b31bdb76262b669) -
There are two more DONE0_CONFIG/DONE1_CONFIG registers on i.mx8m family.
Add them to save/restore register list during systerm level suspend/
resume to restore them after resume back, otherwise, PDM case maybe failed
in suspend/resume case.Signed-off-by: Robin Gong
Reviewed-by: Shengjiu Wang
(cherry picked from commit 2c213d8ac495065f5ec4182335c151d32d0eb482) -
Add sdma_get_firmware_wait() since sdma firmware have to be ready after
runtime resume. That could be done for runtime feature on i.mx8mp since
the only sdma client audio driver request sdma channel after rootfs
mounted which means no any block in sdma_get_firmware_wait() as
sdma_get_firmware().Signed-off-by: Robin Gong
Reviewed-by: Shengjiu Wang
(cherry picked from commit b97783e4c8a3f754cb616df2ab901a1a0a4c730e) -
Add runtime suspend/resume support on i.mx8mp. So sdma will be initialized
and firmware will be loaded at first channel requested, sdma will be off
once no any channel is running.For the legacy chips just keep sdma on
always as before.Signed-off-by: Robin Gong
Reviewed-by: Shengjiu Wang
(cherry picked from commit 65e87c257b8222d433bbf11c2faba1a2d8c092a5) -
Split sdma_init_sw and sdma_init_hw from sdma_init, so that sdma_init_hw
could be delayed in channel allocate phase and it's easier for implementing
runtime suspend/resume in the next.Signed-off-by: Robin Gong
Reviewed-by: Shengjiu Wang
(cherry picked from commit 4da4ba1aed135fa1a760497e2be52d077794a463) -
Add sdma restore back for i.mx8mp since its power resource audioimx will
be off after suspend.Signed-off-by: Robin Gong
Reviewed-by: Shengjiu Wang -
In multi audio play/stop case,sdma_alloc_chan_resources/
sdma_free_chan_resources will be called quickly, especially,dma done
interrupt comes after sdma_free_chan_resources, thus, system will be
hang in interrupt since it'll check sdma register but clocks have
already been disabled in sdma_free_chan_resources. To avoid it, enable
clock in isr.Signed-off-by: Robin Gong
(cherry picked from commit 80b0e31cdd38d77ea5b0a116fe9f2b2dec23dd2b) -
This reverts commit d288bddd8374e0a043ac9dde64a1ae6a09411d74.
This patch is invalid since local commit:
a03180986b79 ("Revert "dmaengine: imx-sdma: refine to load context only once"")Otherwise, met build break as follows:
../drivers/dma/imx-sdma.c: In function ‘sdma_free_chan_resources’:
../drivers/dma/imx-sdma.c:1533:7: error: ‘struct sdma_channel’ has no member named ‘context_loaded’
1533 | sdmac->context_loaded = false;
| ^~Module onwer could follow for a fine tuned solution.
Signed-off-by: Dong Aisheng
-
In case 60 seconds maybe not enough for Yocto loading sdma firmware on
some poor performance chips such as i.mx6sll in nfs case, add another
round to load firmware.Signed-off-by: Robin Gong
Reviewed-by: Fugang Duan -
Correct is_ram_script checking in case sdma firmware not loaded as
expected, otherwise all scripts are considered as rom script without
correct "sdma firmware not ready!" since sdma->ram_code_start is 0.Note: only add the doubtless is_ram_script for sdma-imx6q.bin/sdma-imx7d.
bin , and leave the legacy i.mx5x/i.mx3x/i.mx2x firmware alone since not
sure which of the remain scripts should be in ram.Signed-off-by: Robin Gong
Reviewed-by: Shengjiu Wang -
Correct data size of channel context which would be save and restore back
during suspend/resume. Otherwise, potential memory break may come as
USB met.Signed-off-by: Robin Gong
Acked-by: Fugang Duan
Reported-by: Jun Li
Tested-by: Jun Li -
Correct the ram script number for v3.
Signed-off-by: Fugang Duan
-
Add pm_ops to support suspend & resume
Signed-off-by: Shengjiu Wang