Commit Graph

490 Commits

Author SHA1 Message Date
Frank Wang
c9bbeb3741 mailbox: rockchip: add reading the last message support
The client can invoke rockchip_mbox_read_msg() to read the last message
in the related mailbox channel.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ia9b78bfc04341648f98db4363ca94b66ebe2cee5
2022-08-10 17:22:36 +08:00
Cai YiWei
349cd33d87 media: rockchip: isp: add tb api for rockit
Change-Id: I8d08816cda58c2605e7b8dd0558e7207644e33c1
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-07-05 11:43:39 +08:00
Cai YiWei
92eb422f64 media: rockchip: isp: fix rockit set fps fail
Change-Id: I0b419db064d7a5b317aca0aebb9ba88ba6862dc9
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-06-24 21:53:23 +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
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
Chuanhu Sun
892023e114 media: rockchip: isp: rockit: support set wrap_line
Signed-off-by: Chuanhu Sun <aaron.sun@rock-chips.com>
Change-Id: I83eeb3f3a1d748f505f29136c8e8a84f0d677930
2022-06-08 17:20:43 +08:00
Lian Xu
bd0cebb689 media: rockchip: isp: read the color_ctrl reg for isp32
Change-Id: I4c06d7944b0fb61bfd5f39560a7bd4afefa4f761
Signed-off-by: Lian Xu <xu.lian@rock-chips.com>
2022-06-01 14:36:37 +08:00
Liang Chen
4ee45c385f soc: rockchip: rockchip_performance: optimize tasks schedule policy
When level==0(low-performance mode):
1. prefer prev_cpu for rt tasks if prev cpu is fit.
2. make sure that it saves at least 6% of the energy when
migrate tasks from little cpu to big cpu.

When level==2(high-performance mode):
1. do not use EAS path.
2. select big cpu first when system is not overutilized.
3. do not trigger load_balance() when system is not overutilized.
4. prefer prev_cpu for rt tasks if prev cpu is fit.

Test performance improvement for level==2:

1. CONFIG_ROCKCHIP_PERFORMANCE=n
EMMC Random Write(4KB) 25.44MB/s
Antutu:
Total 581266
CPU   133023
GPU   234106
MEM   103602
UX    110535

2. CONFIG_ROCKCHIP_PERFORMANCE=y and level==2
EMMC Random Write(4KB) 44.19MB/s (73.7% improvement)
Antutu:
Total 600483 (3.3% improvement)
CPU   134481 (1.1% improvement)
GPU   234678
MEM   116551 (12.5% improvement)
UX    114773 (3.8% improvement)

Change-Id: I949ac229864eb12159b886b7769e0b489345bef4
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-05-26 09:57:09 +08:00
Lian Xu
ec704551c3 media: rockchip: isp: add the pause, config, resume stream for isp32
Change-Id: Ifd2ca42954f5efdfd4fd2b4abf42f740a5cd10f3
Signed-off-by: Lian Xu <xu.lian@rock-chips.com>
2022-05-21 15:03:59 +08:00
Finley Xiao
6e471ff113 cpufreq: rockchip: Add support to set soc info for rk3588
1. Change length according to speed grade.
2. Set supported platforms according to SoC version and speed grade.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I448d3f784216bc034ea2900e5ab837920721cdd0
2022-05-12 20:50:56 +08:00
Lian Xu
b0127db292 media: rockchip: isp: ctrl the fps for isp32
Change-Id: Ia2d780d263bc14327527b9e87607a823f1e7936f
Signed-off-by: Lian Xu <xu.lian@rock-chips.com>
2022-05-05 10:55:19 +08:00
Yandong Lin
6c87036e08 video: rockchip: dvbm: Optimize notify frame info to vepu
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib15aed541efdcc4ff1230c7be9e9fa30d816f706
2022-04-26 17:33:23 +08:00
Liang Chen
b6c7d8fb46 soc: rockchip: opp_select: calibrate opp-table by pvtpll
Change-Id: I790cd008707fff37bc158bcca8c8255ce13db987
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-04-25 19:52:56 +08:00
Simon Xue
18762023bb iommu/rockchip: add rockchip_iommu_is_enabled api
Change-Id: I07ee2a1998322acec525868552c5626081bd8137
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2022-04-24 11:44:37 +08:00
Tao Huang
445bc9a587 PM / devfreq: rockchip_dmc: use IS_REACHABLE instead of IS_ENABLED
Fixes: 990b7b2229 ("PM / devfreq: rk3399_dmc: rename driver to 'rockchip_dmc'")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I75bdfa8cbb0e1625f696b694d64c49cee3f4dee0
2022-04-12 20:06:37 +08:00
Yandong Lin
0e80bdc8bb video: rockchip: dvbm: support soft dvbm
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I7585e59fbc8fac053e0d03fddc3f23e974c19508
2022-04-06 20:37:20 +08:00
Finley Xiao
aa228e28b6 soc: rockchip_system_monitor: Separate out custom OPP handler specific code
On some platforms, the dmc driver uses internal rockchip_ddr_set_rate()
to set dmc clock rate, so the system monitor can't use clk_set_rate() to
change dmc clock rate.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: If74f740d87a11f6a6563c3af35a8f335561a88af
2022-04-02 15:32:23 +08:00
Lian Xu
e76af5fc7c media: rockchip: isp: Solve the wrap_line frame rate problem
Change-Id: I6a949723c1b8caa90897b111a37d19f32644b6ba
Signed-off-by: Lian Xu <xu.lian@rock-chips.com>
2022-04-01 10:04:07 +08:00
Yandong Lin
e18dd28625 video: rockchip: dvbm: fix dvbm config issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ia1abe5b1589fc6e02495c28b01e0ee83ef823f0f
2022-03-28 18:43:22 +08:00
Lian Xu
c5f63891e0 media: rockchip: isp: add the rockit buff
Change-Id: Id74df5de928a176c598ba624d21366fae95230ac
Signed-off-by: Lian Xu <xu.lian@rock-chips.com>
2022-03-25 17:32:34 +08:00
Liang Chen
e8a022189c soc: rockchip: add different performance level support
CONFIG_ROCKCHIP_PERFORMANCE_LEVEL=0 for low performance, low power consumption
CONFIG_ROCKCHIP_PERFORMANCE_LEVEL=1 for normal performance
CONFIG_ROCKCHIP_PERFORMANCE_LEVEL=2 for high performance, high power consumption

