Commit Graph

1072263 Commits

Author SHA1 Message Date
Cai YiWei
1f99442699 media: rockchip: isp: check rockit pointer
Change-Id: I205b6f4faf47554afc21b056d45c81458e942db6
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-17 15:08:05 +08:00
Ziyuan Xu
c978cebad4 ARM: configs: rockchip: rv1106-tb.config: disable CONFIG_SLUB_SYSFS
size vmlinux:
before:
   text    data     bss     dec     hex filename
2669029 1176004   87432 3932465  3c0131 vmlinux

after:
   text    data     bss     dec     hex filename
2667557 1174620   87808 3929985  3bf781 vmlinux

reduce boot time
[    0.171059] initcall slab_sysfs_init+0x1/0xac returned 0 after 2649 usecs

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I4f39be5bff88d3d7a2c6300f7b069810a5bed1ba
2022-06-17 10:15:20 +08:00
Cai YiWei
e920d65384 media: rockchip: isp: isp32: fix wrap error for fast stream
Change-Id: I4a7719fb00104c3c1c43fed82c8e5e2439d1f766
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-17 10:12:50 +08:00
Mukesh Ojha
47fa973d9e FROMLIST: devcoredump : Serialize devcd_del work
In following scenario(diagram), when one thread X running dev_coredumpm()
adds devcd device to the framework which sends uevent notification to
userspace and another thread Y reads this uevent and call to
devcd_data_write() which eventually try to delete the queued timer that
is not initialized/queued yet.

So, debug object reports some warning and in the meantime, timer is
initialized and queued from X path. and from Y path, it gets reinitialized
again and timer->entry.pprev=NULL and try_to_grab_pending() stucks.

To fix this, introduce mutex and a boolean flag to serialize the behaviour.

 	cpu0(X)			                cpu1(Y)

    dev_coredump() uevent sent to user space
    device_add()  ======================> user space process Y reads the
                                          uevents writes to devcd fd
                                          which results into writes to

                                         devcd_data_write()
                                           mod_delayed_work()
                                             try_to_grab_pending()
                                               del_timer()
                                                 debug_assert_init()
   INIT_DELAYED_WORK()
   schedule_delayed_work()
                                                   debug_object_fixup()
                                                     timer_fixup_assert_init()
                                                       timer_setup()
                                                         do_init_timer()
                                                       /*
                                                        Above call reinitializes
                                                        the timer to
                                                        timer->entry.pprev=NULL
                                                        and this will be checked
                                                        later in timer_pending() call.
                                                       */
                                                 timer_pending()
                                                  !hlist_unhashed_lockless(&timer->entry)
                                                    !h->pprev
                                                /*
                                                  del_timer() checks h->pprev and finds
                                                  it to be NULL due to which
                                                  try_to_grab_pending() stucks.
                                                */
Bug: 235577024
Change-Id: I5e86abf72e8dff6952ba493fd9f43a26b2b40352
Link: https://lore.kernel.org/lkml/2e1f81e2-428c-f11f-ce92-eb11048cb271@quicinc.com/
Link: https://lore.kernel.org/lkml/1653660220-19197-1-git-send-email-quic_mojha@quicinc.com/
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
2022-06-16 18:03:28 +00:00
Huibin Hong
b188b3c687 fs: pstore: add mcu log
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: Iaa73a2826f5f4d52095399fb7879b8d099676b4e
2022-06-16 16:04:39 +08:00
Jianqun Xu
88970bdcdb dma-buf: heaps: system_heap: fix to sg_dma_address
The rknpu driver creates a sg without page link, so sg_phys(sg) will
crash due to page null.

Fixes: 33b98bf612 ("dma-buf: system_heap: do force sync only if attachment list empty")

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I679122dd4c1663d0520429638565c6cc8b5a2c90
2022-06-16 15:08:44 +08:00
Finley Xiao
a77b9747b5 soc: rockchip_system_monitor: Fix mem volt error when low temp
The memory volt may be different from vdd voltage, for example the dmc.

