]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
2 months agopanel/samsung-s6e63j0x03: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:21 +0000 (21:46 -0500)] 
panel/samsung-s6e63j0x03: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-19-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/samsung-s6e3ha8: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:20 +0000 (21:46 -0500)] 
panel/samsung-s6e3ha8: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-18-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/samsung-s6e3ha2: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:19 +0000 (21:46 -0500)] 
panel/samsung-s6e3ha2: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-17-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/samsung-s6e3fa7: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:18 +0000 (21:46 -0500)] 
panel/samsung-s6e3fa7: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-16-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/samsung-s6d7aa0: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:17 +0000 (21:46 -0500)] 
panel/samsung-s6d7aa0: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-15-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/samsung-s6d27a1: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:16 +0000 (21:46 -0500)] 
panel/samsung-s6d27a1: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-14-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/samsung-s6d16d0: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:15 +0000 (21:46 -0500)] 
panel/samsung-s6d16d0: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-13-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/samsung-ld9040: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:14 +0000 (21:46 -0500)] 
panel/samsung-ld9040: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-12-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/samsung-db7430: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:13 +0000 (21:46 -0500)] 
panel/samsung-db7430: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-11-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/samsung-atna33xc20: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:12 +0000 (21:46 -0500)] 
panel/samsung-atna33xc20: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-10-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/samsung-ams639rq08: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:11 +0000 (21:46 -0500)] 
panel/samsung-ams639rq08: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-9-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/samsung-ams581vf01: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:10 +0000 (21:46 -0500)] 
panel/samsung-ams581vf01: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-8-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/ronbo-rb070d30: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:09 +0000 (21:46 -0500)] 
panel/ronbo-rb070d30: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-7-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/raydium-rm69380: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:08 +0000 (21:46 -0500)] 
panel/raydium-rm69380: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-6-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/raydium-rm692e5: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:07 +0000 (21:46 -0500)] 
panel/raydium-rm692e5: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-5-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/raydium-rm68200: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:06 +0000 (21:46 -0500)] 
panel/raydium-rm68200: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-4-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/raydium-rm67200: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:05 +0000 (21:46 -0500)] 
panel/raydium-rm67200: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-3-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/raydium-rm67191: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:04 +0000 (21:46 -0500)] 
panel/raydium-rm67191: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-2-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/orisetech-otm8009a: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Fri, 30 May 2025 02:46:03 +0000 (21:46 -0500)] 
panel/orisetech-otm8009a: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-1-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agoaccel/qaic: Add Reliability, Accessibility, Serviceability (RAS)
Jeff Hugo [Fri, 16 May 2025 16:06:34 +0000 (10:06 -0600)] 
accel/qaic: Add Reliability, Accessibility, Serviceability (RAS)

AIC100 devices generates Reliability, Availability, Serviceability events
via MHI QAIC_STATUS channel. Support such events and print a structured
log with details of the events, and if the event describes an uncorrected
error, reset the device to put it back into service. As these events may
not all be reported via other mechanisms like AER, maintain counts of
the number of errors observed for each type.

Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Troy Hanson <quic_thanson@quicinc.com>
Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Link: https://lore.kernel.org/r/20250516160634.1408309-1-jeff.hugo@oss.qualcomm.com
2 months agodrm/gem: Inline drm_gem_pin() into PRIME helpers
Thomas Zimmermann [Mon, 26 May 2025 13:25:20 +0000 (15:25 +0200)] 
drm/gem: Inline drm_gem_pin() into PRIME helpers

Inline drm_gem_pin() into its only caller drm_gem_map_attach()
and update the documentation in the callback's purpose. Do the
equivalent for drm_gem_unpin(). Also add stricter error checking
on the involved locking.

The pin operation in the GEM object functions is a helper for
PRIME-exported buffer objects. Having drm_gem_pin() gives the
impression of a general-purpose interface, which is not the case.
Removing it makes the pin callback a bit harder to misuse.

v2:
- clarify comment on pin callback (Dmitry)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://lore.kernel.org/r/20250526132634.531789-5-tzimmermann@suse.de
2 months agodrm/gem-vram: Un-export pin helpers
Thomas Zimmermann [Mon, 26 May 2025 13:25:19 +0000 (15:25 +0200)] 
drm/gem-vram: Un-export pin helpers

There are no external callers of the gem-vram pin helpers. Hence
unexport them.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://lore.kernel.org/r/20250526132634.531789-4-tzimmermann@suse.de
2 months agodrm/gem-vram: Do not set pin and unpin callbacks
Thomas Zimmermann [Mon, 26 May 2025 13:25:18 +0000 (15:25 +0200)] 
drm/gem-vram: Do not set pin and unpin callbacks

Gem-vram helpers do not support PRIME dma-buf sharing. So nothing
will ever call pin/unpin on its buffer objects. Do not set these
callbacks in struct drm_gem_object_funcs.

v2:
- fix typo in commit description

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://lore.kernel.org/r/20250526132634.531789-3-tzimmermann@suse.de
2 months agodrm/client: Do not pin in drm_client_buffer_vmap()
Thomas Zimmermann [Mon, 26 May 2025 13:25:17 +0000 (15:25 +0200)] 
drm/client: Do not pin in drm_client_buffer_vmap()

Pin and vmap are two distict operations. Do not mix them.

The helper drm_client_buffer_vmap() maps the pages for fbdev-dma
and fbdev-shmem. In both cases, the vmap operation ensures that
the pages are available until the vunmap happens. And as the pages
in DMA or SHMEM areas cannot be moved, there is no reason to call
pin. Hence remove the pin call.

Update drm_client_buffer_vunmap() accordingly.