Change-Id: I7a88f1a2e43513f647a860b427d8344e34165fa6
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-03-17 15:08:40 +08:00
Yandong Lin
5d269355f0 video: rockchip: dvbm: support dvbm module
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I165a7b0eebb56da76ddc3ab82cb455aee28c0ffe
2022-03-15 17:52:48 +08:00
Finley Xiao
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: I7ce9959bb56617c2fc1111d047af5ec7e88ce60e
2022-03-08 16:07:27 +08:00
Finley Xiao
816f5aea02 soc: rockchip_system_monitor: Set intermediate rate before change read margin
Improve stability when change read margin.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: If283af8895eead5ec8f86cf7f03eca28fc1d2a45
2022-03-03 18:01:38 +08:00
Finley Xiao
f3a5053707 soc: rockchip: opp_select: Implement rockchip_set_read_margin()
Add common APIs to set read margin and set intermediate rate.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I8fb1d16f4ca1a9ec0ba80019197a73e56391c14c
2022-03-03 18:01:38 +08:00
Finley Xiao
f5f2d23805 soc: rockchip: opp_select: Implement rockchip_get_read_margin()
In order to get target read margin and scmi clk earlier,
and it will also be used in later submissions.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I75bd79dc4963fa0dcc73d7c66a696e1cc0c177b7
2022-03-03 18:01:38 +08:00
Ding Wei
be0296b414 iommu/rockchip: Add pagefault handle callback for device
Change-Id: I6998390ea6e5bf41ab21364cad7471603f8d362f
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2022-03-03 16:06:12 +08:00
Finley Xiao
e87424342d cpufreq: rockchip: Add support to change read margin for dsu
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I6bb6bcdf2ac169deb668e004d823b9dc1fdc4033
2022-01-17 16:59:14 +08:00
Simon Xue
b0c33de198 soc: rockchip: sip: support get ddr map information
Change-Id: I3d96443d8cdfbd303d0b2dddaae04d508b2ce5f2
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2022-01-10 18:44:06 +08:00
Finley Xiao
f8e4af5776 soc: rockchip_system_monitor: Avoid crash when set rate and read margin
1. only update voltage when low temperature.
2. set memory read margin only when pd is on.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I7a0ae4af45b86c7a08c6ffadccb71a0db3fb44e5
2021-12-31 09:25:28 +08:00
Finley Xiao
5226534d73 soc: rockchip_system_monitor: Add support to set init freq
As the scmi clk of npu may come from pvtpll, it should power up npu pd
and enable the pclk of pvtpll before set scmi clk. The "assigned-clocks"
in npu node will be set before npu driver probe, at this time the npu
pd may be down, so add "rockchip,init-freq" in opp table node, make
set scmi clk after npu pd is up and pclk of pvtpll is enabled.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I20fc3b6414601134645fa7f157c8ce5db9569232
2021-12-29 22:07:41 +08:00
Finley Xiao
0f83f6cfe8 soc: rockchip: opp_select: Add current read margin for rockchip_opp_info
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ifd7434d28943aa32222938961fc00ffab7f320ea
2021-12-29 16:10:16 +08:00
Finley Xiao
e3296f88ff soc: rockchip_system_monitor: Add support to change memory read margin
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I7261fda4d41f66add3d1039f2d655d8790aa0a8b
2021-12-29 16:09:56 +08:00
Finley Xiao
ddd6a0b49a soc: rockchip: opp_select: Add struct rockchip_opp_info
Add support to get soc info and set voltage read margin.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I254a92ba124655e3efc4922a7425c1f13d384adf
2021-12-21 15:01:01 +08:00
Tao Huang
f6909c028f Merge tag 'ASB-2021-12-05_12-5.10' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2021-12-01
CVE-2021-33909
CVE-2021-38204
CVE-2021-0961

