Commit Graph

610474 Commits

Author SHA1 Message Date
Andy Yan
ff0e62f83e arm64: support pack zboot.img
zboot.img: Image.lz4 + resouorce.img
boot.img:  Image + resource.img

Change-Id: I97bc39de99ce85cc21f2491a6db59d1e015f67d0
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-07-09 14:56:58 +08:00
William Wu
73462a3bf9 phy: rockchip: rockchip-inno-usb2: fix lock warning
If the usb otg work as host mode or work as peripheral mode
with vbus always on, the otg_sm_work won't be initialized,
so flush the otg_sm_work in rockchip_usb2phy_exit() will
casuse the following lock warning:

[<ffffff800808b1e0>] dump_backtrace+0x0/0x1ec
[<ffffff800808b3e0>] show_stack+0x14/0x1c
[<ffffff8008403f3c>] dump_stack+0xb8/0xf4
[<ffffff8008107f40>] __lock_acquire+0x670/0x1984
[<ffffff8008109a60>] lock_acquire+0x1a4/0x264
[<ffffff8008129d2c>] del_timer_sync+0x48/0xb8
[<ffffff80080c3c94>] flush_delayed_work+0x20/0x50
[<ffffff80084344ac>] rockchip_usb2phy_exit+0x48/0x58
[<ffffff8008432bc4>] phy_exit+0x64/0xb4
[<ffffff80086733b8>] dwc3_core_exit+0x44/0x98
[<ffffff80086736c4>] dwc3_remove+0x90/0xe4
[<ffffff80085a5a5c>] platform_drv_remove+0x28/0x48
[<ffffff80085a3d14>] __device_release_driver+0xac/0x114
[<ffffff80085a3da4>] device_release_driver+0x28/0x3c
[<ffffff80085a2f38>] bus_remove_device+0x110/0x128
[<ffffff80085a0404>] device_del+0x160/0x1f8
[<ffffff80085a5954>] platform_device_del+0x20/0x88
[<ffffff80085a59d0>] platform_device_unregister+0x14/0x28
[<ffffff80088820f4>] of_platform_device_destroy+0x54/0xa8
[<ffffff800859f790>] device_for_each_child+0x68/0x98
[<ffffff8008882084>] of_platform_depopulate+0x30/0x4c
[<ffffff8008680030>] dwc3_rockchip_probe+0x4d4/0x574
[<ffffff80085a5ad4>] platform_drv_probe+0x58/0xa4
[<ffffff80085a396c>] driver_probe_device+0x118/0x2b0
[<ffffff80085a3b70>] __driver_attach+0x6c/0x98
[<ffffff80085a29d0>] bus_for_each_dev+0x80/0xb0
[<ffffff80085a34a0>] driver_attach+0x20/0x28
[<ffffff80085a3038>] bus_add_driver+0xe8/0x1e4
[<ffffff80085a4ad4>] driver_register+0x94/0xe0
[<ffffff80085a5a2c>] __platform_driver_register+0x48/0x50
[<ffffff8009222224>] dwc3_rockchip_driver_init+0x18/0x20
[<ffffff80080839f4>] do_one_initcall+0x17c/0x198
[<ffffff80091f0e48>] kernel_init_freeable+0x1f8/0x2b0
[<ffffff8008c61810>] kernel_init+0x10/0xf8
[<ffffff80080832c0>] ret_from_fork+0x10/0x50

This patch only allows to flush the otg_sm_work when the usb
bvalid irq is valid.

Fixes: f6fac8b68a ("phy: rockchip: rockchip-inno-usb2: flush otg work when exit")
Change-Id: I4dbe34fa9a330f22abb24ccd625da33425a9f753
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-09 11:06:14 +08:00
Wyon Bi
18d4d75fcb drm/panel: simple-panel: no need to send off commands in panel_simple_shutdown
Change-Id: Id0129f899efe6500858ad0aa0aefcfbf5aa101f6
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-07-09 09:47:18 +08:00
Tao Huang
0d946db93a Merge tag 'lsk-v4.4-18.06-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
LSK 18.06 v4.4-android