v2:
- call 'locked' variants of GEM helpers (Dmitry)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://lore.kernel.org/r/20250526132634.531789-2-tzimmermann@suse.de
2 months agodrm: drm_fourcc: add 10/12/16bit software decoder YCbCr formats
Robert Mader [Fri, 9 May 2025 13:35:35 +0000 (15:35 +0200)] 
drm: drm_fourcc: add 10/12/16bit software decoder YCbCr formats

This adds FOURCCs for 3-plane 10/12/16bit YCbCr formats used by software
decoders like ffmpeg, dav1d and libvpx. The intended use-case is buffer
sharing between decoders and GPUs by allocating buffers with e.g. udmabuf
or dma-heaps, avoiding unnecessary copies and format conversions in
various scenarios.

Unlike formats typically used by hardware decoders the 10/12bit formats
use a LSB alignment. In order to allow fast implementations in GL
and Vulkan the padding must contain only zeros, so the float
representation can be calculated by multiplying with 2^6=64 or 2^4=16
respectively.

MRs or branches for Mesa, Vulkan, Gstreamer, Weston and Mutter can be found at:
 - https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34303
 - https://github.com/rmader/Vulkan-Docs/commits/ycbcr-16bit-lsb-formats/
 - https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8540
 - https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1753
 - https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4348

The naming scheme follows the 'P' and 'Q' formats. The 'S' stands for
'software' and was selected in order to make remembering easy.

The 'Sx16' formats could as well be 'Qx16'. We stick with 'S' as 16bit software
decoders are likely much more common than hardware ones for the foreseeable
future. Note that these formats already have Vulkan equivalents:
 - VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM
 - VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM
 - VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM

Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Link: https://lore.kernel.org/r/20250509133535.60330-1-robert.mader@collabora.com
Signed-off-by: Daniel Stone <daniels@collabora.com>
2 months agodrm/xe: Fix NPD when saving default context
Lucas De Marchi [Wed, 28 May 2025 21:42:22 +0000 (14:42 -0700)] 
drm/xe: Fix NPD when saving default context

xef is only valid if it's a job from userspace.  For in-kernel jobs it
causes a NPD like below:

        <4> [] RIP: 0010:xe_sched_job_create+0xbd/0x390 [xe]
...
        <4> [] Call Trace:
        <4> []  <TASK>
        <4> []  __xe_bb_create_job+0xa2/0x240 [xe]
        <4> []  ? find_held_lock+0x31/0x90
        <4> []  ? xa_find_after+0x12c/0x250
        <4> []  xe_bb_create_job+0x6e/0x380 [xe]
        <4> []  ? xa_find_after+0x136/0x250
        <4> []  ? __drm_dev_dbg+0x7d/0xb0
        <4> []  xe_gt_record_default_lrcs+0x542/0xb00 [xe]

Since drm_file starts with 1 for the unique id, just use 0 for the
in-kernel jobs.

Fixes: 2956554823ce ("drm/sched: Store the drm client_id in drm_sched_fence")
Cc: Christian König <christian.koenig@amd.com>
Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Cc: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250528-fix-sched-v1-1-c042ef23ff8b@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/vkms: Add support for DRM_FORMAT_R*
Louis Chauvet [Tue, 15 Apr 2025 13:55:39 +0000 (15:55 +0200)] 
drm/vkms: Add support for DRM_FORMAT_R*

This add the support for:
- R1/R2/R4/R8

R1 format was tested with [1] and [2].

[1]: https://lore.kernel.org/r/20240313-new_rotation-v2-0-6230fd5cae59@bootlin.com
[2]: https://lore.kernel.org/igt-dev/20240306-b4-kms_tests-v1-0-8fe451efd2ac@bootlin.com/

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250415-yuv-v18-8-f2918f71ec4b@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
2 months agodrm/vkms: Add how to run the Kunit tests
Arthur Grillo [Tue, 15 Apr 2025 13:55:38 +0000 (15:55 +0200)] 
drm/vkms: Add how to run the Kunit tests

Now that we have KUnit tests, add instructions on how to run them.

Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250415-yuv-v18-7-f2918f71ec4b@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
2 months agodrm/vkms: Create KUnit tests for YUV conversions
Arthur Grillo [Tue, 15 Apr 2025 13:55:37 +0000 (15:55 +0200)] 
drm/vkms: Create KUnit tests for YUV conversions

Create KUnit tests to test the conversion between YUV and RGB. Test each
conversion and range combination with some common colors.

The code used to compute the expected result can be found in comment.

[Louis Chauvet:
- fix minor formating issues (whitespace, double line)
- change expected alpha from 0x0000 to 0xffff
- adapt to the new get_conversion_matrix usage
- apply the changes from Arthur
- move struct pixel_yuv_u8 to the test itself]

Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250415-yuv-v18-6-f2918f71ec4b@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
2 months agodrm: Export symbols to use in tests
Louis Chauvet [Tue, 15 Apr 2025 13:55:36 +0000 (15:55 +0200)] 
drm: Export symbols to use in tests

The functions drm_get_color_encoding_name and drm_get_color_range_name
are useful for clarifying test results. Therefore, export them so they
can be used in tests built as modules.

Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250415-yuv-v18-5-f2918f71ec4b@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
2 months agodrm/vkms: Drop YUV formats TODO
Arthur Grillo [Tue, 15 Apr 2025 13:55:35 +0000 (15:55 +0200)] 
drm/vkms: Drop YUV formats TODO

VKMS has support for YUV formats now. Remove the task from the TODO
list.

Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250415-yuv-v18-4-f2918f71ec4b@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
2 months agodrm/vkms: Add range and encoding properties to the plane
Arthur Grillo [Tue, 15 Apr 2025 13:55:34 +0000 (15:55 +0200)] 
drm/vkms: Add range and encoding properties to the plane