* tag 'ASB-2021-12-05_12-5.10': (3010 commits)
  ANDROID: workqueue: export symbol of the function wq_worker_comm()
  ANDROID: GKI: Update symbols to symbol list
  ANDROID: vendor_hooks: Add hooks for binder proc transaction
  ANDROID: GKI: Add symbols abi for USB IP kernel modules.
  ANDROID: GKI: Fix file mode on mtk abi file
  UPSTREAM: erofs: fix deadlock when shrink erofs slab
  ANDROID: init_task: Init android vendor and oem data
  UPSTREAM: sched/core: Mitigate race cpus_share_cache()/update_top_cache_domain()
  ANDROID: Update symbol list for mtk
  UPSTREAM: erofs: fix unsafe pagevec reuse of hooked pclusters
  UPSTREAM: erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()
  UPSTREAM: usb: dwc3: gadget: Fix null pointer exception
  ANDROID: fips140: support "evaluation testing" builds via build.sh
  FROMGIT: sched/scs: Reset task stack state in bringup_cpu()
  ANDROID: dma-buf: heaps: fix dma-buf heap pool pages stat
  ANDROID: ABI: Add several spi_mem related symbols
  UPSTREAM: spi: spi-mem: add spi_mem_dtr_supports_op()
  ANDROID: gki_defconfig: enable CONFIG_SPI_MEM
  ANDROID: ABI: Add several iio related symbols
  ANDROID: ABI: Update symbol list for IMX
  ...

Change-Id: I09cddc92fa34553b944e62cc5cbbba94a84e5437

Conflicts:
	arch/arm/boot/dts/rk322x.dtsi
	arch/arm64/boot/dts/rockchip/rk3399.dtsi
	drivers/dma-buf/heaps/system_heap.c
	drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop.c
	drivers/gpu/drm/rockchip/rockchip_lvds.c
	drivers/gpu/drm/rockchip/rockchip_vop_reg.c
	drivers/mtd/nand/spi/core.c
	drivers/pci/controller/pcie-rockchip-host.c
	drivers/soc/rockchip/Kconfig
	drivers/usb/dwc3/core.c
	drivers/usb/dwc3/core.h
2021-12-14 17:09:02 +08:00
Finley Xiao
d33636a552 soc: rockchip_system_monitor: Add multiple regulators support
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I24a52ebb9ee599aadbe6e95449b905d29ee4b92d
2021-11-12 21:55:44 +08:00
Finley Xiao
f1123f2aab PM / devfreq: rockchip_dmc: Change frequency according to vop frame bandwidth
Sometimes the vop line bandwidth is not high, the vop also report
buf empty err, and the frame bandwidth is high at this time, so change
ddr frequency according to frame bandwidth can fix the error.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia893a07def99aaaa4da421b6d619a8fd3eec9745
2021-10-29 19:00:34 +08:00
Sandy Huang
a3d4f6e0df drm/rockchip: vop: add calculate current frame data size
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ie9c92c651b8c379c77aac941d03bf3f772ed7eea
2021-10-29 19:00:34 +08:00
Simon Xue
78f050e418 iommu/rockchip: wrap enable/disable operation for user
There are issues about the field "links" of struct device
by calling pm_runtime_get_sync/pm_runtime_put_sync to
enable/disable iommu, wrap helpers to make things easy.

