Commit Graph

2068 Commits

Author SHA1 Message Date
Tao Huang
3430c68a33 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (660 commits)
  ANDROID: keychord: Check for write data size
  ANDROID: sdcardfs: Set num in extension_details during make_item
  ANDROID: sdcardfs: Hold i_mutex for i_size_write
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck64-XTS
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck128-XTS
  BACKPORT, FROMGIT: crypto: arm/speck - add NEON-accelerated implementation of Speck-XTS
  FROMGIT: crypto: speck - export common helpers
  BACKPORT, FROMGIT: crypto: speck - add support for the Speck block cipher
  UPSTREAM: ANDROID: binder: synchronize_rcu() when using POLLFREE.
  f2fs: updates on v4.16-rc1
  BACKPORT: tee: shm: Potential NULL dereference calling tee_shm_register()
  BACKPORT: tee: shm: don't put_page on null shm->pages
  BACKPORT: tee: shm: make function __tee_shm_alloc static
  BACKPORT: tee: optee: check type of registered shared memory
  BACKPORT: tee: add start argument to shm_register callback
  BACKPORT: tee: optee: fix header dependencies
  BACKPORT: tee: shm: inline tee_shm_get_id()
  BACKPORT: tee: use reference counting for tee_context
  BACKPORT: tee: optee: enable dynamic SHM support
  BACKPORT: tee: optee: add optee-specific shared pool implementation
  ...

Conflicts:
	drivers/irqchip/Kconfig
	drivers/media/i2c/tc35874x.c
	drivers/media/v4l2-core/v4l2-compat-ioctl32.c
	drivers/usb/gadget/function/f_fs.c
	fs/f2fs/node.c

Change-Id: Icecd73a515821b536fa3d81ea91b63d9b3699916
2018-03-09 19:10:14 +08:00
Jacob Chen
eae92ae2b9 media: rockchip: rga: add userptr to use normal cache-enabled memory
It seems people still need it

Change-Id: I4aa312b46f795beeb3eff415a971d13e81f030f8
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2018-02-24 14:07:51 +08:00
Jesse Chan
4f8a4e9984 media: soc_camera: soc_scale_crop: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE
commit 5331aec1bf upstream.

This change resolves a new compile-time warning
when built as a loadable module:

WARNING: modpost: missing MODULE_LICENSE() in drivers/media/platform/soc_camera/soc_scale_crop.o
see include/linux/module.h for more information

This adds the license as "GPL", which matches the header of the file.

MODULE_DESCRIPTION and MODULE_AUTHOR are also added.

Signed-off-by: Jesse Chan <jc@linux.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16 20:09:38 +01:00
Wen Nuan
ad46e68846 phy: rockchip: mipi-dphy-tx1rx1: add mipi-dphy TX1RX1 channel for RK3288
This patch adds the function of mipi-dphy TX1RX1 for RK3288, the
mipi-dphy TX1RX1 is matched when "txrx_base_addr" is valid.

Change-Id: I01640925157a7082e942188b29f6bbf1318cf3d5
Signed-off-by: Wen Nuan <leo.wen@rock-chips.com>
2018-02-13 09:39:36 +08:00
Tao Huang
f9eefeeaa7 rk: add SPDX license identifier to files with no license
Change-Id: I754250669891307b0deab2bdab1bd01512713f79
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-31 20:56:06 +08:00
Jacob Chen
c1df7dec16 media: rk-isp10: grab a copy of userspace headers
Change-Id: I75ceb19f0f4c9a420440ae73538f030aaf49fb95
Signed-off-by: Jacob Chen <cc@rock-chips.com>
2018-01-20 15:26:04 +08:00
Jacob Chen
fc46944d43 media: rockchip: rga: move to rockchip subdir
Change-Id: I3d9a8b0f046b6b34712d3c3c34ff5c5b468bc048
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2018-01-05 18:00:33 +08:00
Jacob Chen
3af6218029 media: rockchip: isp: manual IOMMU management
Rockchip 4.4 kernel don't support of_iommu,
so we have to manage it manualy