Now that the driver internally handles these quantization ranges and YUV
encoding matrices, expose the UAPI for setting them.

Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
[Louis Chauvet: retained only relevant parts, updated the commit message]
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250415-yuv-v18-3-f2918f71ec4b@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
2 months agodrm/vkms: Add YUV support
Arthur Grillo [Tue, 15 Apr 2025 13:55:33 +0000 (15:55 +0200)] 
drm/vkms: Add YUV support

Add support to the YUV formats bellow:

- NV12/NV16/NV24
- NV21/NV61/NV42
- YUV420/YUV422/YUV444
- YVU420/YVU422/YVU444

The conversion from yuv to rgb is done with fixed-point arithmetic, using
32.32 fixed-point numbers and the drm_fixed helpers.

To do the conversion, a specific matrix must be used for each color range
(DRM_COLOR_*_RANGE) and encoding (DRM_COLOR_*). This matrix is stored in
the `conversion_matrix` struct, along with the specific y_offset needed.
This matrix is queried only once, in `vkms_plane_atomic_update` and
stored in a `vkms_plane_state`. Those conversion matrices of each
encoding and range were obtained by rounding the values of the original
conversion matrices multiplied by 2^32. This is done to avoid the use of
floating point operations.

The same reading function is used for YUV and YVU formats. As the only
difference between those two category of formats is the order of field, a
simple swap in conversion matrix columns allows using the same function.

[Louis Chauvet:
- Adapted Arthur's work
- Implemented the read_line_t callbacks for yuv
- add struct conversion_matrix
- store the whole conversion_matrix in the plane state
- remove struct pixel_yuv_u8
- update the commit message
- Merge the modifications from Arthur]

Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250415-yuv-v18-2-f2918f71ec4b@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
2 months agodrm/vkms: Document pixel_argb_u16
Louis Chauvet [Tue, 15 Apr 2025 13:55:32 +0000 (15:55 +0200)] 
drm/vkms: Document pixel_argb_u16

The meaning of each member of the structure was not specified. To clarify
the format used and the reason behind those choices, add some
documentation.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Link: https://lore.kernel.org/r/20250415-yuv-v18-1-f2918f71ec4b@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
2 months agodrm/amdgpu: update trace format to match gpu_scheduler_trace
Pierre-Eric Pelloux-Prayer [Mon, 26 May 2025 12:54:52 +0000 (14:54 +0200)] 
drm/amdgpu: update trace format to match gpu_scheduler_trace

Log fences using the same format for coherency.

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Arvind Yadav <arvind.yadav@amd.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250526125505.2360-11-pierre-eric.pelloux-prayer@amd.com
2 months agodrm/doc: Document some tracepoints as uAPI
Pierre-Eric Pelloux-Prayer [Mon, 26 May 2025 12:54:51 +0000 (14:54 +0200)] 
drm/doc: Document some tracepoints as uAPI

This commit adds a document section in drm-uapi.rst about tracepoints,
and mark the events gpu_scheduler_trace.h as stable uAPI.

The goal is to explicitly state that tools can rely on the fields,
formats and semantics of these events.

Acked-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250526125505.2360-10-pierre-eric.pelloux-prayer@amd.com
2 months agodrm: Get rid of drm_sched_job.id
Pierre-Eric Pelloux-Prayer [Mon, 26 May 2025 12:54:50 +0000 (14:54 +0200)] 
drm: Get rid of drm_sched_job.id

Its only purpose was for trace events, but jobs can already be
uniquely identified using their fence.

The downside of using the fence is that it's only available
after 'drm_sched_job_arm' was called which is true for all trace
events that used job.id so they can safely switch to using it.

Suggested-by: Tvrtko Ursulin <tursulin@igalia.com>
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Arvind Yadav <arvind.yadav@amd.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250526125505.2360-9-pierre-eric.pelloux-prayer@amd.com
2 months agodrm/sched: Cleanup event names
Pierre-Eric Pelloux-Prayer [Mon, 26 May 2025 12:54:49 +0000 (14:54 +0200)] 
drm/sched: Cleanup event names

All events now start with the same prefix (drm_sched_job_).

drm_sched_job_wait_dep was misleading because it wasn't waiting
at all. It's now replaced by trace_drm_sched_job_unschedulable,
which is only traced if the job cannot be scheduled.
For moot dependencies, nothing is traced.

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250526125505.2360-8-pierre-eric.pelloux-prayer@amd.com
2 months agodrm/sched: Add the drm_client_id to the drm_sched_run/exec_job events
Pierre-Eric Pelloux-Prayer [Mon, 26 May 2025 12:54:48 +0000 (14:54 +0200)] 
drm/sched: Add the drm_client_id to the drm_sched_run/exec_job events

For processes with multiple drm_file instances, the drm_client_id is
the only way to map jobs back to their unique owner.

It's even more useful if drm client_name is set, because now a tool
can map jobs to the client name instead of only having access to
the process name.

Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Philipp Stanner <phasta@kernel.org>
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250526125505.2360-7-pierre-eric.pelloux-prayer@amd.com
2 months agodrm/sched: Trace dependencies for GPU jobs
Pierre-Eric Pelloux-Prayer [Mon, 26 May 2025 12:54:47 +0000 (14:54 +0200)] 
drm/sched: Trace dependencies for GPU jobs

We can't trace dependencies from drm_sched_job_add_dependency
because when it's called the job's fence is not available yet.

So instead each dependency is traced individually when
drm_sched_entity_push_job is used.

