]> www.infradead.org Git - users/hch/misc.git/log
users/hch/misc.git
3 months agodt-bindings: display: bridge: Add waveshare DSI2DPI unit support
Joseph Guo [Wed, 6 Aug 2025 01:33:32 +0000 (10:33 +0900)]
dt-bindings: display: bridge: Add waveshare DSI2DPI unit support

Add dt-binding documentation for waveshare DSI2DPI unit

Signed-off-by: Joseph Guo <qijian.guo@nxp.com>
Suggested-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Acked-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250806-waveshare-v3-1-fd28e01f064f@nxp.com
3 months agodrm/panel: sitronix-st7703: fix typo in comments
Hugo Villeneuve [Mon, 21 Jul 2025 15:28:15 +0000 (11:28 -0400)]
drm/panel: sitronix-st7703: fix typo in comments

Fix typo in comments:
    souch -> such.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250721152818.1891212-1-hugo@hugovil.com
3 months agodrm/panel: himax-hx8279: Remove unneeded semicolon
Chen Ni [Tue, 29 Jul 2025 05:42:14 +0000 (13:42 +0800)]
drm/panel: himax-hx8279: Remove unneeded semicolon

Remove unnecessary semicolons reported by Coccinelle/coccicheck and the
semantic patch at scripts/coccinelle/misc/semicolon.cocci.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250729054214.2264377-1-nichen@iscas.ac.cn
3 months agodrm/panel: novatek-nt35560: Fix invalid return value
Brigham Campbell [Thu, 31 Jul 2025 03:23:41 +0000 (21:23 -0600)]
drm/panel: novatek-nt35560: Fix invalid return value

Fix bug in nt35560_set_brightness() which causes the function to
erroneously report an error. mipi_dsi_dcs_write() returns either a
negative value when an error occurred or a positive number of bytes
written when no error occurred. The buggy code reports an error under
either condition.

Fixes: 8152c2bfd780 ("drm/panel: Add driver for Sony ACX424AKP panel")
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Brigham Campbell <me@brighamcampbell.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250731032343.1258366-2-me@brighamcampbell.com
3 months agodrm: panel: Add support for Hydis HV101HD1 MIPI DSI panel
Svyatoslav Ryhel [Thu, 17 Jul 2025 13:57:52 +0000 (16:57 +0300)]
drm: panel: Add support for Hydis HV101HD1 MIPI DSI panel

HV101HD1-1E1 is a color active matrix TFT LCD module using amorphous
silicon TFT's (Thin Film Transistors) as an active switching devices. This
module has a 10.1 inch diagonally measured active area with HD resolutions
(1366 horizontal by 768 vertical pixel array).

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250717135752.55958-3-clamor95@gmail.com
3 months agodt-bindings: display: panel: Document Hydis HV101HD1 DSI panel
Svyatoslav Ryhel [Thu, 17 Jul 2025 13:57:51 +0000 (16:57 +0300)]
dt-bindings: display: panel: Document Hydis HV101HD1 DSI panel

Hydis HV101HD1 is a 2-lane 1366x768 MIPI DSI panel found in ASUS VivoTab RT
TF600T tablet.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250717135752.55958-2-clamor95@gmail.com
3 months agodrm: panel: orisetech: improve error handling during probe
Akhilesh Patil [Thu, 24 Jul 2025 16:08:32 +0000 (21:38 +0530)]
drm: panel: orisetech: improve error handling during probe

Use dev_err_probe() helper as directed by core driver model to handle
driver probe error. Use standard helper defined at drivers/base/core.c
to maintain code consistency.

Inspired by,
commit a787e5400a1ce ("driver core: add device probe log helper")

Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/aIJagJ/RnhSCtb2t@bhairav-test.ee.iitb.ac.in
3 months agodrm/panel: Kconfig: Fix spelling mistake "pannel" -> "panel"
Colin Ian King [Thu, 24 Jul 2025 11:23:58 +0000 (12:23 +0100)]
drm/panel: Kconfig: Fix spelling mistake "pannel" -> "panel"

There is a spelling mistake in the LEDS_BD2606MVV config. Fix it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250724112358.142351-1-colin.i.king@gmail.com
3 months agodrm: panel: add support for Samsung AMS561RA01 panel with S6E8AA5X01 controller
Kaustabh Chakraborty [Mon, 21 Jul 2025 14:39:00 +0000 (20:09 +0530)]
drm: panel: add support for Samsung AMS561RA01 panel with S6E8AA5X01 controller

Samsung AMS561RA01 is an AMOLED panel, using the Samsung S6E8AA5X01 MIPI
DSI controller. Implement a basic panel driver for such panels.

The driver also initializes a backlight device, which works by changing
the panel's gamma values and aid brightness levels appropriately, with
the help of look-up tables acquired from downstream kernel sources.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250721-panel-samsung-s6e8aa5x01-v5-2-1a315aba530b@disroot.org
3 months agodt-bindings: display: panel: document Samsung AMS561RA01 panel with S6E8AA5X01 controller
Kaustabh Chakraborty [Mon, 21 Jul 2025 14:38:59 +0000 (20:08 +0530)]
dt-bindings: display: panel: document Samsung AMS561RA01 panel with S6E8AA5X01 controller

Samsung AMS561RA01 is an AMOLED panel, using the Samsung S6E8AA5X01 MIPI
DSI panel controller. Document the compatible and devicetree properties
of this hardware. It has a reset GPIO and two voltage regulators.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250721-panel-samsung-s6e8aa5x01-v5-1-1a315aba530b@disroot.org
3 months agodrm/panel: simple: Add Olimex LCD-OLinuXino-5CTS support
Paul Kocialkowski [Wed, 2 Jul 2025 08:22:30 +0000 (10:22 +0200)]
drm/panel: simple: Add Olimex LCD-OLinuXino-5CTS support

Add support for the Olimex LCD-OLinuXino-5CTS, a 5-inch TFT LCD panel
with a mode operating at 33.3 MHz.

Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250702082230.1291953-2-paulk@sys-base.io
3 months agodt-bindings: display: simple: Add Olimex LCD-OLinuXino-5CTS
Paul Kocialkowski [Wed, 2 Jul 2025 08:22:29 +0000 (10:22 +0200)]
dt-bindings: display: simple: Add Olimex LCD-OLinuXino-5CTS

Add the Olimex LCD-OLinuXino-5CTS, a 5-inch TFT LCD panel.

Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250702082230.1291953-1-paulk@sys-base.io
3 months agoaccel/rocket: Fix undeclared const rocket_pm_ops
Brigham Campbell [Sat, 2 Aug 2025 19:25:47 +0000 (13:25 -0600)]
accel/rocket: Fix undeclared const rocket_pm_ops

Fix sparse warning regarding an undeclared const rocket_pm_ops, which is
used in rocket_drv.c.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508030021.uwdr4P08-lkp@intel.com/
Signed-off-by: Brigham Campbell <me@brighamcampbell.com>
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Link: https://lore.kernel.org/r/20250802-fix-rockchip-npu-build-v1-2-fb0f0dacb3fe@brighamcampbell.com
3 months agoaccel/rocket: Fix Rockchip NPU compilation
Brigham Campbell [Sat, 2 Aug 2025 19:25:46 +0000 (13:25 -0600)]
accel/rocket: Fix Rockchip NPU compilation