Change-Id: I03a85dc8c67b902e79b1e86a201b2074e2562d83
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-10-28 15:47:09 +08:00
Greg Kroah-Hartman
2300418cc6 This is the 5.10.65 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmFBpvcACgkQONu9yGCS
 aT7JVxAAof4h5rPObKwhFBu4qOHXEtlHrFAF1xTEaQZnIbv9CkEF0LPufWXP+nKS
 mQDOdDmX3rZhWXZbnNK3ZxBADJXyHS6M0jHByuGrzQ8dmMONJtpjYUjxou6k/xg2
 4ECHqzeVbwbWuKrJrAfC1xuZofIHXZBHrkAQmLoMw8ERp309lgPS2cXDOXRzn/n/
 ri+5AhTaw1ZG1JXrXvyfoxjbdE/eEeJXx8N/zJf0sas5lYpsqeAWTgXBkNpPeJm7
 G66ISwEVp6TPxihpRSKwUhADjuM2+EAok2WXwwTvO0s00vE7LL5ijK27hhP5ual1
 +xtxBHag95oIZ+sq1t3z4BgmE1n3z/lHkQki98JQaWShABLGhMdKYPF75hMzR6Pw
 j0TvLHdkPRSrtUelc7rGtqaT9tF9+RU59I5fPGlBpGckOJ5u2IHCKdjk1WadRgrj
 JF7R8ApfP18y1X46tDfr/CIPIZfTVNJyd7hZ1zt11wdBYFmaw/oNyg81OalqzaWf
 ckUIt6AucRQ04uuFfhSaTuxLSEl5Uuh6W30HuO/0N3CoDsfD1RMc+76sXORt/JdK
 MPxTy124KM6VZADVW4tQXHMoGkLftqTAIgRKt4iRPz80rdhACJFoZJlmVON0MmKV
 tSODsqGBxIxhkLj197vQzT152G4wBkmzPtqJfJH7lkGKmBpoKZE=
 =lJCV
 -----END PGP SIGNATURE-----

Merge 5.10.65 into android12-5.10-lts