Tracing the dependencies allows tools to analyze the dependencies
between the jobs (previously it was only possible for fences
traced by drm_sched_job_wait_dep).

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250526125505.2360-6-pierre-eric.pelloux-prayer@amd.com
2 months agodrm/sched: Cleanup gpu_scheduler trace events
Pierre-Eric Pelloux-Prayer [Mon, 26 May 2025 12:54:46 +0000 (14:54 +0200)] 
drm/sched: Cleanup gpu_scheduler trace events

A fence uniquely identify a job, so this commits updates the places
where a kernel pointer was used as an identifier by:

   "fence=%llu:%llu"

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250526125505.2360-5-pierre-eric.pelloux-prayer@amd.com
2 months agodrm/sched: Add device name to the drm_sched_process_job event
Pierre-Eric Pelloux-Prayer [Mon, 26 May 2025 12:54:45 +0000 (14:54 +0200)] 
drm/sched: Add device name to the drm_sched_process_job event

Since switching the scheduler from using kthreads to workqueues in
commit a6149f039369 ("drm/sched: Convert drm scheduler to use a work
queue rather than kthread") userspace applications cannot determine
the device from the PID of the threads sending the trace events
anymore.

Each queue had its own kthread which had a given PID for the whole
time. So, at least for amdgpu, it was possible to associate a PID
to the hardware queues of each GPU in the system. Then, when a
drm_run_job trace event was received by userspace, the source PID
allowed to associate it back to the correct GPU.

With workqueues this is not possible anymore, so the event needs to
contain the dev_name() to identify the device.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250526125505.2360-4-pierre-eric.pelloux-prayer@amd.com
2 months agodrm/sched: Store the drm client_id in drm_sched_fence
Pierre-Eric Pelloux-Prayer [Mon, 26 May 2025 12:54:44 +0000 (14:54 +0200)] 
drm/sched: Store the drm client_id in drm_sched_fence

This will be used in a later commit to trace the drm client_id in
some of the gpu_scheduler trace events.

This requires changing all the users of drm_sched_job_init to
add an extra parameter.

The newly added drm_client_id field in the drm_sched_fence is a bit
of a duplicate of the owner one. One suggestion I received was to
merge those 2 fields - this can't be done right now as amdgpu uses
some special values (AMDGPU_FENCE_OWNER_*) that can't really be
translated into a client id. Christian is working on getting rid of
those; when it's done we should be able to squash owner/drm_client_id
together.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250526125505.2360-3-pierre-eric.pelloux-prayer@amd.com
2 months agodrm/debugfs: Output client_id in in drm_clients_info
Pierre-Eric Pelloux-Prayer [Mon, 26 May 2025 12:54:43 +0000 (14:54 +0200)] 
drm/debugfs: Output client_id in in drm_clients_info

client_id is a unique id used by fdinfo. Having it listed in 'clients'
output means a userspace application can correlate the fields, eg:
given a fdinfo id get the fdinfo name.

Geiven that client_id is a uint64_t, we use a %20llu printf format to
keep the output aligned (20 = digit count of the biggest uint64_t).

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250526125505.2360-2-pierre-eric.pelloux-prayer@amd.com
2 months agodrm/bridge: adv7511: Rename adv7511_dsi_config_timing_gen() into adv7533_dsi_config_t...
Tommaso Merciai [Wed, 28 May 2025 07:04:38 +0000 (09:04 +0200)] 
drm/bridge: adv7511: Rename adv7511_dsi_config_timing_gen() into adv7533_dsi_config_timing_gen()

To preserve the drivers naming convention rename
adv7511_dsi_config_timing_gen() into adv7533_dsi_config_timing_gen()

Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250528070452.901183-3-tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/bridge: adv7511: Move adv711_dsi_config_timing_gen() into adv7511_mode_set()
Tommaso Merciai [Wed, 28 May 2025 07:04:37 +0000 (09:04 +0200)] 
drm/bridge: adv7511: Move adv711_dsi_config_timing_gen() into adv7511_mode_set()

adv7511_mode_set() currently updates only the sync registers of the ADV
bridge. At the end, drm_mode_copy() updates the current mode, but the
horizontal and vertical porch registers of the ADV bridge still retain
values from the old mode.

Move adv7511_dsi_config_timing_gen() into adv7511_mode_set() to ensure
the horizontal and vertical porch registers are correctly updated.

Fixes: ae01d3183d2763ed ("drm/bridge: adv7511: switch to the HDMI connector helpers")
Reported-by: Biju Das <biju.das.jz@bp.renesas.com>
Closes: https://lore.kernel.org/all/aDB8bD6cF7qiSpKd@tom-desktop/
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Tested-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250528070452.901183-2-tommaso.merciai.xr@bp.renesas.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/panel-edp: add N160JCE-ELL CMN panel for Lenovo Thinkbook 16
Jens Glathe [Sat, 24 May 2025 11:48:37 +0000 (13:48 +0200)] 
drm/panel-edp: add N160JCE-ELL CMN panel for Lenovo Thinkbook 16

Panel is widely used in 16" laptops, and also in my Thinkbook 16 G7 QOY.

CMN N160JCE-ELL EDID
edid-decode (hex):

00 ff ff ff ff ff ff 00 0d ae 2b 16 00 00 00 00
20 20 01 04 a5 22 16 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 58 d7 10 00 00 18 35 30 80 a0 70 b0 24 40
30 20 a6 00 58 d7 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 4e 31 36 30 4a 43 45 2d 45 4c 4c 0a 20 00 95

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250524-tb16-dt-v4-2-2c1e6018d3f0@oldschoolsolutions.biz
2 months agodrm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:44 +0000 (15:53 +0200)] 
drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

This driver embeds an array of channels in the main struct, and each
channel embeds a drm_bridge. This prevents dynamic, refcount-based
deallocation of the bridges.