* tag 'lsk-v4.4-18.06-android': (464 commits)
  Linux 4.4.138
  crypto: vmx - Remove overly verbose printk from AES init routines
  Input: elan_i2c - add ELAN0612 (Lenovo v330 14IKB) ACPI ID
  Input: goodix - add new ACPI id for GPD Win 2 touch screen
  kvm: x86: use correct privilege level for sgdt/sidt/fxsave/fxrstor access
  vmw_balloon: fixing double free when batching mode is off
  serial: samsung: fix maxburst parameter for DMA transactions
  KVM: x86: pass kvm_vcpu to kvm_read_guest_virt and kvm_write_guest_virt_system
  KVM: x86: introduce linear_{read,write}_system
  Clarify (and fix) MAX_LFS_FILESIZE macros
  gpio: No NULL owner
  x86/crypto, x86/fpu: Remove X86_FEATURE_EAGER_FPU #ifdef from the crc32c code
  af_key: Always verify length of provided sadb_key
  x86/fpu: Fix math emulation in eager fpu mode
  x86/fpu: Fix FNSAVE usage in eagerfpu mode
  x86/fpu: Hard-disable lazy FPU mode
  x86/fpu: Fix eager-FPU handling on legacy FPU machines
  x86/fpu: Revert ("x86/fpu: Disable AVX when eagerfpu is off")
  x86/fpu: Fix 'no387' regression
  x86/fpu: Default eagerfpu=on on all CPUs
  ...

Conflicts:
	drivers/clk/clk.c
	drivers/clk/rockchip/clk-mmc-phase.c
	sound/core/timer.c

