Commit Graph

844100 Commits

Author SHA1 Message Date
Bian Jin chen
6f99d8c16b arm64: dts: rockchip: Add new dts file for rk3326-863-lp3-v10 rkisp1.
Add this dts to support camera hal3 and be compatible with android 10.

Change-Id: I4594f7e3eb7407a26cbd7dc119653236c622b22d
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2019-09-14 14:19:41 +08:00
Bian Jin chen
4784cbfe9a arm64: dts: rockchip: px30: Add an alias for reboot-mode.
Change-Id: Ib7cd022790fcc381899be97bcecb6c21a3d76157
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2019-09-10 17:08:24 +08:00
Tao Huang
3922f84286 soc: rockchip: All Rockchip CPU default n
For small system.

Change-Id: Ib76fdf45a090b80f2e85c0ca2df611cc86308ec8
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-10 15:35:21 +08:00
Simon Xue
e3fb92c722 iommu/rockchip: make compatible to extra sclk
Change-Id: Ia9821eb74effd0b61a42c5cb19ca12f9cf036b78
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-09-10 10:03:34 +08:00
Wang Panzhenzhuan
51556b4a24 media: i2c: gc0312 gc2145: synchronize with kernel4.4 and update to v01.01.01
Change-Id: I93a367cfb4e6376847748c693cc834996a599f9e
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-09-10 09:59:56 +08:00
Wang Panzhenzhuan
9d4d900830 media: i2c: gc2145/gc0312: fix compile error on kernel-4.19
Change-Id: Ib9c4b6b078289d7ef884a8b0fc4ebe6526bd109f
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-09-10 09:59:56 +08:00
Tao Huang
8eaa58d9a7 video: Add rockchip video drivers
Change-Id: Ice3ea34c4ea3862c29f5e9b561d19a390f2965c7
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-10 09:27:26 +08:00
Grey Li
4d9cbff2d4 video: rockchip: iep: porting for kernel-4.19
Add compile condition of ION and DRM.
Adapt struct kref.
Modify drm's iommu domain get method.
Delete drm's common_iommu_setup_dma_ops.
Delete code about ion.

Change-Id: I340e1798c5930af0a82566f8c40ec93e78084fda
Signed-off-by: Grey Li <grey.li@rock-chips.com>
2019-09-10 09:26:30 +08:00
Tao Huang
7c81bf0ea3 video: rockchip: remove unused dp driver
Change-Id: I1976e8cfda813e82d31ffad062746d44b554d914
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-10 09:21:46 +08:00
Tao Huang
91908215ac video: rockchip: remove unused tve driver
Change-Id: I97f6910e5fb4c093e117f1357fd616a8b6a0ea79
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-10 09:21:46 +08:00
Tao Huang
567278c61b video: rockchip: remove unused hdmi driver
Change-Id: I02744c042c5c29b79c98b5da17acf0da889a005e
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-10 09:21:46 +08:00
Tao Huang
c620d25edd video: rockchip: remove unused transmitter driver
Change-Id: I01c7291b55c9183902ecb55c6b0b2e79d2aa3097
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-10 09:21:46 +08:00
Tao Huang
d96d147740 video: rockchip: remove unused fb driver
Change-Id: I13be9d40d44c2c3ed0bb9abf186410bf39636ec6
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-10 09:21:46 +08:00
Shunqian Zheng
bbabed05f0 media: rockchip: rkisp1: keep active_sensor available when stream off
Currently, it's set active_sensor to NULL when stream off. But it
could be useful for ioctls (e.g. enum_frameintervals) to obtain
active sensor's infomations.

This patchs keep active_sensor always available and renew it
every time before starting stream in case media topology changed.
Meanwhile, get active_sensor info once async subdevice registered
completely.

Change-Id: I21eb3954d5932a4bc7c899d8f110e31b409c91d2
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-09-09 17:31:04 +08:00
Shunqian Zheng
d63f037b70 media: rockchip: rkisp1: restrict video output resolution
Currently the maximum size of video is 4416x3312. For those sensors(5M
or 8M), it's not a good idea to scale up to max resolution by ISP.

This avoid video output resolution exceeding the isp sub-device
size.

Change-Id: I4b2649cf3a8c3c7e81ff978eefba3e69e2c24d81
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-09-09 17:31:04 +08:00
Cai YiWei
7edacbdede media: rockchip: isp1: support get continuous memory from specific CMA region
If no IOMMU support for ISP, we prefer to alloc continuous
physical memory from our reserved CMA region than from system
reserved.