To make the new, dynamic bridge allocation possible:

 * change the array of channels into an array of channel pointers
 * allocate each channel using devm_drm_bridge_alloc()
 * adapt the code wherever using the channels
 * remove the is_available flag, now "ch != NULL" is equivalent

Reviewed-by: Liu Ying <victor.liu@nxp.com>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-18-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/sitronix: Remove broken backwards-compatibility layer
Geert Uytterhoeven [Tue, 20 May 2025 14:33:59 +0000 (16:33 +0200)] 
drm/sitronix: Remove broken backwards-compatibility layer

When moving the Sitronix DRM drivers and renaming their Kconfig symbols,
the old symbols were kept, aiming to provide a seamless migration path
when running "make olddefconfig" or "make oldconfig".

However, the old compatibility symbols are not visible.  Hence unless
they are selected by another symbol (which they are not), they can never
be enabled, and no backwards compatibility is provided.

Drop the broken mechanism and the old symbols.

Fixes: 9b8f32002cddf792 ("drm/sitronix: move tiny Sitronix drivers to their own subdir")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20395b14effe5e2e05a4f0856fdcda51c410329d.1747751592.git.geert+renesas@glider.be
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2 months agodrm/ttm: make ttm_bo_get internal
Christian König [Tue, 16 Jul 2024 12:28:40 +0000 (14:28 +0200)] 
drm/ttm: make ttm_bo_get internal

Prevent drivers from using this directly.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
Link: https://lore.kernel.org/r/20240723121750.2086-8-christian.koenig@amd.com
2 months agodrm/ttm: revert "Export ttm_bo_get_unless_zero()"
Christian König [Fri, 12 Jul 2024 07:43:24 +0000 (09:43 +0200)] 
drm/ttm: revert "Export ttm_bo_get_unless_zero()"

This reverts commit 24dc64c1ba5c3ef0463d59fef6df09336754188d.

Shouldn't be needed by drivers any more.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
Link: https://lore.kernel.org/r/20240723121750.2086-6-christian.koenig@amd.com
2 months agodrm/vesadrm: Use helpers for programming gamma ramps
Thomas Zimmermann [Tue, 20 May 2025 09:40:07 +0000 (11:40 +0200)] 
drm/vesadrm: Use helpers for programming gamma ramps

Replace vesadrm's code for programming the hardware gamma LUT with
DRM helpers. Either load a provided gamma ramp or program a default.
Set the individual entries with a callback.

Each gamma value is given as 3 individual 16-bit values for red,
green and blue. The driver reduces them to 8 bit to make them fit
into hardware registers.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250520094203.30545-6-tzimmermann@suse.de
2 months agodrm/ofdrm: Use helpers for programming gamma ramps
Thomas Zimmermann [Tue, 20 May 2025 09:40:06 +0000 (11:40 +0200)] 
drm/ofdrm: Use helpers for programming gamma ramps

Replace ofdrm's code for programming the hardware gamma LUT with
DRM helpers. Either load a provided gamma ramp or program a default.
Set the individual entries with a callback.

Each gamma value is given as 3 individual 16-bit values for red,
green and blue. The driver reduces them to 8 bit to make them fit
into hardware registers.

v2:
- fix coding style

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250520094203.30545-5-tzimmermann@suse.de
2 months agodrm/mgag200: Use helpers for programming gamma ramps
Thomas Zimmermann [Tue, 20 May 2025 09:40:05 +0000 (11:40 +0200)] 
drm/mgag200: Use helpers for programming gamma ramps

Replace mgag200's code for programming the hardware gamma LUT with
DRM helpers. Either load a provided gamma ramp or program a default.
Set the individual entries with a callback.

Each gamma value is given as 3 individual 16-bit values for red,
green and blue. The driver reduces them to 8 bit to make them fit
into hardware registers.

v2:
- fix coding style

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250520094203.30545-4-tzimmermann@suse.de
2 months agodrm/ast: Use helpers for programming gamma ramps and palettes
Thomas Zimmermann [Tue, 20 May 2025 09:40:04 +0000 (11:40 +0200)] 
drm/ast: Use helpers for programming gamma ramps and palettes

Replace ast's code for programming the hardware gamma/palette LUT
with DRM helpers. Either load provided data or program a default.
Set the individual entries with a callback.

Each gamma/palette value is given as 3 individual 16-bit values
for red, green and blue. The driver reduces them to 8 bit to make
them fit into hardware registers.

v3:
- fix tags (Javier)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250520094203.30545-3-tzimmermann@suse.de
2 months agodrm: Add helpers for programming hardware gamma LUTs
Thomas Zimmermann [Tue, 20 May 2025 09:40:03 +0000 (11:40 +0200)] 
drm: Add helpers for programming hardware gamma LUTs

Provide helpers that program hardware gamma LUTs. Tha gamma ramp is
either provided by the driver or generated by the helper.

The DRM driver exports the GAMMA_LUT property with a fixed number of
entries per color component, such as 256 on 8-bit-wide components. The
entries describe the gamma ramp of each individual component. The new
helper drm_crtc_load_gamma_888() loads such gamma ramp to hardware. The
hardware uses each displayed pixel's individial components as indices
into the hardware gamma table.

For color modes with less than 8 bits per color component, the helpers
drm_crtc_load_gamma_565_from() and drm_crtc_load_gamma_555_from_888()
interpolate the provided gamma ramp to reduce it to the correct number
of entries; 5/6/5 for RGB565-like formats and 5/5/5 for XRGB1555-like
formats.

If no gamma ramp has been provided, drivers can use the new helper
drm_crtc_fill_gamma_888() to load a default gamma ramp with 256 entries
per color component. For color modes with less bits, the new helpers
drm_crtc_fill_gamma_565() and drm_crtc_fill_gamma_555() are available.
The default gamma ramp uses a gamma factor of 1.

