Commit graph

1,233,462 commits

Author SHA1 Message Date
Amadeusz Sławiński
ef91ae9e68
ASoC: Intel: avs: max98927: Validate machine board configuration
Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-13-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-12 13:04:48 +01:00
Amadeusz Sławiński
a1ec836b17
ASoC: Intel: avs: max98373: Validate machine board configuration
Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-12-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-12 13:04:47 +01:00
Amadeusz Sławiński
8d5fed3312
ASoC: Intel: avs: es8336: Validate machine board configuration
Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-11-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-12 13:04:46 +01:00
Amadeusz Sławiński
fc332ea117
ASoC: Intel: avs: da7219: Validate machine board configuration
Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-10-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-12 13:04:45 +01:00
Amadeusz Sławiński
060c0fd1af
ASoC: Intel: avs: rt298: Validate machine board configuration
Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-9-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-12 13:04:44 +01:00
Amadeusz Sławiński
863e3f18d0
ASoC: Intel: avs: max98357a: Validate machine board configuration
Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-8-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-12 13:04:43 +01:00
Amadeusz Sławiński
2172c5b90d
ASoC: Intel: avs: rt5682: Validate machine board configuration
Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-7-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-12 13:04:42 +01:00
Amadeusz Sławiński
b124d7cc6f
ASoC: Intel: avs: rt274: Validate machine board configuration
Allow for board to be used with TDMs.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-6-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-12 13:04:41 +01:00
Amadeusz Sławiński
d3decc196a
ASoC: Intel: avs: i2s_test: Validate machine board configuration
I2S test board can be used in any SSP and TDM configuration.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-5-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-12 13:04:40 +01:00
Amadeusz Sławiński
e6d50e474e
ASoC: Intel: avs: Improve topology parsing of dynamic strings
Current mechanism replaces "%d" present in some routes and widget names
with SSP number. However there are also configurations which make use of
TDM number, in which case expected behavior would be to have string in
form of SSP:TDM - see implementation of avs_i2s_platform_register() in
sound/soc/intel/avs/pcm.c.

Implement custom function, which parses string and make use of it when
parsing topology. While at it make sure that we generate dynamic names
only if there is no multiple SSPs or TDMs defined.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-4-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-12 13:04:39 +01:00
Amadeusz Sławiński
7a6debe047
ASoC: Intel: avs: Introduce helper functions for SSP and TDM handling
In quite a few places in code there are checks for number of SSPs
present on system, to reduce maintenance burden introduce helper
functions allowing to get SSP and TDM from machine board configuration.

Additionally in boards we use SSP and TDM to generate quite a few
strings, it could be done like:
if (tdms)
	dl->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d:%d-Codec",
		ssp_port, tdm_slot);
else
	dl->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-Codec",
		ssp_port);

but quite quickly code ends up with spaghetti of similar if elses.
Instead introduce macro which can be used to generate correct string,
allowing to minimize code to something like:
dl->name = devm_kasprintf(dev, GFP_KERNEL, AVS_STRING_FMT("SSP", "-Codec",
		ssp_port, tdm_slot));

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-12 13:04:38 +01:00
Amadeusz Sławiński
393648ce73
ASoC: Intel: avs: Only create SSP%d snd_soc_dai_driver when requested
When using TDM configuration some other device may be using SSP%d, so
don't create snd_soc_dai_driver configuration for it unless requested
by TDM configuration.

While at it adjust tdf8532 board to explicitly describe TDM
configuration.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-12 13:04:37 +01:00
Ilkka Koskinen
0abe7f61c2 docs/perf: Add ampere_cspmu to toctree to fix a build warning
Add ampere_cspmu to toctree in order to address the following warning
produced when building documents:

	Documentation/admin-guide/perf/ampere_cspmu.rst: WARNING: document isn't included in any toctree

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20231011172250.5a6498e5@canb.auug.org.au/
Fixes: 53a810ad3c ("perf: arm_cspmu: ampere_cspmu: Add support for Ampere SoC PMU")
Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Link: https://lore.kernel.org/r/20231012074103.3772114-1-ilkka@os.amperecomputing.com
Signed-off-by: Will Deacon <will@kernel.org>
2023-10-12 12:32:36 +01:00
Krzysztof Hałasa
26de14831c IXP4xx MAINTAINERS entries
Update MAINTAINERS entries for Intel IXP4xx SoCs.