Changes in 5.10.65
	locking/mutex: Fix HANDOFF condition
	regmap: fix the offset of register error log
	regulator: tps65910: Silence deferred probe error
	crypto: mxs-dcp - Check for DMA mapping errors
	sched/deadline: Fix reset_on_fork reporting of DL tasks
	power: supply: axp288_fuel_gauge: Report register-address on readb / writeb errors
	crypto: omap-sham - clear dma flags only after omap_sham_update_dma_stop()
	sched/deadline: Fix missing clock update in migrate_task_rq_dl()
	rcu/tree: Handle VM stoppage in stall detection
	EDAC/mce_amd: Do not load edac_mce_amd module on guests
	posix-cpu-timers: Force next expiration recalc after itimer reset
	hrtimer: Avoid double reprogramming in __hrtimer_start_range_ns()
	hrtimer: Ensure timerfd notification for HIGHRES=n
	udf: Check LVID earlier
	udf: Fix iocharset=utf8 mount option
	isofs: joliet: Fix iocharset=utf8 mount option
	bcache: add proper error unwinding in bcache_device_init
	blk-throtl: optimize IOPS throttle for large IO scenarios
	nvme-tcp: don't update queue count when failing to set io queues
	nvme-rdma: don't update queue count when failing to set io queues
	nvmet: pass back cntlid on successful completion
	power: supply: smb347-charger: Add missing pin control activation
	power: supply: max17042_battery: fix typo in MAx17042_TOFF
	s390/cio: add dev_busid sysfs entry for each subchannel
	s390/zcrypt: fix wrong offset index for APKA master key valid state
	libata: fix ata_host_start()
	crypto: omap - Fix inconsistent locking of device lists
	crypto: qat - do not ignore errors from enable_vf2pf_comms()
	crypto: qat - handle both source of interrupt in VF ISR
	crypto: qat - fix reuse of completion variable
	crypto: qat - fix naming for init/shutdown VF to PF notifications
	crypto: qat - do not export adf_iov_putmsg()
	fcntl: fix potential deadlock for &fasync_struct.fa_lock
	udf_get_extendedattr() had no boundary checks.
	s390/kasan: fix large PMD pages address alignment check
	s390/pci: fix misleading rc in clp_set_pci_fn()
	s390/debug: keep debug data on resize
	s390/debug: fix debug area life cycle
	s390/ap: fix state machine hang after failure to enable irq
	power: supply: cw2015: use dev_err_probe to allow deferred probe
	m68k: emu: Fix invalid free in nfeth_cleanup()
	sched/numa: Fix is_core_idle()
	sched: Fix UCLAMP_FLAG_IDLE setting
	rcu: Fix to include first blocked task in stall warning
	rcu: Add lockdep_assert_irqs_disabled() to rcu_sched_clock_irq() and callees
	rcu: Fix stall-warning deadlock due to non-release of rcu_node ->lock
	m68k: Fix invalid RMW_INSNS on CPUs that lack CAS
	block: return ELEVATOR_DISCARD_MERGE if possible
	spi: spi-fsl-dspi: Fix issue with uninitialized dma_slave_config
	spi: spi-pic32: Fix issue with uninitialized dma_slave_config
	genirq/timings: Fix error return code in irq_timings_test_irqs()
	irqchip/loongson-pch-pic: Improve edge triggered interrupt support
	lib/mpi: use kcalloc in mpi_resize
	clocksource/drivers/sh_cmt: Fix wrong setting if don't request IRQ for clock source channel
	block: nbd: add sanity check for first_minor
	spi: coldfire-qspi: Use clk_disable_unprepare in the remove function
	irqchip/gic-v3: Fix priority comparison when non-secure priorities are used
	crypto: qat - use proper type for vf_mask
	certs: Trigger creation of RSA module signing key if it's not an RSA key
	tpm: ibmvtpm: Avoid error message when process gets signal while waiting
	x86/mce: Defer processing of early errors
	spi: davinci: invoke chipselect callback
	blk-crypto: fix check for too-large dun_bytes
	regulator: vctrl: Use locked regulator_get_voltage in probe path
	regulator: vctrl: Avoid lockdep warning in enable/disable ops
	spi: sprd: Fix the wrong WDG_LOAD_VAL
	spi: spi-zynq-qspi: use wait_for_completion_timeout to make zynq_qspi_exec_mem_op not interruptible
	EDAC/i10nm: Fix NVDIMM detection
	drm/panfrost: Fix missing clk_disable_unprepare() on error in panfrost_clk_init()
	drm/gma500: Fix end of loop tests for list_for_each_entry
	ASoC: mediatek: mt8183: Fix Unbalanced pm_runtime_enable in mt8183_afe_pcm_dev_probe
	media: TDA1997x: enable EDID support
	leds: is31fl32xx: Fix missing error code in is31fl32xx_parse_dt()
	soc: rockchip: ROCKCHIP_GRF should not default to y, unconditionally
	media: cxd2880-spi: Fix an error handling path
	drm/of: free the right object
	bpf: Fix a typo of reuseport map in bpf.h.
	bpf: Fix potential memleak and UAF in the verifier.
	drm/of: free the iterator object on failure
	gve: fix the wrong AdminQ buffer overflow check
	libbpf: Fix the possible memory leak on error
	ARM: dts: aspeed-g6: Fix HVI3C function-group in pinctrl dtsi
	arm64: dts: renesas: r8a77995: draak: Remove bogus adv7511w properties
	i40e: improve locking of mac_filter_hash
	soc: qcom: rpmhpd: Use corner in power_off
	libbpf: Fix removal of inner map in bpf_object__create_map
	gfs2: Fix memory leak of object lsi on error return path
	firmware: fix theoretical UAF race with firmware cache and resume
	driver core: Fix error return code in really_probe()
	ionic: cleanly release devlink instance
	media: dvb-usb: fix uninit-value in dvb_usb_adapter_dvb_init
	media: dvb-usb: fix uninit-value in vp702x_read_mac_addr
	media: dvb-usb: Fix error handling in dvb_usb_i2c_init
	media: go7007: fix memory leak in go7007_usb_probe
	media: go7007: remove redundant initialization
	media: rockchip/rga: use pm_runtime_resume_and_get()
	media: rockchip/rga: fix error handling in probe
	media: coda: fix frame_mem_ctrl for YUV420 and YVU420 formats
	media: atomisp: fix the uninitialized use and rename "retvalue"
	Bluetooth: sco: prevent information leak in sco_conn_defer_accept()
	6lowpan: iphc: Fix an off-by-one check of array index
	drm/amdgpu/acp: Make PM domain really work
	tcp: seq_file: Avoid skipping sk during tcp_seek_last_pos
	ARM: dts: meson8: Use a higher default GPU clock frequency
	ARM: dts: meson8b: odroidc1: Fix the pwm regulator supply properties
	ARM: dts: meson8b: mxq: Fix the pwm regulator supply properties
	ARM: dts: meson8b: ec100: Fix the pwm regulator supply properties
	net/mlx5e: Prohibit inner indir TIRs in IPoIB
	net/mlx5e: Block LRO if firmware asks for tunneled LRO
	cgroup/cpuset: Fix a partition bug with hotplug
	drm: mxsfb: Enable recovery on underflow
	drm: mxsfb: Increase number of outstanding requests on V4 and newer HW
	drm: mxsfb: Clear FIFO_CLEAR bit
	net: cipso: fix warnings in netlbl_cipsov4_add_std
	Bluetooth: mgmt: Fix wrong opcode in the response for add_adv cmd
	arm64: dts: renesas: rzg2: Convert EtherAVB to explicit delay handling
	arm64: dts: renesas: hihope-rzg2-ex: Add EtherAVB internal rx delay
	devlink: Break parameter notification sequence to be before/after unload/load driver
	net/mlx5: Fix missing return value in mlx5_devlink_eswitch_inline_mode_set()
	i2c: highlander: add IRQ check
	leds: lt3593: Put fwnode in any case during ->probe()
	leds: trigger: audio: Add an activate callback to ensure the initial brightness is set
	media: em28xx-input: fix refcount bug in em28xx_usb_disconnect
	media: venus: venc: Fix potential null pointer dereference on pointer fmt
	PCI: PM: Avoid forcing PCI_D0 for wakeup reasons inconsistently
	PCI: PM: Enable PME if it can be signaled from D3cold
	bpf, samples: Add missing mprog-disable to xdp_redirect_cpu's optstring
	soc: qcom: smsm: Fix missed interrupts if state changes while masked
	debugfs: Return error during {full/open}_proxy_open() on rmmod
	Bluetooth: increase BTNAMSIZ to 21 chars to fix potential buffer overflow
	PM: EM: Increase energy calculation precision
	selftests/bpf: Fix bpf-iter-tcp4 test to print correctly the dest IP
	drm/msm/mdp4: refactor HW revision detection into read_mdp_hw_revision
	drm/msm/mdp4: move HW revision detection to earlier phase
	drm/msm/dpu: make dpu_hw_ctl_clear_all_blendstages clear necessary LMs
	arm64: dts: exynos: correct GIC CPU interfaces address range on Exynos7
	counter: 104-quad-8: Return error when invalid mode during ceiling_write
	cgroup/cpuset: Miscellaneous code cleanup
	cgroup/cpuset: Fix violation of cpuset locking rule
	ASoC: Intel: Fix platform ID matching
	Bluetooth: fix repeated calls to sco_sock_kill
	drm/msm/dsi: Fix some reference counted resource leaks
	net/mlx5: Register to devlink ingress VLAN filter trap
	net/mlx5: Fix unpublish devlink parameters
	ASoC: rt5682: Implement remove callback
	ASoC: rt5682: Properly turn off regulators if wrong device ID
	usb: dwc3: meson-g12a: add IRQ check
	usb: dwc3: qcom: add IRQ check
	usb: gadget: udc: at91: add IRQ check
	usb: gadget: udc: s3c2410: add IRQ check
	usb: phy: fsl-usb: add IRQ check
	usb: phy: twl6030: add IRQ checks
	usb: gadget: udc: renesas_usb3: Fix soc_device_match() abuse
	selftests/bpf: Fix test_core_autosize on big-endian machines
	devlink: Clear whole devlink_flash_notify struct
	samples: pktgen: add missing IPv6 option to pktgen scripts
	Bluetooth: Move shutdown callback before flushing tx and rx queue
	PM: cpu: Make notifier chain use a raw_spinlock_t
	usb: host: ohci-tmio: add IRQ check
	usb: phy: tahvo: add IRQ check
	libbpf: Re-build libbpf.so when libbpf.map changes
	mac80211: Fix insufficient headroom issue for AMSDU
	locking/lockdep: Mark local_lock_t
	locking/local_lock: Add missing owner initialization
	lockd: Fix invalid lockowner cast after vfs_test_lock
	nfsd4: Fix forced-expiry locking
	arm64: dts: marvell: armada-37xx: Extend PCIe MEM space
	clk: staging: correct reference to config IOMEM to config HAS_IOMEM
	i2c: synquacer: fix deferred probing
	firmware: raspberrypi: Keep count of all consumers
	firmware: raspberrypi: Fix a leak in 'rpi_firmware_get()'
	usb: gadget: mv_u3d: request_irq() after initializing UDC
	mm/swap: consider max pages in iomap_swapfile_add_extent
	lkdtm: replace SCSI_DISPATCH_CMD with SCSI_QUEUE_RQ
	Bluetooth: add timeout sanity check to hci_inquiry
	i2c: iop3xx: fix deferred probing
	i2c: s3c2410: fix IRQ check
	i2c: fix platform_get_irq.cocci warnings
	i2c: hix5hd2: fix IRQ check
	gfs2: init system threads before freeze lock
	rsi: fix error code in rsi_load_9116_firmware()
	rsi: fix an error code in rsi_probe()
	ASoC: Intel: kbl_da7219_max98927: Fix format selection for max98373
	ASoC: Intel: Skylake: Leave data as is when invoking TLV IPCs
	ASoC: Intel: Skylake: Fix module resource and format selection
	mmc: sdhci: Fix issue with uninitialized dma_slave_config
	mmc: dw_mmc: Fix issue with uninitialized dma_slave_config
	mmc: moxart: Fix issue with uninitialized dma_slave_config
	bpf: Fix possible out of bound write in narrow load handling
	CIFS: Fix a potencially linear read overflow
	i2c: mt65xx: fix IRQ check
	i2c: xlp9xx: fix main IRQ check
	usb: ehci-orion: Handle errors of clk_prepare_enable() in probe
	usb: bdc: Fix an error handling path in 'bdc_probe()' when no suitable DMA config is available
	usb: bdc: Fix a resource leak in the error handling path of 'bdc_probe()'
	tty: serial: fsl_lpuart: fix the wrong mapbase value
	ASoC: wcd9335: Fix a double irq free in the remove function
	ASoC: wcd9335: Fix a memory leak in the error handling path of the probe function
	ASoC: wcd9335: Disable irq on slave ports in the remove function
	iwlwifi: follow the new inclusive terminology
	iwlwifi: skip first element in the WTAS ACPI table
	ice: Only lock to update netdev dev_addr
	ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point()
	atlantic: Fix driver resume flow.
	bcma: Fix memory leak for internally-handled cores
	brcmfmac: pcie: fix oops on failure to resume and reprobe
	ipv6: make exception cache less predictible
	ipv4: make exception cache less predictible
	net: sched: Fix qdisc_rate_table refcount leak when get tcf_block failed
	net: qualcomm: fix QCA7000 checksum handling
	octeontx2-af: Fix loop in free and unmap counter
	octeontx2-af: Fix static code analyzer reported issues
	octeontx2-af: Set proper errorcode for IPv4 checksum errors
	ipv4: fix endianness issue in inet_rtm_getroute_build_skb()
	ASoC: rt5682: Remove unused variable in rt5682_i2c_remove()
	iwlwifi Add support for ax201 in Samsung Galaxy Book Flex2 Alpha
	f2fs: guarantee to write dirty data when enabling checkpoint back
	time: Handle negative seconds correctly in timespec64_to_ns()
	io_uring: IORING_OP_WRITE needs hash_reg_file set
	bio: fix page leak bio_add_hw_page failure
	tty: Fix data race between tiocsti() and flush_to_ldisc()
	perf/x86/amd/ibs: Extend PERF_PMU_CAP_NO_EXCLUDE to IBS Op
	x86/resctrl: Fix a maybe-uninitialized build warning treated as error
	Revert "KVM: x86: mmu: Add guest physical address check in translate_gpa()"
	KVM: s390: index kvm->arch.idle_mask by vcpu_idx
	KVM: x86: Update vCPU's hv_clock before back to guest when tsc_offset is adjusted
	KVM: VMX: avoid running vmx_handle_exit_irqoff in case of emulation
	KVM: nVMX: Unconditionally clear nested.pi_pending on nested VM-Enter
	ARM: dts: at91: add pinctrl-{names, 0} for all gpios
	fuse: truncate pagecache on atomic_o_trunc
	fuse: flush extending writes
	IMA: remove -Wmissing-prototypes warning
	IMA: remove the dependency on CRYPTO_MD5
	fbmem: don't allow too huge resolutions
	backlight: pwm_bl: Improve bootloader/kernel device handover
	clk: kirkwood: Fix a clocking boot regression
	Linux 5.10.65

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie0b9306ba6ee4193de3200df7cdacaeba152b83e
2021-09-15 14:16:47 +02:00
Nicolas Saenz Julienne
60831f5ae6 firmware: raspberrypi: Keep count of all consumers
[ Upstream commit 1e7c57355a ]