For color modes with palette, drm_crtc_load_palette_8() load an 8-bit
palette into the hardware. If no palette has been specified,
drm_crtc_fill_palette_8() load a system-specific default palette. This
is currently only a grey-scale palette with increasing luminance, but
later patches can change this. For PCs, a VGA default palette could
be used.

v2:
- drop comment on gamma factor of 2.2 (Michel, Pekka)
- fix typos in commit description (Javier)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250520094203.30545-2-tzimmermann@suse.de
2 months agodrm/gem-framebuffer: log errors when gem size < afbc_size
Andy Yan [Thu, 8 May 2025 08:47:57 +0000 (16:47 +0800)] 
drm/gem-framebuffer: log errors when gem size < afbc_size

Let the user know what went wrong in drm_gem_fb_afbc_init
failure paths.

Signed-off-by: Andy Yan <andyshrk@163.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250508084811.2472877-1-andyshrk@163.com
2 months agodrm: drm_auth: Convert mutex usage to guard(mutex)
André Almeida [Fri, 9 May 2025 14:26:27 +0000 (11:26 -0300)] 
drm: drm_auth: Convert mutex usage to guard(mutex)

Replace open-coded mutex handling with cleanup.h guard(mutex). This
simplifies the code and removes the "goto unlock" pattern.

Tested with igt tests core_auth and core_setmaster.

Signed-off-by: André Almeida <andrealmeid@igalia.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250509142627.639419-1-andrealmeid@igalia.com
2 months agodrm: renesas: rz-du: Add support for RZ/V2H(P) SoC
Lad Prabhakar [Mon, 12 May 2025 18:23:20 +0000 (19:23 +0100)] 
drm: renesas: rz-du: Add support for RZ/V2H(P) SoC

The LCD controller (LCDC) on the RZ/V2H(P) SoC is composed of Frame
Compression Processor (FCPVD), Video Signal Processor (VSPD), and
Display Unit (DU).

There is one LCDC unit available on the RZ/V2H(P) SoC which is connected
to the DSI.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20250512182330.238259-3-prabhakar.mahadev-lad.rj@bp.renesas.com
2 months agodt-bindings: display: renesas,rzg2l-du: Add support for RZ/V2H(P) SoC
Lad Prabhakar [Mon, 12 May 2025 18:23:19 +0000 (19:23 +0100)] 
dt-bindings: display: renesas,rzg2l-du: Add support for RZ/V2H(P) SoC

The DU block on the RZ/V2H(P) SoC is identical to the one found on the
RZ/G2L SoC. However, it only supports the DSI interface, whereas the
RZ/G2L supports both DSI and DPI interfaces.

Due to this difference, a SoC-specific compatible string
'renesas,r9a09g057-du' is added for the RZ/V2H(P) SoC.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20250512182330.238259-2-prabhakar.mahadev-lad.rj@bp.renesas.com
2 months agodrm: renesas: rz-du: Add atomic_pre_enable
Chris Brandt [Wed, 21 May 2025 21:03:35 +0000 (17:03 -0400)] 
drm: renesas: rz-du: Add atomic_pre_enable

When drm_panel.prepare_prev_first is set to true in a panel driver, the
panel expects the MIPI DSI hardware to be already configured before the
panel's prepare function is called because it might need to send DCS
commands.

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Tested-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20250521210335.3149065-1-chris.brandt@renesas.com
2 months agodrm: panel: Add support for Renesas R69328 based MIPI DSI panel
Maxim Schwalm [Tue, 6 May 2025 09:27:18 +0000 (12:27 +0300)] 
drm: panel: Add support for Renesas R69328 based MIPI DSI panel

Driver adds support for panels with Renesas R69328 IC

Currently supported compatible is:
- jdi,dx12d100vm0eaa

Co-developed-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Maxim Schwalm <maxim.schwalm@gmail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250506092718.106088-5-clamor95@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodt-bindings: display: panel: Document Renesas R69328 based DSI panel
Svyatoslav Ryhel [Tue, 6 May 2025 09:27:17 +0000 (12:27 +0300)] 
dt-bindings: display: panel: Document Renesas R69328 based DSI panel

R69328 is liquid crystal driver for high-definition amorphous silicon
(a-Si) panels and is ideal for tablets and smartphones.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250506092718.106088-4-clamor95@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm: panel: Add support for Renesas R61307 based MIPI DSI panel
Svyatoslav Ryhel [Tue, 6 May 2025 09:27:16 +0000 (12:27 +0300)] 
drm: panel: Add support for Renesas R61307 based MIPI DSI panel

R61307 is liquid crystal driver for high-definition amorphous silicon
(a-Si) panels and is ideal for tablets and smartphones.

Supported compatibles are:
- hit,tx13d100vm0eaa
- koe,tx13d100vm0eaa

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250506092718.106088-3-clamor95@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodt-bindings: display: panel: Document Renesas R61307 based DSI panel
Svyatoslav Ryhel [Tue, 6 May 2025 09:27:15 +0000 (12:27 +0300)] 
dt-bindings: display: panel: Document Renesas R61307 based DSI panel

R61307 is liquid crystal driver for high-definition amorphous silicon
(a-Si) panels and is ideal for tablets and smartphones.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250506092718.106088-2-clamor95@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/todo: add entry to remove devm_drm_put_bridge()
Luca Ceresoli [Fri, 9 May 2025 13:53:48 +0000 (15:53 +0200)] 
drm/todo: add entry to remove devm_drm_put_bridge()

devm_drm_put_bridge() is a temporary workaround waiting for the panel
bridge lifetime rework. Add a TODO entry to not forget it must be removed
after such rework.