Linus has been handling all IXP4xx stuff since 2019 or so.

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Deepak Saxena <dsaxena@plexity.net>
Link: https://lore.kernel.org/r/m3ttqxu4ru.fsf@t19.piap.pl
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-12 13:11:30 +02:00
Arnd Bergmann
89ca0ec59f Samsung DTS ARM64 changes for v6.7
1. Exynos850: Add support for USB 2.0 (host and device) and enable it on
    E850-96 board.
 
 2. Exynos5433: Switch sound card to generic audio-routing property,
    supported since previous release for Samsung drivers.  The old
    samsung,audio-routing property is deprecated.
 
 3. Few cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmUf1ZsQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD16cgEACT59DACqrwXQuPdWADQAhVosa0U8tXtzxX
 yQR087zK5cIOmWABmHS1XiOXiStFyafSOhN0Mj9VETNQTOT0ZVUr2yBzR/dg6D5H
 ukL6Jhi1i7wX/9oSOaSbc7xAR/0BRSNPTyVACWVdplcRMrnSU/e2kx+69i5VpFJ/
 mKh6w9LZYLpp6zDCrFPcHu01oPMU9hpq8L/tZi8ZnIbMKrYz7BnhxP1bRjrGaxkl
 DjcEn/vpTC//2BOb66FnSy5KAJnTq96iH08xYwlmuTtYJrBamv2+8uQ9/XQbVAHh
 JOldkIplU+JFBcdywt2jF3gFdKwIUl1dFpfpujZJ8tPpVM5/JG7I6BfuTN97pe7E
 7aDdA4+9e1a+sLYtQQQZcF2BJRj7caFdI/FXEacAe500sD7uBB/rSFgFSp435BuH
 EXxXpIPrFIAjx5rc1kUaC520OVbAc9x3VsXwDKHxHOAUiLYySQ2TkMJVa6ChazIS
 8Iel4DtIs0sXaIqmjbBtuCwXi0TXMgvYh2RJf3YKdP3YJd26rIHGJOvD+Wd/b005
 hOE+Zxp2Eqh7XYNuBA3D7JURE1pxaPyqP68kN9v5jjEWSN2ypmhWY9/80CRd8XT4
 5I1RzD137vCxi84shyJ0Lht/Qg/6aIJbd0u7+8XF5u3SJffwQlRTlq8xTWeVFRai
 GboE8iLXqw==
 =06Ah
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUn0QMACgkQYKtH/8kJ
 Uif4VRAA2+CQDQYNkHkvFUb0ehcYOCbQlwZQQmF9gZAlmna9EpK7qp3gfbijDh7E
 OzGgkgxUKUSMh5JpS+bTnd6eZ4cRhYup1AHWJgHmR6pxOSjcFV8lp9bz4UyjMj34
 H2kkCuafY5tLbJYPmtp+bUdmO4SGi7SigOhUqBh/BV/DTa4shAkDZB+kQkjVCd/V
 YSrvdb37Mlcd7cxS58xLS4cB5uE+fT92UOEd5XJvIEUX5e39ShqQcFiQ1oDiBKvH
 HFij7/iCRqZiq74tfke3J7kcB2DR0AOCZG0mQLdHvD83XaCZx2wioGce8raWsyA5
 m/qUjP40h5sqjxoXSp4NZ6trk/I5u23E79zbZ5OKJcmQmyUxsKqnrnPFvJNBbeT9
 kdYhQa1OrRxcmwX+qsNO0mV7+UmcUzuoFhbPGJVwefRW+2m4uQg0WqZsfc4Fc2Gj
 oi1JX1QVdUBSA3b9ATXb1j9AR0hoAP+jvclz2UO1voqZBgvMEUecMyaCzAGVg7O/
 iv29fAFsj/F6G4CMuPfHii+cyukbKYtob/+MRbpVpfr8o4vBWRX/jo2xYCF7zXGb
 aBBqTeiEju18OlEyFVDrlQz91FuQ0jMDjyZnR5Yy9hV/QxbtNcCXAb2r41m5dLCS
 pTOf+FJJVWsFK2B7GP82lOC0urwgANtjRPkyYTrGtrQmh546lLU=
 =i6z7
 -----END PGP SIGNATURE-----

Merge tag 'samsung-dt64-6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/dt

Samsung DTS ARM64 changes for v6.7

1. Exynos850: Add support for USB 2.0 (host and device) and enable it on
   E850-96 board.

2. Exynos5433: Switch sound card to generic audio-routing property,
   supported since previous release for Samsung drivers.  The old
   samsung,audio-routing property is deprecated.

3. Few cleanups.

* tag 'samsung-dt64-6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: dts: exynos: remove unused TMU alias
  arm64: dts: exynos: Use pinctrl macros for exynos5433-tm2
  arm64: dts: exynos: exynos5433-tm2: switch sound card to audio-routing
  arm64: dts: exynos: Enable USB support on E850-96 board
  arm64: dts: exynos: Enable USB in Exynos850