When unbinding the firmware device we need to make sure it has no
consumers left. Otherwise we'd leave them with a firmware handle
pointing at freed memory.

Keep a reference count of all consumers and introduce rpi_firmware_put()
which will permit automatically decrease the reference count upon
unbinding consumer drivers.

Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-15 09:50:41 +02:00
Tao Huang
bb1c2a5cc5 soc: rockchip: power-domain: Add missing dummy definition for pd on/off and pd status
Fixes a build break when CONFIG_ROCKCHIP_PM_DOMAINS is not selected.

drivers/video/rockchip/mpp/mpp_common.c:2286:13: error: implicit declaration of function 'rockchip_pmu_pd_is_on' [-Werror,-Wimplicit-function-declaration]
        pd_is_on = rockchip_pmu_pd_is_on(mpp->dev);
                   ^
drivers/video/rockchip/mpp/mpp_common.c:2288:3: error: implicit declaration of function 'rockchip_pmu_pd_on' [-Werror,-Wimplicit-function-declaration]
                rockchip_pmu_pd_on(mpp->dev);
                ^
drivers/video/rockchip/mpp/mpp_common.c:2304:3: error: implicit declaration of function 'rockchip_pmu_pd_off' [-Werror,-Wimplicit-function-declaration]
                rockchip_pmu_pd_off(mpp->dev);
                ^

