Commit Graph

1080740 Commits

Author SHA1 Message Date
Yang Yingliang
7649bba263 hwmon: (i5500_temp) fix missing pci_disable_device()
[ Upstream commit 3b7f98f237 ]

pci_disable_device() need be called while module exiting, switch to use
pcim_enable(), pci_disable_device() will be called in pcim_release().

Fixes: ada072816b ("hwmon: (i5500_temp) New driver for the Intel 5500/5520/X58 chipsets")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221112125606.3751430-1-yangyingliang@huawei.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:55 +01:00
Ninad Malwade
dddfc03f04 hwmon: (ina3221) Fix shunt sum critical calculation
[ Upstream commit b8d27d2ce8 ]

The shunt sum critical limit register value should be left shifted
by one bit as its LSB-0 is a reserved bit.

Fixes: 2057bdfb71 ("hwmon: (ina3221) Add summation feature support")
Signed-off-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20221108044508.23463-1-nmalwade@nvidia.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
Derek Nguyen
984fcd3ec1 hwmon: (ltc2947) fix temperature scaling
[ Upstream commit 07e06193ea ]

The LTC2947 datasheet (Rev. B) calls out in the section "Register
Description: Non-Accumulated Result Registers" (pg. 30) that "To
calculate temperature, multiply the TEMP register value by 0.204°C
and add 5.5°C". Fix to add 5.5C and not 0.55C.

Fixes: 9f90fd652b ("hwmon: Add support for ltc2947")
Signed-off-by: Derek Nguyen <derek.nguyen@collins.com>
Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Link: https://lore.kernel.org/r/20221110192108.20624-1-brandon.maier@collins.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
Hou Tao
8a549ab672 libbpf: Handle size overflow for ringbuf mmap
[ Upstream commit 927cbb478a ]

The maximum size of ringbuf is 2GB on x86-64 host, so 2 * max_entries
will overflow u32 when mapping producer page and data pages. Only
casting max_entries to size_t is not enough, because for 32-bits
application on 64-bits kernel the size of read-only mmap region
also could overflow size_t.

So fixing it by casting the size of read-only mmap region into a __u64
and checking whether or not there will be overflow during mmap.

Fixes: bf99c936f9 ("libbpf: Add BPF ring buffer support")
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20221116072351.1168938-3-houtao@huaweicloud.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
Michael Grzeschik
cc140c729c ARM: at91: rm9200: fix usb device clock id
[ Upstream commit 5797676242 ]

Referring to the datasheet the index 2 is the MCKUDP. When enabled, it
"Enables the automatic disable of the Master Clock of the USB Device
Port when a suspend condition occurs". We fix the index to the real UDP
id which "Enables the 48 MHz clock of the USB Device Port".

Cc: nicolas.ferre@microchip.com
Cc: ludovic.desroches@microchip.com
Cc: alexandre.belloni@bootlin.com
Cc: mturquette@baylibre.com
Cc: sboyd@kernel.org
Cc: claudiu.beznea@microchip.com
Cc: linux-clk@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: kernel@pengutronix.de
Fixes: 02ff48e4d7 ("clk: at91: add at91rm9200 pmc driver")
Fixes: 0e0e528d82 ("ARM: dts: at91: rm9200: switch to new clock bindings")
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20221114185923.1023249-2-m.grzeschik@pengutronix.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
Srikar Dronamraju
592724b14d scripts/faddr2line: Fix regression in name resolution on ppc64le
[ Upstream commit 2d77de1581 ]