Change-Id: I52af7906676f3e4426292481ec36a9a63ee7ecc9
2018-07-06 20:12:54 +08:00
Huibin Hong
f5ecea2401 spi: rockchip: fix bug when no high_speed pinctrl state
[    1.644632] rockchip-spi ff190000.spi: no high_speed pinctrl state
[    1.646337] Unable to handle kernel NULL pointer dereference at virtual address 00000005
[    1.647412] pgd = ffffff80093b9000
[    1.647873] [00000005] *pgd=00000000feffe003, *pud=00000000feffe003, *pmd=0000000000000000
[    1.649019] Internal error: Oops: 96000005 [#1] SMP
[    1.649643] Modules linked in:
[    1.650065] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.120-rockchip-ayufan-195 #1
[    1.651042] Hardware name: Pine64 Rock64 (DT)
[    1.651603] task: ffffffc0f5d48000 task.stack: ffffffc0f5d44000
[    1.652366] PC is at pinctrl_select_state+0x3c/0x12c
[    1.653004] LR is at pinctrl_select_state+0x7c/0x12c
[    1.653641] pc : [<ffffff8008596840>] lr : [<ffffff8008596880>] pstate: 60000045
[    1.654574] sp : ffffffc0f5d47420

patch from:c9dc2ab327

Change-Id: Ie2926a505288d7198a4d49c2abf5a4207281c89d
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-07-06 19:43:25 +08:00
Finley Xiao
f4fbba93e8 MALI: utgard: Add wide-temperature control
Change-Id: Ibb3c8431dd995bc4aefbde2e2f7082a60cfb40e0
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-06 19:42:07 +08:00
Finley Xiao
c891cb339e MALI: bifrost: Add wide-temperature control
Change-Id: I74ec8bed3065740148814114a72b2740e58688e6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-06 19:42:07 +08:00
Finley Xiao
21d81d9c9c MALI: midgard: Add wide-temperature control
Change-Id: Ibf1c6ebd91d2e793fa8efe0383df346dd8c67b45
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-06 19:42:07 +08:00
Finley Xiao
e4d2ea0c55 PM / devfreq: rockchip_dmc: Add wide-temperature control
Change-Id: Ia90494728679287fb505c1ee0ddffaa9a52bf0cb
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-06 19:40:25 +08:00
Finley Xiao
61d015e7e2 cpufreq: dt: Add wide-temperature control
Change-Id: I42a7d28944a1fb10728b74663fdd62c0f766dee5
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-06 19:39:50 +08:00
Finley Xiao
bf4d561a65 soc: rockchip: opp_select: Implement APIs for wide-temperature control
Add a basic wide-temperature control model for device to adjust opp
table and max frequency.

Change-Id: I23f29ac1892093c527e730164eba086f02667de3
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-06 19:38:51 +08:00
Finley Xiao
60b250f9b6 thermal: Add thermal_notifier_list for thermal zone
Change-Id: I92c3308a4582ec3dbc03d2d6f2bbda60efe7245a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-06 19:36:38 +08:00
Finley Xiao
629b83c413 soc: rockchip: opp_select: Parse 'rockchip,pvtm-thermal-zone' first for pvtm
Sometimes pvtm thermal zone is different from wide-temperature control
thermal zone, so let pvtm parse 'rockchip,pvtm-thermal-zone' first.

Change-Id: Ia6bdfbabb99b053864cbc3cbf14aac675e26483c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-06 19:36:29 +08:00
Sandy Huang
8304527e67 drm/rockchip: add support mcu init screen
the mcu init cmd should be sent from crtc mcu interface,
so we add the rockchip_drm_crtc_send_mcu_cmd to do this.

Change-Id: I7fedfb90c6074e8837a825d10e0dcd9c16bfc1d0
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-07-06 15:56:04 +08:00
Yifeng Zhao
0a0307e95c drivers: rk_nand: fix 2cs 3d mlc nand gc fail issue
bug:
1ppa = 2212a00, status = 0, 2d1db 2bc05 spare: 3a20ea 2d1dc 22bc05 0
1ppa = 2212a00, status = 1, 3b8ef 25fe52 spare: 3a6bfa 3c5d6 5fe53 2
1ppa = 2212a00, status = 0, 2d1db 2bc05 spare: 3a20ea 2d1dc 22bc05 0
1ppa = 2212a00, status = 1, 3b8ef 25fe52 spare: 3a6bfa 3c5d6 5fe53 2

Change-Id: I04fd61716bf12dfdd8afc0eb2f1a099c631119dc
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2018-07-06 15:28:57 +08:00
Xing Zheng
7afc0c7b4b ASoC: rk3308_codec: put switch BIST early during enable ADCs
Fix the negative data before enabling loopback.

Change-Id: I8f4ef1e83b38f17c80f9b4109984c6560e570d20
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-06 15:27:02 +08:00
Cai YiWei
e46953684a media: soc_camera: add ov9750 sensor driver
Change-Id: I027a08ce90a78d4124c07471f21218599fdad815
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2018-07-06 14:32:12 +08:00
Huibin Hong
514cd19fa8 arm64: dts: rockchip: corrected clock-names for uart1 of rk3328
Change-Id: I4f2f1265ba517b5effce0c1b4130d0eb10eae9e5
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-07-06 11:57:53 +08:00
Finley Xiao
e7040c8dd6 cpufreq: rockchip: implement rockchip_cpufreq_check_rate_volt()
Change-Id: I707c88d217725e66119aa28e8823ce68ac3abfba
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-06 10:22:04 +08:00
Finley Xiao
87c0821959 PM / OPP: Rename dev_pm_opp_check_initial_rate to dev_pm_opp_check_rate_volt
Make the function more general.

Change-Id: Ic10b84ddb6b7eff33e1a1fe491f05f10a9c6015a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-06 10:21:14 +08:00
Finley Xiao
9d01f91893 soc: rockchip: opp_select: Use 'rockchip,thermal-zone' property for pvtm
Make the property more general.

Change-Id: Ieacbaccdc008ff8cee51ebfafc203b3200a1c5af
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-06 10:17:45 +08:00
Dingqiang Lin
cbf6303b22 arm64: configs: rk3308_linux_defconfig: enable slc nand and sfc devices driver
1.Disable former nandc configs and change to sftl slc nand;
2.Enables sfc spi nand drivers and sfc spi nand drivers.

Change-Id: Ia17e4e5cac5a2859cf2cb2013d40c446b88194b5
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-06 09:15:55 +08:00
Dingqiang Lin
29c0eb535a arm64: dts: rockchip: enable sfc for rk3308-evb-v10
Change-Id: I091998de2517b9ca5afc77d7c6c02410dd86c618
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-06 09:15:55 +08:00
Sugar Zhang
3ae208f542 ASoC: rockchip: multi_dais_pcm: dmaengine_mpcm_pointer
This patch use the master chan as the sync pointer. and in some case,
one or more sub dai may not start at the same time, or one sub dai
works always which leading the pointer of each sub dai is different,
it depends on the fifo available count and waterlevel. the maximum is
the whole fifo size. report the pointer(dma_pos - max_fifo_size) to
make sure each sub buffer have been filled out.

Change-Id: I5a6d8b3f3c63f8ed7b55b0402429904368adf557
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-07-05 18:33:54 +08:00
Lin Jianhua
716495dada ARM64: dts: rockchip: enable cpufreq 1.2G for rk3308 EVB V11
Change-Id: Ifc077a299c98cb2e1039397f548b1047d10c17c2
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2018-07-05 18:27:44 +08:00
Kieran Bingham
30742c9309 FROMLIST: media: uvcvideo: Move decode processing to process context
Newer high definition cameras, and cameras with multiple lenses such as
the range of stereo-vision cameras now available have ever increasing
data rates.

The inclusion of a variable length packet header in URB packets mean
that we must memcpy the frame data out to our destination 'manually'.
This can result in data rates of up to 2 gigabits per second being
processed.

To improve efficiency, and maximise throughput, handle the URB decode
processing through a work queue to move it from interrupt context, and
allow multiple processors to work on URBs in parallel.

Change-Id: I825a107e706a964525dcabba4faa9434f499fd96
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(am from https://patchwork.kernel.org/patch/10311055/)
2018-07-05 18:27:43 +08:00
Kieran Bingham
be6d7e1f7d FROMLIST: media: uvcvideo: queue: Support asynchronous buffer handling
The buffer queue interface currently operates sequentially, processing
buffers after they have fully completed.

In preparation for supporting parallel tasks operating on the buffers,
we will need to support buffers being processed on multiple CPUs.

Adapt the uvc_queue_next_buffer() such that a reference count tracks the
active use of the buffer, returning the buffer to the VB2 stack at
completion.

Change-Id: Ia42cca9bed7852175202017b042590d844e8c6b0
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(am from https://patchwork.kernel.org/patch/10311051/)
2018-07-05 18:27:43 +08:00
Kieran Bingham
94587fd9d9 FROMLIST: media: uvcvideo: queue: Simplify spin-lock usage
Both uvc_start_streaming(), and uvc_stop_streaming() are called from
userspace context, with interrupts enabled. As such, they do not need to
save the IRQ state, and can use spin_lock_irq() and spin_unlock_irq()
respectively.

Change-Id: I1cde5a8d9a8890cc2b671d1e32d3b6b4b0eac635
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(am from https://patchwork.kernel.org/patch/10311047/)
2018-07-05 18:27:42 +08:00
Kieran Bingham
e075df0dc7 FROMLIST: media: uvcvideo: Protect queue internals with helper
The URB completion operation obtains the current buffer by reading
directly into the queue internal interface.

Protect this queue abstraction by providing a helper
uvc_queue_get_current_buffer() which can be used by both the decode
task, and the uvc_queue_next_buffer() functions.

Change-Id: Ic5401fe9afec00b87bb075f99addae8591de6890
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(am from https://patchwork.kernel.org/patch/10311059/)
2018-07-05 18:27:42 +08:00
Kieran Bingham
683c534884 FROMLIST: media: uvcvideo: Convert decode functions to use new context structure
The URB completion handlers currently reference the stream context.

Now that each URB has its own context structure, convert the decode (and
one encode) functions to utilise this context for URB management.

Change-Id: Ib56b25ca4ec049c5eb75ffceda9c2d8a0c1a96cf
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(am from https://patchwork.kernel.org/patch/10311067/)
2018-07-05 18:27:42 +08:00
Kieran Bingham
5f5018c13a FROMLIST: media: uvcvideo: Refactor URB descriptors
We currently store three separate arrays for each URB reference we hold.

Objectify the data needed to track URBs into a single uvc_urb structure,
allowing better object management and tracking of the URB.

All accesses to the data pointers through stream, are converted to use a
uvc_urb pointer for consistency.

Change-Id: I03320cff8ec5cb268b62610b9852b32505f136aa
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(am from https://patchwork.kernel.org/patch/10311045/)
2018-07-05 18:27:41 +08:00
Guennadi Liakhovetski
87f4981ad5 UPSTREAM: media: uvcvideo: Add a metadata device node
Some UVC video cameras contain metadata in their payload headers. This
patch extracts that data, adding more clock synchronisation information,
on both bulk and isochronous endpoints and makes it available to the user
space on a separate video node, using the V4L2_CAP_META_CAPTURE capability
and the V4L2_BUF_TYPE_META_CAPTURE buffer queue type. By default, only the
V4L2_META_FMT_UVC pixel format is available from those nodes. However,
cameras can be added to the device ID table to additionally specify their
own metadata format, in which case that format will also become available
from the metadata node.

[Use put_unaligned instead of __put_unaligned_cpu64]
[Use put_unaligned for the sof field as well]

Conflicts:
	drivers/media/usb/uvc/uvc_queue.c
	drivers/media/usb/uvc/uvc_video.c

Change-Id: I2696d2c781376e363e0a77d8d895f416aaff09cb
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 088ead2552)
2018-07-05 18:27:41 +08:00
Kieran Bingham
271ae75fec UPSTREAM: [media] uvcvideo: Fix empty packet statistic
The frame counters are inadvertently counting packets with content as
empty.

Fix it by correcting the logic expression

Change-Id: I9e77fcebae2130f534dbac0932b405dd26e4033f
Fixes: 7bc5edb00b [media] uvcvideo: Extract video stream statistics
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 360a3a90c6)
2018-07-05 18:27:40 +08:00
Kieran Bingham
60f2231020 UPSTREAM: [media] uvcvideo: Don't record timespec_sub
The statistics function subtracts two timespecs manually. A helper is
provided by the kernel to do this.

Replace the implementation, using the helper.

Change-Id: I1fc2cdfad723456045515364846958814b30f666
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 52276df0b1)
2018-07-05 18:27:40 +08:00
Guennadi Liakhovetski
8df73b298c UPSTREAM: media: v4l: Add a UVC Metadata format
Add a pixel format, used by the UVC driver to stream metadata.

Conflicts:
        Documentation/media/uapi/v4l/meta-formats.rst
        drivers/media/v4l2-core/v4l2-ioctl.c
        include/uapi/linux/videodev2.h

Change-Id: I979fd6b4d5d24510e47a1cfe525e8ae0a1a573ee
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 563a01e101)
2018-07-05 18:27:39 +08:00
Guennadi Liakhovetski
31a4fbf741 UPSTREAM: media: uvcvideo: Add extensible device information
Currently the UVC driver assigns a quirk bitmask to the .driver_info
field of struct usb_device_id. This patch instroduces a struct to store
quirks and possibly other per-device parameters in the future.

Conflicts:
        drivers/media/usb/uvc/uvc_driver.c

Change-Id: I0c823a17cc15f73eb7806804b9b8d42c109c86b9
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 3bc85817d7)
2018-07-05 18:27:39 +08:00
Laurent Pinchart
679182db69 UPSTREAM: media: uvcvideo: Report V4L2 device caps through the video_device structure
The V4L2 core populates the struct v4l2_capability device_caps field
from the same field in video_device. There's no need to handle that
manually in the driver.

Change-Id: I5a98bd1ba87a4029e3de74b3ac4c21e90fe6e3a2
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Tested-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 94c53e26dc)
2018-07-05 18:27:39 +08:00
Laurent Pinchart
d19a7499b2 UPSTREAM: media: uvcvideo: Factor out video device registration to a function
The function will then be used to register the video device for metadata
capture.

Change-Id: I5aa5604af149dc108d65575af37fcbdd6c32c403
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Tested-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 31a96f4c87)
2018-07-05 18:27:38 +08:00
Laurent Pinchart
a2103e7e7d UPSTREAM: media: uvcvideo: Stream error events carry no data
According to the UVC specification, stream error events carry no data.
Fix a buffer overflow (that should be harmless given data alignment)
when reporting the stream error event by removing the data byte from the
message.