Change-Id: I1e598ee7309c9c53254649f5267a1e7f515c6361
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-09-09 17:31:04 +08:00
Cai YiWei
0cbd040137 media: rockchip: isp1: fix clk gate but isp working
power on->isp start->restart...->power off
isp reset will set clk config to default value, if
isp restart clk isn't to reconfigure.

Change-Id: I2b5ef9883c8ca5e9e142270d935f300395b0ea74
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-09-09 17:31:04 +08:00
Hu Kejun
a8eb21def5 media: rockchip: isp1: add start/stop event for params video
This patch adds two v4l2 events, start/stop streaming, for
userspace to subscribe. With these events, userspace could
init/de-init 3A tuning in proper time.

Only if isp sub-device input format is Raw Bayer and output
format is YUV, the 3A tuning is required.

Change-Id: I027d603fcf6d6901ebcd3762d0889ef8f7603601
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-09-09 17:31:04 +08:00
Shunqian Zheng
c5dac11b8b media: rkisp1: enable userptr io mode
Enable VB2_USERPTR mode. vb2_dma_contig takes care
the rest of details except the vb2_plane_vaddr().

Change-Id: Id23e0c9ef7b3332fcb3be57c71c4178e181d7141
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2019-09-09 17:31:04 +08:00
Hu Kejun
273b21ef08 media: rockchip: isp1: fix receive mipi isr before isp clock resume
The mipi interrupt is auto on in resume operation,
so we may receive interrupt before isp clock resume,
and the kernel will be dead when access isp register in mipi isr function.

Change-Id: I73779111cb103457b0a4f125d8e4c9420a2d8553
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-09-09 17:31:04 +08:00
Hu Kejun
75591b28bd media: rockchip: isp1: change version to v0.1.5
Change-Id: I949db02da473e6f7b1824d2afda36b9f7b60a539
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-09-09 17:31:04 +08:00
Hu Kejun
e1cd99a637 media: rockchip: isp1: fix rkisp1 subdev type is error
Change-Id: I466f6f3493b353e151802a60f87726ba34c789d4
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-09-09 17:31:04 +08:00
Hu Kejun
9312ddd708 media: rockchip: isp1: remove unnessary register setting
Change-Id: I75ccc5b50a7f50e98264c3618e5f9c6b2cb87d52
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-09-09 17:31:04 +08:00
Algea Cao
6619930935 drm: rockchip: dw-hdmi: Add clk hclk_vio
Change-Id: If117c63f97c2af0811d29f322188ddc24470eadb
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-09-09 10:10:35 +08:00
xuhuicong
598534ea8c drm: bridge: dw-hdmi: add debugfs_remove_recursive when unbind
On RK3328, dw-hdmi driver is reloaded after bind and unbind
then it will use the first register debugfs address if no run
debugfs_remove_recursive, and cause system crash.

Change-Id: Iafa6b4059962b62c79157a9cf6c3e1d56df48f03
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2019-09-09 09:43:35 +08:00
algea.cao
f51d77a8b5 drm: bridge: dw-hdmi: fixup kernel crash when reboot with hdmi connected
when other devices bind failed,drm will unbind and re-bind all devices.
if don't cancel the delayed work but flush and destroy workqueue directly,
kernel point is likely to become NULL.

Change-Id: Ib48704186ee298cbd4daac1cdbbac5fb3906b6bb
Signed-off-by: algea.cao <algea.cao@rock-chips.com>
2019-09-09 09:43:35 +08:00
Algea Cao
db79b1540c drm: bridge: synopsys: dw-hdmi: Set dw-hdmi driver data
If hdmi driver data isn't be set, hdmi pointer can't be get
correctly, system will crush when reboot or shutdown.

Change-Id: I3a17a3238c307ab28d7570e8803a6dbe8c57c930
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-09-09 09:43:35 +08:00
Algea Cao
855f25a0c6 drm: bridge: synopsys: dw-hdmi: Fix kernel logo flash
Filling in the missing parts from:
'commit d7f22ab4c1 ("drm: bridge: dw-hdmi: fix wrong color if get
edid error at bootup")'

Change-Id: I92b690dcc332e9f9e50ef7d457734952a9f1ef2a
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-09-09 09:43:34 +08:00
Zheng Yang
0ef24f543d drm: rockchip: dw-hdmi: fix 10bit not work when booting up with uboot logo
Default value of hdmi->colordepth is defined by input color mode,
so there is no need to set value again when color depth property
is created.