Fixes: eb910e20ee ("soc: rockchip_system_monitor: Add support to change mem volt when low temp")
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I4485d4218e3e1fb22aaba0f0ce388036e50d52ff
2022-06-16 15:06:06 +08:00
Kever Yang
13ddb9150c phy: rockchip: naneng-combophy: Add pcie ext clk support
Modify the dts for the combophy:
1. assign clock to 100MHz
2. add "rockchip,ext-refclk"

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I72c125ac6aa42dcf00761f32e20b10042fd9985d
2022-06-16 15:03:29 +08:00
Simon Xue
be0c00efdc media: common: videobuf2: fix begin_cpu_access and end_cpu_access call back
scatterlist nents would change to 1 after dma_map_sg if iommu enabled.
So invalid or clean should use orig_nents to indicate the scatterlist
true nents if user miss the callback prepare and finish of struct vb2_mem_ops.

Change-Id: Iabb4c140d64e79eb16b93cab0fee488fe4ba4b68
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2022-06-16 15:02:49 +08:00
Liang Chen
f0777fbf8e ARM: dts: rockchip: rv1106: adjust clock rate for crypto
Change-Id: Id77c12bf42d8925fd89aba3040a4a3dcd641d8dc
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-06-16 14:52:44 +08:00
Weixin Zhou
97667ca86f arm64: dts: rockchip: rk3588s-tablet-rk806-single: rm SYS_STATUS_VIDEO_4K
DMC_FREQ_LEVEL_LOW is enough for 4k30fps video

Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I1656274d4c0beb8167ea0a41505bd6742e79f83c
2022-06-16 14:37:49 +08:00
Zhang Yubing
6fef59b51b phy: rockchip: usbdp: Add DP PHY max_link_rate limit
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I34ad3f0183358ecf7474fe51a40352ac47cf286c
2022-06-15 20:05:58 +08:00
Tao Huang
ff4142e509 mm: slub: Add SLUB_SYSFS
Make slub sysfs interface selectable.
Save about 4.8ms of boot time on RK1808 EVB if unselected.

Change-Id: I2587cc259c3c31a209604d99640d8e84a4ba78f4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2022-06-15 14:21:09 +08:00
Elon Zhang
70d2349c7c ARM: configs: rv1106-smart-door: enable UVC related drivers
Kernel image size and bootup time are almost unchanged
because the drivers are compiled as modules.

Signed-off-by: Elon Zhang <zhangzj@rock-chips.com>
Change-Id: I2aa77be64be0a96b7a944ded07922de073aa6d60
2022-06-15 10:33:49 +08:00
Liang Chen
99c02a0206 media: rockchip: hdmirx: use devm_request_irq() and remove invalid IRQF_ONESHOT
The flag IRQF_ONESHOT is only for irq thread, so remove IRQF_ONESHOT for
devm_request_irq().