Change-Id: I0603ed4a092bc02ae2a339c96d1433ec8463336a
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 0393e73564)
2018-07-05 18:27:38 +08:00
Baoyou Xie
cedb983b52 UPSTREAM: media: uvcvideo: Mark buffer error where overflow
Some cameras post inaccurate frame where next frame data overlap
it. this results in screen flicker, and it need to be prevented.

So this patch marks the buffer error to discard the frame where
buffer overflow.

Change-Id: Ibd41b93cf8376b126b6d107a59ab22907fb839e6
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit dfc1648c57)
2018-07-05 18:27:37 +08:00
Nicolas Dufresne
f8f362a78c UPSTREAM: media: uvcvideo: Add D3DFMT_L8 support
Microsoft HoloLense UVC sensor uses D3DFMT instead of FOURCC when
exposing formats. This adds support for D3DFMT_L8 as exposed from
the Acer Windows Mixed Reality Headset.

Change-Id: I5689e85bd600029f3fcef37860483c19d639d6ed
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit e96cdc9a0a)
2018-07-05 18:27:37 +08:00
Julia Lawall
b2b0e8e449 UPSTREAM: media: uvcvideo: Constify video_subdev structures
uvc_subdev_ops is only passed as the second argument of
v4l2_subdev_init, which is const, so uvc_subdev_ops can be
const as well.