Change-Id: I38e784e97f1df336837c5ded2b47932f6add180f
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2018-01-05 17:57:22 +08:00
Shunqian Zheng
4a44a24fd2 CHROMIUM: media: rockchip/isp1: fixup for different media/v4l API
Fixup for differences of the previous FROMLIST patches for
rockchip isp1 driver as following,
 - regression of UPSTREAM commits
   + d6dd645eae: ("[media] media: videobuf2: Move timestamp to vb2_buffer")
   + 36c0f8b32c: ("[media] vb2: replace void *alloc_ctxs by struct device *alloc_devs")
   + df9ecb0cad: ("[media] vb2: drop v4l2_format argument from queue_setup")
 - API changes of (4.4 v.s. UPSTREAM)
   + media_entity_pipeline_start/stop() v.s. media_pipeline_start/stop()
   + media_entity_init() v.s. media_entity_pads_init()
   + media_entity_create_link() v.s. media_create_pad_link()
   + media_device_init()
   + entity function flags: MEDIA_ENT_F_IO_V4L and MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN

BUG=b:36227021
TEST=Camera works on Scarlet with the whole series

Change-Id: I4d9c9f784210fda2165ac5372baea09a9c01a30d
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2018-01-05 17:57:22 +08:00
Jacob Chen
f92c8b0016 FROMLIST: media: rkisp1: add rockchip isp1 core driver
Add the core driver for rockchip isp1.

Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Yichong Zhong <zyc@rock-chips.com>
Signed-off-by: Jacob Chen <cc@rock-chips.com>
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>