Fixes: 93993a9497 ("soc: rockchip: power-domain: export pd on/off and pd status")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Idd4039639fb0884a6fccdec0e22f37888a301a98
2021-08-26 14:16:18 +08:00
Finley Xiao
369abda7d1 PM / devfreq: rockchip_dmc: Split out some functions into separate file
Fix the depmod error as follows.
depmod: ERROR: Cycle detected: rockchip_dmc -> rockchipdrm -> rockchip_dmc

Change-Id: I99c2a959e9220836b78ef48a2d43f37b56ecedf1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-06 20:11:06 +08:00
Finley Xiao
990b7b2229 PM / devfreq: rk3399_dmc: rename driver to 'rockchip_dmc'
In future it will be modified to support more rockchip platforms.

Change-Id: I5cd7ce555eefe08b12fbfcda8ef445c4b169e8c6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-28 14:38:18 +08:00
Finley Xiao
d58bcc8c2b soc: rockchip_system_monitor: Add support to limit volt during system startup
Now a regulator device can supply multiple consumers at the same time,
if a consumer starts and set a low voltage, another consumer doesn't
start in kernel but has been set a high frequency in bootloader will
abort.

This patch implements the same function as the commit
d712e9b8d5 ("regulator: core: Add support to limit min_uV during system startup")
in 4.19.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I3266d120c1b9327248a509196c0c32a26c0c355e
2021-07-20 17:58:25 +08:00
Finley Xiao
7ee882d39e Revert "soc: rockchip: system_monitor: change cdev state according to temperature"
This reverts commit 72dc50cd92.