Change-Id: I2e242fabdaadc0c3b41e48f806cbded5f619c455
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-09-09 09:43:34 +08:00
Algea Cao
bda1198450 media: cec: Fix crash if HPD is occurred before adapt allocated.
Change-Id: I4d546cdbbecfd124c7cd6a985f0843879037b6dc
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-09-09 09:43:34 +08:00
Algea Cao
64b91f4baf media: cec: Set kernel not do retransmit
HDMI protocol does not allow retransmit more than
five times when send cec message failed. In android
system, we do retransmit in framework only.

Change-Id: I7bd1a4aa48874be11e4948d60e0c36077268c1c9
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-09-09 09:43:34 +08:00
Zheng Yang
438372dd2a drm: rockchip: dw-hdmi: fix colorimetry bt2020 value
To differentiate extend colorimetry and normal colorimetry, we
add the offset HDMI_COLORIMETRY_EXTENDED in colorimetry property.
It should use same value in dw_hdmi_rockchip_select_output.

Change-Id: I13e10b6e8211e7a2634dbd4b6c5310bc129bfa8d
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-09-09 09:43:33 +08:00
Tao Huang
b6c3d16103 input: sensors: no default y
For small system.

Change-Id: I41b897bbb6ad97022b175cc7db2f2535c790de16
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-05 22:07:06 +08:00
Wang Jie
92e18f08e3 input: sensors: program the sensor driver into the kernel.
Modify the code to sensor driver into the kernel and
make the compilation successful.

Change-Id: I3226b5df0084a80c63b7ad59aec7c759b3165a7b
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-09-05 22:07:06 +08:00
William Wu
1afe4e7ce2 usb: dwc2: disable lpm feature on Rockchip SoCs
LPM feature of DWC2 module integrated in Rockchip SoCs doesn't work
properly or needs some additional handling, so disable it for now.
Without disabling LPM feature, the USB ADB communication fail with
the following error log:

dwc2 ff580000.usb: new address 27
dwc2 ff580000.usb: Failed to exit L1 sleep state in 200us.
dwc2 ff580000.usb: dwc2_hsotg_send_reply: cannot queue req
dwc2 ff580000.usb: dwc2_hsotg_process_req_status: failed to send reply
dwc2 ff580000.usb: dwc2_hsotg_enqueue_setup: failed queue (-11)
dwc2 ff580000.usb: Failed to exit L1 sleep state in 200us.

Change-Id: I4e2b243fba2f1536c39f313232433cfd295113d6
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-09-05 14:07:08 +08:00
Shixiang Zheng
61157e2609 video/rockchip: rga2: fix compile err in kernel-4.19
Change-Id: I1505e7fbaae0a1145675d27aa7854407cf69a969
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-09-04 15:41:56 +08:00
Yifeng Zhao
7996cfe15e drivers: rk_nand: add disk information to kernel list
set nand devices path to /dev/platform/xxxxxxx.nandc/rknand0
for android 9.0 and android 10 while using gpt.

Change-Id: I21c5d71ee6ed5d8520630174329c6da1c2764430
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-09-04 15:22:51 +08:00
Ulf Hansson
bcc14fe700 UPSTREAM: mmc: core: Fix init of SD cards reporting an invalid VDD range
The OCR register defines the supported range of VDD voltages for SD cards.
However, it has turned out that some SD cards reports an invalid voltage
range, for example having bit7 set.

When a host supports MMC_CAP2_FULL_PWR_CYCLE and some of the voltages from
the invalid VDD range, this triggers the core to run a power cycle of the
card to try to initialize it at the lowest common supported voltage.
Obviously this fails, since the card can't support it.

Let's fix this problem, by clearing invalid bits from the read OCR register
for SD cards, before proceeding with the VDD voltage negotiation.

Change-Id: I23c224b59505e747e4156f7ddaf0c26630b3f6a4
Cc: stable@vger.kernel.org
Reported-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Philip Langdale <philipl@overt.org>
Tested-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from commit 72741084d9)
2019-09-02 15:19:42 +08:00
Algea Cao
94dd525b02 drm/bridge/synopsys: Report hdmi HPD to userspace for cec
When hdmi HPD is occurred, call cec_notifier_repo_cec_hpd.

Change-Id: If2047121c8ccf55e9a49fa4c3c4ec2187248a593
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-08-30 20:28:53 +08:00
Algea Cao
bf0e651045 media: cec: Add an interface for hdmi report HPD
Add cec-notifier interface that hdmi can call it when
HPD is occurred.