Done with the help of Coccinelle.

Change-Id: Ic146384e5570ad6d249e661a73138ad396c6e3a6
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 5422079014)
2018-07-05 18:27:36 +08:00
Guennadi Liakhovetski
a953079953 UPSTREAM: media: uvcvideo: Convert from using an atomic variable to a reference count
When adding support for metadata nodes, we'll have to keep video
devices registered until all metadata nodes are closed too. Since
this has nothing to do with stream counting, replace the nstreams
atomic variable with a reference counter.

Change-Id: Ied4c660b0cc618f010e4fffc3c3e06a2f71f4aa7
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 9d15cd958c)
2018-07-05 18:27:36 +08:00
Xing Zheng
a74ace07b6 ARM: dts: rockchip: enable 'rockchip,no-hp-det' for rk3308 voice modules
There isn't headphone on all of rk3308 voice modules,
so we don't need to enable headphone detection.

Change-Id: I526dc02dfb3c0b92503c8a7821baa82b87c8c996
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-05 18:27:36 +08:00
Xing Zheng
08d21cd001 ASoC: rk3308_codec: add 'rockchip,no-hp-det' property
Change-Id: Ief8c0e7f5fcd21cdc7d115bbcca4eeb7050a373d
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-05 18:27:35 +08:00
Xing Zheng
7e131b7f26 ASoC: rk3308_codec: add support 'rockchip,no-hp-det' property
Fix the incorrect switching LINEOUT to HPOUT if there
isn't no headphone and hp-det pin is hanging.