As the system monitor support changing thermal governor and managing
cooling devices, there's no need to export system monitor devices to
thermal framework.

Change-Id: I2ee0314d6f3b342f2c7f41f7fafbb0074555759d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-06 17:16:48 +08:00
Finley Xiao
99290df06c soc: rockchip_system_monitor: Add support to check voltage
As dev_pm_opp_check_rate_volt() is implemented in file driver/opp/core.c
by rockchip, it is unsupported for gki.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I13b7b916b1b1310cf5f421e98417bdb4fc1a953a
2021-07-06 17:16:48 +08:00
Finley Xiao
0ce78e6aeb soc: rockchip: system_monitor: Use PM QoS to set frequency limits
The cpufreq core now takes the min/max frequency constraints via QoS
requests and the CPUFREQ_ADJUST notifier is removed.

The devfreq core now supports limiting the frequency range of a device
through PM QoS make use of it instead of disabling OPPs that should
not be used.

Change-Id: I3e909bd6a1ba77e565ebb0e4870f79f1e0724b46
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-06 17:16:48 +08:00
Finley Xiao
7f0e1711ed soc: rockchip: opp_select: Export rockchip_nvmem_cell_read_u8/u16()
Change-Id: I1c231afce31da9f42cd92839540d8dcb675778ce
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-03 11:30:16 +08:00
Tao Huang
d648938407 Merge remote branch 'android12-5.10' of https://android.googlesource.com/kernel/common
* android12-5.10: (1647 commits)
  FROMGIT: mm/page_owner: record the timestamp of all pages during free
  UPSTREAM: mm/page_io: use pr_alert_ratelimited for swap read/write errors
  ANDROID: roll back xt_IDLETIMER to 5.10.21 upstream/vanilla version
  ANDROID: qcom: Add ip, rtnl and free related symbols
  FROMGIT: power: supply: Fix build error when CONFIG_POWER_SUPPLY is not enabled.
  FROMGIT: usb: dwc3: gadget: modify the scale in vbus_draw callback
  BACKPORT: FROMLIST: usb: dwc3: gadget: Clear DEP flags after stop transfers in ep disable
  FROMLIST: Makefile: fix GDB warning with CONFIG_RELR
  ANDROID: refresh ABI XML before enabling KMI enforcement
  Revert "Revert "ANDROID: GKI: Enable bounds sanitizer""
  Revert "ANDROID: Revert "f2fs: fix to tag FIEMAP_EXTENT_MERGED in f2fs_fiemap()""
  ANDROID: Enforce KMI stability
  ANDROID: enable options prior to enforcing KMI
  Revert "ANDROID: GKI: temporarily disable LTO/CFI"
  ANDROID: gki_defconfig: Enable NET_CLS_{BASIC,TCINDEX,MATCHALL} & NET_ACT_{GACT,MIRRED}
  FROMLIST: selftests: Add a MREMAP_DONTUNMAP selftest for shmem
  FROMLIST: mm: Extend MREMAP_DONTUNMAP to non-anonymous mappings
  ANDROID: GKI: enable CONFIG_CMA_SYSFS
  ANDROID: make cma_sysfs experimental
  FROMLIST: mm: cma: support sysfs
  ...

Change-Id: I6145eddeb253bea33164fc909e7790d30f17ef1f
2021-04-25 18:33:22 +08:00