Suggested-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-22-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:28 +0000 (15:53 +0200)] 
drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API

devm_drm_bridge_alloc() is the new API to be used for allocating (and
partially initializing) a private driver struct embedding a struct
drm_bridge.

For many drivers having a simple code flow in the probe function, this
commit does a mass conversion automatically with the following semantic
patch. The changes have been reviewed manually for correctness as well as
to find any false positives.

The patch has been applied with the explicit exclusion of bridge/panel.c,
handled by a separate patch.

After applying the semantic patch, manually fixed these issues:

 - 4 drivers need ERR_CAST() instead of PTR_ERR() as the function calling
   devm_drm_bridge_alloc() returns a pointer
 - re-added empty lines and comments that the script had removed but that
   should stay

  @@
  type T;
  identifier C;
  identifier BR;
  expression DEV;
  expression FUNCS;
  @@
  -T *C;
  +T *C;
   ...
  (
  -C = devm_kzalloc(DEV, ...);
  -if (!C)
  -    return -ENOMEM;
  +C = devm_drm_bridge_alloc(DEV, T, BR, FUNCS);
  +if (IS_ERR(C))
  +     return PTR_ERR(C);
  |
  -C = devm_kzalloc(DEV, ...);
  -if (!C)
  -    return ERR_PTR(-ENOMEM);
  +C = devm_drm_bridge_alloc(DEV, T, BR, FUNCS);
  +if (IS_ERR(C))
  +     return PTR_ERR(C);
  )
   ...
  -C->BR.funcs = FUNCS;

Reviewed-by: Manikandan Muralidharan <manikandan.m@microchip.com> # microchip-lvds.c
Reviewed-by: Douglas Anderson <dianders@chromium.org> # parade-ps8640
Tested-by: Douglas Anderson <dianders@chromium.org> # parade-ps8640
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-2-b8bc1f16d7aa@bootlin.com
[Luca: fixed trivial patch conflict in adv7511_drv.c while applying]
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/panel: abstract of_panel_find()
Jani Nikula [Thu, 22 May 2025 10:00:36 +0000 (13:00 +0300)] 
drm/panel: abstract of_panel_find()

Add a helper to wrap OF-specific calls in drm_panel_add_follower() in
preparation for adding an ACPI equivalent in the future. No functional
changes.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250522100036.2529624-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2 months agodrm: renesas: rcar-du: use proper naming for R-Car
Wolfram Sang [Thu, 22 May 2025 10:34:44 +0000 (12:34 +0200)] 
drm: renesas: rcar-du: use proper naming for R-Car

Not RCAR, but R-Car.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20250522103530.51972-2-wsa+renesas@sang-engineering.com
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
2 months agodrm/bridge: fix build with CONFIG_OF=n
Luca Ceresoli [Thu, 22 May 2025 07:12:58 +0000 (09:12 +0200)] 
drm/bridge: fix build with CONFIG_OF=n

Commit 5164553d739e ("drm/bridge: add devm_drm_put_bridge()") adds two
declarations for devm_drm_put_bridge():

 1) an inline declaration in the #else branch of
    '#if defined(CONFIG_OF)...'
 2) one outside of the same #if

This results in a build failure with CONFIG_OF=n:

  ../drivers/gpu/drm/drm_bridge.c:1406:6: error: redefinition of ‘devm_drm_put_bridge’

The function has nothing to do with OF, thus fix by removing declaration 1.

Fixes: 5164553d739e ("drm/bridge: add devm_drm_put_bridge()")
Reported-by: Ville Syrjala <ville.syrjala@linux.intel.com>
Closes: https://oftc.catirclogs.org/dri-devel/2025-05-21#34288266;
Tested-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Link: https://lore.kernel.org/r/20250522-devm_drm_put_bridge-fix-non-of-build-v1-1-a05234dea046@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/panel-edp: Add KDC KD116N3730A05
Langyan Ye [Wed, 21 May 2025 09:37:43 +0000 (17:37 +0800)] 
drm/panel-edp: Add KDC KD116N3730A05

Add support for the KDC KD116N3730A05, pleace the EDID here for
subsequent reference.

00 ff ff ff ff ff ff 00 2c 83 20 12 00 00 00 00
30 22 01 04 95 1a 0e 78 03 3a 75 9b 5d 5b 96 28
19 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 00 00 00 00 00
00 00 00 00 00 00 00 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 4b 44 31 31 36 4e 33 37 33 30 41 30 35 00 e2

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/20250521093743.1057466-1-yelangyan@huaqin.corp-partner.google.com
2 months agodrm/bridge: panel: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:47 +0000 (15:53 +0200)] 
drm/bridge: panel: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

The devm lifetime management of this driver is peculiar. The underlying
device for the panel_bridge is the panel, and the devm lifetime is tied the
panel device (panel->dev). However the panel_bridge allocation is not
performed by the panel driver, but rather by a separate entity (typically
the previous bridge in the encoder chain).

Thus when that separate entity is destroyed, the panel_bridge is not
removed automatically by devm, so it is rather done explicitly by calling
drm_panel_bridge_remove(). This is the function that does devm_kfree() the
panel_bridge in current code, so update it as well to put the bridge
reference instead.

This is a temporary solution until the panel lifetime is reworked, which
should make this workaround unnecessary, so add a comment to clarify that.

Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-21-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: add devm_drm_put_bridge()
Luca Ceresoli [Fri, 9 May 2025 13:53:46 +0000 (15:53 +0200)] 
drm/bridge: add devm_drm_put_bridge()

Bridges obtained via devm_drm_bridge_alloc(dev, ...) will be put when the
requesting device (@dev) is removed.

