27 Nov, 2020
2 commits
-
subdev_notifier_complete will be called multi times in some cases
due to workaround to support hotplugin-like mechanism, so add checking
media device register status before register new media device.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
There is no RGBA format in V4L2 framework when develop ISI mem2mem
driver, so we add V4L2_PIX_FMT_RGBA in V4L2 framework. But in the
latest kernel version, V4L2 framework add V4L2_PIX_FMT_RGBA32 for
RGBA format, so change use RGBA format define in latest framework.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai
21 Nov, 2020
3 commits
-
Remove 4K feature for ISI channel1 due to ISI line buffer limitation
Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
Remove "fsl,chain_buf" property parse because it's no longer used.
Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
Add workaround for iMX865 ISI to support 4K because for the ISI line
buffer management, the other chips used a single clock for all the
memories, where as in iMX865, each channel has the corresponding clock
which is used, so need to enable channel1 clock when channel0 chain
buffer enabled.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai
13 Nov, 2020
8 commits
-
Set the V4L2_SUBDEV_FL_HAS_DEVNODE flag in mipi_csis_subdev_init.
Signed-off-by: Oliver F. Brown
-
Align discard buffer size to page size.
Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
Adding 4K support for ISI of iMX8MN platform.
Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
Using spin_lock_irqsave instead of spin_lock to disable interrupt
when in irq handler to avoid potential race issue.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
Using list_del_init instead of list_del to remove list entry from list
Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
Remove redundant code for clean out pending and active list
Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
Disable ISI channel clock after stream off
Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
CHAIN_BUF occupy CHNL_CTRL[25:26], so the mask value should be 0x6000000.
Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai
08 Oct, 2020
1 commit
-
* tag 'v5.4.70': (3051 commits)
Linux 5.4.70
netfilter: ctnetlink: add a range check for l3/l4 protonum
ep_create_wakeup_source(): dentry name can change under you...
...Conflicts:
arch/arm/mach-imx/pm-imx6.c
arch/arm64/boot/dts/freescale/imx8mm-evk.dts
arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts
drivers/crypto/caam/caamalg.c
drivers/gpu/drm/imx/dw_hdmi-imx.c
drivers/gpu/drm/imx/imx-ldb.c
drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
drivers/mmc/host/sdhci-esdhc-imx.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/net/ethernet/freescale/enetc/enetc.c
drivers/net/ethernet/freescale/enetc/enetc_pf.c
drivers/thermal/imx_thermal.c
drivers/usb/cdns3/ep0.c
drivers/xen/swiotlb-xen.c
sound/soc/fsl/fsl_esai.c
sound/soc/fsl/fsl_sai.cSigned-off-by: Jason Liu
01 Oct, 2020
2 commits
-
[ Upstream commit 628cbd971a927abe6388d44320e351c337b331e4 ]
skb clones use same data buffer,
so tail of one skb is corrupted by beginning of next skb.Signed-off-by: Ivan Safonov
Link: https://lore.kernel.org/r/20200423191404.12028-1-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Sasha Levin -
[ Upstream commit ef0ed05dcef8a74178a8b480cce23a377b1de2b8 ]
There was supposed to be a "ret = " assignment here, otherwise the
error handling on the next line won't work.Fixes: 64b5a49df486 ("[media] media: imx: Add Capture Device Interface")
Signed-off-by: Dan Carpenter
Reviewed-by: Steve Longerbeam
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin
17 Sep, 2020
2 commits
-
commit 1dffeb8b8b4c261c45416d53c75ea51e6ece1770 upstream.
The current implementation for gbcodec_mixer_dapm_ctl_put() uses
uninitialized gbvalue for comparison with updated value. This was found
using static analysis with coverity.Uninitialized scalar variable (UNINIT)
11. uninit_use: Using uninitialized value
gbvalue.value.integer_value[0].
460 if (gbvalue.value.integer_value[0] != val) {This patch fixes the issue with fetching the gbvalue before using it for
comparision.Fixes: 6339d2322c47 ("greybus: audio: Add topology parser for GB codec")
Reported-by: Colin Ian King
Signed-off-by: Vaibhav Agarwal
Cc: stable
Link: https://lore.kernel.org/r/bc4f29eb502ccf93cd2ffd98db0e319fa7d0f247.1597408126.git.vaibhav.sr@gmail.com
Signed-off-by: Greg Kroah-Hartman -
commit fea22e159d51c766ba70473f473a0ec914cc7e92 upstream.
let's use usb_find_common_endpoints() to discover endpoints, it does all
necessary checks for type and xfer directionremove memset() in hfa384x_create(), because we now assign endpoints in
prism2sta_probe_usb() and because create_wlan() uses kzalloc() to
allocate hfa384x struct before calling hfa384x_create()Fixes: faaff9765664 ("staging: wlan-ng: properly check endpoint types")
Reported-and-tested-by: syzbot+22794221ab96b0bab53a@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=22794221ab96b0bab53a
Signed-off-by: Rustam Kovhaev
Cc: stable
Link: https://lore.kernel.org/r/20200804145614.104320-1-rkovhaev@gmail.com
Signed-off-by: Greg Kroah-Hartman
10 Sep, 2020
1 commit
-
[ Upstream commit b30063976f29fc221a99d18d37d22ca035068aa9 ]
The check for a required control in the request was missing a call to
v4l2_ctrl_request_hdl_put() in the error path. Fix it.Fixes: 50e761516f2b8c ("media: platform: Add Cedrus VPU decoder driver")
Signed-off-by: Ezequiel Garcia
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Sasha Levin
09 Sep, 2020
2 commits
-
Return directly for independent entity because it hasn't any links
with other entity, so needn't to do clean operation.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai
(cherry picked from commit 039d27179737734f9ffb6ef5badbdd35aac83ce2) -
Fix pyeiq can't detect camera device when build imx8-media-dev.c as
modules. Video device will be registered before entities link setup
and it will send an event to userspace once video device created.
Userspace will try to open the video device but entities links are
still not established due to driver need to wait all subdev register,
so driver will return -ENODEV, it leads to pyeiq fail. The patch add
checking for entities link when userspace try to open video device and
will return directly when links are not ready.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai
(cherry picked from commit de136a4752ea34ddea7143c7c5bec7c1ce1f12d4)
04 Sep, 2020
1 commit
-
Return error when no command support
Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai
(cherry picked from commit f59b06a40cd1aeb7948e3fd0b907296b686f9e12)
19 Aug, 2020
3 commits
-
[ Upstream commit c4283950a9a4d3bf4a3f362e406c80ab14f10714 ]
Currently the masking of ret with 0xff and followed by a right shift
of 8 bits always leaves a zero result. It appears the mask of 0xff
is incorrect and should be 0xff00, but I don't have the hardware to
test this. Fix this to mask the upper 8 bits before shifting.[ Not tested ]
Addresses-Coverity: ("Operands don't affect result")
Fixes: 8fc8598e61f6 ("Staging: Added Realtek rtl8192u driver to staging")
Signed-off-by: Colin Ian King
Link: https://lore.kernel.org/r/20200716154720.1710252-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Sasha Levin -
[ Upstream commit 5d9272e28a9a6117fb63f5f930991304765caa32 ]
All the registered children of vchiq have a corresponding call to
platform_device_unregister except bcm2835_audio. Fix that.Fixes: 25c7597af20d ("staging: vchiq_arm: Register a platform device for audio")
Signed-off-by: Phil Elwell
Signed-off-by: Jacopo Mondi
Signed-off-by: Nicolas Saenz Julienne
Link: https://lore.kernel.org/r/20200629150945.10720-9-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Sasha Levin -
For iMX8MP platform, csi driver need to get gpr to set isp_dewarp control
in mediamix_gpr registers, but for iMX8MN platform, there is no isp dewarp
module, driver don't need to get gpr property in driver. So only print error
message when there is no gpr property instead of return error.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai
(cherry picked from commit 6bd941f789d258d8146c257ff3ff4bbfb7aab416)
14 Aug, 2020
2 commits
-
Skip v4l2 register subdev for isi, the second csi and ov5640 sensor
because currently, isp_media_server can't handle multi camera case,
if there are other /dev/v4l-subdev, isp_media_server can't handle.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
Reuse samsung csi driver for isp of iMX8MP platform. CSI driver
are shared by ISI and ISP.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai
11 Aug, 2020
3 commits
-
commit 11536442a3b4e1de6890ea5e805908debb74f94a upstream.
The variable authmode can be uninitialized. The danger would be if
it equals to _WPA_IE_ID_ (0xdd) or _WPA2_IE_ID_ (0x33). We can avoid
this by setting it to zero instead. This is the approach that was
used in the rtl8723bs driver.Fixes: 7b464c9fa5cc ("staging: r8188eu: Add files for new driver - part 4")
Co-developed-by: Dan Carpenter
Signed-off-by: Dan Carpenter
Signed-off-by: Dinghao Liu
Cc: stable
Link: https://lore.kernel.org/r/20200728072153.9202-1-dinghao.liu@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman -
commit b4383c971bc5263efe2b0915ba67ebf2bf3f1ee5 upstream.
when firmware fails to load we should not call unregister_netdev()
this patch fixes a race condition between rtl871x_load_fw_cb() and
r871xu_dev_remove() and fixes the bug reported by syzbotReported-by: syzbot+80899a8a8efe8968cde7@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=80899a8a8efe8968cde7
Signed-off-by: Rustam Kovhaev
Cc: stable
Link: https://lore.kernel.org/r/20200716151324.1036204-1-rkovhaev@gmail.com
Signed-off-by: Greg Kroah-Hartman -
commit 3e338d3c95c735dc3265a86016bb4c022ec7cadc upstream.
syzbot report [1] describes a deadlock when write operation against an
ashmem fd executed at the time when ashmem is shrinking its cache results
in the following lock sequence:Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(fs_reclaim);
lock(&sb->s_type->i_mutex_key#13);
lock(fs_reclaim);
lock(&sb->s_type->i_mutex_key#13);kswapd takes fs_reclaim and then inode_lock while generic_perform_write
takes inode_lock and then fs_reclaim. However ashmem does not support
writing into backing shmem with a write syscall. The only way to change
its content is to mmap it and operate on mapped memory. Therefore the race
that lockdep is warning about is not valid. Resolve this by introducing a
separate lockdep class for the backing shmem inodes.[1]: https://lkml.kernel.org/lkml/0000000000000b5f9d059aa2037f@google.com/
Reported-by: syzbot+7a0d9d0b26efefe61780@syzkaller.appspotmail.com
Signed-off-by: Suren Baghdasaryan
Cc: stable
Reviewed-by: Joel Fernandes (Google)
Link: https://lore.kernel.org/r/20200730192632.3088194-1-surenb@google.com
Signed-off-by: Greg Kroah-Hartman
31 Jul, 2020
10 commits
-
Config isi core driver as tristate
Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
Config isi mem2mem driver as tristate
Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
Config isi capture driver as tristate
Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
In order to decouple ISI core, capture and mem2mem driver, need to config
imx8-isi-hw.c as a separate driver and build as tristateSigned-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
mxc_isi_get_hostdata() and mxc_isi_dev_get_parent() are defined in isi
core driver and they will be used capture and mem2mem driver, so moving
them from core driver to isi hardware driver will be better.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
mxc_isi_m2m_frame_write_done is called in imx8-isi-core.c driver.
if build the driver as modules, mem2mem driver need to export the
function.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
mxc_isi_cap_frame_write_done is called in imx8-isi-core.c driver,
if build the driver as modules, capture driver need to export the
function.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
Because ISI hardware is shared by capture and mem2mem driver. Their
functions depended on methods in imx8-isi-hw.c to do register read/
write operation. When build capture and mem2mem driver as modules,we
need to export methods in imx8-isi-hw.c file.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
We create a virtual capture device under isi device and isi driver will
populate platform device for the virtual device, but missed depopulate
operation when parent(isi) driver removed.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai -
Because iMX8QXP/QM parallel interface for camera rely on multi power
domain resources, so driver will attach the related power domain when
driver probe and missed detach operation when driver removed.Signed-off-by: Guoniu.zhou
Reviewed-by: Robby Cai