Link: https://lore.kernel.org/r/20231006093943.106002-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-12 12:57:07 +02:00
Arnd Bergmann
78857f7fe3 Minor improvements in ARM DTS for v6.7
Few cleanups and improvements: split joined reg entries for Ethernet in
 omap3-devkit8000, add missing spaces before '{' (MediaTek, Nuvoton) and
 cleanup whitespace around '=' (MediaTek).
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmUf0uwQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD11HCEACSALLob97HRyvtlPGUWeYKIFe1OKtf3Tn4
 Kv+46ohImBobDYsqg0GHQ1tYY90tIA2sft9YrS79e4c4FrBulWURpaMEjSFDORXu
 2Vy5ZVOhrTNe4WqZclrGzpw3kf/PdGEeTZKvoIZjWvg6LDEOXmgezkx3u051ZUce
 4HY4rvQ+Jrp2qSYcFXSDlopYYnQmH5muby+LwEkerhMggi1XenwKO/BuMz17o0v5
 waPszM5e6Ffk9vnbgBMOKiSf2e7pq3JftGVroI3z2O66H6FeXzEoSHF7Xkc9p5R/
 6n+KkojeqyZMs6/iWHnS6cKgMMCaqhOXMGI4wtTKKJzRWHckwKMOBrzoZ+Biszig
 wvNnFGqnbdXNF5BZMkipn6ZDVjY2Vfe2Kw/aZ89yqt5Rbhc3YPb0hMmdrM9eCEvw
 yn4lz0kUehUbi7yaYs0W7r6nYdSZop4h5+OrnOHPFvUR8kG8uQKYKHRcCiFXkbvV
 OBmGXfFRQvywqC99uXAQcKXNfAbwGRnxAy0kQXYFJWjLMEtrlp8YYbdxDRNLIv4v
 m4MabOCeEB/nZEKXA0E09Ycp7Bb/grqIvm/HKxA/H/f05gvGcRoJQeDTDSmMrwpg
 AlA6G6QhOXj2OBA8NuBm7SWz+zbmiYaXmvVB5R3qQWaTtzoeqQtQdYlrwOEQmH1M
 zXR91sbWxA==
 =OExn
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUn0NMACgkQYKtH/8kJ
 UifoAg/7BYsh4+nSllKQfcofYgup5tDlMk83ABysH8d3mAGn4RajibHmYHMj9C22
 7kPCCHecd9x6t4Fwk7m/ZNq8VwTw9Lx0wNY5C5kDy7MiZspii4omf2oVAcuqK6qi
 ELKd+gF4VOQ7Rsf5iN+Kap7mg8eunGU9vwjr16MyCx8oks84PN83gIhZdOpviyVy
 HyWDWUQdZ1TBNRrIVqqcX/a6TXF995+gMHSyMyT/daF3qVD3UmfCtay2ol0jStg8
 iCebqhkncYUcKgXE8KK713xGb/B8aCCvkWseeO0M4EhAy5aQ7llT/nq4o/iA65Lz
 wkq7h8bko111KV5/cZbelsIWHbRxzsJM3gv2Qmr6laetkDrAN6s5EiRJFOEx6iFv
 AdMGwAIDqJjPZrbpAmV6G+2Q/b+XNnbHNj4T7DE5sjfP1HkhcHkSiKfm0Y1UDPqU
 3e9qTai+i40jYmchHECNoQGwwbvl9h2mxinhwQNHFflb3RSvk3FjJugQrvaB0TJw
 NLY0xBF8EVhrZ/0T80pv/1+lySEzXdqix+Sqzech98JNpIfNlUW3YMcSe0QcboVW
 ZkYnV+NlfIs10iOcztRt5DpkSlBlJQLeqWDrImcWG9cfKyzOCnsh2QmXKuviLIeG
 TKRtL4KYvipQmGYenLBpR01dxssDmPc4o2fsAp/fDTG6N7OYvx0=
 =sey8
 -----END PGP SIGNATURE-----

Merge tag 'dt-cleanup-6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt

Minor improvements in ARM DTS for v6.7

Few cleanups and improvements: split joined reg entries for Ethernet in
omap3-devkit8000, add missing spaces before '{' (MediaTek, Nuvoton) and
cleanup whitespace around '=' (MediaTek).