Replace DRM_GPU_SCHED_STAT_NOMINAL with GPU_DRM_SCHED_STAT_RESET, in
accordance with commit 0a5dc1b67ef5 ("drm/sched: Rename
DRM_GPU_SCHED_STAT_NOMINAL to DRM_GPU_SCHED_STAT_RESET")

Pass extra parameter to drm_sched_job_init, as required by commit
2956554823ce ("drm/sched: Store the drm client_id in drm_sched_fence")

Signed-off-by: Brigham Campbell <me@brighamcampbell.com>
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Link: https://lore.kernel.org/r/20250802-fix-rockchip-npu-build-v1-1-fb0f0dacb3fe@brighamcampbell.com
3 months agodrm/panel-edp: Add BOE NV140WUM-N64
Aleksandrs Vinarskis [Thu, 31 Jul 2025 21:55:10 +0000 (23:55 +0200)]
drm/panel-edp: Add BOE NV140WUM-N64

Timings taken from NV140WUM-N41. It is found in some arm64 laptops,
eg. Asus Zenbook A14 UX3407QA.

The raw edid of the panel is:
00 ff ff ff ff ff ff 00 09 e5 f6 0c 00 00 00 00
10 22 01 04 a5 1e 13 78 07 8e 95 a6 52 4c 9d 26
0f 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 5d 30 80 a0 70 b0 28 40 30 20
36 00 2e bc 10 00 00 1a 00 00 00 fd 00 28 3c 4a
4a 0f 01 0a 20 20 20 20 20 20 00 00 00 fe 00 3d
4c 33 30 20 20 20 20 20 20 20 20 ff 00 00 00 fc
00 4e 56 31 34 30 57 55 4d 2d 4e 36 34 0a 01 f8

70 20 79 02 00 21 00 1d c8 0b 5d 07 80 07 b0 04
88 66 ea 51 cc 74 9d 66 52 0f 02 35 54 40 5e 40
5e 00 44 12 78 22 00 14 7f 5c 02 85 7f 07 9f 00
2f 00 1f 00 af 04 27 00 02 00 05 00 2b 00 0c 27
00 28 3b 00 00 27 00 28 2f 00 00 2e 00 06 00 44
40 5e 40 5e 81 00 1e 72 1a 00 00 03 71 28 3c 00
00 60 ff 60 ff 3c 00 00 00 00 e3 05 04 00 e6 06
01 01 60 60 ff 00 00 00 00 00 00 00 00 00 de 90

Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250731215635.206702-4-alex.vinarskis@gmail.com
3 months agodt-bindings: display: panel: samsung,atna40ct06: document ATNA40CT06
Aleksandrs Vinarskis [Thu, 31 Jul 2025 21:55:09 +0000 (23:55 +0200)]
dt-bindings: display: panel: samsung,atna40ct06: document ATNA40CT06

The Samsung ATNA40CT06 panel is a 14" AMOLED eDP panel. It is
similar to the ATNA33XC20 except that it is larger and has a
different resolution. It is found in some arm64 laptops, eg.
Asus Zenbook A14 UX3407QA.

Raw panel edid:

00 ff ff ff ff ff ff 00 4c 83 0d 42 00 00 00 00
00 22 01 04 b5 1e 13 78 02 0c f1 ae 52 3c b9 23
0c 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 42 3c 80 a0 70 b0 24 40 30 20
88 00 2e bd 10 00 00 1b 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
00 41 54 4e 41 34 30 43 54 30 36 2d 30 20 01 7d

70 20 79 02 00 20 00 0c 4c 83 00 0d 42 00 00 00
00 00 22 00 21 00 1d ca 0b 5e 07 80 07 b0 04 00
e1 fa 51 cb 13 b9 3d d2 0c 01 45 54 40 5e d0 60
18 10 23 78 26 00 09 07 06 03 00 00 00 50 00 00
22 00 14 8d 5a 02 85 7f 07 9f 00 2f 00 1f 00 af
04 23 00 07 00 07 00 81 00 0b e3 05 80 00 e6 06
05 01 74 60 02 2e 00 06 00 45 40 5e d0 60 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 b0 90

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250731215635.206702-3-alex.vinarskis@gmail.com
3 months agodt-bindings: display: panel: samsung,atna40cu11: document ATNA40CU11
Aleksandrs Vinarskis [Thu, 31 Jul 2025 21:55:08 +0000 (23:55 +0200)]
dt-bindings: display: panel: samsung,atna40cu11: document ATNA40CU11

The Samsung ATNA40CU11 panel is a 14" AMOLED eDP panel. It is
similar to the ATNA33XC20 except that it is larger and has a
different resolution. It is found in some arm64 laptops, eg.
Asus Zenbook A14 UX3407RA.

Raw panel edid:

00 ff ff ff ff ff ff 00 4c 83 9d 41 00 00 00 00
00 20 01 04 b5 1e 13 78 03 cf d1 ae 51 3e b6 23
0b 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 cb fe 40 64 b0 08 38 77 20 08
88 00 2e bd 10 00 00 1b 00 00 00 fd 00 30 78 da
da 42 01 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fe
00 41 54 4e 41 34 30 43 55 31 31 2d 30 20 01 2a

70 20 79 02 00 20 00 0c 4c 83 00 9d 41 00 00 00
00 00 20 00 21 00 1d b8 0b 6c 07 40 0b 08 07 00
ee ea 50 ec d3 b6 3d 42 0b 01 45 54 40 5e d0 60
18 10 23 78 26 00 09 07 06 03 00 00 00 50 00 00
22 00 14 e7 f3 09 85 3f 0b 63 00 1f 00 07 00 07
07 17 00 07 00 07 00 81 00 1f 73 1a 00 00 03 03
30 78 00 a0 74 02 60 02 78 00 00 00 00 8d e3 05
80 00 e6 06 05 01 74 60 02 00 00 00 00 00 91 90

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250731215635.206702-2-alex.vinarskis@gmail.com
3 months agodrm/panel-edp: Add edp panels used by mt8189 Chromebooks
Cong Yang [Thu, 31 Jul 2025 10:59:39 +0000 (18:59 +0800)]
drm/panel-edp: Add edp panels used by mt8189 Chromebooks

Add a few generic edp panels used by mt8189 chromebooks, most of
them use the same general enable timing 50ms. For BOE-NV116WHM-N4B and
BOE-NV116WHM-T01 CMN-N140JCA-ELP the enable timing required 80ms. For
CMN-N116BCA-EAK, the enable timing required 200ms and disable timing
required 50ms. For CMN-N116BCL-EAK and CMN-N122JCA-ENK the enable timing
required 80ms and disable timing required 50ms. For TMA-TL140VDMS03-01,
the enable timing required 50ms and the disable timing required 100ms.

AUO B122UAN01.0:
edid-decode (hex):
00 ff ff ff ff ff ff 00 06 af a4 04 00 00 00 00
31 20 01 04 a5 1a 10 78 03 54 c5 9d 54 55 8f 25
22 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 fa 3c 80 b8 70 b0 24 40 10 10
3e 00 06 a4 10 00 00 18 00 00 00 fd 00 28 3c 4b
4b 10 01 0a 20 20 20 20 20 20 00 00 00 fe 00 41
55 4f 0a 20 20 20 20 20 20 20 20 20 00 00 00 fe
00 42 31 32 32 55 41 4e 30 31 2e 30 20 0a 01 7c

AUO B116XAK02.0:
edid-decode (hex):

00 ff ff ff ff ff ff 00 06 af b0 52 00 00 00 00
2e 21 01 04 95 1a 0e 78 03 5b 35 9f 59 55 8e 26
25 50 54 00 00 00 01 01 01 01
01 01 01 01 01 01
01 01 01 01 01 01 5d 1c 56 a0 50 00 19 30 30 20
46 00 00 90 10 00 00 18 00 00 00 fd 00 28 3c 30
30 07 01 0a 20 20 20 20 20 20 00 00 00 fe 00 41
55 4f 0a 20 20 20 20 20 20 20 20 20 00 00 00 fe
00 42 31 31 36 58 41 4b 30 32 2e 30 20 0a 00 bd

AUO B140UAN08.5:
edid-decode (hex):

00 ff ff ff ff ff ff 00 06 af ba 8b 00 00 00 00
10 23 01 04 a5 1e 13 78 03 7c f2 90 57 59 93 29
1d 51 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 26 3d 80 b8 70 b0 28 40 10 10
3e 00 2d bc 10 00 00 18 00 00 00 fd 00 28 3c 4b
4b 10 01 0a 20 20 20 20 20 20 00 00 00 fe 00 41
55 4f 0a 20 20 20 20 20 20 20 20 20 00 00 00 fc
00 42 31 34 30 55 41 4e 30 38 2e 35 20 0a 01 29

70 20 79 02 00 22 00 14 7b 63 02 85 7f 07 b7 00
0f 80 0f 00 af 04 27 00 02 00 0d 00 25 01 09 7b
63 02 7b 63 02 28 3c 80 2b 00 0c 27 00 28 3b 00
00 27 00 28 3b 00 00 81 00 15 74 1a 00 00 03 01
28 3c 00 00 60 51 60 51 3c 00 00 00 00 8d 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 31 90

AUO B140UAX01.2:
edid-decode (hex):

00 ff ff ff ff ff ff 00 06 af ba cd 00 00 00 00
32 23 01 04 a5 1e 13 78 02 ca 31 9b 5c 58 8d 26
21 4f 52 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 60 3f 80 a0 70 b0 64 40 30 20
96 00 2d bc 10 00 00 18 00 00 00 fd 00 28 3c 4e
4e 10 01 0a 20 20 20 20 20 20 00 00 00 fe 00 41
55 4f 0a 20 20 20 20 20 20 20 20 20 00 00 00 fc
00 42 31 34 30 55 41 58 30 31 2e 32 20 0a 00 46

BOE NV116WHM-N4B:
edid-decode (hex):
00 ff ff ff ff ff ff 00 09 e5 45 0d 00 00 00 00
1f 22 01 04 95 1a 0e 78 03 0b 55 9a 5f 58 95 28
1e 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 09 1e 56 dc 50 00 28 30 30 20
36 00 00 90 10 00 00 1a 00 00 00 fd 00 28 3c 30
30 08 01 0a 20 20 20 20 20 20 00 00 00 fe 00 42
4f 45 20 43 51 0a 20 20 20 20 20 20 00 00 00 fc
00 4e 56 31 31 36 57 48 4d 2d 4e 34 42 0a 01 c1

70 20 79 02 00 81 00 15 74 1a 00 00 03 01 28 3c
00 00 4b 51 4b 51 3c 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 65 90

BOE NV116WHM-T01:
edid-decode (hex):

00 ff ff ff ff ff ff 00 09 e5 df 0d 00 00 00 00
01 1c 01 04 95 1a 0e 78 0a 81 15 96 59 5a 9a 29
1f 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 6b 1b 56 64 50 00 1e 30 26 18
44 00 00 90 10 00 00 1a ef 15 56 64 50 00 1e 30
26 18 44 00 00 90 10 00 00 00 00 00 00 fe 00 42
4f 45 20 48 46 0a 20 20 20 20 20 20 00 00 00 fe
00 4e 56 31 31 36 57 48 32 2d 4d 30 30 0a 00 83

CMN N116BCL-EAK:
edid-decode (hex):

00 ff ff ff ff ff ff 00 0d ae 5f 11 00 00 00 00
08 22 01 04 95 1a 0e 78 03 46 a5 9c 5b 53 8b 24
1d 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 e6 1e 56 e2 50 00 3c 30 30 20
a6 00 00 90 10 00 00 1a 00 00 00 fd 00 28 3c 32
32 08 01 0a 20 20 20 20 20 20 00 00 00 fe 00 43
4d 4e 0a 20 20 20 20 20 20 20 20 20 00 00 00 fe
00 4e 31 31 36 42 43 4c 2d 45 41 4b 0a 20 01 9b

70 20 79 02 00 25 01 09 fc 34 01 fc 34 01 28 3c
80 81 00 10 72 1a 00 00 03 01 28 3c 00 00 00 00
00 00 3c 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 2f 90

CMN N122JCA-ENK:
edid-decode (hex):

00 ff ff ff ff ff ff 00 0d ae 4c 12 00 00 00 00
11 20 01 04 a5 1a 10 78 03 0a f5 9e 5c 52 8b 24
1e 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 42 3c 80 a0 70 b0 24 40 30 20
a6 00 06 a4 10 00 00 18 00 00 00 fd 00 28 3c 4a
4a 10 01 0a 20 20 20 20 20 20 00 00 00 fe 00 43
4d 4e 0a 20 20 20 20 20 20 20 20 20 00 00 00 fe
00 4e 31 32 32 4a 43 41 2d 45 4e 4b 0a 20 00 fd

CMN N140JCA-ELP:
edid-decode (hex):
00 ff ff ff ff ff ff 00 0d ae a8 14 00 00 00 00
1d 23 01 04 a5 1e 13 78 03 28 65 97 59 54 8e 27
1e 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 42 3c 80 a0 70 b0 24 40 30 20
a6 00 2d bc 10 00 00 18 00 00 00 fd 00 28 3c 4a
4a 10 01 0a 20 20 20 20 20 20 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
00 4e 31 34 30 4a 43 41 2d 45 4c 50 0a 20 01 c2

70 20 79 02 00 25 01 09 94 5a 02 94 5a 02 28 3c
80 81 00 15 74 1a 00 00 03 01 28 3c 00 00 00 00
00 00 3c 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 aa 90

CMN N116BCA-EAK:
edid-decode (hex):
00 ff ff ff ff ff ff 00 0d ae 02 74 00 00 00 00
2a 22 01 04 95 1a 0e 78 03 67 75 98 59 53 90 27
1c 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 da 1d 56 e2 50 00 20 30 30 20
a6 00 04 8c 10 00 00 1a 00 00 00 fd 00 28 3c 30
30 08 01 0a 20 20 20 20 20 20 00 00 00 fe 00 43
4d 4e 0a 20 20 20 20 20 20 20 20 20 00 00 00 fe
00 4e 31 31 36 42 43 41 2d 45 41 4b 0a 20 00 ba

CSW MNE007QS5-2:
edid-decode (hex):
00 ff ff ff ff ff ff 00 0e 77 62 14 00 00 00 00
10 23 01 04 a5 1e 13 78 03 1c 2e 93 5f 58 95 28
1f 4f 58 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 ea 3d 80 c8 70 b0 2e 40 30 20
36 00 2e bc 10 00 00 1a 00 00 00 fd 00 28 3c 4b
4b 10 01 0a 20 20 20 20 20 20 00 00 00 fe 00 43
53 4f 54 20 54 39 0a 20 20 20 20 20 00 00 00 fc
00 4d 4e 45 30 30 37 51 53 35 2d 32 0a 20 01 8e

70 20 79 02 00 81 00 15 74 1a 00 00 03 01 28 3c
00 00 00 00 00 00 3c 00 00 00 00 80 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 1d 90

CSW MNE007QB2-2:
edid-decode (hex):
00 ff ff ff ff ff ff 00 0e 77 68 14 00 00 00 00
00 23 01 04 a5 1e 13 78 03 90 e0 90 5e 59 86 25
14 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 35 3c 80 a0 70 b0 23 40 30 20
36 00 2d bc 10 00 00 18 00 00 00 fd 00 28 3c 4a
4a 10 01 0a 20 20 20 20 20 20 00 00 00 fc 00 4d
4e 46 33 30 37 51 42 32 2d 32 0a 20 00 00 00 fe
00 43 53 4f 54 20 54 33 0a 20 20 20 20 20 00 9a

TMA TM140VDXP01-04:
edid-decode (hex):

00 ff ff ff ff ff ff 00 51 a1 11 08 00 00 00 00
1a 22 01 04 a5 1e 13 78 03 83 3d 98 5b 57 8d 28
1f 4e 53 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 6d 3d 80 a0 70 b0 3c 40 30 20
36 00 2d bc 10 00 00 1a 00 00 00 10 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 fd 00 28
3c 4c 4c 10 01 0a 20 20 20 20 20 20 00 00 00 fc
00 54 4d 31 34 30 56 44 58 50 30 31 0a 20 01 f7

70 20 79 02 00 25 00 09 41 66 02 41 66 02 28 3c
80 81 00 14 73 1a 00 00 03 01 28 3c 00 00 00 00
00 00 3c 00 00 00 00 8d 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 ae 90

TMA TL140VDMS03-01:
edid-decode (hex):

00 ff ff ff ff ff ff 00 51 a1 94 20 00 00 00 00
0b 23 01 04 a5 1e 13 78 03 47 5a 9e 53 5e 8b 28
23 54 53 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 03 3e 80 a0 70 b0 48 40 30 20
66 0c 2e bd 10 00 00 1e 00 00 00 fd 00 28 3c 4d
4d 10 01 0a 20 20 20 20 20 20 00 00 00 10 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
00 54 4c 31 34 30 56 44 4d 53 30 33 0a 20 01 9c

70 20 79 02 00 20 00 0c 00 00 00 94 20 00 00 00
00 0b 19 00 21 00 1d c8 0b 5d 07 80 07 b0 04 00
48 c9 55 48 a5 90 7b 42 21 02 45 54 00 00 00 00
00 00 12 78 26 00 09 02 00 00 00 00 00 01 00 00
2b 00 06 04 00 28 3b 00 00 81 00 14 73 1a 00 00
03 01 28 3c 00 00 00 00 00 00 3c 00 00 00 00 8d
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 ae 90

Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250731105939.2692654-1-yangcong5@huaqin.corp-partner.google.com
3 months agodrm/vkms: Add writeback encoders as possible clones
Robert Mader [Fri, 18 Jul 2025 12:14:42 +0000 (14:14 +0200)]
drm/vkms: Add writeback encoders as possible clones

Since commit 41b4b11da0215 ("drm: Add valid clones check") setting
the `possible_clones` values is a hard requirement for cloning.
`vkms` supports cloning for writeback connectors in order to capture
CRTC content, however that broke with said commit.

Writeback connectors are created on a per-CRTC basis, thus mark
every non-writeback connector that is compatible with a given CRTC
as possible clone - and vice-versa.

Using a default configuration, the corresponding `drm_info` output
changes from:

├───Encoders
│   ├───Encoder 0
│   │   ├───Object ID: 40
│   │   ├───Type: virtual
│   │   ├───CRTCS: {0}
│   │   └───Clones: {0}
│   └───Encoder 1
│       ├───Object ID: 41
│       ├───Type: virtual
│       ├───CRTCS: {0}
│       └───Clones: {1}

into:

├───Encoders
│   ├───Encoder 0
│   │   ├───Object ID: 44
│   │   ├───Type: virtual
│   │   ├───CRTCS: {0}
│   │   └───Clones: {0, 1}
│   └───Encoder 1
│       ├───Object ID: 50
│       ├───Type: virtual
│       ├───CRTCS: {0}
│       └───Clones: {0, 1}

Fixes: dbd9d80c1b2e ("drm/vkms: Add support for writeback")
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Link: https://lore.kernel.org/r/20250718121442.490634-1-robert.mader@collabora.com
[fixed Fixes line and changed to: to into: to avoid checkpatch warnings]
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
3 months agodrm: bridge: Add support for Solomon SSD2825 RGB/DSI bridge
Svyatoslav Ryhel [Wed, 30 Jul 2025 05:54:24 +0000 (08:54 +0300)]
drm: bridge: Add support for Solomon SSD2825 RGB/DSI bridge

SSD2825 is a cost-effective MIPI Bridge Chip solution targeting mainly
smartphones. It can convert 24bit RGB interface into 4-lane MIPI-DSI
interface to drive display modules of up to 800 x 1366, while supporting
AMOLED, a-si LCD or LTPS panel technologies for smartphone applications.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250730055424.6718-3-clamor95@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
3 months agodt-bindings: display: bridge: Document Solomon SSD2825
Svyatoslav Ryhel [Wed, 30 Jul 2025 05:54:23 +0000 (08:54 +0300)]
dt-bindings: display: bridge: Document Solomon SSD2825

Add bindings for Solomon SSD2825 MIPI master bridge chip that connects an
application processor with traditional parallel LCD interface and an LCD
driver with MIPI slave interface. The SSD2825 supports both parallel RGB
interface and serial SPI interface.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250730055424.6718-2-clamor95@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
3 months agodrm: docs: Update task from drm TODO list
Brigham Campbell [Tue, 22 Jul 2025 01:53:11 +0000 (19:53 -0600)]
drm: docs: Update task from drm TODO list

Update TODO item from drm documentation to contain more applicable
information regarding the removal of deprecated MIPI DSI functions and
no longer reference functions which have already been removed from the
kernel.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Brigham Campbell <me@brighamcampbell.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250722015313.561966-5-me@brighamcampbell.com
3 months agodrm: Remove unused MIPI write seq and chatty functions
Brigham Campbell [Tue, 22 Jul 2025 01:53:10 +0000 (19:53 -0600)]
drm: Remove unused MIPI write seq and chatty functions

Remove the deprecated mipi_dsi_generic_write_seq() and
mipi_dsi_generic_write_chatty() functions now that they are no longer
used.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Brigham Campbell <me@brighamcampbell.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250722015313.561966-4-me@brighamcampbell.com
3 months agodrm/panel: jdi-lpm102a188a: Fix bug and clean up driver
Brigham Campbell [Tue, 22 Jul 2025 01:53:09 +0000 (19:53 -0600)]
drm/panel: jdi-lpm102a188a: Fix bug and clean up driver

Fix bug in unprepare() which causes the function's return value to be
that of the last mipi "enter sleep mode" command.

Update driver to use the "multi" variant of MIPI functions in order to
facilitate improved error handling and remove the panel's dependency on
deprecated MIPI functions.

Use the new mipi_dsi_dual macro to reduce code duplication.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Tested-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Signed-off-by: Brigham Campbell <me@brighamcampbell.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250722015313.561966-3-me@brighamcampbell.com
3 months agodrm: Create mipi_dsi_dual* macros
Brigham Campbell [Tue, 22 Jul 2025 01:53:08 +0000 (19:53 -0600)]
drm: Create mipi_dsi_dual* macros

Create mipi_dsi_dual, mipi_dsi_dual_dcs_write_seq_multi, and
mipi_dsi_dual_generic_write_seq_multi macros for panels which are driven
by two parallel serial interfaces. This allows for the reduction of code
duplication in drivers for these panels.

Remove mipi_dsi_dual_dcs_write_seq_multi definition from
panel-novatek-nt36523.c to avoid the duplicate definition. Make novatek
driver pass mipi_dsi_context struct as a pointer.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Brigham Campbell <me@brighamcampbell.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250722015313.561966-2-me@brighamcampbell.com
3 months agodrm/vmwgfx: fix missing assignment to ts
Colin Ian King [Mon, 23 Jun 2025 22:35:26 +0000 (23:35 +0100)]
drm/vmwgfx: fix missing assignment to ts

The assignment to ts is missing on the call to ktime_to_timespec64.
Fix this by adding the missing assignment.

Fixes: db6a94b26354 ("drm/vmwgfx: Implement dma_fence_ops properly")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Ian Forbes <ian.forbes@broadcom.com>
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://lore.kernel.org/r/20250623223526.281398-1-colin.i.king@gmail.com
3 months agodt-bindings: npu: rockchip,rknn: Add bindings
Tomeu Vizoso [Mon, 21 Jul 2025 09:17:33 +0000 (11:17 +0200)]
dt-bindings: npu: rockchip,rknn: Add bindings

Add the bindings for the Neural Processing Unit IP from Rockchip.

v2:
- Adapt to new node structure (one node per core, each with its own
  IOMMU)
- Several misc. fixes from Sebastian Reichel

v3:
- Split register block in its constituent subblocks, and only require
  the ones that the kernel would ever use (Nicolas Frattaroli)
- Group supplies (Rob Herring)
- Explain the way in which the top core is special (Rob Herring)

v4:
- Change required node name to npu@ (Rob Herring and Krzysztof Kozlowski)
- Remove unneeded items: (Krzysztof Kozlowski)
- Fix use of minItems/maxItems (Krzysztof Kozlowski)
- Add reg-names to list of required properties (Krzysztof Kozlowski)
- Fix example (Krzysztof Kozlowski)

v5:
- Rename file to rockchip,rk3588-rknn-core.yaml (Krzysztof Kozlowski)
- Streamline compatible property (Krzysztof Kozlowski)

v6:
- Remove mention to NVDLA, as the hardware is only incidentally related
  (Kever Yang)
- Mark pclk and npu clocks as required by all clocks (Rob Herring)

v7:
- Remove allOf section, not needed now that all nodes require 4 clocks
  (Heiko Stübner)

v8:
- Remove notion of top core (Robin Murphy)

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250721-6-10-rocket-v9-6-77ebd484941e@tomeuvizoso.net
3 months agoaccel/rocket: Add IOCTLs for synchronizing memory accesses
Tomeu Vizoso [Mon, 21 Jul 2025 09:17:32 +0000 (11:17 +0200)]
accel/rocket: Add IOCTLs for synchronizing memory accesses

The NPU cores have their own access to the memory bus, and this isn't
cache coherent with the CPUs.

Add IOCTLs so userspace can mark when the caches need to be flushed, and
also when a writer job needs to be waited for before the buffer can be
accessed from the CPU.

Initially based on the same IOCTLs from the Etnaviv driver.

v2:
- Don't break UABI by reordering the IOCTL IDs (Jeff Hugo)

v3:
- Check that padding fields in IOCTLs are zero (Jeff Hugo)

v6:
- Fix conversion logic to make sure we use DMA_BIDIRECTIONAL when needed
  (Lucas Stach)

v8:
- Always sync BOs in both directions (Robin Murphy)

Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250721-6-10-rocket-v9-5-77ebd484941e@tomeuvizoso.net
3 months agoaccel/rocket: Add job submission IOCTL
Tomeu Vizoso [Mon, 21 Jul 2025 09:17:31 +0000 (11:17 +0200)]
accel/rocket: Add job submission IOCTL

Using the DRM GPU scheduler infrastructure, with a scheduler for each
core.

Userspace can decide for a series of tasks to be executed sequentially
in the same core, so SRAM locality can be taken advantage of.

The job submission code was initially based on Panfrost.

v2:
- Remove hardcoded number of cores
- Misc. style fixes (Jeffrey Hugo)
- Repack IOCTL struct (Jeffrey Hugo)

v3:
- Adapt to a split of the register block in the DT bindings (Nicolas
  Frattaroli)
- Make use of GPL-2.0-only for the copyright notice (Jeff Hugo)
- Use drm_* logging functions (Thomas Zimmermann)
- Rename reg i/o macros (Thomas Zimmermann)
- Add padding to ioctls and check for zero (Jeff Hugo)
- Improve error handling (Nicolas Frattaroli)

v6:
- Use mutexes guard (Markus Elfring)
- Use u64_to_user_ptr (Jeff Hugo)
- Drop rocket_fence (Rob Herring)

v7:
- Assign its own IOMMU domain to each client, for isolation (Daniel
  Stone and Robin Murphy)

v8:
- Use reset lines to reset the cores (Robin Murphy)
- Use the macros to compute the values for the bitfields (Robin Murphy)
- More descriptive name for the IRQ (Robin Murphy)
- Simplify job interrupt handing (Robin Murphy)
- Correctly acquire a reference to the IOMMU (Robin Murphy)
- Specify the size of the embedded structs in the IOCTLs for future
  extensibility (Rob Herring)
- Expose only 32 bits for the address of the regcmd BO (Robin Murphy)

Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250721-6-10-rocket-v9-4-77ebd484941e@tomeuvizoso.net
3 months agoaccel/rocket: Add IOCTL for BO creation
Tomeu Vizoso [Mon, 21 Jul 2025 09:17:30 +0000 (11:17 +0200)]
accel/rocket: Add IOCTL for BO creation

This uses the SHMEM DRM helpers and we map right away to the CPU and NPU
sides, as all buffers are expected to be accessed from both.

v2:
- Sync the IOMMUs for the other cores when mapping and unmapping.

v3:
- Make use of GPL-2.0-only for the copyright notice (Jeff Hugo)

v6:
- Use mutexes guard (Markus Elfring)

v7:
- Assign its own IOMMU domain to each client, for isolation (Daniel
  Stone and Robin Murphy)

v8:
- Correctly acquire a reference to the IOMMU (Robin Murphy)
- Allocate DMA address ourselves with drm_mm (Robin Murphy)
- Use refcount_read (Heiko Stuebner)
- Remove superfluous dma_sync_sgtable_for_device (Robin Murphy)

Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250721-6-10-rocket-v9-3-77ebd484941e@tomeuvizoso.net
3 months agoaccel/rocket: Add a new driver for Rockchip's NPU
Tomeu Vizoso [Mon, 21 Jul 2025 09:17:29 +0000 (11:17 +0200)]
accel/rocket: Add a new driver for Rockchip's NPU

This initial version supports the NPU as shipped in the RK3588 SoC and
described in the first part of its TRM, in Chapter 36.

This NPU contains 3 independent cores that the driver can submit jobs
to.

This commit adds just hardware initialization and power management.

v2:
- Split cores and IOMMUs as independent devices (Sebastian Reichel)
- Add some documentation (Jeffrey Hugo)
- Be more explicit in the Kconfig documentation (Jeffrey Hugo)
- Remove resets, as these haven't been found useful so far (Zenghui Yu)
- Repack structs (Jeffrey Hugo)
- Use DEFINE_DRM_ACCEL_FOPS (Jeffrey Hugo)
- Use devm_drm_dev_alloc (Jeffrey Hugo)
- Use probe log helper (Jeffrey Hugo)
- Introduce UABI header in a later patch (Jeffrey Hugo)

v3:
- Adapt to a split of the register block in the DT bindings (Nicolas
  Frattaroli)
- Move registers header to its own commit (Thomas Zimmermann)
- Misc. cleanups (Thomas Zimmermann and Jeff Hugo)
- Make use of GPL-2.0-only for the copyright notice (Jeff Hugo)
- PM improvements (Nicolas Frattaroli)

v4:
- Use bulk clk API (Krzysztof Kozlowski)

v6:
- Remove mention to NVDLA, as the hardware is only incidentally related
  (Kever Yang)
- Use calloc instead of GFP_ZERO (Jeff Hugo)
- Explicitly include linux/container_of.h (Jeff Hugo)
- pclk and npu clocks are now needed by all cores (Rob Herring)

v7:
- Assign its own IOMMU domain to each client, for isolation (Daniel
  Stone and Robin Murphy)

v8:
- Kconfig: fix depends to be more explicit about Rockchip, and remove
  superfluous selects (Robin Murphy)
- Use reset lines to reset the cores (Robin Murphy)
- Reference count the module
- Set dma_set_max_seg_size
- Correctly acquire a reference to the IOMMU (Robin Murphy)
- Remove notion of top core (Robin Murphy)

Reviewed-by: Robert Foss <rfoss@kernel.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250721-6-10-rocket-v9-2-77ebd484941e@tomeuvizoso.net
3 months agoaccel/rocket: Add registers header
Tomeu Vizoso [Mon, 21 Jul 2025 09:17:28 +0000 (11:17 +0200)]
accel/rocket: Add registers header

A XML file was generated with the data from the TRM, and then this
header was generated from it.

The canonical location for the XML file is the Mesa3D repository.

v3:
- Make use of GPL-2.0-only for the copyright notice (Jeff Hugo)

v8:
- Remove full MIT license blob, to match other files with the same
  licensing arrangement in the kernel

Reviewed-by: Robert Foss <rfoss@kernel.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250721-6-10-rocket-v9-1-77ebd484941e@tomeuvizoso.net
3 months agoMAINTAINERS: Update email address for Carl Vanderlip
Carl Vanderlip [Mon, 21 Jul 2025 22:08:10 +0000 (15:08 -0700)]
MAINTAINERS: Update email address for Carl Vanderlip

Qualcomm is changing open source email address policy.
LKML and other busy mailing lists use the oss.qualcomm.com domain.

Signed-off-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250721220811.962509-1-carl.vanderlip@oss.qualcomm.com
3 months agopanthor: dump task pid and comm on gpu errors
Chia-I Wu [Fri, 18 Jul 2025 06:38:16 +0000 (23:38 -0700)]
panthor: dump task pid and comm on gpu errors

It is useful to know which tasks cause gpu errors.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20250718063816.1452123-4-olvaffe@gmail.com
3 months agopanthor: save task pid and comm in panthor_group
Chia-I Wu [Fri, 18 Jul 2025 06:38:15 +0000 (23:38 -0700)]
panthor: save task pid and comm in panthor_group

We would like to report them on gpu errors.

We choose to save the info on panthor_group_create rather than on
panthor_open because, when the two differ, we are more interested in the
task that created the group.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20250718063816.1452123-3-olvaffe@gmail.com
3 months agopanthor: set owner field for driver fops
Chia-I Wu [Fri, 18 Jul 2025 06:38:14 +0000 (23:38 -0700)]
panthor: set owner field for driver fops

It allows us to get rid of manual try_module_get / module_put.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20250718063816.1452123-2-olvaffe@gmail.com
3 months agodrm/panel-edp: Add 50ms disable delay for four panels
Langyan Ye [Wed, 23 Jul 2025 07:25:13 +0000 (15:25 +0800)]
drm/panel-edp: Add 50ms disable delay for four panels

Add 50ms disable delay for NV116WHM-N49, NV122WUM-N41, and MNC207QS1-1
to satisfy T9+T10 timing. Add 50ms disable delay for MNE007JA1-2
as well, since MNE007JA1-2 copies the timing of MNC207QS1-1.

Specifically, it should be noted that the MNE007JA1-2 panel was added
by someone who did not have the panel documentation, so they simply
copied the timing from the MNC207QS1-1 panel. Adding an extra 50 ms
of delay should be safe.

Fixes: 0547692ac146 ("drm/panel-edp: Add several generic edp panels")
Fixes: 50625eab3972 ("drm/edp-panel: Add panel used by T14s Gen6 Snapdragon")
Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250723072513.2880369-1-yelangyan@huaqin.corp-partner.google.com
3 months agodrm/display: bridge-connector: correct CEC bridge pointers in drm_bridge_connector_init
Dmitry Baryshkov [Sat, 19 Jul 2025 10:58:13 +0000 (13:58 +0300)]
drm/display: bridge-connector: correct CEC bridge pointers in drm_bridge_connector_init

The bridge used in drm_bridge_connector_init() for CEC init does not
correctly point to the required HDMI CEC bridge, which can lead to
errors during CEC initialization.

Fixes: 65a2575a68e4 ("drm/display: bridge-connector: hook in CEC notifier support")
Fixes: a74288c8ded7 ("drm/display: bridge-connector: handle CEC adapters")
Reported-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Closes: http://lore.kernel.org/r/20250718164156.194702d9@booty/
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://lore.kernel.org/r/20250719-fix-cec-bridges-v1-1-a60b1333c87d@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
3 months agodrm/bridge: display-connector: put the bridge obtained by drm_bridge_get_prev_bridge()
Luca Ceresoli [Wed, 9 Jul 2025 15:59:39 +0000 (17:59 +0200)]
drm/bridge: display-connector: put the bridge obtained by drm_bridge_get_prev_bridge()

The bridge returned by drm_bridge_get_prev_bridge() is refcounted. Put it
when done.

To keep the code clean and future-proof use a scope-based free.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250709-drm-bridge-alloc-getput-drm_bridge_get_prev_bridge-v1-3-34ba6f395aaa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 months agodrm/bridge: select_bus_fmt_recursive(): put the bridge obtained by drm_bridge_get_pre...
Luca Ceresoli [Wed, 9 Jul 2025 15:59:38 +0000 (17:59 +0200)]
drm/bridge: select_bus_fmt_recursive(): put the bridge obtained by drm_bridge_get_prev_bridge()

The bridge returned by drm_bridge_get_prev_bridge() is refcounted. Put it
when done.

select_bus_fmt_recursive() has several return points, and ensuring
drm_bridge_put() is always called in the right place would be error-prone
(especially with future changes to the select_bus_fmt_recursive() code) and
make code uglier. Instead use a scope-based free, which is future-proof and
a lot cleaner.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250709-drm-bridge-alloc-getput-drm_bridge_get_prev_bridge-v1-2-34ba6f395aaa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 months agodrm/bridge: get the bridge returned by drm_bridge_get_prev_bridge()
Luca Ceresoli [Wed, 9 Jul 2025 15:59:37 +0000 (17:59 +0200)]
drm/bridge: get the bridge returned by drm_bridge_get_prev_bridge()

drm_bridge_get_prev_bridge() returns a bridge pointer that the
caller could hold for a long time. Increment the refcount of the returned
bridge and document it must be put by the caller.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250709-drm-bridge-alloc-getput-drm_bridge_get_prev_bridge-v1-1-34ba6f395aaa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 months agoMAINTAINERS: Add new intel_vpu maintainer
Jacek Lawrynowicz [Tue, 22 Jul 2025 10:04:21 +0000 (12:04 +0200)]
MAINTAINERS: Add new intel_vpu maintainer

Add Karol as a new intel_vpu maintainer.

Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://lore.kernel.org/r/20250722100421.500984-1-jacek.lawrynowicz@linux.intel.com
3 months agoaccel/amdxdna: Delete pci_free_irq_vectors()
Salah Triki [Sat, 19 Jul 2025 06:33:36 +0000 (07:33 +0100)]
accel/amdxdna: Delete pci_free_irq_vectors()

The device is managed so pci_free_irq_vectors() is called automatically
no need to do it manually.

Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://lore.kernel.org/r/aHs8QAfUlFeNp7qL@pc
3 months agoaccel/amdxdna: Support user space allocated buffer
Lizhi Hou [Wed, 16 Jul 2025 16:44:14 +0000 (09:44 -0700)]
accel/amdxdna: Support user space allocated buffer

Enhance DRM_IOCTL_AMDXDNA_CREATE_BO to accept user space allocated
buffer pointer. The buffer pages will be pinned in memory. Unless
the CAP_IPC_LOCK is enabled for the application process, the total
pinned memory can not beyond rlimit_memlock.

Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://lore.kernel.org/r/20250716164414.112091-1-lizhi.hou@amd.com
3 months agodrm/probe-helper: put the bridge returned by drm_bridge_chain_get_first_bridge()
Luca Ceresoli [Tue, 8 Jul 2025 15:48:22 +0000 (17:48 +0200)]
drm/probe-helper: put the bridge returned by drm_bridge_chain_get_first_bridge()

The bridge returned by drm_bridge_chain_get_first_bridge() is
refcounted. Put it when done.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250708-drm-bridge-alloc-getput-drm_bridge_chain_get_first_bridge-v9-5-db1ba3df7f58@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 months agodrm/atomic-helper: put the bridge returned by drm_bridge_chain_get_first_bridge()
Luca Ceresoli [Tue, 8 Jul 2025 15:48:21 +0000 (17:48 +0200)]
drm/atomic-helper: put the bridge returned by drm_bridge_chain_get_first_bridge()

The bridge returned by drm_bridge_chain_get_first_bridge() is
refcounted. Put it when done.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250708-drm-bridge-alloc-getput-drm_bridge_chain_get_first_bridge-v9-4-db1ba3df7f58@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 months agodrm/mxsfb: put the bridge returned by drm_bridge_chain_get_first_bridge()
Luca Ceresoli [Tue, 8 Jul 2025 15:48:20 +0000 (17:48 +0200)]
drm/mxsfb: put the bridge returned by drm_bridge_chain_get_first_bridge()

The bridge returned by drm_bridge_chain_get_first_bridge() is
refcounted. Put it when done. Use a scope-based free action to catch all
the code paths.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250708-drm-bridge-alloc-getput-drm_bridge_chain_get_first_bridge-v9-3-db1ba3df7f58@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 months agodrm/bridge: get the bridge returned by drm_bridge_chain_get_first_bridge()
Luca Ceresoli [Tue, 8 Jul 2025 15:48:19 +0000 (17:48 +0200)]
drm/bridge: get the bridge returned by drm_bridge_chain_get_first_bridge()

drm_bridge_chain_get_first_bridge() returns a bridge pointer that the
caller could hold for a long time. Increment the refcount of the returned
bridge and document it must be put by the caller.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250708-drm-bridge-alloc-getput-drm_bridge_chain_get_first_bridge-v9-2-db1ba3df7f58@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 months agodrm/bridge: add a cleanup action for scope-based drm_bridge_put() invocation
Luca Ceresoli [Tue, 8 Jul 2025 15:48:18 +0000 (17:48 +0200)]
drm/bridge: add a cleanup action for scope-based drm_bridge_put() invocation

Many functions get a drm_bridge pointer, only use it in the function body
(or a smaller scope such as a loop body), and don't store it. In these
cases they always need to drm_bridge_put() it before returning (or exiting
the scope).

Some of those functions have complex code paths with multiple return points
or loop break/continue. This makes adding drm_bridge_put() in the right
places tricky, ugly and error prone in case of future code changes.

Others use the bridge pointer in the return statement and would need to
split the return line to fit the drm_bridge_put, which is a bit annoying:

  -return some_thing(bridge);
  +ret = some_thing(bridge);
  +drm_bridge_put(bridge);
  +return ret;

To make it easier for all of them to put the bridge reference correctly
without complicating code, define a scope-based cleanup action to be used
with __free().

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250708-drm-bridge-alloc-getput-drm_bridge_chain_get_first_bridge-v9-1-db1ba3df7f58@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
3 months agoaccel/ivpu: Remove lockdep_assert_irqs_disabled()
Maarten Lankhorst [Wed, 16 Jul 2025 10:56:36 +0000 (12:56 +0200)]
accel/ivpu: Remove lockdep_assert_irqs_disabled()

This breaks on PREEMPT_RT, and should be unneeded since
lockdep can track irq disabled status itself.

Link: https://lore.kernel.org/r/20250715165919.33754-1-dev@lankhorst.se
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
3 months agodrm/panel-edp: Add disable to 100ms for MNB601LS1-4
Langyan Ye [Mon, 21 Jul 2025 06:16:27 +0000 (14:16 +0800)]
drm/panel-edp: Add disable to 100ms for MNB601LS1-4

For the MNB601LS1-4 panel, the T9+T10 timing does not meet the
requirements of the specification, so disable is set to 100ms.

Fixes: 9d8e91439fc3 ("drm/panel-edp: Add CSW MNB601LS1-4")
Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250721061627.3816612-1-yelangyan@huaqin.corp-partner.google.com
3 months agorust: drm: Drop the use of Opaque for ioctl arguments
Beata Michalska [Thu, 26 Jun 2025 16:23:13 +0000 (18:23 +0200)]
rust: drm: Drop the use of Opaque for ioctl arguments

With the Opaque<T>, the expectations are that Rust should not
make any assumptions on the layout or invariants of the wrapped
C types. That runs rather counter to ioctl arguments, which must
adhere to certain data-layout constraints. By using Opaque<T>,
ioctl handlers are forced to use unsafe code where none is actually
needed. This adds needless complexity and maintenance overhead,
brining no safety benefits.
Drop the use of Opaque for ioctl arguments as that is not the best
fit here.

Signed-off-by: Beata Michalska <beata.michalska@arm.com>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20250626162313.2755584-1-beata.michalska@arm.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
3 months agodrm/panthor: Fix memory leak in panthor_ioctl_group_create()
Jann Horn [Wed, 13 Nov 2024 21:03:39 +0000 (22:03 +0100)]
drm/panthor: Fix memory leak in panthor_ioctl_group_create()

When bailing out due to group_priority_permit() failure, the queue_args
need to be freed. Fix it by rearranging the function to use the
goto-on-error pattern, such that the success case flows straight without
indentation while error cases jump forward to cleanup.

Cc: stable@vger.kernel.org
Fixes: 5f7762042f8a ("drm/panthor: Restrict high priorities on group_create")
Signed-off-by: Jann Horn <jannh@google.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20241113-panthor-fix-gcq-bailout-v1-1-654307254d68@google.com
3 months agodrm/sched: Avoid double re-lock on the job free path
Tvrtko Ursulin [Wed, 16 Jul 2025 08:51:17 +0000 (09:51 +0100)]
drm/sched: Avoid double re-lock on the job free path

Currently the job free work item will lock sched->job_list_lock first time
to see if there are any jobs, free a single job, and then lock again to
decide whether to re-queue itself if there are more finished jobs.

Since drm_sched_get_finished_job() already looks at the second job in the
queue we can simply add the signaled check and have it return the presence
of more jobs to be freed to the caller. That way the work item does not
have to lock the list again and repeat the signaled check.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Maíra Canal <mcanal@igalia.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250716085117.56864-1-tvrtko.ursulin@igalia.com
3 months agodrm: Move drm_gem ioctl kerneldoc to uapi file
David Francis [Thu, 17 Jul 2025 14:35:56 +0000 (10:35 -0400)]
drm: Move drm_gem ioctl kerneldoc to uapi file

The drm_gem ioctls were documented in internal file drm_gem.c
instead of uapi header drm.h. Move them there and change to
appropriate kerneldoc formatting.

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250717143556.857893-3-David.Francis@amd.com
3 months agodrm: Add DRM prime interface to reassign GEM handle
David Francis [Thu, 17 Jul 2025 14:35:55 +0000 (10:35 -0400)]
drm: Add DRM prime interface to reassign GEM handle

CRIU restore of drm buffer objects requires the ability to create
or import a buffer object with a specific gem handle.

Add new drm ioctl DRM_IOCTL_GEM_CHANGE_HANDLE, which takes
the gem handle of an object and moves that object to a
specified new gem handle.

This ioctl needs to call drm_prime_remove_buf_handle,
but that function acquires the prime lock, which the ioctl
needs to hold for other purposes.

Make drm_prime_remove_buf_handle not acquire the prime lock,
and change its other caller to reflect this.

The rest of the kernel patches required to enable CRIU can be
found at
https://lore.kernel.org/dri-devel/20250617194536.538681-1-David.Francis@amd.com/

v2 - Move documentation to UAPI headers
v3 - Always return 0 on success

Signed-off-by: David Francis <David.Francis@amd.com>
Acked-by: Felix Kuehling <felix.kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250717143556.857893-2-David.Francis@amd.com
3 months agodrm: document DRM_MODE_PAGE_FLIP_EVENT interactions with atomic
Simon Ser [Thu, 1 May 2025 11:29:51 +0000 (11:29 +0000)]
drm: document DRM_MODE_PAGE_FLIP_EVENT interactions with atomic

It's not obvious off-hand which CRTCs will get a page-flip event
when using this flag in an atomic commit, because it's all
implicitly implied based on the contents of the atomic commit.
Document requirements for using this flag and how to request an
event for a CRTC.

Note, because prepare_signaling() runs right after
drm_atomic_set_property() calls, page-flip events are not delivered
for CRTCs pulled in later by DRM core (e.g. on modeset by
drm_atomic_helper_check_modeset()) or the driver (e.g. other CRTCs
sharing a DP-MST connector).

v2: fix cut off sentence in commit message (Pekka)

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Simona Vetter <simona@ffwll.ch>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
Cc: David Turner <david.turner@raspberrypi.com>
Cc: Daniel Stone <daniel@fooishbar.org>
Link: https://lore.kernel.org/r/20250501112945.6448-1-contact@emersion.fr
3 months agodrm/v3d: Add parameter to retrieve the number of GPU resets per-fd
Maíra Canal [Fri, 11 Jul 2025 15:18:32 +0000 (12:18 -0300)]
drm/v3d: Add parameter to retrieve the number of GPU resets per-fd

The GL extension KHR_robustness uses the number of global and per-context
GPU resets to learn about graphics resets that affect a GL context. This
commit introduces a new V3D parameter to retrieve the number of GPU resets
triggered by jobs submitted through a file descriptor.

To retrieve this information, user-space must use DRM_V3D_PARAM_CONTEXT_RESET_COUNTER.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Link: https://lore.kernel.org/r/20250711-v3d-reset-counter-v1-2-1ac73e9fca2d@igalia.com
Signed-off-by: Maíra Canal <mcanal@igalia.com>
3 months agodrm/v3d: Add parameter to retrieve the global number of GPU resets
Maíra Canal [Fri, 11 Jul 2025 15:18:31 +0000 (12:18 -0300)]
drm/v3d: Add parameter to retrieve the global number of GPU resets

The GL extension KHR_robustness uses the number of global and per-context
GPU resets to learn about graphics resets that affect a GL context. This
commit introduces a new V3D parameter to retrieve the global number of
GPU resets that have happened since the driver was probed.

To retrieve this information, user-space must use DRM_V3D_PARAM_GLOBAL_RESET_COUNTER.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Link: https://lore.kernel.org/r/20250711-v3d-reset-counter-v1-1-1ac73e9fca2d@igalia.com
Signed-off-by: Maíra Canal <mcanal@igalia.com>
3 months agodrm/sched: Fix a race in DRM_GPU_SCHED_STAT_NO_HANG test
Tvrtko Ursulin [Wed, 16 Jul 2025 08:48:17 +0000 (09:48 +0100)]
drm/sched: Fix a race in DRM_GPU_SCHED_STAT_NO_HANG test

The "skip reset" test waits for the timeout handler to run for the
duration of 2 * MOCK_TIMEOUT, and because the mock scheduler opted to
remove the "skip reset" flag once it fires, this gives opportunity for the
timeout handler to run twice. Second time the job will be removed from the
mock scheduler job list and the drm_mock_sched_advance() call in the test
will fail.

Fix it by making the "don't reset" flag persist for the lifetime of the
job and add a new flag to verify that the code path had executed as
expected.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Fixes: 1472e7549f84 ("drm/sched: Add new test for DRM_GPU_SCHED_STAT_NO_HANG")
Cc: Maíra Canal <mcanal@igalia.com>
Cc: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250716084817.56797-1-tvrtko.ursulin@igalia.com
3 months agodrm/amdgpu: Fix missing unlocking in an error path in amdgpu_userq_create()
Christophe JAILLET [Wed, 9 Jul 2025 19:02:51 +0000 (21:02 +0200)]
drm/amdgpu: Fix missing unlocking in an error path in amdgpu_userq_create()

If kasprintf() fails, some mutex still need to be released to avoid locking
issue, as already done in all other error handling path.

Fixes: c03ea34cbf88 ("drm/amdgpu: add support of debugfs for mqd information")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/all/366557fa7ca8173fd78c58336986ca56953369b9.1752087753.git.christophe.jaillet@wanadoo.fr/
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
3 months agodrm: Make passing of format info to drm_helper_mode_fill_fb_struct() mandatory
Ville Syrjälä [Tue, 1 Jul 2025 09:07:22 +0000 (12:07 +0300)]
drm: Make passing of format info to drm_helper_mode_fill_fb_struct() mandatory

Now that everyone passes along the format info to
drm_helper_mode_fill_fb_struct() we can make this behaviour
mandatory and drop the extra lookup.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-20-ville.syrjala@linux.intel.com
3 months agodrm/vmwgfx: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_s...
Ville Syrjälä [Tue, 1 Jul 2025 09:07:21 +0000 (12:07 +0300)]
drm/vmwgfx: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()

Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.

Cc: Zack Rusin <zack.rusin@broadcom.com>
Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-19-ville.syrjala@linux.intel.com
3 months agodrm/virtio: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_s...
Ville Syrjälä [Tue, 1 Jul 2025 09:07:20 +0000 (12:07 +0300)]
drm/virtio: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()

Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.

Cc: David Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Gurchetan Singh <gurchetansingh@chromium.org>
Cc: Chia-I Wu <olvaffe@gmail.com>
Cc: virtualization@lists.linux.dev
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-18-ville.syrjala@linux.intel.com
3 months agodrm/tegra: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_st...
Ville Syrjälä [Tue, 1 Jul 2025 09:07:19 +0000 (12:07 +0300)]
drm/tegra: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()

Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.

For the fbdev case a manual drm_get_format_info() lookup
is needed.

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Mikko Perttunen <mperttunen@nvidia.com>
Cc: linux-tegra@vger.kernel.org
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-17-ville.syrjala@linux.intel.com
3 months agodrm/msm: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()
Ville Syrjälä [Tue, 1 Jul 2025 09:07:18 +0000 (12:07 +0300)]
drm/msm: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()

Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookups.

For the fbdev case a manual drm_get_format_info() lookup
is needed.

Cc: Rob Clark <robdclark@gmail.com>
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: Dmitry Baryshkov <lumag@kernel.org>
Cc: Sean Paul <sean@poorly.run>
Cc: Marijn Suijten <marijn.suijten@somainline.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-16-ville.syrjala@linux.intel.com
3 months agodrm/komeda: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_s...
Ville Syrjälä [Tue, 1 Jul 2025 09:07:17 +0000 (12:07 +0300)]
drm/komeda: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()

Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-15-ville.syrjala@linux.intel.com
3 months agodrm/i915: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_str...
Ville Syrjälä [Tue, 1 Jul 2025 09:07:16 +0000 (12:07 +0300)]
drm/i915: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()

Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.

For the fbdev case a manual drm_get_format_info() lookup
is needed.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-14-ville.syrjala@linux.intel.com
3 months agodrm/gma500: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_s...
Ville Syrjälä [Tue, 1 Jul 2025 09:07:15 +0000 (12:07 +0300)]
drm/gma500: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()

Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.

For the fbdev case a manual drm_get_format_info() lookup
is needed.

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-13-ville.syrjala@linux.intel.com
3 months agodrm/exynos: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_s...
Ville Syrjälä [Tue, 1 Jul 2025 09:07:14 +0000 (12:07 +0300)]
drm/exynos: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()

Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.

For the fbdev case a manual drm_get_format_info() lookup
is needed.

Cc: Inki Dae <inki.dae@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-12-ville.syrjala@linux.intel.com
3 months agodrm/armada: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_s...
Ville Syrjälä [Tue, 1 Jul 2025 09:07:13 +0000 (12:07 +0300)]
drm/armada: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()

Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.

For the fbdev case a manual drm_get_format_info() lookup
is needed.

Cc: Russell King <linux@armlinux.org.uk>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-11-ville.syrjala@linux.intel.com
3 months agodrm/amdgpu: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_s...
Ville Syrjälä [Tue, 1 Jul 2025 09:07:12 +0000 (12:07 +0300)]
drm/amdgpu: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()

Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-10-ville.syrjala@linux.intel.com
3 months agodrm/gem/afbc: Eliminate redundant drm_get_format_info()
Ville Syrjälä [Tue, 1 Jul 2025 09:07:11 +0000 (12:07 +0300)]
drm/gem/afbc: Eliminate redundant drm_get_format_info()

Pass along the format info from .fb_create() to aliminate the
redundant drm_get_format_info() calls from the afbc code.

Cc: Sandy Huang <hjc@rock-chips.com>
Cc: "Heiko Stübner" <heiko@sntech.de>
Cc: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-9-ville.syrjala@linux.intel.com
3 months agodrm/gem: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()
Ville Syrjälä [Tue, 1 Jul 2025 09:07:10 +0000 (12:07 +0300)]
drm/gem: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()

Pass along the format info from .fb_create() to eliminate the
redundant drm_get_format_info() calls from the gem fb code.

v2: Fix kernel docs (Laurent)

Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Sandy Huang <hjc@rock-chips.com>
Cc: "Heiko Stübner" <heiko@sntech.de>
Cc: Andy Yan <andy.yan@rock-chips.com>
Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Cc: virtualization@lists.linux.dev
Cc: spice-devel@lists.freedesktop.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-8-ville.syrjala@linux.intel.com
3 months agodrm/malidp: Pass along the format info from .fb_create() malidp_verify_afbc_framebuff...
Ville Syrjälä [Tue, 1 Jul 2025 09:07:09 +0000 (12:07 +0300)]
drm/malidp: Pass along the format info from .fb_create() malidp_verify_afbc_framebuffer_size()

Plumb the format info from .fb_create() all the way to
malidp_verify_afbc_framebuffer_size() to avoid the
redundant lookup.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-7-ville.syrjala@linux.intel.com
3 months agodrm: Allow the caller to pass in the format info to drm_helper_mode_fill_fb_struct()
Ville Syrjälä [Tue, 1 Jul 2025 09:07:08 +0000 (12:07 +0300)]
drm: Allow the caller to pass in the format info to drm_helper_mode_fill_fb_struct()

Soon all drivers should have the format info already available in the
places where they call drm_helper_mode_fill_fb_struct(). Allow it to
be passed along into drm_helper_mode_fill_fb_struct() instead of doing
yet another redundant lookup.

Start by always passing in NULL and still doing the extra lookup.
The actual changes to avoid the lookup will follow.

Done with cocci (with some manual fixups):
@@
identifier dev, fb, mode_cmd;
expression get_format_info;
@@
void drm_helper_mode_fill_fb_struct(struct drm_device *dev,
                                    struct drm_framebuffer *fb,
+                                    const struct drm_format_info *info,
                                    const struct drm_mode_fb_cmd2 *mode_cmd)
{
...
- fb->format = get_format_info;
+ fb->format = info ?: get_format_info;
...
}

@@
identifier dev, fb, mode_cmd;
@@
void drm_helper_mode_fill_fb_struct(struct drm_device *dev,
                                    struct drm_framebuffer *fb,
+                                    const struct drm_format_info *info,
                                    const struct drm_mode_fb_cmd2 *mode_cmd);

@@
expression dev, fb, mode_cmd;
@@
drm_helper_mode_fill_fb_struct(dev, fb
+        ,NULL
       ,mode_cmd);

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: Dmitry Baryshkov <lumag@kernel.org>
Cc: Sean Paul <sean@poorly.run>
Cc: Marijn Suijten <marijn.suijten@somainline.org>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Mikko Perttunen <mperttunen@nvidia.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Gurchetan Singh <gurchetansingh@chromium.org>
Cc: Chia-I Wu <olvaffe@gmail.com>
Cc: Zack Rusin <zack.rusin@broadcom.com>
Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: linux-tegra@vger.kernel.org
Cc: virtualization@lists.linux.dev
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-6-ville.syrjala@linux.intel.com
3 months agodrm: Pass the format info to .fb_create()
Ville Syrjälä [Tue, 1 Jul 2025 09:07:07 +0000 (12:07 +0300)]
drm: Pass the format info to .fb_create()

Pass along the format information from the top to .fb_create()
so that we can avoid redundant (and somewhat expensive) lookups
in the drivers.

Done with cocci (with some manual fixups):
@@
identifier func =~ ".*create.*";
identifier dev, file, mode_cmd;
@@
struct drm_framebuffer *func(
       struct drm_device *dev,
       struct drm_file *file,
+      const struct drm_format_info *info,
       const struct drm_mode_fb_cmd2 *mode_cmd)
{
...
(
- const struct drm_format_info *info = drm_get_format_info(...);
|
- const struct drm_format_info *info;
...
- info = drm_get_format_info(...);
)
<...
- if (!info)
-    return ...;
...>
}

@@
identifier func =~ ".*create.*";
identifier dev, file, mode_cmd;
@@
struct drm_framebuffer *func(
       struct drm_device *dev,
       struct drm_file *file,
+      const struct drm_format_info *info,
       const struct drm_mode_fb_cmd2 *mode_cmd)
{
...
}

@find@
identifier fb_create_func =~ ".*create.*";
identifier dev, file, mode_cmd;
@@
struct drm_framebuffer *fb_create_func(
       struct drm_device *dev,
       struct drm_file *file,
+      const struct drm_format_info *info,
       const struct drm_mode_fb_cmd2 *mode_cmd);

@@
identifier find.fb_create_func;
expression dev, file, mode_cmd;
@@
fb_create_func(dev, file
+        ,info
       ,mode_cmd)

@@
expression dev, file, mode_cmd;
@@
drm_gem_fb_create(dev, file
+        ,info
       ,mode_cmd)

@@
expression dev, file, mode_cmd;
@@
drm_gem_fb_create_with_dirty(dev, file
+        ,info
       ,mode_cmd)

@@
expression dev, file_priv, mode_cmd;
identifier info, fb;
@@
info = drm_get_format_info(...);
...
fb = dev->mode_config.funcs->fb_create(dev, file_priv
+                                      ,info
                                       ,mode_cmd);

@@
identifier dev, file_priv, mode_cmd;
@@
struct drm_mode_config_funcs {
...
struct drm_framebuffer *(*fb_create)(struct drm_device *dev,
                                     struct drm_file *file_priv,
+                                     const struct drm_format_info *info,
                                     const struct drm_mode_fb_cmd2 *mode_cmd);
...
};

v2: Fix kernel docs (Laurent)
    Fix commit msg (Geert)

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: Dmitry Baryshkov <lumag@kernel.org>
Cc: Sean Paul <sean@poorly.run>
Cc: Marijn Suijten <marijn.suijten@somainline.org>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Agner <stefan@agner.ch>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Cc: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Sandy Huang <hjc@rock-chips.com>
Cc: "Heiko Stübner" <heiko@sntech.de>
Cc: Andy Yan <andy.yan@rock-chips.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Mikko Perttunen <mperttunen@nvidia.com>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: "Maíra Canal" <mcanal@igalia.com>
Cc: Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>
Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Gurchetan Singh <gurchetansingh@chromium.org>
Cc: Chia-I Wu <olvaffe@gmail.com>
Cc: Zack Rusin <zack.rusin@broadcom.com>
Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: virtualization@lists.linux.dev
Cc: spice-devel@lists.freedesktop.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-5-ville.syrjala@linux.intel.com
3 months agodrm: Look up the format info earlier
Ville Syrjälä [Tue, 1 Jul 2025 09:07:06 +0000 (12:07 +0300)]
drm: Look up the format info earlier

Look up the format info already in drm_internal_framebuffer_create()
so that we can later pass it along to .fb_create(). Currently various
drivers are doing additional lookups in their .fb_create()
implementations, and these lookups are rather expensive now (given
how many different pixel formats we have).

v2: Fix commit msg (Thomas)

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-4-ville.syrjala@linux.intel.com
3 months agodrm: Pass pixel_format+modifier directly to drm_get_format_info()
Ville Syrjälä [Tue, 1 Jul 2025 09:07:05 +0000 (12:07 +0300)]
drm: Pass pixel_format+modifier directly to drm_get_format_info()

Decouple drm_get_format_info() from struct drm_mode_fb_cmd2 and just
pass the pixel format+modifier combo in by hand.

We may want to use drm_get_format_info() outside of the normal
addfb paths where we won't have a struct drm_mode_fb_cmd2, and
creating a temporary one just for this seems silly.

Done with cocci:
@@
identifier dev, mode_cmd;
@@
struct drm_format_info *
drm_get_format_info(struct drm_device *dev,
-     const struct drm_mode_fb_cmd2 *mode_cmd
+     u32 pixel_format, u64 modifier
          )
{
<...
(
- mode_cmd->pixel_format
+ pixel_format
|
- mode_cmd->modifier[0]
+ modifier
)
...>
}

@@
identifier dev, mode_cmd;
@@
struct drm_format_info *
drm_get_format_info(struct drm_device *dev,
-     const struct drm_mode_fb_cmd2 *mode_cmd
+     u32 pixel_format, u64 modifier
          );

@@
expression dev, mode_cmd;
@@
- drm_get_format_info(dev, mode_cmd)
+ drm_get_format_info(dev, mode_cmd->pixel_format, mode_cmd->modifier[0])

v2: Fix kernel docs (Laurent)
    Drop drm_mode_fb_cmd2 forward declaration (Thomas)

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: Dmitry Baryshkov <lumag@kernel.org>
Cc: Sean Paul <sean@poorly.run>
Cc: Marijn Suijten <marijn.suijten@somainline.org>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Agner <stefan@agner.ch>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Sandy Huang <hjc@rock-chips.com>
Cc: "Heiko Stübner" <heiko@sntech.de>
Cc: Andy Yan <andy.yan@rock-chips.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Mikko Perttunen <mperttunen@nvidia.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org
Cc: linux-tegra@vger.kernel.org
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-3-ville.syrjala@linux.intel.com
3 months agodrm: Pass pixel_format+modifier to .get_format_info()
Ville Syrjälä [Tue, 1 Jul 2025 09:07:04 +0000 (12:07 +0300)]
drm: Pass pixel_format+modifier to .get_format_info()

Decouple .get_format_info() from struct drm_mode_fb_cmd2 and just
pass the pixel format+modifier combo in by hand.

We may want to use .get_format_info() outside of the normal
addfb paths where we won't have a struct drm_mode_fb_cmd2, and
creating a temporary one just for this seems silly.

v2: Fix intel_fb_get_format_info() docs (Laurent)

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Rodrigo Siqueira <siqueira@igalia.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-2-ville.syrjala@linux.intel.com
3 months agodrm/tests: edid: Add edid-decode --check output
Maxime Ripard [Wed, 25 Jun 2025 15:14:37 +0000 (17:14 +0200)]
drm/tests: edid: Add edid-decode --check output

Some of our EDIDs are (rightfully) invalid, but most of them should be
valid.

Let's add the edid-decode --check of these EDIDs when they were
generated, so we know what to expect going forward, and a comment to
explicitly mention when we expect them to be broken.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250625-drm-update-edid-v1-3-2d963743ab9e@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/tests: edid: Update CTA-861 HDMI Vendor Specific Data Block
Maxime Ripard [Wed, 25 Jun 2025 15:14:36 +0000 (17:14 +0200)]
drm/tests: edid: Update CTA-861 HDMI Vendor Specific Data Block

For some reason, the HDMI VSDBs in our kunit EDIDs had a length longer
than expected.

While this was harmless, we should get rid of it to make it somewhat
predictable.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250625-drm-update-edid-v1-2-2d963743ab9e@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/tests: edid: Fix monitor range limits
Maxime Ripard [Wed, 25 Jun 2025 15:14:35 +0000 (17:14 +0200)]
drm/tests: edid: Fix monitor range limits

For some reason, some EDIDs used by kunit had Monitor Range Limits
making no sense, and not matching the edid-decode output in the comment.

While they were in the comments as:
    Display Range Limits:
      Monitor ranges (GTF): 50-70 Hz V, 30-70 kHz H, max dotclock 150 MHz

They were actually:
    Display Range Limits:
      Monitor ranges (GTF): 50-70 Hz V, 0-0 kHz H, max dotclock 1960 MHz

Fix that section of the EDIDs to match the expected edid-decode output.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250625-drm-update-edid-v1-1-2d963743ab9e@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/panel/boe-himax8279d: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 11 Jul 2025 04:31:25 +0000 (23:31 -0500)]
drm/panel/boe-himax8279d: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-14-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/panel/boe-tv101wum-nl6: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 11 Jul 2025 04:31:24 +0000 (23:31 -0500)]
drm/panel/boe-tv101wum-nl6: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-13-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/panel/himax-hx83102: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 11 Jul 2025 04:31:23 +0000 (23:31 -0500)]
drm/panel/himax-hx83102: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-12-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/panel/ilitek-ili9882t: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 11 Jul 2025 04:31:22 +0000 (23:31 -0500)]
drm/panel/ilitek-ili9882t: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-11-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/panel/lpm102a188a: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 11 Jul 2025 04:31:21 +0000 (23:31 -0500)]
drm/panel/lpm102a188a: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-10-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/panel/jdi-lt070me05000: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 11 Jul 2025 04:31:20 +0000 (23:31 -0500)]
drm/panel/jdi-lt070me05000: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-9-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/panel/khadas-ts050: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 11 Jul 2025 04:31:19 +0000 (23:31 -0500)]
drm/panel/khadas-ts050: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-8-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/panel/kd097d04: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 11 Jul 2025 04:31:18 +0000 (23:31 -0500)]
drm/panel/kd097d04: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-7-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/panel/lg-sw43408: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 11 Jul 2025 04:31:17 +0000 (23:31 -0500)]
drm/panel/lg-sw43408: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-6-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/panel/novatek-nt36672a: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 11 Jul 2025 04:31:16 +0000 (23:31 -0500)]
drm/panel/novatek-nt36672a: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-5-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/panel/osd101t2587-53ts: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 11 Jul 2025 04:31:15 +0000 (23:31 -0500)]
drm/panel/osd101t2587-53ts: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-4-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/panel/vvx10f034n00: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 11 Jul 2025 04:31:14 +0000 (23:31 -0500)]
drm/panel/vvx10f034n00: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-3-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/panel/raspberrypi: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 11 Jul 2025 04:31:13 +0000 (23:31 -0500)]
drm/panel/raspberrypi: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-2-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/panel/lq101r1sx01: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 11 Jul 2025 04:31:12 +0000 (23:31 -0500)]
drm/panel/lq101r1sx01: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-1-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
3 months agodrm/sitronix/st7571-i2c: Add support for the ST7567 Controller
Javier Martinez Canillas [Tue, 15 Jul 2025 11:03:54 +0000 (13:03 +0200)]
drm/sitronix/st7571-i2c: Add support for the ST7567 Controller