However drivers which obtained them may need to put the obtained reference
explicitly. One such case is if they bind the devm removal action to a
different device than the one implemented by the driver itself and which
might be removed at a different time, such as bridge/panel.c.

Add devm_drm_put_bridge() to manually release a devm-obtained bridge in
such cases.

This function is considered only a temporary workaround until the panel
bridge is reworked and should be removed afterwards.

Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-20-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm: zynqmp_dp: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:43 +0000 (15:53 +0200)] 
drm: zynqmp_dp: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

This driver has a peculiar structure. zynqmp_dpsub.c is the actual driver,
which delegates to a submodule (zynqmp_dp.c) the allocation of a
sub-structure embedding the drm_bridge and its initialization, however it
does not delegate the drm_bridge_add(). Hence, following carefully the code
flow, it is correct to change the allocation function and .funcs assignment
in the submodule, while the drm_bridge_add() is not in that submodule.

Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-17-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/sti: dvo: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:42 +0000 (15:53 +0200)] 
drm/sti: dvo: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

This driver allocates the DRM bridge separately from the main driver
private struct, which prevents using the new devm_drm_bridge_alloc()
API. Simplify the code by replacing the struct drm_bridge pointer with an
embedded struct drm_bridge inside the private struct, to make use of the
new API with the same code flow.

Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-16-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: stm_lvds: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:41 +0000 (15:53 +0200)] 
drm/bridge: stm_lvds: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-15-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/rcar-du: dsi: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:40 +0000 (15:53 +0200)] 
drm/rcar-du: dsi: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-14-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/omap: dss: venc: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:39 +0000 (15:53 +0200)] 
drm/omap: dss: venc: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Switching from a non-devm to a devm allocation allows removing the kfree()
in the remove function and in the probe error management code, and as a
consequence to simplify the code flow by removing now unnecessary gotos.

Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-13-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/omap: dss: sdi: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:38 +0000 (15:53 +0200)] 
drm/omap: dss: sdi: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Switching from a non-devm to a devm allocation allows removing the kfree()
in the remove function and in the probe error management code, and as a
consequence to simplify the code flow by removing now unnecessary gotos.

Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-12-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/omap: dss: hdmi5: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:37 +0000 (15:53 +0200)] 
drm/omap: dss: hdmi5: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Switching from a non-devm to a devm allocation allows removing the kfree()
in the remove function and in the probe error management code, and as a
consequence to simplify the code flow by removing now unnecessary gotos.

Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-11-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/omap: dss: hdmi4: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:36 +0000 (15:53 +0200)] 
drm/omap: dss: hdmi4: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Switching from a non-devm to a devm allocation allows removing the kfree()
in the remove function and in the probe error management code, and as a
consequence to simplify the code flow by removing now unnecessary gotos.

Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-10-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/omap: dss: dsi: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:35 +0000 (15:53 +0200)] 
drm/omap: dss: dsi: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-9-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/omap: dss: dpi: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:34 +0000 (15:53 +0200)] 
drm/omap: dss: dpi: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-8-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: sii902x: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:33 +0000 (15:53 +0200)] 
drm/bridge: sii902x: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-7-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: nxp-ptn3460: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:32 +0000 (15:53 +0200)] 
drm/bridge: nxp-ptn3460: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-6-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: megachips-stdpxxxx-ge-b850v3-fw: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:31 +0000 (15:53 +0200)] 
drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-5-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: cdns-dsi: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:30 +0000 (15:53 +0200)] 
drm/bridge: cdns-dsi: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-4-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: anx7625: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Fri, 9 May 2025 13:53:29 +0000 (15:53 +0200)] 
drm/bridge: anx7625: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-3-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agopanel/orisetech-ota5601a: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:04:01 +0000 (22:04 -0500)] 
panel/orisetech-ota5601a: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250520-drivers-mass-convert-part2-v3-30-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/lcd-olinuxino: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:04:00 +0000 (22:04 -0500)] 
panel/lcd-olinuxino: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250520-drivers-mass-convert-part2-v3-29-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/novatek-nt39016: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:59 +0000 (22:03 -0500)] 
panel/novatek-nt39016: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250520-drivers-mass-convert-part2-v3-28-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/novatek-nt36672e: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:58 +0000 (22:03 -0500)] 
panel/novatek-nt36672e: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250520-drivers-mass-convert-part2-v3-27-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/novatek-nt36523: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:57 +0000 (22:03 -0500)] 
panel/novatek-nt36523: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250520-drivers-mass-convert-part2-v3-26-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/novatek-nt35950: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:56 +0000 (22:03 -0500)] 
panel/novatek-nt35950: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250520-drivers-mass-convert-part2-v3-25-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/novatek-nt35560: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:55 +0000 (22:03 -0500)] 
panel/novatek-nt35560: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250520-drivers-mass-convert-part2-v3-24-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/novatek-nt35510: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:54 +0000 (22:03 -0500)] 
panel/novatek-nt35510: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250520-drivers-mass-convert-part2-v3-23-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/newvision-nv3052c: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:53 +0000 (22:03 -0500)] 
panel/newvision-nv3052c: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250520-drivers-mass-convert-part2-v3-22-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/newvision-nv3051d: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:52 +0000 (22:03 -0500)] 
panel/newvision-nv3051d: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250520-drivers-mass-convert-part2-v3-21-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/mantix-mlaf057we51: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:51 +0000 (22:03 -0500)] 
panel/mantix-mlaf057we51: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250520-drivers-mass-convert-part2-v3-20-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/magnachip-d53e6ea8966: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:50 +0000 (22:03 -0500)] 
panel/magnachip-d53e6ea8966: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250520-drivers-mass-convert-part2-v3-19-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>