Commit 1d1a0e7c51 ("scripts/faddr2line: Fix overlapping text section
failures") can cause faddr2line to fail on ppc64le on some
distributions, while it works fine on other distributions. The failure
can be attributed to differences in the readelf output.

  $ ./scripts/faddr2line vmlinux find_busiest_group+0x00
  no match for find_busiest_group+0x00

On ppc64le, readelf adds the localentry tag before the symbol name on
some distributions, and adds the localentry tag after the symbol name on
other distributions. This problem has been discussed previously:

  https://lore.kernel.org/bpf/20191211160133.GB4580@calabresa/

This problem can be overcome by filtering out the localentry tags in the
readelf output. Similar fixes are already present in the kernel by way
of the following commits:

  1fd6cee127 ("libbpf: Fix VERSIONED_SYM_COUNT number parsing")
  aa915931ac ("libbpf: Fix readelf output parsing for Fedora")

[jpoimboe: rework commit log]

Fixes: 1d1a0e7c51 ("scripts/faddr2line: Fix overlapping text section failures")
Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Reviewed-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Link: https://lore.kernel.org/r/20220927075211.897152-1-srikar@linux.vnet.ibm.com
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
Hou Tao
353c3aaaf3 bpf, perf: Use subprog name when reporting subprog ksymbol
[ Upstream commit 47df8a2f78 ]

Since commit bfea9a8574 ("bpf: Add name to struct bpf_ksym"), when
reporting subprog ksymbol to perf, prog name instead of subprog name is
used. The backtrace of bpf program with subprogs will be incorrect as
shown below:

  ffffffffc02deace bpf_prog_e44a3057dcb151f8_overwrite+0x66
  ffffffffc02de9f7 bpf_prog_e44a3057dcb151f8_overwrite+0x9f
  ffffffffa71d8d4e trace_call_bpf+0xce
  ffffffffa71c2938 perf_call_bpf_enter.isra.0+0x48

overwrite is the entry program and it invokes the overwrite_htab subprog
through bpf_loop, but in above backtrace, overwrite program just jumps
inside itself.

Fixing it by using subprog name when reporting subprog ksymbol. After
the fix, the output of perf script will be correct as shown below:

  ffffffffc031aad2 bpf_prog_37c0bec7d7c764a4_overwrite_htab+0x66
  ffffffffc031a9e7 bpf_prog_c7eb827ef4f23e71_overwrite+0x9f
  ffffffffa3dd8d4e trace_call_bpf+0xce
  ffffffffa3dc2938 perf_call_bpf_enter.isra.0+0x48

Fixes: bfea9a8574 ("bpf: Add name to struct bpf_ksym")
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20221114095733.158588-1-houtao@huaweicloud.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
Paul Gazzillo
d48f6a5784 iio: light: rpr0521: add missing Kconfig dependencies
[ Upstream commit 6ac1230357 ]

Fix an implicit declaration of function error for rpr0521 under some configs

When CONFIG_RPR0521 is enabled without CONFIG_IIO_TRIGGERED_BUFFER,
the build results in "implicit declaration of function" errors, e.g.,
  drivers/iio/light/rpr0521.c:434:3: error: implicit declaration of function
           'iio_trigger_poll_chained' [-Werror=implicit-function-declaration]
    434 |   iio_trigger_poll_chained(data->drdy_trigger0);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~

This fix adds select dependencies to RPR0521's configuration declaration.

Fixes: e12ffd241c ("iio: light: rpr0521 triggered buffer")
Signed-off-by: Paul Gazzillo <paul@pgazz.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216678
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221110214729.ls5ixav5kxpeftk7@device
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
Wei Yongjun
5eb114f55b iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw
[ Upstream commit fc92d9e3de ]

KASAN report out-of-bounds read as follows:

BUG: KASAN: global-out-of-bounds in afe4404_read_raw+0x2ce/0x380
Read of size 4 at addr ffffffffc00e4658 by task cat/278

Call Trace:
 afe4404_read_raw
 iio_read_channel_info
 dev_attr_show

The buggy address belongs to the variable:
 afe4404_channel_leds+0x18/0xffffffffffffe9c0

This issue can be reproduce by singe command:

 $ cat /sys/bus/i2c/devices/0-0058/iio\:device0/in_intensity6_raw

The array size of afe4404_channel_leds and afe4404_channel_offdacs
are less than channels, so access with chan->address cause OOB read
in afe4404_[read|write]_raw. Fix it by moving access before use them.

Fixes: b36e825764 ("iio: health/afe440x: Use regmap fields")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20221107152010.95937-1-weiyongjun@huaweicloud.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
Wei Yongjun
b1756af172 iio: health: afe4403: Fix oob read in afe4403_read_raw
[ Upstream commit 58143c1ed5 ]

KASAN report out-of-bounds read as follows:

BUG: KASAN: global-out-of-bounds in afe4403_read_raw+0x42e/0x4c0
Read of size 4 at addr ffffffffc02ac638 by task cat/279

Call Trace:
 afe4403_read_raw
 iio_read_channel_info
 dev_attr_show

The buggy address belongs to the variable:
 afe4403_channel_leds+0x18/0xffffffffffffe9e0

This issue can be reproduced by singe command:

 $ cat /sys/bus/spi/devices/spi0.0/iio\:device0/in_intensity6_raw

The array size of afe4403_channel_leds is less than channels, so access
with chan->address cause OOB read in afe4403_read_raw. Fix it by moving
access before use it.

Fixes: b36e825764 ("iio: health/afe440x: Use regmap fields")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20221107151946.89260-1-weiyongjun@huaweicloud.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
ChenXiaoSong
01d7c41eac btrfs: qgroup: fix sleep from invalid context bug in btrfs_qgroup_inherit()
[ Upstream commit f7e942b5bb ]

Syzkaller reported BUG as follows:

  BUG: sleeping function called from invalid context at
       include/linux/sched/mm.h:274
  Call Trace:
   <TASK>
   dump_stack_lvl+0xcd/0x134
   __might_resched.cold+0x222/0x26b
   kmem_cache_alloc+0x2e7/0x3c0
   update_qgroup_limit_item+0xe1/0x390
   btrfs_qgroup_inherit+0x147b/0x1ee0
   create_subvol+0x4eb/0x1710
   btrfs_mksubvol+0xfe5/0x13f0
   __btrfs_ioctl_snap_create+0x2b0/0x430
   btrfs_ioctl_snap_create_v2+0x25a/0x520
   btrfs_ioctl+0x2a1c/0x5ce0
   __x64_sys_ioctl+0x193/0x200
   do_syscall_64+0x35/0x80

Fix this by calling qgroup_dirty() on @dstqgroup, and update limit item in
btrfs_run_qgroups() later outside of the spinlock context.

CC: stable@vger.kernel.org # 4.9+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: ChenXiaoSong <chenxiaosong2@huawei.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
Alex Deucher
d3f5be8246 drm/amdgpu: Partially revert "drm/amdgpu: update drm_display_info correctly when the edid is read"
[ Upstream commit 602ad43c3c ]

This partially reverts 20543be93c.

Calling drm_connector_update_edid_property() in
amdgpu_connector_free_edid() causes a noticeable pause in
the system every 10 seconds on polled outputs so revert this
part of the change.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2257
Cc: Claudio Suarez <cssk@net-c.es>
Acked-by: Luben Tuikov <luben.tuikov@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
Claudio Suarez
00570fafc2 drm/amdgpu: update drm_display_info correctly when the edid is read
[ Upstream commit 20543be93c ]

drm_display_info is updated by drm_get_edid() or
drm_connector_update_edid_property(). In the amdgpu driver it is almost
always updated when the edid is read in amdgpu_connector_get_edid(),
but not always.  Change amdgpu_connector_get_edid() and
amdgpu_connector_free_edid() to keep drm_display_info updated.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Claudio Suarez <cssk@net-c.es>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: 602ad43c3c ("drm/amdgpu: Partially revert "drm/amdgpu: update drm_display_info correctly when the edid is read"")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
Lyude Paul
44b204730b drm/display/dp_mst: Fix drm_dp_mst_add_affected_dsc_crtcs() return code
[ Upstream commit 2f3a127386 ]

Looks like that we're accidentally dropping a pretty important return code
here. For some reason, we just return -EINVAL if we fail to get the MST
topology state. This is wrong: error codes are important and should never
be squashed without being handled, which here seems to have the potential
to cause a deadlock.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Wayne Lin <Wayne.Lin@amd.com>
Fixes: 8ec046716c ("drm/dp_mst: Add helper to trigger modeset on affected DSC MST CRTCs")
Cc: <stable@vger.kernel.org> # v5.6+
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
Nikolay Borisov
1faf21bdd1 btrfs: move QUOTA_ENABLED check to rescan_should_stop from btrfs_qgroup_rescan_worker
[ Upstream commit db5df25412 ]

Instead of having 2 places that short circuit the qgroup leaf scan have
everything in the qgroup_rescan_leaf function. In addition to that, also
ensure that the inconsistent qgroup flag is set when rescan_should_stop
returns true. This both retains the old behavior when -EINTR was set in
the body of the loop and at the same time also extends this behavior
when scanning is interrupted due to remount or unmount operations.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Stable-dep-of: f7e942b5bb ("btrfs: qgroup: fix sleep from invalid context bug in btrfs_qgroup_inherit()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
Frieder Schrempf
6050872f9f spi: spi-imx: Fix spi_bus_clk if requested clock is higher than input clock
[ Upstream commit db2d2dc9a0 ]

In case the requested bus clock is higher than the input clock, the correct
dividers (pre = 0, post = 0) are returned from mx51_ecspi_clkdiv(), but
*fres is left uninitialized and therefore contains an arbitrary value.

This causes trouble for the recently introduced PIO polling feature as the
value in spi_imx->spi_bus_clk is used there to calculate for which
transfers to enable PIO polling.

Fix this by setting *fres even if no clock dividers are in use.

This issue was observed on Kontron BL i.MX8MM with an SPI peripheral clock set
to 50 MHz by default and a requested SPI bus clock of 80 MHz for the SPI NOR
flash.

With the fix applied the debug message from mx51_ecspi_clkdiv() now prints the
following:

spi_imx 30820000.spi: mx51_ecspi_clkdiv: fin: 50000000, fspi: 50000000,
post: 0, pre: 0

Fixes: 6fd8b8503a ("spi: spi-imx: Fix out-of-order CS/SCLK operation at low speeds")
Fixes: 07e7593877 ("spi: spi-imx: add PIO polling support")
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: David Jander <david@protonic.nl>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Marek Vasut <marex@denx.de>
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Tested-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20221115181002.2068270-1-frieder@fris.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:54 +01:00
Anand Jain
7b020665d4 btrfs: free btrfs_path before copying inodes to userspace
[ Upstream commit 418ffb9e3c ]

btrfs_ioctl_logical_to_ino() frees the search path after the userspace
copy from the temp buffer @inodes. Which potentially can lead to a lock
splat.

Fix this by freeing the path before we copy @inodes to userspace.

CC: stable@vger.kernel.org # 4.19+
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:53 +01:00
David Sterba
d5b7a34379 btrfs: sink iterator parameter to btrfs_ioctl_logical_to_ino
[ Upstream commit e3059ec06b ]

There's only one function we pass to iterate_inodes_from_logical as
iterator, so we can drop the indirection and call it directly, after
moving the function to backref.c

Signed-off-by: David Sterba <dsterba@suse.com>
Stable-dep-of: 418ffb9e3c ("btrfs: free btrfs_path before copying inodes to userspace")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:53 +01:00
Yu Qiaowei
6be361f257 video/rockchip: rga: fix hardware abort error when pre-scaling
The reserved pre-scale buffer size is modified to the currently supported
maximum output size.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: If2f2a1275466bfd39e9003e24e3cf0a848dccff1
2022-12-08 17:28:47 +08:00
Yu Qiaowei
bbab2e43b6 video/rockchip: rga: remove log printing of unknown ioctl cmd
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: If1f17ecd83c32e1d021f0445b65379a39ea9aec8
2022-12-08 15:43:06 +08:00
Yu Qiaowei
5893da2a48 video/rockchip: rga: enable MMU interrupt
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I8ac1b290bcb3390221e58bf0cef1ea3d7cee9a93
2022-12-08 15:43:01 +08:00
Zefa Chen
9e6e11128c media: i2c: gc2145 fix issue of power off, when probe fail
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ice95c869bee6ab1c8170021e68a0b2ec529f3143
2022-12-08 14:52:47 +08:00
Finley Xiao
edba7a6365 clk: rockchip: rk3128: Fix aclk_peri_src parent
Change-Id: Id679e7235f78635233dc4d6bd59c75ce05dfc99e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-12-08 11:58:19 +08:00
Wyon Bi
7a3c5ebd55 clk: rockchip: rk3128: mark the hclk_vio_h2p as critical clk
Change-Id: Ib4eb985b1c3aacf6e51d593fcf71cd46e1dc0b82
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-12-08 11:58:07 +08:00
Finley Xiao
6b9329bb95 clk: rockchip: rk3128: Add sclk_hsadc_tsp
Change-Id: I842869a7ea79730daa6616f1cf2a8f5db7165ceb
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-12-08 11:57:54 +08:00
Liang Chen
15eed48777 clk: rockchip: rk3128: fix incorrect configuration
1. The first parent name of sclk_cif_out_src is wrong, it is
"sclk_cif_src".
2. The MUX configuration for sclk_cif_out_src is wrong, it should
be muxdiv_offset=29, mux_shift=2, mux_width=1.

Change-Id: I36a0ec0791afdef398d37ac8b92b7831619fb01b
Signed-off-by: Liang Chen <cl@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-12-08 11:57:39 +08:00
Linyu Yuan
01b3d953ac BACKPORT: UPSTREAM: usb: typec: ucsi: Wait for the USB role switches
When role switch module probe late than ucsi module,
fwnode_usb_role_switch_get() will return -EPROBE_DEFER,
it is better to restart ucsi init work to find
it again every 100ms, total wait time is 10 second.

It also means change ucsi init work to delayed_work.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
Link: https://lore.kernel.org/r/1650881886-25530-3-git-send-email-quic_linyyuan@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry picked from commit 3c16251153
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git)

Bug: 260537721
[ugoswami: Fixed KMI breakage by moving the delayed_work & work_count
to a new parent structure]
Change-Id: Ia4e2521c40b9b0ffe8b6f13ec19990e7f3a60e7a
Signed-off-by: Udipto Goswami <quic_ugoswami@quicinc.com>
2022-12-07 11:26:19 +00:00
Wu Liangqing
914877f7c1 arm64: configs: rockchip_gki: Enable CONFIG_PWRSEQ_SIMPLE
Change-Id: I95a39f35eecc2139e894b8d9b8c1730d674ddf6c
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2022-12-07 18:19:31 +08:00
Tao Huang
a60cc43489 arm64: rockchip_gki.config: Enable CONFIG_CPU_RK3568
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ied70ff781c200aed42cf6ca9f4a33ccb0ab281d5
2022-12-07 18:17:42 +08:00
Jianqun Xu
ebc7e6d848 irqchip/gic-v3: get free page instead of kmalloc for itt
Since kmalloc may not care about GFP_DMA32, change to use get free pages
for itt on its device.

To reduce the impact of this change, we only applied it to rk3566/rk3568.

Change-Id: I2e91c97bd4d61d2542cf437363fc3dd1d9fa669c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2022-12-07 18:15:05 +08:00
Guochun Huang
0b2f07b378 drm/rockchip: dsi: driver may retry bind when panel or bridge not register
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I8687da829e61a170e52c83f8565c2db879fd958a
2022-12-07 18:14:51 +08:00
Huibin Hong
f8080404df soc: rockchip: debug: rockchip_show_interrupts print all cpu
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I929a9cee5d596a8d9f1280f8232eefc2fecf2f31
2022-12-07 17:37:42 +08:00
Finley Xiao
2438e94364 arm64: dts: rockchip: rk3588s: Add hardware version for rk3588m and rk3588j
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ide13f6d0c8d38c1e46be52c4b407b1147a08ad8a
2022-12-07 17:21:51 +08:00
Finley Xiao
63e89b6e63 driver: rknpu: Implement set_soc_info and set_soc_info for rk3588
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I8cfe13ffded798363388153bfbf305f6fc9f9f33
2022-12-07 17:21:51 +08:00
Finley Xiao
b1bae8a36b MALI: bifrost: Implement set_soc_info and set_soc_info for rk3588
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic5dddbd667b63b61f60b80270ba8bae8b1086852
2022-12-07 17:21:51 +08:00
Finley Xiao
1e655030ce soc: rockchip: opp_select: Add support to set soc info
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I101ff42d9e175535cfab9b58781c472b00b700e1
2022-12-07 17:21:51 +08:00
Finley Xiao
c25a99d05f cpufreq: rockchip: Add support for rk3588j
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I13d2ffae1253c7e5b3513c6aefcf15fb8e16eb5d
2022-12-07 17:21:51 +08:00
William Wu
ee7c3ab6b5 usb: dwc2: fix waiting time for host only mode
The current code uses 50ms sleep to wait for host only
mode, the delay time is not enough for some Rockchip
platforms (e.g RK3036G EVB1).

Test on RK3036G EVB1, the dwc2 host only controller reg
GOTGCTL.ConIDSts = 1'b1 (device mode) if only wait for
50ms. And the host fails to detect usb2 device with the
following error log:

usb usb2-port1: connect-debounce failed

This patch checks the GOTGCTL.ConIDSts for host only
mode and increases the maximum waiting time to 200ms.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ie28299934aba09907ea08f5fd3b34bf2fb35822e
2022-12-07 16:56:58 +08:00
Elaine Zhang
7a22993077 clk: rockchip: update the frac clk parent
Fixes: cd10522093 ("clk: rockchip: fix up frac clk parent no update")
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I9fd76eb118f925ec4eeb8b928a7acb3ee2b93deb
2022-12-07 15:38:11 +08:00
Herman Chen
1a04192711 video: rockchip: mpp: vepu2: Fix core id limit
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I52268e292c8527bd377da1574a64ff09621d4971
2022-12-07 15:34:01 +08:00
Sandy Huang
1abf5c42d2 drm/rockchip: drv: split pre mapping into two mapping
At 32 bit platform size_t maximum value is 0xffffffff, SZ_4G(0x100000000) will
be cliped to 0, so we split into two mapping.

Fixes: 0da77f77c0 ("drm/rockchip: drv: add support pre mapping for vop iommu")
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I4066b1e20cfb9e29033b72f2035bf5e24a1f1f23
2022-12-07 15:32:27 +08:00
Damon Ding
ffa6d4f255 drm/rockchip: vop: add support for cvbs interface on rk3036
CVBS only support for 480i and 576i display mode. It is
needed for rk3036 to enable scaling when using interlace
mode, which also updated in this commit.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I1d131ec71c0b31680280353e1690f8c01eb3c94e
2022-12-07 15:22:41 +08:00
Damon Ding
e327d3bb1a drm/rockchip: drv: register rockchip tve driver
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I40cce413d738ad16473eb35ce6c2adf4897380d6
2022-12-07 15:20:14 +08:00
ZhiZhan Chen
c9d18638d6 drm/rockchip: add config options of TVE driver
Change-Id: I059808111bfa96724eb629b6fc37915a4852e234
Signed-off-by: ZhiZhan Chen <zhizhan.chen@rock-chips.com>
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2022-12-07 15:08:12 +08:00
Damon Ding
47855807ea ARM: configs: rockchip_linux_defconfig: enable tve
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I6c1b81809b31873e751207c29feb045fdcfc1a63
2022-12-07 15:08:12 +08:00
Damon Ding
7ffd80939a drm/rockchip: tve: add tve support for rk3036/rk312x/rk322x
The related codes are ported from kernel-3.10. Tve interface
function has been tested on rk3036/rk3128/rk3228.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I5395bdccd7c645dfd34e9ccf166f3c94086e3134
2022-12-07 15:08:12 +08:00
Damon Ding
657133eb06 ARM: dts: rockchip: rk3036: add tve node
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ia912356862fc30ad79506dc75c9bc105ca3bba6e
2022-12-07 15:00:36 +08:00
Greg Kroah-Hartman
f3226d86f8 Revert "xfrm: fix "disable_policy" on ipv4 early demux"
This reverts commit 497653f6d2 which is
commit 3a5913183a upstream.  It is not
needed here as the commit it fixes, e6175a2ed1 ("xfrm: fix
"disable_policy" flag use when arriving from different devices"), was
already reverted from this branch due to ABI issues.

Bug: 161946584
Change-Id: I9bcc08425bf73b6fd1dcad8d801ffc728e1021b6
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2022-12-06 19:06:22 +00:00
Cai YiWei
25cbf08d91 media: rockchip: isp: fix rockit stream pause if readback mode
Change-Id: I8482c9cd365f34adbb6ded979cd4d58d4b299776
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-12-06 18:44:51 +08:00
Su Yuefu
6564f48d22 media: rockchip: fix vicap captures raw not responding
caused by commit of thunderboot support
be07e90202262ebfe8b008e7ec5b0142ee54a99c

Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: I54c19bd9084a004bb15fc6f9054138f2c81ff059
2022-12-06 18:10:52 +08:00