The Sitronix ST7567 is a monochrome Dot Matrix LCD Controller that has SPI,
I2C and parallel interfaces. The st7571-i2c driver only has support for I2C
so displays using other transport interfaces are currently not supported.

The DRM_FORMAT_R1 pixel format and data commands are the same than what
is used by the ST7571 controller, so only is needed a different callback
that implements the expected initialization sequence for the ST7567 chip.

Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250715110411.448343-6-javierm@redhat.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
3 months agodt-bindings: display: Add Sitronix ST7567 LCD Controller
Javier Martinez Canillas [Tue, 15 Jul 2025 11:03:53 +0000 (13:03 +0200)]
dt-bindings: display: Add Sitronix ST7567 LCD Controller

Sitronix ST7567 is a monochrome Dot Matrix LCD Controller.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Link: https://lore.kernel.org/r/20250715110411.448343-5-javierm@redhat.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
3 months agodrm/sitronix/st7571-i2c: Add an indirection level to parse DT
Javier Martinez Canillas [Tue, 15 Jul 2025 11:03:52 +0000 (13:03 +0200)]
drm/sitronix/st7571-i2c: Add an indirection level to parse DT

Other Sitronix display controllers might need a different parsing DT
logic, so lets add a .parse_dt callback to struct st7571_panel_data.

Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Link: https://lore.kernel.org/r/20250715110411.448343-4-javierm@redhat.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>