Change-Id: I902ce3e112049981300f786cefa247bd166e1c33
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-05 18:27:29 +08:00
Xing Zheng
5fb4a3ee57 ASoC: rk3308_codec: add property 'rockchip,delay-loopback-handle-ms'
Change-Id: Icf9384f15ccedee3f3c039cc55b506381712caae
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-05 18:26:01 +08:00
Xing Zheng
36615e7b17 ASoC: rk3308_codec: add loopback handle delay property
It may take different time for different PAs(AMPs) to
open, so the delay we need in loopback needs to be
flexible.

Change-Id: I76c98b769e382cef08a6e897bb1d527783660f3b
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-05 18:26:00 +08:00
Lin Jianhua
616ff66320 arm: dts: rockchip: rk3308-voice-module: config vad
Change-Id: I764b5fe657a503d4a0efd12920054932c8b61dcf
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2018-07-05 18:26:00 +08:00
ZhongYiChong
ca3a31fb5d media: rockchip: isp1: fix config lsc error
LSC data table size is 17x17, but when configuring data to ISP,
should be aligned to 18x17. That means every last data of last
line should be filled with 0, and not filled with the data of
next line.

BUG=b:36227021
TEST=scarlet can preview.

Change-Id: I5e923529429a1c60efff3827e594f32db7112c1f
Signed-off-by: ZhongYiChong <zyc@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/942600
Commit-Ready: Jeffy Chen <jeffy.chen@rock-chips.com>
Tested-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
2018-07-05 18:26:00 +08:00