BUG=b:36227021
TEST=Camera works on Scarlet with the whole series
(am from https://patchwork.linuxtv.org/patch/46240/)
Conflicts:
	drivers/media/platform/Kconfig
	drivers/media/platform/Makefile

Change-Id: I09bd87cf0a0557079e93e94a41dc673f36c63f6a
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2018-01-05 17:57:22 +08:00
Jacob Chen
68c406aa36 FROMLIST: media: rkisp1: add capture device driver
This is the capture device interface driver that provides the v4l2
user interface. Frames can be received from ISP1.

Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Yichong Zhong <zyc@rock-chips.com>
Signed-off-by: Jacob Chen <cc@rock-chips.com>
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>

BUG=b:36227021
TEST=Camera works on Scarlet with the whole series
(am from https://patchwork.linuxtv.org/patch/46232/)

Change-Id: I3ff679d32c48c8dd8e91f22879e58e1b1ef896d7
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2018-01-05 17:57:22 +08:00
Jacob Chen
760a375e13 FROMLIST: media: rkisp1: add ISP1 params driver
Add the output video driver that accept params from userspace.

Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Yichong Zhong <zyc@rock-chips.com>
Signed-off-by: Jacob Chen <cc@rock-chips.com>
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>

BUG=b:36227021
TEST=Camera works on Scarlet with the whole series
(am from https://patchwork.linuxtv.org/patch/46241/)

Change-Id: Ibabcbfb8a607da9e51d124bc878dcc09f201c26b
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2018-01-05 17:57:22 +08:00
Jacob Chen
d41678365a FROMLIST: media: rkisp1: add ISP1 statistics driver
Add the capture video driver for rockchip isp1 statistics block.

Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Yichong Zhong <zyc@rock-chips.com>
Signed-off-by: Jacob Chen <cc@rock-chips.com>
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>

BUG=b:36227021
TEST=Camera works on Scarlet with the whole series
(am from https://patchwork.linuxtv.org/patch/46242/)

Change-Id: I70f8b17cde2102cee7742101b38a532fb800ff67
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2018-01-05 17:57:22 +08:00
Jacob Chen
f508b1a615 FROMLIST: media: rkisp1: add Rockchip ISP1 subdev driver
Add the subdev driver for rockchip isp1.

Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Yichong Zhong <zyc@rock-chips.com>
Signed-off-by: Jacob Chen <cc@rock-chips.com>
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>

BUG=b:36227021
TEST=Camera works on Scarlet with the whole series
(am from https://patchwork.linuxtv.org/patch/46244/)

Change-Id: I3d4b7aba7ce2d20f1f7c3983ef9bd301c96e5fb3
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2018-01-05 17:57:22 +08:00
Jacob Chen
b46ee0e23a FROMLIST: media: rkisp1: add Rockchip MIPI Synopsys DPHY driver
This commit adds a subdev driver for Rockchip MIPI Synopsys DPHY driver

Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>

BUG=b:36227021
TEST=Camera works on Scarlet with the whole series
(am from https://patchwork.linuxtv.org/patch/46243/)

Change-Id: Ic5746f1cddf0900054750e9f4e0f0171e5206d70
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2018-01-05 17:57:22 +08:00
Tao Huang
afd240d168 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (510 commits)
  Linux 4.4.103
  Revert "sctp: do not peel off an assoc from one netns to another one"
  xen: xenbus driver must not accept invalid transaction ids
  s390/kbuild: enable modversions for symbols exported from asm
  ASoC: wm_adsp: Don't overrun firmware file buffer when reading region data
  btrfs: return the actual error value from from btrfs_uuid_tree_iterate
  ASoC: rsnd: don't double free kctrl
  netfilter: nf_tables: fix oob access
  netfilter: nft_queue: use raw_smp_processor_id()
  spi: SPI_FSL_DSPI should depend on HAS_DMA
  staging: iio: cdc: fix improper return value
  iio: light: fix improper return value
  mac80211: Suppress NEW_PEER_CANDIDATE event if no room
  mac80211: Remove invalid flag operations in mesh TSF synchronization
  drm: Apply range restriction after color adjustment when allocation
  ALSA: hda - Apply ALC269_FIXUP_NO_SHUTUP on HDA_FIXUP_ACT_PROBE
  ath10k: set CTS protection VDEV param only if VDEV is up
  ath10k: fix potential memory leak in ath10k_wmi_tlv_op_pull_fw_stats()
  ath10k: ignore configuring the incorrect board_id
  ath10k: fix incorrect txpower set by P2P_DEVICE interface
  ...

Conflicts:
	drivers/media/v4l2-core/v4l2-ctrls.c
	kernel/sched/fair.c

Change-Id: I48152b2a0ab1f9f07e1da7823119b94f9b9e1751
2017-12-01 11:04:13 +08:00
Hu Kejun
a3c79584a4 media: rk-isp10: support isp0 and isp1 run at the same time
1. support isp0 and isp1 run at the same time;
2. support VIDIOC_G_INPUT command;
3. support VIDIOC_G_PARM command;
4. support VIDIOC_G_PARM command;
5. add pix.bytesperline and pix.sizeimage in VIDIOC_G_FMT command;

Change-Id: I6d0347350a0bef372ee2e01c508b2fb581ea7cfc
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2017-11-27 14:17:45 +08:00
Laurent Pinchart
5e744b23da FROMLIST: v4l: async: Move async subdev notifier operations to a separate structure
The async subdev notifier .bound(), .unbind() and .complete() operations
are function pointers stored directly in the v4l2_async_subdev
structure. As the structure isn't immutable, this creates a potential
security risk as the function pointers are mutable.

To fix this, move the function pointers to a new
v4l2_async_subdev_operations structure that can be made const in
drivers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
(cherry picked from commit ef44d7cb0c00968dc62987a6d0438ec30ca8c06c)
https://git.linuxtv.org/sailus/media_tree.git/log/?h=010f7f4393fd
http://www.spinics.net/lists/linux-media/msg122688.html
Signed-off-by: Marc Herbert <marc.herbert@intel.com>

    Conflicts:
            drivers/media/pci/intel/ipu3/ipu3-cio2.c
    (implement change in non-upstream driver)
            drivers/media/platform/davinci/vpif_capture.c
(Change vpif_probe() instead of newer vpif_capture_get_pdata() UNTESTED)
            drivers/media/platform/omap3isp/isp.c
(Add .bound = isp_subdev_notifier_bound which we still have UNTESTED)
            drivers/media/platform/atmel/atmel-isc.c
            drivers/media/platform/atmel/atmel-isi.c
            drivers/media/platform/pxa_camera.c
            drivers/media/platform/qcom/camss-8x16/camss.c
            drivers/media/platform/rcar-vin/rcar-core.c
            drivers/media/platform/rcar_drif.c
            drivers/media/platform/stm32/stm32-dcmi.c
            drivers/media/platform/ti-vpe/cal.c
            drivers/staging/media/imx/imx-media-dev.c
    (Ignore drivers we don't have)

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: Ic3c4a327763507c8b4fa242ae4642a633e3c7dbc
Reviewed-on: https://chromium-review.googlesource.com/693689
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Peng Zhou
00b6248f20 rockchip: vip: remove unused head-file
Add deinit gpiod for camera sensor when probe failed.
The video_device->ctrl_handler = NULL in soc_camera, in order to
VIDIOC_CTRL call v4l2_ioctl_ops.

Change-Id: Idf2d8bf2c8d56ec921084dcd74220ed3c5541427
Signed-off-by: Peng Zhou <benjo.zhou@rock-chips.com>
2017-11-15 20:37:10 +08:00
Arvind Yadav
0e97077574 exynos4-is: fimc-is: Unmap region obtained by of_iomap()
[ Upstream commit 4742575cde ]

Free memory mapping, if fimc_is_probe is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-08 10:06:30 +01:00
Tao Huang
6bedca442a Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (546 commits)
  Linux 4.4.93
  x86/alternatives: Fix alt_max_short macro to really be a max()
  USB: serial: console: fix use-after-free after failed setup
  USB: serial: qcserial: add Dell DW5818, DW5819
  USB: serial: option: add support for TP-Link LTE module
  USB: serial: cp210x: add support for ELV TFD500
  USB: serial: ftdi_sio: add id for Cypress WICED dev board
  fix unbalanced page refcounting in bio_map_user_iov
  direct-io: Prevent NULL pointer access in submit_page_section
  usb: gadget: composite: Fix use-after-free in usb_composite_overwrite_options
  ALSA: line6: Fix leftover URB at error-path during probe
  ALSA: caiaq: Fix stray URB at probe error path
  ALSA: seq: Fix copy_from_user() call inside lock
  ALSA: seq: Fix use-after-free at creating a port
  ALSA: usb-audio: Kill stray URB at exiting
  iommu/amd: Finish TLB flush in amd_iommu_unmap()
  usb: renesas_usbhs: Fix DMAC sequence for receiving zero-length packet
  KVM: nVMX: fix guest CR4 loading when emulating L2 to L1 exit
  crypto: shash - Fix zero-length shash ahash digest crash
  HID: usbhid: fix out-of-bounds bug
  ...

Conflicts:
	drivers/cpufreq/cpufreq-dt.c
	drivers/usb/dwc3/gadget.c

Change-Id: I1a24ad0bba307b56b5ddf1fd7c4832ffb73ad12f
2017-11-02 17:00:07 +08:00
Jacob Chen
6a77d26968 media: rockchip: rga: add quantization support
Also:
- correct the default quantization for RGB input, it should be full range.

Change-Id: I786799a3532b5c3a18e67c9195ec24ea811d1144
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-01 14:39:35 +08:00
Peng Zhou
016f7ec166 Rockchip: vip: support cif controller
Transplant from kernel v3.10.

Change-Id: I8b1f8d664ebcaad435132f260250204255793b66
Signed-off-by: Peng Zhou <benjo.zhou@rock-chips.com>
2017-10-31 09:49:17 +08:00
Thibault Saunier
fa029020bd exynos-gsc: Do not swap cb/cr for semi planar formats
[ Upstream commit d7f3e33df4 ]

In the case of semi planar formats cb and cr are in the same plane
in memory, meaning that will be set to 'cb' whatever the format is,
and whatever the (packed) order of those components are.

Suggested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Thibault Saunier <thibault.saunier@osg.samsung.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:14:19 +02:00
Jacob Chen
1750e8d84e media: rk-isp10: test suite 'v4l2-ctl' passed
Initialize default format for current stream and set stream state
to 'READY' in case of streaming on by user without passing format
to driver. Default format will be overridden by VIDIOC_S_FMT.

Implement VIDIOC_G_FMT and application can get the format info
of current stream now. This will become necessary when enable
'--set-fmt-video' option of v4l2-ctl test suite,

Set bytesused of each plane to its real size to prevent confusing.

The IO mode of vb2 queue 'VB2_DMABUF' is now supported.

Change-Id: Id52da502df8aea796b3405ebf472541a394afd80
Signed-off-by: Jacob Chen <cc@rock-chips.com>
2017-09-21 10:38:49 +08:00
zhoupeng
0067ec165b media: rk-isp10: optimize readability of code
rk-isp10: version 0.1.a
1. To optimize the readability of the code, based on v0.1.9
2. Optimize CIF_MI_CTRL_BURST_LEN param.
3. Add check for cam_itf.type(PLTFRM_CAM_ITF_BT656_8I) on
cif_isp10_s_fmt_mp.
4. get field_flag value from cif_isp10_isp_isr.

Change-Id: I334595c01e8b418b47e0a54e6fdfcf624445ff9f
Signed-off-by: zhoupeng <benjo.zhou@rock-chips.com>
2017-09-19 11:26:52 +08:00
zhoupeng
3565b1e7e8 media: rk-isp10: support bt656 signal interlace
odd and even field interlace generating a frame image.
fix cif_isp10_img_src_v4l2_subdev_enum_strm_fmts defrect info get error.
fix cif_isp10_rk3399 cif_clk_pll info doesn't match with dts config.

Change-Id: I44159c0dd4e676334221b5d5682e29d3280aa9fd
Signed-off-by: zhoupeng <benjo.zhou@rock-chips.com>
2017-09-12 19:09:55 +08:00
Tao Huang
dc6b994588 Merge tag 'lsk-v4.4-17.08-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
LSK 17.08 v4.4-android

* tag 'lsk-v4.4-17.08-android': (451 commits)
  Linux 4.4.83
  pinctrl: samsung: Remove bogus irq_[un]mask from resource management
  pinctrl: sunxi: add a missing function of A10/A20 pinctrl driver
  pnfs/blocklayout: require 64-bit sector_t
  iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits
  usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume
  usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter
  usb: core: unlink urbs from the tail of the endpoint's urb_list
  USB: Check for dropped connection before switching to full speed
  uag: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069
  iio: light: tsl2563: use correct event code
  iio: accel: bmc150: Always restore device to normal mode after suspend-resume
  staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read
  USB: hcd: Mark secondary HCD as dead if the primary one died
  usb: musb: fix tx fifo flush handling again
  USB: serial: pl2303: add new ATEN device id
  USB: serial: cp210x: add support for Qivicon USB ZigBee dongle
  USB: serial: option: add D-Link DWM-222 device ID
  nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays
  fuse: initialize the flock flag in fuse_file on allocation
  ...
2017-09-01 18:56:00 +08:00
Hu Kejun
09a2b13d8b media: rk-isp10: Fix oops error when soc_clk_disable is called in rk3399
Change-Id: I046855bf1f699c5bd8aac77daf726dbd63070593
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2017-09-01 14:07:14 +08:00
Jacob Chen
31a29aae3d media: rk-isp10: MP/SP support export buffer to user.
Change-Id: I5f6f252a579da9d5e50f69f5062cdbbc62978207
Signed-off-by: Jacob Chen <cc@rock-chips.com>
2017-08-31 15:36:16 +08:00
Hu Kejun
eb1f4ff9ba media: isp: add support to isp1
The running of isp0 or isp1 is ok,
but running of isp0 and isp1 at the same time has not been tested.

Change-Id: I430aafb6060eb5aea464ddce05614604ee015e78
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2017-08-31 15:35:24 +08:00
Jacob Chen
315f0de380 media: platform: rga: correct rgb24 rb swap
rgb24 don't need enable rbswap

Change-Id: I23e57977b7dd1a4d8fa3cbd357c9cfb3ddfd1126
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-31 11:54:37 +08:00
Sakari Ailus
cd40430ed3 BACKPORT: [media] v4l: Switch from V4L2 OF not V4L2 fwnode API
Switch users of the v4l2_of_ APIs to the more generic v4l2_fwnode_ APIs.
Async OF matching is replaced by fwnode matching and OF matching support
is removed.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Benoit Parrot <bparrot@ti.com> # i2c/ov2569.c, am437x/am437x-vpfe.c and ti-vpe/cal.c
Tested-by: Hans Verkuil <hans.verkuil@cisco.com> # Atmel sama5d3 board + ov2640 sensor
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 859969b38e)
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>

Conflicts:
Nathan: context, comment and include deltas, as well as deleting files
that don't apply to ChromeOS-4.4 yet
	drivers/media/i2c/Kconfig
	drivers/media/i2c/mt9v032.c
	drivers/media/i2c/ov5645.c
	drivers/media/i2c/ov5647.c
	drivers/media/i2c/s5c73m3/s5c73m3-core.c
	drivers/media/i2c/smiapp/smiapp-core.c
	drivers/media/i2c/tc358743.c
	drivers/media/i2c/tvp514x.c
	drivers/media/i2c/tvp5150.c
	drivers/media/i2c/tvp7002.c
	drivers/media/platform/Kconfig
	drivers/media/platform/atmel/Kconfig
	drivers/media/platform/atmel/atmel-isc.c
	drivers/media/platform/atmel/atmel-isi.c
	drivers/media/platform/exynos4-is/mipi-csis.c
	drivers/media/platform/omap3isp/isp.c
	drivers/media/platform/pxa_camera.c
	drivers/media/platform/rcar-vin/Kconfig
	drivers/media/platform/rcar-vin/rcar-core.c
	drivers/media/platform/soc_camera/soc_camera.c
	drivers/media/platform/stm32/stm32-dcmi.c
	drivers/media/platform/ti-vpe/cal.c
	include/media/v4l2-subdev.h

BUG=b:62359918
TEST=No regression in camera functionality
TEST=Kernel builds and boots

Change-Id: If338e2ab0c68c72f242988f34202e0449642734c
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/528621
Commit-Ready: Nathan D Ciobanu <nathan.d.ciobanu@intel.com>
Tested-by: Yong Zhi <yong.zhi@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-30 17:31:38 +08:00
Prabhakar Lad
fa95dfc750 media: platform: davinci: return -EINVAL for VPFE_CMD_S_CCDC_RAW_PARAMS ioctl
commit da05d52d2f upstream.

this patch makes sure VPFE_CMD_S_CCDC_RAW_PARAMS ioctl no longer works
for vpfe_capture driver with a minimal patch suitable for backporting.

- This ioctl was never in public api and was only defined in kernel header.
- The function set_params constantly mixes up pointers and phys_addr_t
  numbers.
- This is part of a 'VPFE_CMD_S_CCDC_RAW_PARAMS' ioctl command that is
  described as an 'experimental ioctl that will change in future kernels'.
- The code to allocate the table never gets called after we copy_from_user
  the user input over the kernel settings, and then compare them
  for inequality.
- We then go on to use an address provided by user space as both the
  __user pointer for input and pass it through phys_to_virt to come up
  with a kernel pointer to copy the data to. This looks like a trivially
  exploitable root hole.

Due to these reasons we make sure this ioctl now returns -EINVAL and backport
this patch as far as possible.

Fixes: 5f15fbb68f ("V4L/DVB (12251): v4l: dm644x ccdc module for vpfe capture driver")

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-11 09:08:48 -07:00
Jacob Chen
ad9703226a FROMLIST: rockchip/rga: v4l2 m2m support
Rockchip RGA is a separate 2D raster graphic acceleration unit. It
accelerates 2D graphics operations, such as point/line drawing, image
scaling, rotation, BitBLT, alpha blending and image blur/sharpness

The drvier is mostly based on s5p-g2d v4l2 m2m driver
And supports various operations from the rendering pipeline.
 - copy
 - fast solid color fill
 - rotation
 - flip
 - alpha blending

The code in rga-hw.c is used to configure regs accroding to operations
The code in rga-buf.c is used to create (1-Level)mmu table for RGA
The tables is stored in a list, and be removed when buffer is cleanup
(am form https://patchwork.linuxtv.org/patch/42846/)

Change-Id: I3ddd885beb2388be2ef23fe75806719d1fda8695
Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-08-04 15:39:06 +08:00
Mauro Carvalho Chehab
f440ec864f s5p-jpeg: don't return a random width/height
commit a16e37726c upstream.

Gcc 7.1 complains about:

drivers/media/platform/s5p-jpeg/jpeg-core.c: In function 's5p_jpeg_parse_hdr.isra.9':
drivers/media/platform/s5p-jpeg/jpeg-core.c:1207:12: warning: 'width' may be used uninitialized in this function [-Wmaybe-uninitialized]
  result->w = width;
  ~~~~~~~~~~^~~~~~~
drivers/media/platform/s5p-jpeg/jpeg-core.c:1208:12: warning: 'height' may be used uninitialized in this function [-Wmaybe-uninitialized]
  result->h = height;
  ~~~~~~~~~~^~~~~~~~

Indeed the code would allow it to return a random value (although
it shouldn't happen, in practice). So, explicitly set both to zero,
just in case.

Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-27 15:06:02 -07:00
Jacob Chen
f08082651f media: isp: migrate isp driver to videobuf2
Verify the functionality of isp driver with
sensor ov7750.
V4l2n or gstreamer is suitable for test.

Change-Id: I4f0cf68b84f4909dd1c132ec3506777f39d487ee
Signed-off-by: Jacob Chen <cc@rock-chips.com>
2017-07-13 11:33:10 +08:00
Huang, Tao
ad2fc3b29a Merge tag 'lsk-v4.4-17.05-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
LSK 17.05 v4.4-android

* tag 'lsk-v4.4-17.05-android': (266 commits)
  BACKPORT: mm/slab: clean up DEBUG_PAGEALLOC processing code
  Linux 4.4.70
  UPSTREAM: arm64: hibernate: Support DEBUG_PAGEALLOC
  BACKPORT: arm64: vmlinux.ld: Add mmuoff data sections and move mmuoff text into idmap
  BACKPORT: arm64: Create sections.h
  ANDROID: uid_sys_stats: defer io stats calulation for dead tasks
  ANDROID: AVB: Fix linter errors.
  ANDROID: AVB: Fix invalidate_vbmeta_submit().
  drivers: char: mem: Check for address space wraparound with mmap()
  nfsd: encoders mustn't use unitialized values in error cases
  drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2
  PCI: Freeze PME scan before suspending devices
  PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms
  tracing/kprobes: Enforce kprobes teardown after testing
  osf_wait4(): fix infoleak
  genirq: Fix chained interrupt data ordering
  uwb: fix device quirk on big-endian hosts
  metag/uaccess: Check access_ok in strncpy_from_user
  metag/uaccess: Fix access_ok()
  iommu/vt-d: Flush the IOTLB to get rid of the initial kdump mappings
  ...
2017-06-07 10:03:03 +08:00
Marek Szyprowski
a896652f6a s5p-mfc: Fix unbalanced call to clock management
commit a5cb00eb42 upstream.

Clock should be turned off after calling s5p_mfc_init_hw() from the
watchdog worker, like it is already done in the s5p_mfc_open() which also
calls this function.

Fixes: af93574678 ("[media] MFC: Add MFC 5.1 V4L2 driver")

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 14:30:14 +02:00
Huang, Tao
77bab04357 Merge tag 'lsk-v4.4-17.03-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
LSK 17.03 v4.4-android

* tag 'lsk-v4.4-17.03-android': (166 commits)
  Linux 4.4.55
  ext4: don't BUG when truncating encrypted inodes on the orphan list
  dm: flush queued bios when process blocks to avoid deadlock
  nfit, libnvdimm: fix interleave set cookie calculation
  s390/kdump: Use "LINUX" ELF note name instead of "CORE"
  KVM: s390: Fix guest migration for huge guests resulting in panic
  mvsas: fix misleading indentation
  serial: samsung: Continue to work if DMA request fails
  USB: serial: io_ti: fix information leak in completion handler
  USB: serial: io_ti: fix NULL-deref in interrupt callback
  USB: iowarrior: fix NULL-deref in write
  USB: iowarrior: fix NULL-deref at probe
  USB: serial: omninet: fix reference leaks at open
  USB: serial: safe_serial: fix information leak in completion handler
  usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers
  usb: host: xhci-dbg: HCIVERSION should be a binary number
  usb: gadget: function: f_fs: pass companion descriptor along
  usb: dwc3: gadget: make Set Endpoint Configuration macros safe
  usb: gadget: dummy_hcd: clear usb_gadget region before registration
  powerpc: Emulation support for load/store instructions on LE
  ...

Change-Id: I4db95bbe5b2523e19ddf22b3f65863f7f6d46632
2017-03-31 11:43:47 +08:00
Nicolas Iooss
5988e73201 am437x-vpfe: always assign bpp variable
commit 6ebf75774f upstream.

In vpfe_s_fmt(), when the sensor format and the requested format were
the same, bpp was assigned to vpfe->bpp without being initialized first.

Grab the bpp value that is currently used by using __vpfe_get_format()
instead of its wrapper, vpfe_try_fmt().

This use of uninitialized variable has been found by compiling the
kernel with clang.

Fixes: 417d2e507e ("[media] media: platform: add VPFE capture driver
support for AM437X")

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12 06:37:24 +01:00
Huang, Tao
5ed6b099c8 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (434 commits)
  Linux 4.4.52
  kvm: vmx: ensure VMCS is current while enabling PML
  Revert "usb: chipidea: imx: enable CI_HDRC_SET_NON_ZERO_TTHA"
  rtlwifi: rtl_usb: Fix for URB leaking when doing ifconfig up/down
  block: fix double-free in the failure path of cgwb_bdi_init()
  goldfish: Sanitize the broken interrupt handler
  x86/platform/goldfish: Prevent unconditional loading
  USB: serial: ark3116: fix register-accessor error handling
  USB: serial: opticon: fix CTS retrieval at open
  USB: serial: spcp8x5: fix modem-status handling
  USB: serial: ftdi_sio: fix line-status over-reporting
  USB: serial: ftdi_sio: fix extreme low-latency setting
  USB: serial: ftdi_sio: fix modem-status error handling
  USB: serial: cp210x: add new IDs for GE Bx50v3 boards
  USB: serial: mos7840: fix another NULL-deref at open
  tty: serial: msm: Fix module autoload
  net: socket: fix recvmmsg not returning error from sock_error
  ip: fix IP_CHECKSUM handling
  irda: Fix lockdep annotations in hashbin_delete().
  dccp: fix freeing skb too early for IPV6_RECVPKTINFO
  ...

Conflicts:
	drivers/mmc/core/mmc.c
	drivers/usb/dwc3/ep0.c
	drivers/usb/host/xhci.h

Change-Id: Icf331a68162ab686d01996a3f43fa2e97543f62e
2017-03-01 18:40:28 +08:00
Dan Carpenter
b02d7a8219 blackfin: check devm_pinctrl_get() for errors
commit c9205e18b4 upstream.

devm_pinctrl_get() can fail so we should check for that.

Fixes: 0a6824bc10 ('[media] v4l2: blackfin: select proper pinctrl state in ppi_set_params if CONFIG_PINCTRL is enabled')

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-26 08:23:49 +01:00
dalong.zhang
8bffe04905 isp10: rockchip: v0.1.6
Change-Id: I1b702fb51d1baabd47f190fdafd79ecd22e18be0
Signed-off-by: dalong.zhang <dalon.zhang@rock-chips.com>
2016-11-29 21:11:43 +08:00
Huang, Tao
f9ae5d202b Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (1362 commits)
  Linux 4.4.30
  Revert "fix minor infoleak in get_user_ex()"
  Revert "x86/mm: Expand the exception table logic to allow new handling options"
  Linux 4.4.29
  ARM: pxa: pxa_cplds: fix interrupt handling
  powerpc/nvram: Fix an incorrect partition merge
  mpt3sas: Don't spam logs if logging level is 0
  perf symbols: Fixup symbol sizes before picking best ones
  perf symbols: Check symbol_conf.allow_aliases for kallsyms loading too
  perf hists browser: Fix event group display
  clk: divider: Fix clk_divider_round_rate() to use clk_readl()
  clk: qoriq: fix a register offset error
  s390/con3270: fix insufficient space padding
  s390/con3270: fix use of uninitialised data
  s390/cio: fix accidental interrupt enabling during resume
  x86/mm: Expand the exception table logic to allow new handling options
  dmaengine: ipu: remove bogus NO_IRQ reference
  power: bq24257: Fix use of uninitialized pointer bq->charger
  staging: r8188eu: Fix scheduling while atomic splat
  ASoC: dapm: Fix kcontrol creation for output driver widget
  ...
2016-11-04 14:30:24 +08:00
Arnd Bergmann
7fb33fb721 am437x-vfpe: fix typo in vpfe_get_app_input_index
commit 0fb5040011 upstream.

gcc-6 points out an obviously silly comparison in vpfe_get_app_input_index():

drivers/media/platform/am437x/am437x-vpfe.c: In function 'vpfe_get_app_input_index':
drivers/media/platform/am437x/am437x-vpfe.c:1709:27: warning: self-comparison always evaluats to true [-Wtautological-compare]
       client->adapter->nr == client->adapter->nr) {
                           ^~

This was introduced in a slighly incorrect conversion, and it's
clear that the comparison was meant to compare the iterator
to the current subdev instead, as we do in the line above.

Fixes: d37232390f ("[media] media: am437x-vpfe: match the OF node/i2c addr instead of name")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-30 10:18:35 +02:00
Javier Martinez Canillas
31edf03971 s5p-mfc: Add release callback for memory region devs
commit 6311f1261f upstream.

When s5p_mfc_remove() calls put_device() for the reserved memory region
devs, the driver core warns that the dev doesn't have a release callback:

WARNING: CPU: 0 PID: 591 at drivers/base/core.c:251 device_release+0x8c/0x90
Device 's5p-mfc-l' does not have a release() function, it is broken and must be fixed.

Also, the declared DMA memory using dma_declare_coherent_memory() isn't
relased so add a dev .release that calls dma_release_declared_memory().

Fixes: 6e83e6e25e ("[media] s5p-mfc: Fix kernel warning on memory init")
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-20 18:09:19 +02:00
Javier Martinez Canillas
bddb6876b6 s5p-mfc: Set device name for reserved memory region devs
commit 29debab0a9 upstream.

The devices don't have a name set, so makes dev_name() returns NULL which
makes harder to identify the devices that are causing issues, for example:

WARNING: CPU: 2 PID: 616 at drivers/base/core.c:251 device_release+0x8c/0x90
Device '(null)' does not have a release() function, it is broken and must be fixed.

And after setting the device name:

WARNING: CPU: 0 PID: 591 at drivers/base/core.c:251 device_release+0x8c/0x90
Device 's5p-mfc-l' does not have a release() function, it is broken and must be fixed.

Fixes: 6e83e6e25e ("[media] s5p-mfc: Fix kernel warning on memory init")
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-20 18:09:19 +02:00
Yakir Yang
15fe5755d5 media: rockchip-vpu: fix compiled warning about uninitialized 'ret'
rockchip_vpu_hw.c:251:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]

Change-Id: Ia5564c2da345c5922341b818961b18d2b1419013
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-07-19 15:21:45 +08:00
Jeffy Chen
0564b69557 media: rockchip-vpu: remove force aclk_vcodec 400M
3036's vpu is not stable with 400M.

Change-Id: I5ea988704fd4d82154319cc0b3376aad10d9373b
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2016-07-07 18:28:34 +08:00