* tag 'dt-cleanup-6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt:
  ARM: dts: nuvoton: add missing space before {
  ARM: dts: mediatek: minor whitespace cleanup around '='
  ARM: dts: mediatek: add missing space before {
  ARM: dts: omap3-devkit8000: correct ethernet reg addresses (split)

Link: https://lore.kernel.org/r/20231006092823.94839-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-12 12:56:19 +02:00
Jacek Lawrynowicz
a18f172489 accel/ivpu: Add ivpu_bo_vaddr() and ivpu_bo_size()
Use:
  - ivpu_bo_vaddr(bo) instead of bo->kvaddr
  - ivpu_bo_size(bo) instead of bo->base.size

This is a preparation for switch to a drm_gem_shmem_object as a base for
ivpu_bo, where:
  - bo->kvaddr becomes bo->base.vaddr
  - bo->base.size becomes bo->base.base.size

Using ivpu_bo_vaddr() and ivpu_bo_size() increases the readability of
the code.

Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230901094957.168898-9-stanislaw.gruszka@linux.intel.com
2023-10-12 12:54:51 +02:00
Arnd Bergmann
9e3fdca114 Minor improvements in ARM64 DTS for v6.7
Few cleanups and improvements: use lowercase hex for unit addresses
 (Bitmain), add missing spaces before '{' (APM, MediaTek) and cleanup
 whitespace around '=' (MediaTek, Marvell).
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmUf0o4QHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD17Q7D/9pmG/xjaFv3pb6zjR9AFZQ6+t2FpmbkfQS
 dGjDTkZ2ruIsm0giPXhVhzbDhlBJo+SBpfw2o4rKibfIW9UcVrmwIWpynOTQ3oDp
 P6yK+q5HcbWNZXZmzk/KIlHFHI/75p8H5UdkEQP6PvxZE7FTP1Q3wCtdSi/fj81e
 OPgnygB+Gq/SZ6mg4fv4ESPPevbGjuU4DRZbTHyU4eADJ9W0WG7XCR+T8TccJt2g
 4OZkRQ1mjJYL/OoLj5OOza46HRkL9Qcval/ox29zuuV38w3rQ03qEgeBTpnlxxOB
 rFuCiTZJB32e7e5AMlxrPVNIq1A7sW+jZcJdCtSylFCFdoKUcZelZJ6OZvCQziE8
 UeI1EscYldvJzSNiDeSOprFk4Iye12IycJr5JIXFenp5t7fPKuVzIUEZ5xBZuyS9
 MlxYPQtYoPDqLiP2nwnWTXjx/W4OkwnEVc5c1m87/l6QDhqmPl05EgkaTyspgA8T
 LwIjpmxI1MC8VbewZptaVe7AkzyPJuwpkQjkK2BuYPFIx5clpRzrig7x/cKkjsY8
 9Q6NexHl/Zj+AqaCZZr6yGa33B4JiEyDROQ/yjgVIn0nfe0vVQpyjCaKi/SJ36AD
 9YP34szs5VkHreFld8HcBy7BRrjUhdete6r6uwxkcvsVPrIX7u1hUHleZnv6BNsx
 6vYRjssDWQ==
 =2VXS
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUn0DcACgkQYKtH/8kJ
 UidNHxAA0FWewJMfcm6aHCGXMFIn0bxIIZZS2UlK1MZalRGqiifkwAj1vZi+N8bQ
 uI+ZTp1A4wEJQsTMICumAeKXMdN966vvTyPpfn370lFPHamRBkGjE27xBpMdmVXm
 EQmybmIyHbcyI1ZsVz3jljxXsHyxDp3aSFWvr1WT7hFvQ2Mw1dIt7xRaqXMDHlPn
 uX0oEmwS4NQZFK8P048x+6c0EQSxZviKQFuuA/v3Lf+l0zCdJq0aivPXBDBGT8NA
 udG7FTUJwtoKuixiZy79h5IhL2q5Ei9jMPqnJrsEl1Drjr08AFxqclqE+RobdKgG
 pzWqcPB9Q8oAtD3pU1r8Vd5QYhJACMltcM/E/ewwYnHJ0jkUnsEVHrEpQ4IhWEqd
 2yPogLh1LMl3wG9ooqYNULCRnh1UjmJSiBcYCpTbgyZQG0PHbfCfANBl24kSnTNq
 hANLNQAp1tI29YKQocez+lrt6trAwLLXdGx3NGt0DfjUQkFNzQcFmoCV1kaU1Mgt
 3N1B4wB6q/RzNloflaukjsvIR8YoFyAMHqrMBYxsHFiiEDK7VPhCMz1idODvowlA
 YbDIzZzdCwf0ttF+k95SrlAPcJK9J7EzSMHW4XslGN8gs7sfCMv0iHP21RE+aaEb
 zma0xdRP7+1kUq/qMZqVZkudu0jZxj19E1Fpb9poXCzy29IhSq8=
 =1l61
 -----END PGP SIGNATURE-----

Merge tag 'dt64-cleanup-6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt

Minor improvements in ARM64 DTS for v6.7

Few cleanups and improvements: use lowercase hex for unit addresses
(Bitmain), add missing spaces before '{' (APM, MediaTek) and cleanup
whitespace around '=' (MediaTek, Marvell).

* tag 'dt64-cleanup-6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt:
  arm64: dts: marvell: minor whitespace cleanup around '='
  arm64: dts: mediatek: minor whitespace cleanup around '='
  arm64: dts: mediatek: add missing space before {
  arm64: dts: apm: add missing space before {
  arm64: dts: bitmain: lowercase unit addresses

Link: https://lore.kernel.org/r/20231006092823.94839-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-12 12:53:43 +02:00
Hans de Goede
a6028afef9 drm/i915/dsi: Add some debug logging to mipi_exec_i2c (v2)
Add some debug logging to mipi_exec_i2c, to make debugging various
issues seen with it easier.

Changes in v2:
- Drop unnecessary __func__ drm_dbg_kms() argument

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230920195613.304091-5-hdegoede@redhat.com
2023-10-12 12:41:54 +02:00
Hans de Goede
f6f4a0862b drm/i915/vlv_dsi: Add DMI quirk for backlight control issues on Lenovo Yoga Tab 3 (v2)
On the Lenovo Yoga Tab 3 Pro YT3-X90F there are 2 issues with the backlight
on/off MIPI sequences:

1. The backlight on sequence has an I2C MIPI sequence element which uses
   bus 0, but there is a bogus I2cSerialBus resource under the GPU in
   the DSDT which causes i2c_acpi_find_adapter() to pick the wrong bus.

2. There is no backlight off sequence, causing the backlight to stay on.

Add a DMI quirk fixing both issues.

v2:
- Add Closes tag to gitlab issue with drm.debug=0xe, VBT info

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9380
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230920195613.304091-4-hdegoede@redhat.com
2023-10-12 12:41:48 +02:00
Hans de Goede
2cac4ed99f drm/i915/vlv_dsi: Add DMI quirk for wrong I2C bus and panel size on Lenovo Yoga Tablet 2 series (v3)
On the Lenovo Yoga Tablet 2 830 / 1050 there are 2 problems:

1. The I2C MIPI sequence elements reference bus 3. ACPI has I2C1 - I2C7
   which under Linux become bus 0 - 6. And the MIPI sequence reference
   to bus 3 is indented for I2C3 which is bus 2 under Linux.

   This leads to errors like these:
   [  178.244049] i2c_designware 80860F41:03: controller timed out
   [  178.245703] i915 0000:00:02.0: [drm] *ERROR* Failed to xfer payload of size (1) to reg (169)
   There are 3 timeouts when the panel is on, delaying
   waking up the screen on a key press by 3 seconds.

   Note mipi_exec_i2c() cannot just subtract 1 from the bus
   given in the I2C MIPI sequence element. Since on other
   devices the I2C bus-numbers used in the MIPI sequences do
   actually start at 0.

2. width_/height_mm contain a bogus 192mm x 120mm size. This is
   especially a problem on the 8" 830 version which uses a 10:16
   portrait screen where as the bogus size is 16:10.

Add a DMI quirk to override the I2C bus and the panel size with
the correct values.

Note both the 10" 1050 models as well as the 8" 830 models use the same
mainboard and thus the same DMI strings. The 10" 1050 uses a 1920x1200
landscape screen, where as the 8" 830 uses a 1200x1920 portrait screen,
so the quirk handling uses the display resolution to detect the model.

v2:
- Also override i2c_bus_num to fix mipi_exec_i2c() timeouts

v3:
- Add Closes tag to gitlab issue with drm.debug=0xe, VBT info

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9379
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230920195613.304091-3-hdegoede@redhat.com
2023-10-12 12:41:41 +02:00
Hans de Goede
b07eb15d0b drm/i915/vlv_dsi: Add DMI quirk for wrong panel modeline in BIOS on Asus TF103C (v3)
Vtotal is wrong in the BIOS supplied modeline for the DSI panel on
the Asus TF103C leading to the last line of the display being shown
as the first line.

Original: "1280x800": 60 67700 1280 1312 1328 1376 800 808 812 820 0x8 0xa
Fixed:    "1280x800": 60 67700 1280 1312 1328 1376 800 808 812 816 0x8 0xa

The factory installed Android has a hardcoded modeline in its kernel,
causing it to not suffer from this BIOS bug;
and the Android boot-splash which uses the EFI FB which does have this bug
has the last line all black causing the bug to not be visible.

This commit introduces a generic DMI based quirk mechanism to vlv_dsi for
doing various fixups, and uses this to correct the modeline.

v2:
- s/mode_fixup/dmi_quirk/ to make the new DMI quirk mechanism more generic
- Add a comment with the old and new modelines to the patch and commit msg

v3:
- Add Closes tag to gitlab issue with drm.debug=0xe, VBT info

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9381
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230920195613.304091-2-hdegoede@redhat.com
2023-10-12 12:41:26 +02:00
Arnd Bergmann
161e7cc4b1 Renesas DTS updates for v6.7
- Add PCIe Host and Endpoint support for the R-Car S4-8 SoC and the
     Renesas Spider development board,
   - Add FLASH support for the Renesas Genmai and RSK+RZA1 development
     boards,
   - Add multi Component sound support for Renesas ULCB development
     boards equipped with the Shimafuji Kingfisher extension,
   - Miscellaneous fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCZRafdwAKCRCKwlD9ZEnx
 cDXJAPwOPRJcBYKbh+Ng2Svplh9wZ278H1nA7d0A+SpS00ctWwEAiYnLMZ1eiLzG
 VbrEpON36aBil5Yo4fZZH6VGHLBMrgw=
 =yBIM
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUnzGwACgkQYKtH/8kJ
 UiflrA//T9leDRTo89ZY3C1oYAUA4kuQ8gTOhMt63T+saFdy7UNxD5SIdZ3iwzGq
 Sn/4st6s2+TbDnQ+mbG30phQSOmvJYnfwA1ef1bmVfyi27qrw75OSr1Lyhdq8hF7
 qooqDprxyIoaqZIo5Q7p/Mt6OJHZqv4YAriBunfq6YL5RFiOLaVLAo57cPdBg555
 xiFKFOXES204wCTc2yr9uYQdFipGyG1kHSrOkFF+jI5H/iAIKi2cZ6PHwSZ8HSSw
 jQo3WlV+sIPJWOS02uYp+EvHm7VqIeXxqRfsplRSUcoclekZU8ryONP4QRMtqUCW
 /eW3S6XfiFUg3VxNDkrMWUlKdhCRFt+lsmQsCewtetQvgWXMgqeQk3L5zw0+klGv
 3ar76ppk43p8W17jP5D2bFNQC1xwpuUaxPRiSVBkjEhD8bBa9fhnIDz9x5+gVLkI
 bIicCL90zMTmmTWTItGO4y0HZ1gHA8KWY0Pj3eqNLvBKxP1b6XjY+SKSG3kur4O8
 bXn7FmU/RAhVtvVLAYysINw3InJCaMiZOAifr/5JRbA5Xwhc7G6gK6x5pYufm3kQ
 z4UFib/53Fbe4WF/ruPBIy61lKVTiX6sD1WuBpzFIldV0DvyaZ+fitYqwf7Nj4/w
 rTAFDo73sOug44pHKh9y6hgygHtUi0rTOXWOH/ghy48R8S4jeq8=
 =TJHw
 -----END PGP SIGNATURE-----

Merge tag 'renesas-dts-for-v6.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt

Renesas DTS updates for v6.7

  - Add PCIe Host and Endpoint support for the R-Car S4-8 SoC and the
    Renesas Spider development board,
  - Add FLASH support for the Renesas Genmai and RSK+RZA1 development
    boards,
  - Add multi Component sound support for Renesas ULCB development
    boards equipped with the Shimafuji Kingfisher extension,
  - Miscellaneous fixes and improvements.

* tag 'renesas-dts-for-v6.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  arm64: dts: renesas: ulcb/kf: Use multi Component sound
  ARM: dts: renesas: rskrza1: Add FLASH nodes
  ARM: dts: renesas: genmai: Add FLASH nodes
  ARM: dts: renesas: wheat: Move Ethernet node to LBSC
  ARM: dts: renesas: blanche: Move Ethernet node to LBSC
  ARM: dts: renesas: marzen: Move Ethernet node to LBSC
  ARM: dts: renesas: r8a7792: Add LBSC node
  ARM: dts: renesas: r8a7779: Add LBSC node
  ARM: dts: renesas: r7s72100: Add BSC node
  ARM: dts: renesas: Remove unused LBSC nodes from board DTS
  arm64: dts: renesas: r8a779f0: spider: Enable PCIe Host ch0
  arm64: dts: renesas: r8a779f0: Add PCIe Host and Endpoint nodes
  ARM: dts: renesas: gr-peach: Remove unneeded probe-type property
  ARM: dts: renesas: ape6evm: Drop bogus "mtd-rom" compatible value
  ARM: dts: renesas: blanche: Fix typo in GP_11_2 pin name
  arm64: dts: renesas: Handle ADG bit for sound clk_i

Link: https://lore.kernel.org/r/cover.1695985427.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-12 12:37:31 +02:00
Arnd Bergmann
b898a92e94 Renesas DT binding updates for v6.7
- Document support for the new RZ/G3S (R9A08G045) SoC variants.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCZRaeDAAKCRCKwlD9ZEnx
 cP6/AP4o6ckofZCLc7F71vqZUFgwRS0v429z119NC6Ftd0UfGQEAqCXDFYDCFuyW
 tZElcRAcDDaZlcFIipBT0RUWOdJDDAo=
 =7PUe
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUnzBQACgkQYKtH/8kJ
 UifoUxAAiKa+Rsm2t8IWHrgBDvTVU4Hekv4jrXE/t25e6ZaSGNymk1OrLCjMfta0
 Cbi2YbCmVPFSLWjaK0AHNUHp2Lu2X+BiXp0mGSBiGSZ6E8ISuIOh8R2K79LmQ9R6
 8ZCtwaCxeVkIX9aF0IQw92odFrf+lF1hOzaBTMy7EjDMxbnjN5nydRbwhMxIqAkY
 IBiOaI2zOleRlBf6vvCtyGWsW0vUrWTftBvQxXvBu9Ot0QMR4ZdynicAAcv+EMCL
 D5+nsIDbAOqCvmUP7w3/+9NSREubszgd9kzmA6Sj3ZxPEbdo2rM3qLpbG4nNL4Qb
 Dnk0mwswYwQPAdKuvNnZReR7pXRN1GkAsblxpDv1636GM4TtAZaPgdKSTOHyL7L1
 9iQ0FeJwheUe0ep8LXuQEUzUX2cy8CkdS9+wSCX61DBrnCUwvaR2LmKM2nlLEgk/
 dt8lgX3Lr+BmHYkIt4mEEDnFnAg9nUAPHMopRFNCWq9Jdlqyxw3gAEUKQb7pCMzi
 V3CoIlxYeCAZS6leOZuMB82itO+LgBL/M7n79/EKNaDS7AmdSuFs8Ge+r7msTGNv
 DU2nShxDnUZ0f9E9uo3CO+A1AXWABObV93xMsA1o8TzZZzpjBqKK99XnE+/uQYE4
 PPEo2rDxDWXZr0pBAcbNzQmyttHYM7y0qloLachCRVPrz2VTdyA=
 =5LJM
 -----END PGP SIGNATURE-----

Merge tag 'renesas-dt-bindings-for-v6.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt

Renesas DT binding updates for v6.7

  - Document support for the new RZ/G3S (R9A08G045) SoC variants.

* tag 'renesas-dt-bindings-for-v6.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  dt-bindings: soc: renesas: renesas,rzg2l-sysc: Document RZ/G3S SoC
  dt-bindings: soc: renesas: Document Renesas RZ/G3S SoC variants

Link: https://lore.kernel.org/r/cover.1695985425.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-12 12:36:04 +02:00
Marek Vasut
2651723668 arm64: dts: imx8mp: Drop i.MX8MP DHCOM rev.100 PHY address workaround from PDK3 DT
In case the i.MX8MP DHCOM rev.100 has been populated on the PDK3
carrier board, the on-SoM PHY PHYAD1 signal has been pulled high
by the carrier board and changed the PHY MDIO address from 5 to 7.
This has been fixed on production rev.200 SoM by additional buffer
on the SoM PHYAD/LED signals, remove the workaround.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-10-12 18:18:55 +08:00
Marek Vasut
320371562f arm64: dts: imx8mp: Update i.MX8MP DHCOM SoM DT to production rev.200
The current imx8mp-dhcom-som.dtsi describes prototype rev.100 SoM,
update the DT to describe production rev.200 SoM which brings the
following changes:
- Fast SoC GPIOs exposed on the SoM edge connector
- Slow GPIOs like component resets moved to I2C GPIO expander
- ADC upgraded from TLA2024 to ADS1015 with conversion interrupt
- EEPROM size increased from 256 B to 4 kiB

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-10-12 18:18:55 +08:00
Marek Vasut
686e25dd2b arm64: dts: imx8mp: Add UART1 and RTC wake up source on DH i.MX8M Plus DHCOM SoM
Turn Console UART1 and dedicated RTC into wake up sources, to make
it possible to wake on UART and RTC alarm.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-10-12 18:18:55 +08:00
Marek Vasut
dfd948b998 arm64: dts: imx8mp: Switch WiFI enable signal to mmc-pwrseq-simple on i.MX8MP DHCOM SoM
The reset-gpio is connected to WL_REG_EN signal of the WiFi MAC, the
mmc-pwrseq-simple driver is better suited to operate this signal as
it is tied to the slot instead of the MAC, and it can enable the MAC
before the brcmfmac driver binds to it. Make use of the MMC power
sequencer.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-10-12 18:18:55 +08:00
Marek Vasut
b7d6532c52 arm64: dts: imx8mp: Fix property indent on DH i.MX8M Plus DHCOM PDK3
Fix indent to use tab indent. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-10-12 18:18:55 +08:00
Marek Vasut
e306d386cc arm64: dts: imx8mp: Describe VDD_ARM run and standby voltage for DH i.MX8M Plus DHCOM SoM
Describe VDD_ARM (BUCK2) run and standby voltage in DT.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-10-12 18:18:44 +08:00
Marek Vasut
4a0f36cd99 arm64: dts: imx8mp: Describe VDD_ARM run and standby voltage for Data Modul i.MX8M Plus eDM SBC
Describe VDD_ARM (BUCK2) run and standby voltage in DT.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-10-12 18:09:02 +08:00
Uwe Kleine-König
40da473771 backlight: pwm_bl: Disable PWM on shutdown, suspend and remove
Since commit 00e7e698bf ("backlight: pwm_bl: Configure pwm only once
per backlight toggle") calling pwm_backlight_power_off() doesn't disable
the PWM any more. However this is necessary to suspend because PWM
drivers usually refuse to suspend if they are still enabled.

Also adapt shutdown and remove callbacks to disable the PWM for similar
reasons.

Fixes: 00e7e698bf ("backlight: pwm_bl: Configure pwm only once per backlight toggle")
Reported-by: Aisheng Dong <aisheng.dong@nxp.com>
Tested-by: Aisheng Dong <aisheng.dong@nxp.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20231009093223.227286-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones <lee@kernel.org>
2023-10-12 10:31:15 +01:00
Nam Cao
cf98fe6b57 riscv: dts: starfive: visionfive 2: correct spi's ss pin
The ss pin of spi0 is the same as sck pin. According to the
visionfive 2 documentation, it should be pin 49 instead of 48.

Fixes: 74fb20c8f0 ("riscv: dts: starfive: Add spi node and pins configuration")
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
2023-10-12 10:23:23 +01:00
Paolo Abeni
b91e840337 Merge branch 'rswitch-fix-issues-on-specific-conditions'
Yoshihiro Shimoda says:

====================
rswitch: Fix issues on specific conditions

This patch series fix some issues of rswitch driver on specific
condtions.
====================

Link: https://lore.kernel.org/r/20231010124858.183891-1-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-10-12 11:22:24 +02:00
Yoshihiro Shimoda
053f13f67b rswitch: Fix imbalance phy_power_off() calling
The phy_power_off() should not be called if phy_power_on() failed.
So, add a condition .power_count before calls phy_power_off().

Fixes: 5cb630925b ("net: renesas: rswitch: Add phy_power_{on,off}() calling")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-10-12 11:22:21 +02:00
Yoshihiro Shimoda
510b18cf23 rswitch: Fix renesas_eth_sw_remove() implementation
Fix functions calling order and a condition in renesas_eth_sw_remove().
Otherwise, kernel NULL pointer dereference happens from phy_stop() if
a net device opens.

Fixes: 3590918b5d ("net: ethernet: renesas: Add support for "Ethernet Switch"")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-10-12 11:22:21 +02:00
Marek Vasut
4791146e90 eeprom: at24: add ST M24C32-D Additional Write lockable page support
The ST M24C32-D behaves as a regular M24C32, except for the -D variant
which uses up another I2C address for Additional Write lockable page.
This page is 32 Bytes long and can contain additional data. Add entry
for it, so users can describe that page in DT. Note that users still
have to describe the main M24C32 area separately as that is on separate
I2C address from this page.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-10-12 11:04:34 +02:00
Marek Vasut
c761068f48 dt-bindings: at24: add ST M24C32-D Additional Write lockable page
The ST M24C32-D behaves as a regular M24C32, except for the -D variant
which uses up another I2C address for Additional Write lockable page.
This page is 32 Bytes long and can contain additional data. Document
compatible string for it, so users can describe that page in DT. Note
that users still have to describe the main M24C32 area separately as
that is on separate I2C address from this page.

Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-10-12 11:03:51 +02:00
Joey Gouly
c1165df2be drm/tiny: correctly print struct resource * on error
The `res` variable is already a `struct resource *`, don't take the address of it.

Fixes incorrect output:

	simple-framebuffer 9e20dc000.framebuffer: [drm] *ERROR* could not acquire memory range [??? 0xffff4be88a387d00-0xfffffefffde0a240 flags 0x0]: -16

To be correct:

	simple-framebuffer 9e20dc000.framebuffer: [drm] *ERROR* could not acquire memory range [mem 0x9e20dc000-0x9e307bfff flags 0x200]: -16

Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Fixes: 9a10c7e651 ("drm/simpledrm: Add support for system memory framebuffers")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v6.3+
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20231010174652.2439513-1-joey.gouly@arm.com
2023-10-12 10:57:07 +02:00
Matthew Wilcox (Oracle)
b7fd68ab15
drm: Do not overrun array in drm_gem_get_pages()
If the shared memory object is larger than the DRM object that it backs,
we can overrun the page array.  Limit the number of pages we install
from each folio to prevent this.

Signed-off-by: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Reported-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Link: https://lore.kernel.org/lkml/13360591.uLZWGnKmhe@natalenko.name/
Fixes: 3291e09a46 ("drm: convert drm_gem_put_pages() to use a folio_batch")
Cc: stable@vger.kernel.org # 6.5.x
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20231005135648.2317298-1-willy@infradead.org
2023-10-12 10:44:06 +02:00
Thierry Reding
c395c83aaf drm/simpledrm: Fix power domain device link validity check
We need to check if a link is non-NULL before trying to delete it.

Fixes: 61df9ca231 ("drm/simpledrm: Add support for multiple "power-domains"")
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Janne Grunau <j@jannau.net>
Cc: Eric Curtin <ecurtin@redhat.com>
Cc: Neal Gompa <neal@gompa.dev>
Cc: Sven Peter <sven@svenpeter.dev>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20231011143230.1107731-1-thierry.reding@gmail.com
2023-10-12 10:39:48 +02:00
Andy Shevchenko
668706b10c gpiolib: provide gpio_device_find_by_fwnode()
One of the ways of looking up GPIO devices is using their fwnode.
Provide a helper for that to avoid every user implementing their
own matching function.

Reviewed-by: Dipen Patel <dipenp@nvidia.com>
Tested-by: Dipen Patel <dipenp@nvidia.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231010151709.4104747-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-10-12 10:36:39 +02:00
Florian Westphal
d351c1ea2d netfilter: nft_payload: fix wrong mac header matching
mcast packets get looped back to the local machine.
Such packets have a 0-length mac header, we should treat
this like "mac header not set" and abort rule evaluation.

As-is, we just copy data from the network header instead.

Fixes: 96518518cc ("netfilter: add nftables")
Reported-by: Blažej Krajňák <krajnak@levonet.sk>
Signed-off-by: Florian Westphal <fw@strlen.de>
2023-10-12 10:28:45 +02:00
Xingyuan Mo
505ce0630a nf_tables: fix NULL pointer dereference in nft_expr_inner_parse()
We should check whether the NFTA_EXPR_NAME netlink attribute is present
before accessing it, otherwise a null pointer deference error will occur.

Call Trace:
 <TASK>
 dump_stack_lvl+0x4f/0x90
 print_report+0x3f0/0x620
 kasan_report+0xcd/0x110
 __asan_load2+0x7d/0xa0
 nla_strcmp+0x2f/0x90
 __nft_expr_type_get+0x41/0xb0
 nft_expr_inner_parse+0xe3/0x200
 nft_inner_init+0x1be/0x2e0
 nf_tables_newrule+0x813/0x1230
 nfnetlink_rcv_batch+0xec3/0x1170
 nfnetlink_rcv+0x1e4/0x220
 netlink_unicast+0x34e/0x4b0
 netlink_sendmsg+0x45c/0x7e0
 __sys_sendto+0x355/0x370
 __x64_sys_sendto+0x84/0xa0
 do_syscall_64+0x3f/0x90
 entry_SYSCALL_64_after_hwframe+0x6e/0xd8

Fixes: 3a07327d10 ("netfilter: nft_inner: support for inner tunnel header matching")
Signed-off-by: Xingyuan Mo <hdthky0@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
2023-10-12 10:28:45 +02:00
Xingyuan Mo
52177bbf19 nf_tables: fix NULL pointer dereference in nft_inner_init()
We should check whether the NFTA_INNER_NUM netlink attribute is present
before accessing it, otherwise a null pointer deference error will occur.

Call Trace:
 dump_stack_lvl+0x4f/0x90
 print_report+0x3f0/0x620
 kasan_report+0xcd/0x110
 __asan_load4+0x84/0xa0
 nft_inner_init+0x128/0x2e0
 nf_tables_newrule+0x813/0x1230
 nfnetlink_rcv_batch+0xec3/0x1170
 nfnetlink_rcv+0x1e4/0x220
 netlink_unicast+0x34e/0x4b0
 netlink_sendmsg+0x45c/0x7e0
 __sys_sendto+0x355/0x370
 __x64_sys_sendto+0x84/0xa0
 do_syscall_64+0x3f/0x90
 entry_SYSCALL_64_after_hwframe+0x6e/0xd8

Fixes: 3a07327d10 ("netfilter: nft_inner: support for inner tunnel header matching")
Signed-off-by: Xingyuan Mo <hdthky0@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
2023-10-12 10:28:45 +02:00
Pablo Neira Ayuso
4c90bba60c netfilter: nf_tables: do not refresh timeout when resetting element
The dump and reset command should not refresh the timeout, this command
is intended to allow users to list existing stateful objects and reset
them, element expiration should be refresh via transaction instead with
a specific command to achieve this, otherwise this is entering combo
semantics that will be hard to be undone later (eg. a user asking to
retrieve counters but _not_ requiring to refresh expiration).

Fixes: 079cd63321 ("netfilter: nf_tables: Introduce NFT_MSG_GETSETELEM_RESET")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
2023-10-12 10:28:45 +02:00
Kees Cook
d51c42cdef netfilter: nf_tables: Annotate struct nft_pipapo_match with __counted_by
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct nft_pipapo_match.

Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jozsef Kadlecsik <kadlec@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: netfilter-devel@vger.kernel.org
Cc: coreteam@netfilter.org
Cc: netdev@vger.kernel.org
Link: https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci [1]
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
2023-10-12 10:28:45 +02:00
Florian Westphal
2e1d175410 netfilter: nfnetlink_log: silence bogus compiler warning
net/netfilter/nfnetlink_log.c:800:18: warning: variable 'ctinfo' is uninitialized

The warning is bogus, the variable is only used if ct is non-NULL and
always initialised in that case.  Init to 0 too to silence this.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309100514.ndBFebXN-lkp@intel.com/
Signed-off-by: Florian Westphal <fw@strlen.de>
2023-10-12 10:28:45 +02:00
Pablo Neira Ayuso
ebd032fa88 netfilter: nf_tables: do not remove elements if set backend implements .abort
pipapo set backend maintains two copies of the datastructure, removing
the elements from the copy that is going to be discarded slows down
the abort path significantly, from several minutes to few seconds after
this patch.

Fixes: 212ed75dc5 ("netfilter: nf_tables: integrate pipapo into commit protocol")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
2023-10-12 10:28:45 +02:00
David Lechner
291e45eeeb iio: resolver: ad2s1210: move out of staging
This moves the ad2s1210 resolver driver out of staging. The driver has
been fixed up and is ready to graduate.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20231010-ad2s1210-mainline-v5-4-35a0f6ffa04a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2023-10-12 09:20:50 +01:00