And with IRQF_ONESHOT, when enable CONFIG_PREEMPT_RT, kernel will report bug:
[    4.953930][    C4] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:970
[    4.953932][    C4] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 1, name: swapper/0
[    4.953936][    C4] INFO: lockdep is turned off.
[    4.953937][    C4] irq event stamp: 2481260
[    4.953938][    C4] hardirqs last  enabled at (2481259): [<ffffffc0113a5504>] _raw_spin_unlock_irqrestore+0x60/0xb8
[    4.953946][    C4] hardirqs last disabled at (2481260): [<ffffffc01139b7c0>] enter_el1_irq_or_nmi+0x20/0x54
[    4.953951][    C4] softirqs last  enabled at (2334926): [<ffffffc010056c20>] __local_bh_enable_ip+0x1f4/0x258
[    4.953957][    C4] softirqs last disabled at (2334920): [<ffffffc010123444>] local_bh_disable+0x4/0x30
[    4.953963][    C4] Preemption disabled at:
[    4.953964][    C4] [<ffffffc0100de3d0>] __raw_spin_lock_irqsave+0x3c/0x138
[    4.953971][    C4] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 5.10.66-rt53 #9
[    4.953974][    C4] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[    4.953976][    C4] Call trace:
[    4.953977][    C4]  dump_backtrace+0x0/0x1c4
[    4.953983][    C4]  show_stack+0x18/0x24
[    4.953989][    C4]  dump_stack_lvl+0xec/0x148
[    4.953992][    C4]  dump_stack+0x18/0x64
[    4.953996][    C4]  ___might_sleep+0x1b4/0x1c4
[    4.954002][    C4]  rt_spin_lock+0x70/0xd8
[    4.954005][    C4]  hdmirx_hdmi_irq_handler+0x44/0xcf4
[    4.954008][    C4]  __handle_irq_event_percpu+0xa8/0x1b4
[    4.954015][    C4]  handle_irq_event+0x8c/0x180
[    4.954021][    C4]  handle_fasteoi_irq+0x128/0x228
[    4.954025][    C4]  __handle_domain_irq+0xb0/0x11c
[    4.954030][    C4]  gic_handle_irq+0x74/0x14c
[    4.954034][    C4]  el1_irq+0xd0/0x1c0
[    4.954037][    C4]  _raw_spin_unlock_irqrestore+0x64/0xb8
[    4.954043][    C4]  __setup_irq+0x474/0x6a8
[    4.954046][    C4]  request_threaded_irq+0xfc/0x164
[    4.954049][    C4]  devm_request_threaded_irq+0x84/0xd4
[    4.954054][    C4]  hdmirx_probe+0xa2c/0x128c
[    4.954057][    C4]  platform_drv_probe+0x94/0xbc
[    4.954061][    C4]  really_probe+0x200/0x508
[    4.954067][    C4]  driver_probe_device+0x7c/0xb8
[    4.954072][    C4]  device_driver_attach+0x6c/0xac
[    4.954078][    C4]  __driver_attach+0xc4/0x148
[    4.954084][    C4]  bus_for_each_dev+0x7c/0xc8
[    4.954089][    C4]  driver_attach+0x24/0x30
[    4.954095][    C4]  bus_add_driver+0x100/0x1e0
[    4.954099][    C4]  driver_register+0x78/0x110
[    4.954106][    C4]  __platform_driver_register+0x44/0x50
[    4.954109][    C4]  hdmirx_init+0x44/0x50
[    4.954113][    C4]  do_one_initcall+0x98/0x188
[    4.954116][    C4]  do_initcall_level+0xa0/0xc0
[    4.954121][    C4]  do_initcalls+0x54/0x94
[    4.954125][    C4]  do_basic_setup+0x24/0x30
[    4.954130][    C4]  kernel_init_freeable+0x98/0xf0
[    4.954134][    C4]  kernel_init+0x14/0x184
[    4.954139][    C4]  ret_from_fork+0x10/0x30

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I32d3d7588e1eddc3f88fd5c1f47b6efef5da9e32
2022-06-15 09:58:55 +08:00
Liang Chen
9ee2b2d154 usb: typec: fusb302: remove invalid flag IRQF_ONESHOT for request_irq()
The flag IRQF_ONESHOT is only for irq thread, so remove IRQF_ONESHOT
for request_irq().

And with IRQF_ONESHOT, when enable CONFIG_PREEMPT_RT, kernel will report bug:

[  789.709834][    C0] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:970
[  789.709862][    C0] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/0
[  789.709879][    C0] INFO: lockdep is turned off.
[  789.709885][    C0] irq event stamp: 25194
[  789.709892][    C0] hardirqs last  enabled at (25193): [<ffffffc01139bd30>] exit_el1_irq_or_nmi+0x20/0x54
[  789.709929][    C0] hardirqs last disabled at (25194): [<ffffffc0100a236c>] do_idle+0x94/0x10c
[  789.709954][    C0] softirqs last  enabled at (2818): [<ffffffc010056c20>] __local_bh_enable_ip+0x1f4/0x258
[  789.709982][    C0] softirqs last disabled at (2812): [<ffffffc01015f6ac>] local_bh_disable+0x4/0x30
[  789.710009][    C0] Preemption disabled at:
[  789.710014][    C0] [<ffffffc0113a05e8>] schedule_preempt_disabled+0x20/0x2c
[  789.710042][    C0] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W         5.10.66-rt53 #7
[  789.710061][    C0] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[  789.710070][    C0] Call trace:
[  789.710075][    C0]  dump_backtrace+0x0/0x1c4
[  789.710099][    C0]  show_stack+0x18/0x24
[  789.710119][    C0]  dump_stack_lvl+0xec/0x148
[  789.710135][    C0]  dump_stack+0x18/0x64
[  789.710150][    C0]  ___might_sleep+0x1b4/0x1c4
[  789.710172][    C0]  rt_spin_lock+0x70/0xd8
[  789.710188][    C0]  fusb302_irq_intn+0x28/0x6c
[  789.710210][    C0]  __handle_irq_event_percpu+0xa8/0x1b4
[  789.710234][    C0]  handle_irq_event+0x8c/0x180
[  789.710255][    C0]  handle_level_irq+0x148/0x1e4
[  789.710272][    C0]  generic_handle_irq+0x30/0x48
[  789.710293][    C0]  rockchip_irq_demux+0x154/0x224
[  789.710316][    C0]  __handle_domain_irq+0xb0/0x11c
[  789.710336][    C0]  gic_handle_irq+0x74/0x14c
[  789.710354][    C0]  el1_irq+0xd0/0x1c0
[  789.710369][    C0]  cpuidle_enter_state+0x184/0x2d0
[  789.710386][    C0]  cpuidle_enter+0x38/0x50
[  789.710401][    C0]  cpuidle_idle_call+0x188/0x278
[  789.710419][    C0]  do_idle+0xb8/0x10c
[  789.710436][    C0]  cpu_startup_entry+0x24/0x28
[  789.710453][    C0]  rest_init+0x1ec/0x1fc
[  789.710471][    C0]  arch_call_rest_init+0x10/0x1c
[  789.710492][    C0]  start_kernel+0x3f0/0x524

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: Ifb3bf4e6f20a705b4a13beaa3f0fee9be8709ac9
2022-06-15 09:54:10 +08:00
Michael Grzeschik
b92ac32536 FROMGIT: usb: gadget: uvc: calculate the number of request depending on framesize
The current limitation of possible number of requests being handled is
dependent on the gadget speed. It makes more sense to depend on the
typical frame size when calculating the number of requests. This patch
is changing this and is using the previous limits as boundaries for
reasonable minimum and maximum number of requests.