Change-Id: I0087a879bf3ba65e300c3db3a67ddaa7e22f16ad
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-08-30 20:28:29 +08:00
xuhuicong
9f8442483e drm: bridge: dw-hdmi: set hdcp1x_enable in the dts so uboot can visit
Change-Id: Ibaf91c5beac2355e5c270f1edb69a63795dbff6a
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2019-08-30 20:22:39 +08:00
Zheng Yang
3a28e9287f drm: bridge: dw-hdmi: add more check for HDCP function
On RK3328, dw-hdmi HDCP driver is loaded slower than dw-hdmi.
hdmi->hdcp->hdcp_start is NULL when dw-hdmi call the hdcp_start,
cause following system crash:

Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = ffffff8009292000
[00000000] *pgd=000000007e1fe003, *pud=000000007e1fe003, *pmd=0000000000000000
Internal error: Oops: 86000005 [#1] SMP
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.70 #418
Hardware name: Rockchip RK3328 EVB (DT)
task: ffffffc0003a0000 ti: ffffffc0003a8000 task.ti: ffffffc0003a8000
PC is at 0x0
LR is at dw_hdmi_update_power+0xef4/0x1004
pc : [<0000000000000000>] lr : [<ffffff800849e778>] pstate: 60000045
sp : ffffffc0003ab3b0
x29: ffffffc0003ab3b0 x28: 000000000000410b
x27: 0000000000000000 x26: 0000000000000000
x25: ffffffc07770d028 x24: 000000000000410b
x23: 0000000000000000 x22: 0000000000000001
x21: 0000000000000002 x20: ffffff8008c02000
x19: ffffff8008c02d90 x18: 0000000062475a46
x17: 0000000000000000 x16: 000000000000000e
x15: 0000000000000007 x14: 0ffffffffffffffd
x13: 0000000000000018 x12: 0101010101010101
x11: 7f7f7f7f7f7fff7f x10: fefefefeff01f305
x9 : ff7fff7f7f7f7f7f x8 : ffffff80091db5df
x7 : 0000000000000000 x6 : 0000000000000004
x5 : 0000000000000015 x4 : 0000000000140b82
x3 : 000000000106b1af x2 : 0000000000000001
x1 : 0000000000000000 x0 : ffffffc076e25e00

Change-Id: I0fccf9d8e06f7acdb56d8e5360acf0df026fee10
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-08-30 16:21:58 +08:00
Sandy Huang
37e6c0c99a rk: logo: update logo file
1. set resolution from 654x258 to 654x270, because vop max scale up fac
limit.
2. convert logo_kernel.bmp to rle8 bmp

Change-Id: I0aee01aeb3546d11ae98a85ee811292ad91b1f22
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-29 19:45:37 +08:00
Zhen Chen
f828f106e0 MALI: bifrost: only call dma_fence_set_error() for actual errors
This would eliminate the repeating WARNING logs from dma_fence_set_error().

Change-Id: I3b319decb8899dfc0410f4975e31bb1c67f7ae9f
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-08-29 19:27:20 +08:00
Sandy Huang
78c8b4e61a drm/rockchip: driver: compare vmode picture_aspect_ratio
Change-Id: I2d1e16d48876a5095d45e1c90e1389441c130d20
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-08-29 18:43:28 +08:00
Shixiang Zheng
cee5e34661 scripts/bmpconvert: add bmpconvert for auto convert bmpfile
Change-Id: Ic1be83af4de8b586b83c3398e42368106a4fd7e2
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-08-29 18:38:49 +08:00
Wyon Bi
01a60fe23a drm/rockchip: dsi: Improve horizontal time accuracy
To improve the accuracy of the horizontal time perform
multiplications before divisions.

Change-Id: I08eab894482a06831eb7211c9754de365a7ab1a8
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-08-28 09:03:13 +08:00
Wyon Bi
86eba41022 drm/rockchip: drv: support atomic_mode_set helper callback
Change-Id: I565db14e964d72c460155b6b3ce8c45877d5f74c
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-08-28 08:48:36 +08:00
Algea Cao
f688bcfc62 drm/rockchip: dw-hdmi: Set 4K x 2k 60Hz/50Hz color to YUV420 if tmdsclk over the limit
When 4K x 2k 60Hz/50Hz tmds clock is above the max tmds clock, setting its
color to YUV420. A few TV edid declare that they can't support
4K x 2k 60Hz/50Hz YUV420, we still set color to YUV420 or 4K x 2k 60Hz/50Hz
tmds clock will over the limit.

Change-Id: Id57c9313ab52973927c578d0eb2a7b1b30cb9ec1
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-08-26 18:16:04 +08:00
Algea Cao
4088ea06bc drm/rockchip: dw_hdmi-rockchip: get phy config from dts
Change-Id: I6903f3b9498be32f9d4936beb2d6d2aa5db43d09
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2019-08-26 18:13:50 +08:00