For a 1080p jpeg encoded video stream with a maximum imagesize of
e.g. 800kB with a maxburst of 8 and an multiplier of 1 the resulting
number of requests is calculated to 49.

        800768         1
nreqs = ------ * -------------- ~= 49
          2      (1024 * 8 * 1)

Tested-by: Dan Vacura <w36195@motorola.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20220529223848.105914-2-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 234757296
(cherry picked from commit 87d76b5f1d
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Change-Id: I0228cbaa56d4e75bed33e1ef721ae3127d779faf
Signed-off-by: Dan Vacura <w36195@motorola.com>
2022-06-14 08:40:53 -05:00
Wang Panzhenzhuan
cdc625748c media: i2c: add imx586 sensor driver
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Id71e4b691fa70b52c87583da728c0ac6cc442950
2022-06-14 15:18:50 +08:00
Guochun Huang
5a174db8ed arm64: rockchip_defconfig: enable CONFIG_DRM_ROHM_BU18XL82
Enable the ROHM SerDes driver for RK3588 Vehicle EVB.

Change-Id: Id436940de5d7bc3079a12504ea095dba760ca965
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2022-06-14 15:15:22 +08:00
Wyon Bi
99f9b6cc07 mfd: max96745: Enable regcache
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I044343b2de644e2939f014fff84cbc22cd4c29b2
2022-06-14 14:28:17 +08:00
Chen Shunqing
7f56984c21 regulator: Add WL2868C LDO support
main features:
    - LDO1-LDO2 Output Voltage: 0.496V to 2.536V in 8mV
    - LDO3-LDO7 Output Voltage: 1.504V to 3.544V in 8mV

Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I4741620901aec99f958a50a35f7dbafc01900151
2022-06-14 14:27:45 +08:00
Luca Ceresoli
5aca5f1070 UPSTREAM: spi: rockchip: fix missing error on unsupported SPI_CS_HIGH
The hardware (except for the ROCKCHIP_SPI_VER2_TYPE2 version) does not
support active-high native chip selects. However if such a CS is configured
the core does not error as it normally should, because the
'ctlr->use_gpio_descriptors = true' line in rockchip_spi_probe() makes the
core set SPI_CS_HIGH in ctlr->mode_bits.

In such a case the spi-rockchip driver operates normally but produces an
active-low chip select signal without notice.

There is no provision in the current core code to handle this
situation. Fix by adding a check in the ctlr->setup function (similarly to
what spi-atmel.c does).

This cannot be done reading the SPI_CS_HIGH but in ctlr->mode_bits because
that bit gets always set by the core for master mode (see above).

Fixes: eb1262e3cc ("spi: spi-rockchip: use num-cs property and ctlr->enable_gpiods")
Change-Id: I3e1065973cd5f3deac486bbc9a3bad230ace4971
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://lore.kernel.org/r/20220421213251.1077899-1-luca.ceresoli@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit d5d933f09a)
2022-06-13 17:19:44 +08:00
Liujie Xie
59d057a3f9 ANDROID: GKI: Add tracing_is_on interface into symbol list
The tracing_is_on interface has been exported, add it to the symbol table so that we can use it in the external module.

Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function int tracing_is_on()'

Bug: 193384408

Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: If9f923850ab1db76214240efd8337211972d3a67
2022-06-13 09:04:30 +00:00
Wang Xiaobin
b3cb70b9f5 ARM: configs: rv1106-smart-door: enable VIDEO_SC3336
Startup time  : increase about 1ms (test on RMSL_V10 board).
Firmware size : increase about 4KByte.

Signed-off-by: Wang Xiaobin <xb.wang@rock-chips.com>
Change-Id: I9627eb7491ff58cb9be060d978d4568963703cb3
2022-06-13 16:54:36 +08:00
Wang Xiaobin
6f64e61b2b ARM: configs: rv1106-smart-door: enable ROCKCHIP_MTD_VENDOR_STORAGE
Startup time  : increase about 1ms.
Firmware size : increase about 1KByte.

Signed-off-by: Wang Xiaobin <xb.wang@rock-chips.com>
Change-Id: Idbc7828cf89eec88dc7b50483c51536dda46036d
2022-06-13 16:54:36 +08:00
Jianwei Fan
dcab84e77d media: rockchip: vicap add MIPI-DSI RGB565 format support
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ia5b08471bd00233951d5b0a065c0f07fd6c03d02
2022-06-13 08:27:52 +00:00
Liang Chen
53d3b87a66 soc: rockchip: opp_select: fix bug for calibrate opp-table by pvtpll
volt will be used as start_volt in next loop, so ensure volt is not
greater than volt_max.

Fixes: b6c7d8fb46 (soc: rockchip: opp_select: calibrate opp-table by pvtpll)
Change-Id: Ifc8f75075ad137483d1c8f603423b2d5f2e119ce
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-06-13 16:07:52 +08:00
Herman Chen
4856e30c88 video: rockchip: mpp: rkvenc2: Fix pagefault issue
Add force clear before each task to avoid pagefault which is caused by
invalid fbc header data.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Siyong Chen <sayon.chen@rock-chips.com>
Change-Id: Idb81e3aa4875e890afa3ec7aecfd25da84e618ae
2022-06-13 15:33:06 +08:00
Lian Xu
c540a82d3d media: rockchip: isp: add the double isp_dev in rockit for isp32
Change-Id: I8aca92b674d81252e7109bf0c07ce9374f31ce0a
Signed-off-by: Lian Xu <xu.lian@rock-chips.com>
2022-06-13 15:16:45 +08:00
Yiqing Zeng
be1ce105fd ARM: dts: rockchip: rv1103-evb-cam: change module name for sc4336
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I2679bf6ab142f898f4403d5329f91d7da039f3a3
2022-06-13 15:11:03 +08:00
Yiqing Zeng
7ea183719f ARM: dts: rockchip: rv1106-ipc: change module name for sc4336
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I7dc43df398c21e28f1dcded2f1b7ea6c32eeadea
2022-06-13 15:11:03 +08:00
Yiqing Zeng
bd079d954d ARM: dts: rockchip: rv1106-evb-cam: change module name for sc4336
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Id5145835244b0348dcfc4e701cd01dc80a30d06f
2022-06-13 15:11:03 +08:00
Jianwei Fan
d8592b707f media: i2c: imx577: add imx577 camera driver
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I6203116ecca52f259dfaf2a09b57bf6c4ee10a0f
2022-06-13 15:10:13 +08:00
Zefa Chen
fe3602cf12 media: rockchip: vicap fixed issue of sditf async to isp
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: If650530feba615c5cc92770f8378a1cc354ed010
2022-06-13 14:56:53 +08:00
Cai YiWei
201d45e4d4 media: rockchip: isp: fix isp32 stream buf update double
Change-Id: Ie6d5e6a411f071777756da6e92cc451507118236
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-13 14:54:49 +08:00
Cai YiWei
78bb39759a media: rockchip: isp: thunderboot for isp32
Change-Id: Id9e7ee4f009ae18f4943ac3252ee766ea4532b80
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-13 14:53:16 +08:00
Cai YiWei
9fde394414 ARM: dts: rockchip: rv1106-thunder-boot: add isp thunder boot node
Change-Id: I9a23b06703e87dbe7dd2980ae80a8bcdfdbcda72
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-13 14:52:13 +08:00
Jianwei Fan
f9d6f92544 media: rockchip: vicap add CSI RGB888 format input support
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Iaaaf63a380e3c8de461f1c5a651a1f7efc313773
2022-06-13 14:47:03 +08:00
Zefa Chen
653c8f5871 media: rockchip: vicap fixed hdr err with group mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I3720c692dbd480067f65fc6c8800b7085ffa783a
2022-06-13 10:05:18 +08:00
Wang Panzhenzhuan
016f705b4c media: i2c: gc8034: add 2lane full 30fps & rk otp support
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I215e3fc9442c93450e45f3b06579403fcc9f2d02
2022-06-10 17:46:59 +08:00
Lin Jinhan
e21704dc6a ARM: dts: rockchip: rv1106-smd-cam: disconnect sc132gs from isp
sc132gs is an IR sensor that no need to process by isp.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I43eadf141556e607f81e281030b1bf292b711bc1
2022-06-10 17:26:31 +08:00
Joseph Chen
c7d3eae2d2 clk: rockchip: rk3588: Fix coding style
Use its own RK3588_PLLCON(), maybe RK3399_PLLCON() was
brought when copy RK3399 code.

Fixes: 58c1fa2ef2 ("clk: rockchip: add pll type for RK3588")
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I551c1d39073f2eba4837bd702f9c2172bfecbd65
2022-06-10 17:24:27 +08:00
Zhang Yubing
77ac72f1ec drm/rockchip: logo: attach crtc to drm state earlier
When the connector is disconneted, the crtc->state->state will be used
before it assignment a value, which will cause a NULL ppinter issue,
the dumpstack as follow:

[    3.015805][    T9] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000048
[    3.024448][    T9] Mem abort info:
[    3.024821][    T9]   ESR = 0x96000005
[    3.025176][    T9]   EC = 0x25: DABT (current EL), IL = 32 bits
[    3.025725][    T9]   SET = 0, FnV = 0
[    3.026076][    T9]   EA = 0, S1PTW = 0
[    3.026434][    T9] Data abort info:
[    3.026771][    T9]   ISV = 0, ISS = 0x00000005
[    3.027190][    T9]   CM = 0, WnR = 0
[    3.027530][    T9] [0000000000000048] user address but active_mm is swapper
[    3.028194][    T9] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[    3.028764][    T9] Modules linked in:
[    3.029140][    T9] CPU: 2 PID: 9 Comm: kworker/u16:1 Not tainted 5.10.66 #234
[    3.029797][    T9] Hardware name: Firefly ITX-3588J HDMI(Android) (DT)
[    3.030417][    T9] Workqueue: events_unbound deferred_probe_work_func
[    3.031018][    T9] pstate: 00c00009 (nzcv daif +PAN +UAO -TCO BTYPE=--)
[    3.031638][    T9] pc : drm_atomic_get_crtc_state+0x1c/0x104
[    3.032175][    T9] lr : vop2_crtc_loader_protect+0x160/0x34c
[    3.032700][    T9] sp : ffffffc0124737b0
[    3.033074][    T9] x29: ffffffc0124737b0 x28: ffffff80052db108
[    3.033629][    T9] x27: dead000000000100 x26: ffffff80061da400
[    3.034192][    T9] x25: ffffff8006208a60 x24: ffffff80062189b8
[    3.034756][    T9] x23: 0000000000000000 x22: 0000000000000001
[    3.035320][    T9] x21: ffffff8006208880 x20: ffffff8006210080
[    3.035882][    T9] x19: ffffff80062108e0 x18: ffffffc0124250a0
[    3.036444][    T9] x17: 0000000000000040 x16: 0000000000000000
[    3.037005][    T9] x15: 0000000000000001 x14: 0000000000000010
[    3.037567][    T9] x13: 0000000000000010 x12: 0000000000000010
[    3.038118][    T9] x11: 0000000000000001 x10: 0000000000000000
[    3.038680][    T9] x9 : 0000000000000002 x8 : ffffff8005726800
[    3.039232][    T9] x7 : 0000000000000020 x6 : 0000000000000000
[    3.039782][    T9] x5 : 0000000000000020 x4 : 0000000080000000
[    3.040345][    T9] x3 : 0000000000000020 x2 : 0000000000000001
[    3.040907][    T9] x1 : ffffff80062108e0 x0 : 0000000000000000
[    3.041466][    T9] Call trace:
[    3.041774][    T9]  drm_atomic_get_crtc_state+0x1c/0x104
[    3.042261][    T9]  vop2_crtc_loader_protect+0x160/0x34c
[    3.042752][    T9]  rockchip_drm_show_logo+0x11e8/0x18e4
[    3.043239][    T9]  rockchip_drm_bind+0x488/0x57c
[    3.043673][    T9]  try_to_bring_up_master+0x16c/0x1b4
[    3.044148][    T9]  __component_add+0xc0/0x188
[    3.044556][    T9]  component_add+0x18/0x28
[    3.044944][    T9]  dw_dp_probe+0x5ac/0x5bc
[    3.045331][    T9]  platform_drv_probe+0x9c/0xc4
[    3.045761][    T9]  really_probe+0x204/0x510
[    3.046158][    T9]  driver_probe_device+0x80/0xc0
[    3.046588][    T9]  __device_attach_driver+0x118/0x140
[    3.047062][    T9]  bus_for_each_drv+0x84/0xd4
[    3.047469][    T9]  __device_attach+0xc0/0x158
[    3.047876][    T9]  device_initial_probe+0x18/0x28
[    3.048317][    T9]  bus_probe_device+0x38/0xa0
[    3.048723][    T9]  deferred_probe_work_func+0x80/0xe0
[    3.049202][    T9]  process_one_work+0x1f4/0x490
[    3.049631][    T9]  worker_thread+0x324/0x4dc
[    3.050039][    T9]  kthread+0x13c/0x344
[    3.050403][    T9]  ret_from_fork+0x10/0x30

Attaching crtc to drm state earlier to avoid attaching the drm state
failed if the function is not normally return.

Fixed:
commit 0a196311ef ("drm/rockchip: logo: attach crtc to drm state")

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I53211f91089143b093e74bf5016cacf8c677dc74
2022-06-10 11:41:25 +08:00
Cai YiWei
24275dd459 media: rockchip: isp: fix cac on/off for isp32
Change-Id: Ic5647d161c71d01c4fcfea519e4b17c2b3ce5a2b
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-10 11:38:32 +08:00
Cai YiWei
d07683b395 media: rockchip: isp: fix hold at lsc ram data config
isp_raw_clk auto-gate and lsc ram config need lsc enable

Change-Id: Id257c40bea4fea0bf89b799bbcb127a4827d5394
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-10 11:38:32 +08:00
Zefa Chen
11ee607656 media: rockchip: vicap optimize print of csi2
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I95e4b2d7a65f25074ee196af6cada345b7462ba3
2022-06-10 11:30:21 +08:00
Lin Jinhan
cb39ed0640 ARM: dts: rockchip: rv1106-smd-cam: modify gc2093 module name
rockchip,camera-module-name = "SIDA209300461";
rockchip,camera-module-lens-name = "VB";

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I5a892722690b3f9383a810eb48fb05b7acce6056
2022-06-10 11:28:03 +08:00
Algea Cao
029514d144 phy: rockchip-samsung-hdptx-hdmi: Fixed frequency setting err when 10bit deep color mode
Don't set the frequency to 1.25 times in hdptx_phy_clk_set_rate,
hdptx_ropll_cmn_config has already done this.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ic9728308ca88edb158f11f70af6d9d7b95825ef9
2022-06-10 11:27:43 +08:00
Finley Xiao
24f9c771cc ARM: dts: rockchip: rv1103: Change CLK_339M_SRC to 264MHz
ISP's parents are CLK_339M_SRC and CLK_200M_SRC, 4M/30fps requires
264M for better power and performance. But it can only get 200M as
CLK_200M_SRC is the closest clk src than CLK_339M_SRC.

CLK_339M_SRC only outputs for ISP and VICAP modules, it's fine to
change CLK_339M_SRC to 264MHz.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I9d349ec7e1dc29f2f6ecdda954a6c0419b9b7d89
2022-06-10 11:27:12 +08:00
Wang Xiaobin
4e9a347fc0 ARM: configs: rv1106-smart-door: disable SQUASHFS
Startup time  : almost unchanged (<1ms).
Firmware size : reduce about 7KByte.

Signed-off-by: Wang Xiaobin <xb.wang@rock-chips.com>
Change-Id: I6b744b3069c4bdda4714c9674735e68a057e1b2d
2022-06-10 11:24:33 +08:00