]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
2 months agodrm/ast: Move Gen2 device initialization into separate helper
Thomas Zimmermann [Mon, 22 Sep 2025 08:36:06 +0000 (10:36 +0200)] 
drm/ast: Move Gen2 device initialization into separate helper

Split off device initialization for Gen2 hardware into the helpers
ast_2100_device_create() and ast_2100_detect_wide_screen(). The new
functions are duplicates of their counterparts in ast_main.c, but
stripped from most non-Gen2 support.

Simplifies maintenance as the driver's number of supported hardware
generations grows.

v2:
- simplify widescreen-detection logic (Jocelyn)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250922083708.45564-7-tzimmermann@suse.de
2 months agodrm/ast: Move Gen1 device initialization into separate helper
Thomas Zimmermann [Mon, 22 Sep 2025 08:36:05 +0000 (10:36 +0200)] 
drm/ast: Move Gen1 device initialization into separate helper

Split off device initialization for Gen1 hardware into the helper
ast_2000_device_create(). The new function is a duplicate of their
counterpart in ast_main.c, but stripped from most non-Gen1 support.

Simplifies maintenance as the driver's number of supported hardware
generations grows.

v2:
- remove unnecessary widescreen-detection logic

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250922083708.45564-6-tzimmermann@suse.de
2 months agodrm/ast: Prepare per-Gen device initialization
Thomas Zimmermann [Mon, 22 Sep 2025 08:36:04 +0000 (10:36 +0200)] 
drm/ast: Prepare per-Gen device initialization

Switch device creation by hardware Gen. Return the value from the
call to ast_detect_chip(). All generations are still initialized
by ast_device_create().

Also add ast_device_init() for setting some common fields in struct
ast_device.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250922083708.45564-5-tzimmermann@suse.de
2 months agodrm/ast: Split ast_detect_tx_chip() per chip generation
Thomas Zimmermann [Mon, 22 Sep 2025 08:36:03 +0000 (10:36 +0200)] 
drm/ast: Split ast_detect_tx_chip() per chip generation

Gen4 and later models detect the TX chip from VGACRD1, while earlier
models detect from VGACRA3. Split up the detection helper into
two separate helpers. Use SZ_ constants instead of plain numbers.

Then inline the call into its only caller ast_device_create(). When
ast_device_create() gets split up per Gen, either call will remain.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250922083708.45564-4-tzimmermann@suse.de
2 months agodrm/ast: Move mode-detection helpers to Gen2 source files
Thomas Zimmermann [Mon, 22 Sep 2025 08:36:02 +0000 (10:36 +0200)] 
drm/ast: Move mode-detection helpers to Gen2 source files

Wide-screen modes are only available on Gen2 and later. Move the
detection helpers to the appropriate source file.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250922083708.45564-3-tzimmermann@suse.de
2 months agodrm/ast: Move display-clock tables to per-Gen source files
Thomas Zimmermann [Mon, 22 Sep 2025 08:36:01 +0000 (10:36 +0200)] 
drm/ast: Move display-clock tables to per-Gen source files

Move display-clock tables to the appropriate per-Gen source files.
The tables are almost identical, except for mode entries 0x17 and
0x1a. Rename to tables to match common style.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250922083708.45564-2-tzimmermann@suse.de
2 months agodrm/bridge: imx: add driver for HDMI TX Parallel Audio Interface
Shengjiu Wang [Tue, 23 Sep 2025 05:29:59 +0000 (13:29 +0800)] 
drm/bridge: imx: add driver for HDMI TX Parallel Audio Interface

The HDMI TX Parallel Audio Interface (HTX_PAI) is a digital module that
acts as the bridge between the Audio Subsystem to the HDMI TX Controller.
This IP block is found in the HDMI subsystem of the i.MX8MP SoC.

Data received from the audio subsystem can have an arbitrary component
ordering. The HTX_PAI block has integrated muxing options to select which
sections of the 32-bit input data word will be mapped to each IEC60958
field. The HTX_PAI_FIELD_CTRL register contains mux selects to
individually select P,C,U,V,Data, and Preamble.

Use component helper so that imx8mp-hdmi-tx will be aggregate driver,
imx8mp-hdmi-pai will be component driver, then imx8mp-hdmi-pai can use
bind() ops to get the plat_data from imx8mp-hdmi-tx device.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Link: https://lore.kernel.org/r/20250923053001.2678596-6-shengjiu.wang@nxp.com
2 months agodrm/bridge: dw-hdmi: Add API dw_hdmi_set_sample_iec958() for iec958 format
Shengjiu Wang [Tue, 23 Sep 2025 05:29:58 +0000 (13:29 +0800)] 
drm/bridge: dw-hdmi: Add API dw_hdmi_set_sample_iec958() for iec958 format

Add API dw_hdmi_set_sample_iec958() for IEC958 format because audio device
driver needs IEC958 information to configure this specific setting.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Liu Ying <victor.liu@nxp.com>
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Link: https://lore.kernel.org/r/20250923053001.2678596-5-shengjiu.wang@nxp.com
2 months agodrm/bridge: dw-hdmi: Add API dw_hdmi_to_plat_data() to get plat_data
Shengjiu Wang [Tue, 23 Sep 2025 05:29:57 +0000 (13:29 +0800)] 
drm/bridge: dw-hdmi: Add API dw_hdmi_to_plat_data() to get plat_data

Add API dw_hdmi_to_plat_data() to fetch plat_data because audio device
driver needs it to enable(disable)_audio().

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Liu Ying <victor.liu@nxp.com>
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Link: https://lore.kernel.org/r/20250923053001.2678596-4-shengjiu.wang@nxp.com
2 months agoALSA: Add definitions for the bits in IEC958 subframe
Shengjiu Wang [Tue, 23 Sep 2025 05:29:56 +0000 (13:29 +0800)] 
ALSA: Add definitions for the bits in IEC958 subframe

The IEC958 subframe format SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE are used
in HDMI and DisplayPort to describe the audio stream, but hardware device
may need to reorder the IEC958 bits for internal transmission, so need
these standard bits definitions for IEC958 subframe format.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Link: https://lore.kernel.org/r/20250923053001.2678596-3-shengjiu.wang@nxp.com
2 months agodt-bindings: display: imx: add HDMI PAI for i.MX8MP
Shengjiu Wang [Tue, 23 Sep 2025 05:29:55 +0000 (13:29 +0800)] 
dt-bindings: display: imx: add HDMI PAI for i.MX8MP

Add binding for the i.MX8MP HDMI parallel Audio interface block.

The HDMI TX Parallel Audio Interface (HTX_PAI) is a digital module that
acts as the bridge between the Audio Subsystem to the HDMI TX Controller.
This IP block is found in the HDMI subsystem of the i.MX8MP SoC.

Aud2htx module in Audio Subsystem, HDMI PAI module and HDMI TX
Controller compose the HDMI audio pipeline.

In fsl,imx8mp-hdmi-tx.yaml, add port@2 that is linked to pai_to_hdmi_tx.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Link: https://lore.kernel.org/r/20250923053001.2678596-2-shengjiu.wang@nxp.com
2 months agodrm/solomon: Enforce one assignment per line
Iker Pedrosa [Sat, 20 Sep 2025 09:45:45 +0000 (11:45 +0200)] 
drm/solomon: Enforce one assignment per line

The code contains several instances of chained assignments. The Linux
kernel coding style generally favors clarity and simplicity over terse
syntax. Refactor the code to use a separate line for each assignment.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
Link: https://lore.kernel.org/r/20250920-improve-ssd130x-v2-5-77721e87ae08@gmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2 months agodrm/solomon: Simplify get_modes() using DRM helper
Iker Pedrosa [Sat, 20 Sep 2025 09:45:44 +0000 (11:45 +0200)] 
drm/solomon: Simplify get_modes() using DRM helper

The ssd130x_connector_get_modes function contains a manual implementation
to manage modes.

This pattern is common for simple displays, and the DRM core already
provides the drm_connector_helper_get_modes_fixed() helper for this exact
use case.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
Link: https://lore.kernel.org/r/20250920-improve-ssd130x-v2-4-77721e87ae08@gmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2 months agodrm/solomon: Simplify mode_valid() using DRM helper
Iker Pedrosa [Sat, 20 Sep 2025 09:45:43 +0000 (11:45 +0200)] 
drm/solomon: Simplify mode_valid() using DRM helper

The ssd130x_crtc_mode_valid() function contains a manual implementation
to validate the display mode against the panel's single fixed resolution.

This pattern is common for simple displays, and the DRM core already
provides the drm_crtc_helper_mode_valid_fixed() helper for this exact
use case.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
Link: https://lore.kernel.org/r/20250920-improve-ssd130x-v2-3-77721e87ae08@gmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2 months agodrm/solomon: Use drm_WARN_ON_ONCE instead of WARN_ON
Iker Pedrosa [Sat, 20 Sep 2025 09:45:42 +0000 (11:45 +0200)] 
drm/solomon: Use drm_WARN_ON_ONCE instead of WARN_ON

To prevent log spam, convert all instances to the DRM-specific
drm_WARN_ON_ONCE() macro. This ensures that a warning is emitted only
the first time the condition is met for a given device instance, which
is the desired behavior within the graphics subsystem.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
Link: https://lore.kernel.org/r/20250920-improve-ssd130x-v2-2-77721e87ae08@gmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2 months agodrm/solomon: Move calls to drm_gem_fb_end_cpu*()
Iker Pedrosa [Sat, 20 Sep 2025 09:45:41 +0000 (11:45 +0200)] 
drm/solomon: Move calls to drm_gem_fb_end_cpu*()

Calls to drm_gem_fb_end_cpu*() should be between the calls to
drm_dev*(), and not hidden inside some other function. This way the
critical section code is visible at a glance, keeping it short and
improving maintainability.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
Link: https://lore.kernel.org/r/20250920-improve-ssd130x-v2-1-77721e87ae08@gmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2 months agoaccel/ivpu: Split FW runtime and global memory buffers
Karol Wachowski [Thu, 25 Sep 2025 07:42:09 +0000 (09:42 +0200)] 
accel/ivpu: Split FW runtime and global memory buffers

Split firmware boot parameters (4KB) and FW version (4KB) into dedicated
buffer objects, separating them from the FW runtime memory buffer. This
creates three distinct buffers with independent allocation control.

This enables future modifications, particularly allowing the FW
image memory to be moved into a read-only buffer.

Fix user range starting address from incorrect 0x88000000 (2GB + 128MB)
overlapping global aperture on 37XX to intended 0xa0000000 (2GB + 512MB).
This caused no issues as FW aligned this range to 512MB anyway, but
corrected for consistency.

Convert ivpu_hw_range_init() from inline helper to function with overflow
validation to prevent potential security issues from address range
arithmetic overflows.

Improve readability of ivpu_fw_parse() function, remove unrelated constant
defines and validate firmware header values based on vdev->hw->ranges.

Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Link: https://lore.kernel.org/r/20250925074209.1148924-1-karol.wachowski@linux.intel.com
2 months agoaccel/amdxdna: Enhance runtime power management
Lizhi Hou [Tue, 23 Sep 2025 15:22:29 +0000 (08:22 -0700)] 
accel/amdxdna: Enhance runtime power management

Currently, pm_runtime_resume_and_get() is invoked in the driver's open
callback, and pm_runtime_put_autosuspend() is called in the close
callback. As a result, the device remains active whenever an application
opens it, even if no I/O is performed, leading to unnecessary power
consumption.

Move the runtime PM calls to the AIE2 callbacks that actually interact
with the hardware. The device will automatically suspend after 5 seconds
of inactivity (no hardware accesses and no pending commands), and it will
be resumed on the next hardware access.

Reviewed-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://lore.kernel.org/r/20250923152229.1303625-1-lizhi.hou@amd.com
2 months agodrm/bridge: adapt drm_bridge_add/remove() docs, mention the lingering list
Luca Ceresoli [Mon, 15 Sep 2025 10:12:48 +0000 (12:12 +0200)] 
drm/bridge: adapt drm_bridge_add/remove() docs, mention the lingering list

The role of drm_bridge_add/remove() is more complex now after having added
the lingering list. Update the kdoc accordingly.

Also stop mentioning the global list(s) in the first line of the docs: the
most important thing to mention here is that bridges are registered and
deregistered, lists are just the type of container used to implement such
(de)registration.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250915-drm-bridge-debugfs-removed-v9-3-6e5c0aff5de9@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/debugfs: show lingering bridges
Luca Ceresoli [Mon, 15 Sep 2025 10:12:47 +0000 (12:12 +0200)] 
drm/debugfs: show lingering bridges

The usefulness of /sys/kernel/debug/dri/bridges is limited as it only shows
bridges between drm_bridge_add() and drm_bridge_remove(). However
refcounted bridges can stay allocated and lingering for a long time after
drm_bridge_remove(), and a memory leak due to a missing drm_bridge_put()
would not be visible in this debugfs file.

Add lingering bridges to the /sys/kernel/debug/dri/bridges output.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250915-drm-bridge-debugfs-removed-v9-2-6e5c0aff5de9@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: add list of removed refcounted bridges
Luca Ceresoli [Mon, 15 Sep 2025 10:12:46 +0000 (12:12 +0200)] 
drm/bridge: add list of removed refcounted bridges

Between drm_bridge_add() and drm_bridge_remove() bridges are registered to
the DRM core via the global bridge_list and visible in
/sys/kernel/debug/dri/bridges. However between drm_bridge_remove() and the
last drm_bridge_put() memory is still allocated even though the bridge is
not registered, i.e. not in bridges_list, and also not visible in
debugfs. This prevents debugging refcounted bridges lifetime, especially
leaks due to a missing drm_bridge_put().

In order to allow debugfs to also show the removed bridges, move such
bridges into a new ad-hoc list until they are eventually freed.

Note this requires adding INIT_LIST_HEAD(&bridge->list) in the bridge
initialization code. The lack of such init was not exposing any bug so far,
but it would with the new code, for example when a bridge is allocated and
then freed without calling drm_bridge_add(), which is common on probe
errors.

drm_bridge_add() needs special care for bridges being added after having
been previously added and then removed.  This happens for example for many
non-DCS DSI host bridge drivers like samsung-dsim which
drm_bridge_add/remove() themselves every time the DSI device does a DSI
attaches/detach. When the DSI device is hot-pluggable this happens multiple
times in the lifetime of the DSI host bridge.  On every attach after the
first one, drm_bridge_add() finds bridge->list in the removed list, not at
the initialized state as drm_bridge_add() currently expects. Add a
list_del_init() to remove the bridge from the lingering list and bring
bridge->list back to the initialized state.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250915-drm-bridge-debugfs-removed-v9-1-6e5c0aff5de9@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: ti-sn65dsi86: Add support for DisplayPort mode with HPD
John Ripple [Mon, 15 Sep 2025 17:45:43 +0000 (11:45 -0600)] 
drm/bridge: ti-sn65dsi86: Add support for DisplayPort mode with HPD

Add support for DisplayPort to the bridge, which entails the following:
- Get and use an interrupt for HPD;
- Properly clear all status bits in the interrupt handler;

Signed-off-by: John Ripple <john.ripple@keysight.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250915174543.2564994-1-john.ripple@keysight.com
2 months agofbdev/simplefb: Sort headers correctly
Luca Weiss [Mon, 23 Jun 2025 06:44:48 +0000 (08:44 +0200)] 
fbdev/simplefb: Sort headers correctly

Make sure the headers are sorted alphabetically to ensure consistent
code.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250623-simple-drm-fb-icc-v2-4-f69b86cd3d7d@fairphone.com
2 months agodrm/sysfb: simpledrm: Sort headers correctly
Luca Weiss [Mon, 23 Jun 2025 06:44:46 +0000 (08:44 +0200)] 
drm/sysfb: simpledrm: Sort headers correctly

Make sure the headers are sorted alphabetically to ensure consistent
code.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
2 months agofbdev: Turn FB_MODE_HELPERS into an internal config option
Thomas Zimmermann [Tue, 9 Sep 2025 13:19:31 +0000 (15:19 +0200)] 
fbdev: Turn FB_MODE_HELPERS into an internal config option

Several fbdev drivers select FB_MODE_HELPER in the Kconfig. The
setting controls some helper functions and has no meaning to the
user. Make it an internal option.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250909132047.152612-3-tzimmermann@suse.de
2 months agofbdev: Make drivers depend on FB_TILEBLITTING
Thomas Zimmermann [Tue, 9 Sep 2025 13:19:30 +0000 (15:19 +0200)] 
fbdev: Make drivers depend on FB_TILEBLITTING

The option CONFIG_FB_TILEBLITTING is controlled by the user. Selecting
it from drivers can lead to cyclic dependencies within the config. In
fbcon, there's special handling for tile blitting, which currently
cannot be disabled without first disabling the relevant fbdev drivers.
Fix the Kconfig dependency to make it work.

Some guidelines for using select can be found in the kernel docs at [1].

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://elixir.bootlin.com/linux/v6.16/source/Documentation/kbuild/kconfig-language.rst#L147
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250909132047.152612-2-tzimmermann@suse.de
2 months agodrm/format-helper: Remove drm_fb_blit()
Thomas Zimmermann [Thu, 18 Sep 2025 15:39:51 +0000 (17:39 +0200)] 
drm/format-helper: Remove drm_fb_blit()

The function is unused; remove it.

Instead of relying on a general blit helper, drivers should pick a blit
function by themselves from their list of supported color formats.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250918154207.84714-4-tzimmermann@suse.de
2 months agodrm/sysfb: Lookup blit function during atomic check
Thomas Zimmermann [Thu, 18 Sep 2025 15:39:50 +0000 (17:39 +0200)] 
drm/sysfb: Lookup blit function during atomic check

Some configurations of sysfb outputs require format conversion from
framebuffer to scanout buffer. It is a driver bug if the conversion
helper is missing, yet it might happen on odd scanout formats. The old
code, based on drm_fb_blit(), only detects this situation during the
commit's hardware update, which is too late to abort the update.

Lookup the correct blit helper as part of the check phase. Then store
it in the sysfb plane state. Allows for detection of a missing helper
before the commit has started. Also avoids drm_fb_blit()'s large switch
statement on each updated scanline. Only a single lookup has to be done.

The lookup is in drm_sysfb_get_blit_func(), which only tracks formats
supported by sysfb drivers.

The lookup happens in sysfb's begin_fb_access helper instead of its
atomic_check helper. This allows vesadrm, and possibly other drivers,
to implement their own atomic_check without interfering with blit
lookups. Vesadrm implements XRGB8888 on top of R8 formats with the
help of the atomic_check. Doing the blit lookup in begin_fb_access then
always uses the correct CRTC format on all drivers.

v2:
- vesadrm: use drm_sysfb_plane_helper_begin_fb_access()
- fix type in commit description (Javier)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250918154207.84714-3-tzimmermann@suse.de
2 months agodrm/sysfb: Add custom plane state
Thomas Zimmermann [Thu, 18 Sep 2025 15:39:49 +0000 (17:39 +0200)] 
drm/sysfb: Add custom plane state

The plane-state type struct drm_sysfb_plane_state will store the
helper for blitting to the scanout buffer.

v2:
- add variable for duplicated shadow-plane state (Javier)
- fix build error

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250918154207.84714-2-tzimmermann@suse.de
2 months agodrm/gud: fix accidentally deleted IS_ERR() check
Ruben Wauters [Mon, 22 Sep 2025 17:32:20 +0000 (18:32 +0100)] 
drm/gud: fix accidentally deleted IS_ERR() check

During conversion of WARN_ON_ONCE to drm_WARN_ON_ONCE in
commit 2d2f1dc74cfb ("drm: gud: replace WARN_ON/WARN_ON_ONCE with
drm versions"), the IS_ERR check was accidentally removed, breaking
the gud_connector_add_properties() function, as any valid pointer
in state_val would produce an error.

The warning was reported by kernel test robot, and is fixed in this patch.

Fixes: 2d2f1dc74cfb ("drm: gud: replace WARN_ON/WARN_ON_ONCE with drm versions")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202509212215.c8v3RKmL-lkp@intel.com/
Signed-off-by: Ruben Wauters <rubenru09@aol.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250922173836.5608-1-rubenru09@aol.com
2 months agodrm/dp: Add POST_LT_ADJ_REQ helpers
Ville Syrjälä [Fri, 18 Jul 2025 12:01:52 +0000 (15:01 +0300)] 
drm/dp: Add POST_LT_ADJ_REQ helpers

Add small helpers (drm_dp_post_lt_adj_req_supported() and
drm_dp_post_lt_adj_req_in_progress()) to help with implementing
the POST_LT_ADJ_REQ sequence.

Tested-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250718120154.15492-3-ville.syrjala@linux.intel.com
2 months agodrm/dp: Add definitions for POST_LT_ADJ training sequence
Ville Syrjälä [Fri, 18 Jul 2025 12:01:51 +0000 (15:01 +0300)] 
drm/dp: Add definitions for POST_LT_ADJ training sequence

Add the bit definitions needed for POST_LT_ADJ sequence.

v2: DP_POST_LT_ADJ_REQ_IN_PROGRESS is bit 1 not 5 (Jani)

Tested-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250718120154.15492-2-ville.syrjala@linux.intel.com
2 months agodrm/panel: Add support for KD116N3730A12
Zhijian Yan [Fri, 19 Sep 2025 11:11:01 +0000 (19:11 +0800)] 
drm/panel: Add support for KD116N3730A12

Add panel driver support for the KD116N3730A12 eDP panel.
This includes initialization sequence and compatible string, the
enable timimg required 50ms.

KD116N3730A12:
edid-decode (hex):

00 ff ff ff ff ff ff 00 2c 83 97 03 00 00 00 00
02 23 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 31 32 00 a9

Signed-off-by: Zhijian Yan <yanzhijian@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/20250919111101.2955536-1-yanzhijian@huaqin.corp-partner.google.com
2 months agodrm/sched/tests: Remove relict of done_list
Philipp Stanner [Fri, 19 Sep 2025 06:44:51 +0000 (08:44 +0200)] 
drm/sched/tests: Remove relict of done_list

A rework of the scheduler unit tests removed the done_list. That list is
still mentioned in the mock test header.

Remove that relict.

Fixes: 4576de9b7977 ("drm/sched/tests: Implement cancel_job() callback")
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250919064450.147176-2-phasta@kernel.org
2 months agodrm/panfrost: Bump the minor version number
Steven Price [Fri, 19 Sep 2025 08:07:00 +0000 (09:07 +0100)] 
drm/panfrost: Bump the minor version number

Commit a017f7b86051 ("drm/panfrost: Expose JM context IOCTLs to UM")
added new ioctls to the driver and was meant to bump the version number.
However it actually only added a comment and didn't change the exposed
version number. Bump the number to be consistent with the comment.

Fixes: a017f7b86051 ("drm/panfrost: Expose JM context IOCTLs to UM")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Link: https://lore.kernel.org/r/20250919080700.3949393-1-steven.price@arm.com
2 months agofbcon: Streamline setting rotated/unrotated bitops
Thomas Zimmermann [Tue, 9 Sep 2025 12:44:45 +0000 (14:44 +0200)] 
fbcon: Streamline setting rotated/unrotated bitops

Support for console rotation is somewhat bolted onto the helper
fbcon_set_bitops() for unrotated displays.

Update fbcon_set_bitops() with a switch statement that picks the
correct settings helper for the current rotation. For unrotated
consoles, set the bitops for in the new helper fbcon_set_bitops_ur().
Rename the other, existing helpers to match the common naming
scheme.

The old helper fbcon_set_rotate() is no longer used.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://lore.kernel.org/r/20250909124616.143365-6-tzimmermann@suse.de
2 months agofbcon: Move fbcon callbacks into struct fbcon_bitops
Thomas Zimmermann [Tue, 9 Sep 2025 12:44:44 +0000 (14:44 +0200)] 
fbcon: Move fbcon callbacks into struct fbcon_bitops

Depending on rotation settings, fbcon sets different callback
functions in struct fbcon_par from within fbcon_set_bitops(). Declare
the callback functions in the new type struct fbcon_bitops. Then
only replace the single bitops pointer in struct fbcon_par.

Keeping callbacks in constant instances of struct fbcon_bitops
makes it harder to exploit the callbacks. Also makes the code slightly
easier to maintain.

For tile-based consoles, there's a separate instance of the bitops
structure.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://lore.kernel.org/r/20250909124616.143365-5-tzimmermann@suse.de
2 months agofbcon: Set rotate_font callback with related callbacks
Thomas Zimmermann [Tue, 9 Sep 2025 12:44:43 +0000 (14:44 +0200)] 
fbcon: Set rotate_font callback with related callbacks

The field struct fbcon_par.rotate_font points to fbcon_rotate_font() if
the console is rotated. Set the callback in the same place as the other
callbacks. Prepares for declaring all fbcon callbacks in a dedicated
struct type.

If not rotated, fbcon_set_bitops() still clears the callback to NULL.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://lore.kernel.org/r/20250909124616.143365-4-tzimmermann@suse.de
2 months agofbcon: Rename struct fbcon_ops to struct fbcon_par
Thomas Zimmermann [Tue, 9 Sep 2025 12:44:42 +0000 (14:44 +0200)] 
fbcon: Rename struct fbcon_ops to struct fbcon_par

The type struct fbcon_ops contains fbcon state and callbacks. As the
callbacks will be removed from struct fbcon_ops, rename the data type
to struct fbcon_par. Also rename the variables from ops to par.

The _par postfix ("private access registers") is used throughout the
fbdev subsystem for per-driver state. The fbcon pointer within struct
fb_info is also named fbcon_par. Hence, the new naming fits existing
practice.

v2:
- rename struct fbcon_ops to struct fbcon_par
- fix build for CONFIG_FB_TILEBITTING=n (kernel test robot)
- fix indention

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://lore.kernel.org/r/20250909124616.143365-3-tzimmermann@suse.de
2 months agofbcon: Fix empty lines in fbcon.h
Thomas Zimmermann [Tue, 9 Sep 2025 12:44:41 +0000 (14:44 +0200)] 
fbcon: Fix empty lines in fbcon.h

Add and remove empty lines as necessary to fix coding style. No
functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://lore.kernel.org/r/20250909124616.143365-2-tzimmermann@suse.de
2 months agodrm/panthor: always set fence errors on CS_FAULT
Chia-I Wu [Thu, 28 Aug 2025 20:04:19 +0000 (13:04 -0700)] 
drm/panthor: always set fence errors on CS_FAULT

It is unclear why fence errors were set only for CS_INHERIT_FAULT.
Downstream driver also does not treat CS_INHERIT_FAULT specially.
Remove the check.

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/20250828200419.3533393-1-olvaffe@gmail.com
2 months agodrm/panfrost: Display list of device JM contexts over debugfs
Boris Brezillon [Wed, 17 Sep 2025 19:18:40 +0000 (20:18 +0100)] 
drm/panfrost: Display list of device JM contexts over debugfs

For DebugFS builds, create a filesystem knob that, for every single open
file of the Panfrost DRM device, shows its command name information and
PID (when applicable), and all of its existing JM contexts.

For every context, show the DRM scheduler priority value of all of its
scheduling entities.

Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20250917191859.500279-5-adrian.larumbe@collabora.com
2 months agodrm/panfrost: Expose JM context IOCTLs to UM
Boris Brezillon [Wed, 17 Sep 2025 19:18:39 +0000 (20:18 +0100)] 
drm/panfrost: Expose JM context IOCTLs to UM

Minor revision of the driver must be bumped because this expands the
uAPI. On top of that, let UM know about the available priorities so that
they can create contexts with legal priority values.

Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20250917191859.500279-4-adrian.larumbe@collabora.com
2 months agodrm/panfrost: Introduce JM contexts for manging job resources
Boris Brezillon [Wed, 17 Sep 2025 19:18:38 +0000 (20:18 +0100)] 
drm/panfrost: Introduce JM contexts for manging job resources

A JM context describes user-requested priorities for the JM queues.

Context creation leads to the initialization of scheduling entities of
the same priority for all the device's job slots.

Until context creation and destruction are exposed to UM, all issued
jobs shall be bound to the default Panfrost file context, which has
medium priority.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Adrián Larumbe <adrian.larumbe@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/20250917191859.500279-3-adrian.larumbe@collabora.com
2 months agodrm/panfrost: Introduce uAPI for JM context creation
Boris Brezillon [Wed, 17 Sep 2025 19:18:37 +0000 (20:18 +0100)] 
drm/panfrost: Introduce uAPI for JM context creation

The new uAPI lets user space query the KM driver for the available
priorities a job can be given at submit time. These are managed through
the notion of a context, for which we also provide new creation and
destruction ioctls.

Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20250917191859.500279-2-adrian.larumbe@collabora.com
2 months agoaccel/ivpu: Add support for user-managed preemption buffer
Andrzej Kacprowski [Mon, 15 Sep 2025 10:34:37 +0000 (12:34 +0200)] 
accel/ivpu: Add support for user-managed preemption buffer

Allow user mode drivers to manage preemption buffers, enabling
memory savings by sharing a single buffer across multiple
command queues within the same memory context.

Introduce DRM_IVPU_PARAM_PREEMPT_BUFFER_SIZE to report the required
preemption buffer size as specified by the firmware.

The preemption buffer is now passed from user space as an entry
in the BO list of DRM_IVPU_CMDQ_SUBMIT. The buffer must be
non-mappable and large enough to hold preemption data.

For backward compatibility, the kernel will allocate an internal
preemption buffer if user space does not provide one.

User space can only provide a single preemption buffer,
simplifying the ioctl interface and parameter validation.
A separate secondary preemption buffer is only needed
to save below 4GB address space on 37xx and only if preemption
buffers are not shared.

Signed-off-by: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Link: https://lore.kernel.org/r/20250915103437.830086-1-karol.wachowski@linux.intel.com
2 months agoaccel/ivpu: Update JSM firmware API to latest 3.32.5 version
Karol Wachowski [Tue, 16 Sep 2025 08:41:31 +0000 (10:41 +0200)] 
accel/ivpu: Update JSM firmware API to latest 3.32.5 version

Synchronize the JSM API header file with the latest 3.32.5 version
to reflect all changes introduced in the new firmware API

Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Link: https://lore.kernel.org/r/20250916084131.848988-1-karol.wachowski@linux.intel.com
2 months agoaccel/ivpu: Ensure rpm_runtime_put in case of engine reset/resume fail
Karol Wachowski [Tue, 16 Sep 2025 08:48:09 +0000 (10:48 +0200)] 
accel/ivpu: Ensure rpm_runtime_put in case of engine reset/resume fail

Previously, aborting work could return early after engine reset or resume
failure, skipping the necessary runtime_put cleanup leaving the device
with incorrect reference count breaking runtime power management state.

Replace early returns with goto statements to ensure runtime_put is always
executed.

Fixes: a47e36dc5d90 ("accel/ivpu: Trigger device recovery on engine reset/resume failure")
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Link: https://lore.kernel.org/r/20250916084809.850073-1-karol.wachowski@linux.intel.com
2 months agoaccel/ivpu: Remove unused firmware boot parameters
Andrzej Kacprowski [Mon, 15 Sep 2025 10:35:53 +0000 (12:35 +0200)] 
accel/ivpu: Remove unused firmware boot parameters

Remove references to firmware boot parameters that were never used
by any production version of device firmware.

Signed-off-by: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Link: https://lore.kernel.org/r/20250915103553.830151-1-karol.wachowski@linux.intel.com
2 months agoaccel/ivpu: Refactor priority_bands_show for readability
Jacek Lawrynowicz [Mon, 15 Sep 2025 10:34:01 +0000 (12:34 +0200)] 
accel/ivpu: Refactor priority_bands_show for readability

Reduce code duplication and improve the overall readability of the debugfs
output for job scheduling priority bands.

Additionally fix clang-tidy warning about missing default case in the
switch statement.

Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Link: https://lore.kernel.org/r/20250915103401.830045-1-karol.wachowski@linux.intel.com
2 months agoaccel/ivpu: Reset cmdq->db_id on register failure
Karol Wachowski [Mon, 15 Sep 2025 10:34:21 +0000 (12:34 +0200)] 
accel/ivpu: Reset cmdq->db_id on register failure

Ensure that cmdq->db_id is reset to 0 if ivpu_jsm_register_db fails,
preventing potential reuse of invalid command queue with
unregistered doorbell.

Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Link: https://lore.kernel.org/r/20250915103421.830065-1-karol.wachowski@linux.intel.com
2 months agoaccel/amdxdna: Call dma_buf_vmap_unlocked() for imported object
Lizhi Hou [Tue, 16 Sep 2025 17:48:42 +0000 (10:48 -0700)] 
accel/amdxdna: Call dma_buf_vmap_unlocked() for imported object

In amdxdna_gem_obj_vmap(), calling dma_buf_vmap() triggers a kernel
warning if LOCKDEP is enabled. So for imported object, use
dma_buf_vmap_unlocked(). Then, use drm_gem_vmap() for other objects.
The similar change applies to vunmap code.

Fixes: bd72d4acda10 ("accel/amdxdna: Support user space allocated buffer")
Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://lore.kernel.org/r/20250916174842.234709-1-lizhi.hou@amd.com
2 months agodrm/sched: backend_ops doc fix
Luc Ma [Mon, 15 Sep 2025 13:23:26 +0000 (21:23 +0800)] 
drm/sched: backend_ops doc fix

Function drm_sched_entity_do_release() has been renamed in
commit 180fc134d712 ("drm/scheduler: Rename cleanup functions v2.").

Refer to the correct function in the documentation.

Signed-off-by: Luc Ma <onion0709@gmail.com>
[phasta: commit message]
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250915132327.6293-1-onion0709@gmail.com
2 months agodrm/ttm: rename ttm_bo_put to _fini v3
Christian König [Fri, 13 Jun 2025 12:09:08 +0000 (14:09 +0200)] 
drm/ttm: rename ttm_bo_put to _fini v3

Give TTM BOs a separate cleanup function.

No funktional change, but the next step in removing the TTM BO reference
counting and replacing it with the GEM object reference counting.

v2: move the code around a bit to make it clearer what's happening
v3: fix nouveau_bo_fini as well

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Acked-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://lore.kernel.org/r/20250909144311.1927-1-christian.koenig@amd.com
2 months agodrm/ssd130x: Use kmalloc_array() instead of kmalloc()
James Flowers [Sun, 14 Sep 2025 07:38:22 +0000 (00:38 -0700)] 
drm/ssd130x: Use kmalloc_array() instead of kmalloc()

Documentation/process/deprecated.rst recommends against the use of
kmalloc with dynamic size calculations due to the risk of overflow and
smaller allocation being made than the caller was expecting.
kmalloc_array avoids this issue.

Signed-off-by: James Flowers <bold.zone2373@fastmail.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250914073841.69582-1-bold.zone2373@fastmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2 months agodrm/tests: make sure drm_client_modeset tests are enabled
Dmitry Baryshkov [Thu, 21 Aug 2025 11:25:06 +0000 (14:25 +0300)] 
drm/tests: make sure drm_client_modeset tests are enabled

Default config for UML (x86_64) doesn't include any driver which
supports DRM_CLIENT_SELECTION, which makes drm_client_modeset disabled
(and correspondingly tests for that module are not executed too).

Enable DRM_VKMS and DRM_FBDEV_EMULATION in order to be able to run DRM
client modesetting tests.

Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Link: https://lore.kernel.org/r/20250821-drm-client-tests-v1-1-49e7212c744a@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/imx: parallel-display: put the bridge returned by drm_bridge_get_next_bridge()
Luca Ceresoli [Fri, 1 Aug 2025 17:05:31 +0000 (19:05 +0200)] 
drm/imx: parallel-display: put the bridge returned by drm_bridge_get_next_bridge()

The bridge returned by drm_bridge_get_next_bridge() is refcounted. Put it
when done. We need to ensure it is not put before either next_bridge or
next_bridge_state is in use, thus for simplicity use a cleanup action.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20250801-drm-bridge-alloc-getput-drm_bridge_get_next_bridge-v2-9-888912b0be13@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: put the bridge returned by drm_bridge_get_next_bridge()
Luca Ceresoli [Fri, 1 Aug 2025 17:05:30 +0000 (19:05 +0200)] 
drm/bridge: put the bridge returned by drm_bridge_get_next_bridge()

The bridge returned by drm_bridge_get_next_bridge() is refcounted. Put it
when done. We need to ensure it is not put before either next_bridge or
next_bridge_state is in use, thus for simplicity use a cleanup action.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250801-drm-bridge-alloc-getput-drm_bridge_get_next_bridge-v2-8-888912b0be13@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: get the bridge returned by drm_bridge_get_next_bridge()
Luca Ceresoli [Fri, 1 Aug 2025 17:05:29 +0000 (19:05 +0200)] 
drm/bridge: get the bridge returned by drm_bridge_get_next_bridge()

drm_bridge_get_next_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/20250801-drm-bridge-alloc-getput-drm_bridge_get_next_bridge-v2-7-888912b0be13@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/omap: use drm_for_each_bridge_in_chain_from()
Luca Ceresoli [Fri, 8 Aug 2025 14:49:16 +0000 (16:49 +0200)] 
drm/omap: use drm_for_each_bridge_in_chain_from()

Use drm_for_each_bridge_in_chain_from _scoped() instead of an open-coded
loop based on drm_bridge_get_next_bridge() to ensure the bridge being
looped on is refcounted and simplify the driver code.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250808-drm-bridge-alloc-getput-for_each_bridge-v2-9-edb6ee81edf1@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: add drm_for_each_bridge_in_chain_from()
Luca Ceresoli [Fri, 8 Aug 2025 14:49:15 +0000 (16:49 +0200)] 
drm/bridge: add drm_for_each_bridge_in_chain_from()

Add variant of drm_for_each_bridge_in_chain_scoped() that iterates on the
encoder bridge from a given bridge until the end of the chain.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250808-drm-bridge-alloc-getput-for_each_bridge-v2-8-edb6ee81edf1@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: remove drm_for_each_bridge_in_chain()
Luca Ceresoli [Fri, 8 Aug 2025 14:49:14 +0000 (16:49 +0200)] 
drm/bridge: remove drm_for_each_bridge_in_chain()

All users have been replaced by drm_for_each_bridge_in_chain_scoped().

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250808-drm-bridge-alloc-getput-for_each_bridge-v2-7-edb6ee81edf1@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: use drm_for_each_bridge_in_chain_scoped()
Luca Ceresoli [Fri, 8 Aug 2025 14:49:13 +0000 (16:49 +0200)] 
drm/bridge: use drm_for_each_bridge_in_chain_scoped()

Use drm_for_each_bridge_in_chain_scoped() instead of
drm_for_each_bridge_in_chain() to ensure the bridge being looped on is
refcounted.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250808-drm-bridge-alloc-getput-for_each_bridge-v2-6-edb6ee81edf1@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/atomic: use drm_for_each_bridge_in_chain_scoped()
Luca Ceresoli [Fri, 8 Aug 2025 14:49:12 +0000 (16:49 +0200)] 
drm/atomic: use drm_for_each_bridge_in_chain_scoped()

Use drm_for_each_bridge_in_chain_scoped() instead of
drm_for_each_bridge_in_chain() to ensure the bridge being looped on is
refcounted.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250808-drm-bridge-alloc-getput-for_each_bridge-v2-5-edb6ee81edf1@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/display: bridge-connector: use drm_for_each_bridge_in_chain_scoped()
Luca Ceresoli [Fri, 8 Aug 2025 14:49:11 +0000 (16:49 +0200)] 
drm/display: bridge-connector: use drm_for_each_bridge_in_chain_scoped()

Use drm_for_each_bridge_in_chain_scoped() instead of
drm_for_each_bridge_in_chain() to ensure the bridge being looped on is
refcounted.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250808-drm-bridge-alloc-getput-for_each_bridge-v2-4-edb6ee81edf1@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/bridge: add drm_for_each_bridge_in_chain_scoped()
Luca Ceresoli [Fri, 8 Aug 2025 14:49:10 +0000 (16:49 +0200)] 
drm/bridge: add drm_for_each_bridge_in_chain_scoped()

drm_for_each_bridge_in_chain() iterates ofer the bridges in an encoder
chain without protecting the lifetime of the bridges using
drm_bridge_get/put(). This creates a risk window where the bridge could be
freed while iterating on it. Users of drm_for_each_bridge_in_chain() cannot
solve this reliably.

Add variant of drm_for_each_bridge_in_chain() that gets/puts the bridge
reference at the beginning/end of each iteration, and puts it if breaking
ot of the loop.

Note that this requires adding a new drm_bridge_get_next_bridge_and_put()
function because, unlike similar functions as __of_get_next_child(),
drm_bridge_get_next_bridge() gets the "next" pointer but does not put the
"prev" pointer. Unfortunately drm_bridge_get_next_bridge() cannot be
modified to put the "prev" pointer because some of its users rely on
this, such as drm_atomic_bridge_propagate_bus_flags().

Also deprecate drm_for_each_bridge_in_chain(), in preparation for removing
it after converting all users to the scoped version.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250808-drm-bridge-alloc-getput-for_each_bridge-v2-3-edb6ee81edf1@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/display: bridge-connector: use scope-specific variable for the bridge pointer
Luca Ceresoli [Fri, 8 Aug 2025 14:49:08 +0000 (16:49 +0200)] 
drm/display: bridge-connector: use scope-specific variable for the bridge pointer

Currently drm_bridge_connector_init() reuses the 'bridge' variable, first
as a loop variable in the long drm_for_each_bridge_in_chain() and then in
the HDMI-specific code as a shortcut to bridge_connector->bridge_cec.

We are about to remove the 'bridge' loop variable for
drm_for_each_bridge_in_chain() by moving to a scoped version of the same
macro, which implies removing the 'bridge' variable from the main function
scope. Additionally reusing the variable can make such long function less
readable.

Similarly to what commit 6f727c838ea8 ("drm/bridge-connector: Fix bridge in
drm_connector_hdmi_audio_init()") already did for the audio HDMI bridge,
use n local variable inside the scopes where it is needed as a
bridge_connector->bridge_hdmi_cec shortcut to make its scope clearer as
well as to allow removing the 'bridge' variable in an upcoming commit.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250808-drm-bridge-alloc-getput-for_each_bridge-v2-1-edb6ee81edf1@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2 months agodrm/fb-helper: Synchronize dirty worker with vblank
Thomas Zimmermann [Fri, 29 Aug 2025 09:13:45 +0000 (11:13 +0200)] 
drm/fb-helper: Synchronize dirty worker with vblank

Before updating the display from the console's shadow buffer, the dirty
worker now waits for a vblank. This allows several screen updates to pile
up and acts as a rate limiter. If a DRM master is present, it could
interfere with the vblank. Don't wait in this case.

v4:
* share code with WAITFORVSYNC ioctl (Emil)
* use lock guard
v3:
* add back helper->lock
* acquire DRM master status while waiting for vblank
v2:
* don't hold helper->lock while waiting for vblank

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://lore.kernel.org/r/20250829091447.46719-1-tzimmermann@suse.de
2 months agodrm/vc4: hdmi: switch to generic CEC helpers
Dmitry Baryshkov [Sat, 5 Jul 2025 10:05:13 +0000 (13:05 +0300)] 
drm/vc4: hdmi: switch to generic CEC helpers

Switch VC4 driver to using CEC helpers code, simplifying hotplug and
registration / cleanup. The existing vc4_hdmi_cec_release() is kept for
now.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20250705-drm-hdmi-connector-cec-v7-1-d14fa0c31b74@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/nouveau: Support devfreq for Tegra
Aaron Kling [Sun, 7 Sep 2025 01:03:02 +0000 (20:03 -0500)] 
drm/nouveau: Support devfreq for Tegra

Using pmu counters for usage stats. This enables dynamic frequency
scaling on all of the currently supported Tegra gpus.

The register offsets are valid for gk20a, gm20b, gp10b, and gv11b. If
support is added for ga10b, this will need rearchitected.

Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
[fixed tab alignment in gk20a_devfreq_target()]
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://lore.kernel.org/r/20250906-gk20a-devfreq-v2-1-0217f53ee355@gmail.com
2 months agodrm/nouveau: Support reclocking on gp10b
Aaron Kling [Sat, 23 Aug 2025 17:26:05 +0000 (12:26 -0500)] 
drm/nouveau: Support reclocking on gp10b

Starting with Tegra186, gpu clock handling is done by the bpmp and there
is little to be done by the kernel. The only thing necessary for
reclocking is to set the gpcclk to the desired rate and the bpmp handles
the rest. The pstate list is based on the downstream driver generates.

Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
[added newline before gp10b_clk macro declaration for checkpatch error]
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://lore.kernel.org/r/20250823-gp10b-reclock-v2-1-90a1974a54e3@gmail.com
2 months agodrm/panel-edp: Add several panel configurations for mt8189 Chromebook
Zhongtian Wu [Mon, 15 Sep 2025 11:34:37 +0000 (19:34 +0800)] 
drm/panel-edp: Add several panel configurations for mt8189 Chromebook

Add several panel configurations for mt8189 Chromebook. For B140HAK03.3,
the enable timing required 50ms. For NV156FHM-N4S, the enable timing
required 200ms. For N140HCA-EAC, the enable timing required 80ms. For
N156HCA-EAB, the enable timing required 80ms. For MNE001BS1-4, the enable
timing required 80ms. For MNF601BS1-3, the enable timing required 80ms,
the disable timing required 50ms.

B140HAK03.3
edid-decode (hex):

00 ff ff ff ff ff ff 00 06 af a9 b7 00 00 00 00
28 20 01 04 95 1f 11 78 03 f5 65 8f 55 5a 93 2a
1f 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 60 3b 80 04 71 38 52 40 10 10
3e 00 35 ae 10 00 00 18 95 27 80 04 71 38 52 40
10 10 3e 00 35 ae 10 00 00 18 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 34 30 48 41 4b 30 33 2e 33 20 0a 00 f1

NV156FHM-N4S
edid-decode (hex):

00 ff ff ff ff ff ff 00 09 e5 f2 0c 00 00 00 00
10 22 01 04 a5 22 13 78 03 00 f5 97 5e 5b 93 29
1f 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 99 3b 80 10 71 38 50 40 30 20
36 00 58 c2 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 fe 00 42
4f 45 20 43 51 0a 20 20 20 20 20 20 00 00 00 fe
00 4e 56 31 35 36 46 48 4d 2d 4e 34 53 0a 00 dc

N140HCA-EAC
edid-decode (hex):

00 ff ff ff ff ff ff 00 0d ae 8f 14 00 00 00 00
0f 22 01 04 a5 1f 11 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 b4 3b 80 4a 71 38 34 40 50 3c
68 00 35 ad 10 00 00 18 c2 2f 80 4a 71 38 34 40
50 3c 68 00 35 ad 10 00 00 18 00 00 00 fd 00 28
3c 44 44 10 01 0a 20 20 20 20 20 20 00 00 00 fc
00 4e 31 34 30 48 43 41 2d 45 41 43 0a 20 01 90

02 03 22 00 e3 05 80 00 e6 06 01 01 53 53 4b 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 00 00 00 00 00 00 62

N156HCA-EAB
edid-decode (hex):

00 ff ff ff ff ff ff 00 0d ae 65 15 00 00 00 00
0b 22 01 04 a5 22 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 b4 3b 80 4a 71 38 34 40 50 36
68 00 58 c1 10 00 00 18 c2 2f 80 4a 71 38 34 40
50 36 68 00 58 c1 10 00 00 18 00 00 00 fd 00 28
3c 44 44 10 01 0a 20 20 20 20 20 20 00 00 00 fc
00 4e 31 35 36 48 43 41 2d 45 41 42 0a 20 01 50

02 03 22 00 e3 05 80 00 e6 06 01 01 53 53 42 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 00 00 00 00 00 00 6b

MNE001BS1-4
edid-decode (hex):

00 ff ff ff ff ff ff 00 0e 77 4b 14 00 00 00 00
25 22 01 04 a5 1f 11 78 03 2c c5 94 5c 59 95 29
1e 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 9a 36 80 a0 70 38 28 40 30 20
36 00 35 ae 10 00 00 1a 00 00 00 fd 00 28 3c 43
43 0e 01 0a 20 20 20 20 20 20 ae 2b 80 a0 70 38
28 40 30 20 36 00 35 ae 10 00 00 1a 00 00 00 fc
00 4d 4e 45 30 30 31 42 53 31 2d 34 0a 20 01 0e

70 20 79 02 00 81 00 1e 72 1a 00 00 03 01 28 3c
00 00 53 ff 53 ff 3c 00 00 00 00 e3 05 04 00 e6
06 01 01 53 53 ff 2b 00 06 27 00 28 3b 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 b8 90

MNF601BS1-3
edid-decode (hex):

00 ff ff ff ff ff ff 00 0e 77 19 15 00 00 00 00
19 22 01 04 a5 22 13 78 03 2c c5 94 5c 59 95 29
1e 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 9a 36 80 a0 70 38 28 40 30 20
36 00 58 c1 10 00 00 1a ae 2b 80 a0 70 38 28 40
30 20 36 00 58 c1 10 00 00 1a 00 00 00 fd 00 28
3c 43 43 0e 01 0a 20 20 20 20 20 20 00 00 00 fc
00 4d 4e 46 36 30 31 42 53 31 2d 33 0a 20 01 d4

70 20 79 02 00 81 00 1e 72 1a 00 00 03 01 28 3c
00 00 53 ff 53 ff 3c 00 00 00 00 e3 05 04 00 e6
06 01 01 53 53 ff 2b 00 06 27 00 28 3b 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 b8 90

Signed-off-by: Zhongtian Wu <wuzhongtian@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/20250915113437.665345-1-wuzhongtian@huaqin.corp-partner.google.com
2 months agodrm/panel: Add support for KD116N3730A07
Zhijian Yan [Mon, 15 Sep 2025 06:47:14 +0000 (14:47 +0800)] 
drm/panel: Add support for KD116N3730A07

Add panel driver support for the KD116N3730A07 11.6" eDP panel.
This includes initialization sequence and compatible string, the
enable timimg required 50ms.

KD116N3730A07:
edid-decode (hex):

00 ff ff ff ff ff ff 00 2c 83 10 01 00 00 00 00
02 23 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 37 00 2e

Signed-off-by: Zhijian Yan <yanzhijian@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/20250915064715.662312-1-yanzhijian@huaqin.corp-partner.google.com
2 months agodrm/sun4i/sun4i_tcon_dclk: convert from round_rate() to determine_rate()
Brian Masney [Mon, 11 Aug 2025 10:56:13 +0000 (06:56 -0400)] 
drm/sun4i/sun4i_tcon_dclk: convert from round_rate() to determine_rate()

The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Link: https://lore.kernel.org/r/20250811-drm-clk-round-rate-v2-9-4a91ccf239cf@redhat.com
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
2 months agodrm/sun4i/sun4i_hdmi_ddc_clk: convert from round_rate() to determine_rate()
Brian Masney [Mon, 11 Aug 2025 10:56:12 +0000 (06:56 -0400)] 
drm/sun4i/sun4i_hdmi_ddc_clk: convert from round_rate() to determine_rate()

The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Link: https://lore.kernel.org/r/20250811-drm-clk-round-rate-v2-8-4a91ccf239cf@redhat.com
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
2 months agodrm/stm/lvds: convert from round_rate() to determine_rate()
Brian Masney [Mon, 11 Aug 2025 10:56:11 +0000 (06:56 -0400)] 
drm/stm/lvds: convert from round_rate() to determine_rate()

The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Link: https://lore.kernel.org/r/20250811-drm-clk-round-rate-v2-7-4a91ccf239cf@redhat.com
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
2 months agodrm/stm/dw_mipi_dsi-stm: convert from round_rate() to determine_rate()
Brian Masney [Mon, 11 Aug 2025 10:56:10 +0000 (06:56 -0400)] 
drm/stm/dw_mipi_dsi-stm: convert from round_rate() to determine_rate()

The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Link: https://lore.kernel.org/r/20250811-drm-clk-round-rate-v2-6-4a91ccf239cf@redhat.com
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
2 months agodrm/pl111: convert from round_rate() to determine_rate()
Brian Masney [Mon, 11 Aug 2025 10:56:09 +0000 (06:56 -0400)] 
drm/pl111: convert from round_rate() to determine_rate()

The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Link: https://lore.kernel.org/r/20250811-drm-clk-round-rate-v2-5-4a91ccf239cf@redhat.com
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
2 months agodrm/mcde/mcde_clk_div: convert from round_rate() to determine_rate()
Brian Masney [Mon, 11 Aug 2025 10:56:06 +0000 (06:56 -0400)] 
drm/mcde/mcde_clk_div: convert from round_rate() to determine_rate()

The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Link: https://lore.kernel.org/r/20250811-drm-clk-round-rate-v2-2-4a91ccf239cf@redhat.com
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
2 months agodrm/imx/ipuv3/imx-tve: convert from round_rate() to determine_rate()
Brian Masney [Mon, 11 Aug 2025 10:56:05 +0000 (06:56 -0400)] 
drm/imx/ipuv3/imx-tve: convert from round_rate() to determine_rate()

The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20250811-drm-clk-round-rate-v2-1-4a91ccf239cf@redhat.com
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
2 months agodrm: Replace the deprecated DRM_* logging macros in gem helper files
Athul Raj Kollareth [Tue, 2 Sep 2025 18:10:20 +0000 (23:40 +0530)] 
drm: Replace the deprecated DRM_* logging macros in gem helper files

Replace the DRM_* logging macros used in gem helper files with the
appropriate ones specified in /include/drm/drm_print.h.

Signed-off-by: Athul Raj Kollareth <krathul3152@gmail.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/aLczDHV_yGnnRKbr@Terra
2 months agodrm: gud: replace WARN_ON/WARN_ON_ONCE with drm versions
Ruben Wauters [Sun, 14 Sep 2025 15:50:52 +0000 (16:50 +0100)] 
drm: gud: replace WARN_ON/WARN_ON_ONCE with drm versions

GUD is a drm driver, and therefore should use the drm versions of
WARN_ON and WARN_ON_ONCE. This patch replaces all instances of WARN_ON
and WARN_ON_ONCE with drm_WARN_ON and drm_WARN_ON_ONCE.

Signed-off-by: Ruben Wauters <rubenru09@aol.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250914155308.2144-1-rubenru09@aol.com
2 months agoMerge drm/drm-next into drm-misc-next
Thomas Zimmermann [Mon, 15 Sep 2025 07:57:29 +0000 (09:57 +0200)] 
Merge drm/drm-next into drm-misc-next

Backmerging to drm-misc-next to get fixes from v6.17-rc6.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
2 months agoMerge tag 'v6.17-rc6' into drm-next
Dave Airlie [Mon, 15 Sep 2025 07:51:07 +0000 (17:51 +1000)] 
Merge tag 'v6.17-rc6' into drm-next

This is a backmerge of Linux 6.17-rc6, needed for msm,
also requested by misc.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2 months agoMerge tag 'drm-intel-gt-next-2025-09-12' of https://gitlab.freedesktop.org/drm/i915...
Dave Airlie [Mon, 15 Sep 2025 03:16:53 +0000 (13:16 +1000)] 
Merge tag 'drm-intel-gt-next-2025-09-12' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next

Driver Changes:

- Include the GuC registers in the error state (Daniele)
- Use memdup_user() (Thorsten)
- Selftest improvements (Jonathan)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://lore.kernel.org/r/aMPCfRObHMg6DZAs@jlahtine-mobl
2 months agoLinux 6.17-rc6 v6.17-rc6
Linus Torvalds [Sun, 14 Sep 2025 21:21:14 +0000 (14:21 -0700)] 
Linux 6.17-rc6

2 months agoMerge tag 'phy-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy
Linus Torvalds [Sun, 14 Sep 2025 20:17:30 +0000 (13:17 -0700)] 
Merge tag 'phy-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy

Pull generic phy driver fixes from Vinod Koul:

 - Qualcomm repeater override properties, qmp pcie bindings fix for
   clocks and initialization sequence for firmware power down case

 - Marvell comphy bindings clock and child node constraints

 - Tegra xusb device reference leaks fix

 - TI omap usb device ref leak on unbind and RGMII IS settings fix

* tag 'phy-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
  phy: qcom: qmp-pcie: Fix PHY initialization when powered down by firmware
  phy: ti: gmii-sel: Always write the RGMII ID setting
  dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Update pcie phy bindings
  phy: ti-pipe3: fix device leak at unbind
  phy: ti: omap-usb2: fix device leak at unbind
  phy: tegra: xusb: fix device and OF node leak at probe
  dt-bindings: phy: marvell,comphy-cp110: Fix clock and child node constraints
  phy: qualcomm: phy-qcom-eusb2-repeater: fix override properties

2 months agoMerge tag 'dmaengine-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul...
Linus Torvalds [Sun, 14 Sep 2025 20:06:06 +0000 (13:06 -0700)] 
Merge tag 'dmaengine-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine

Pull dmaengine fixes from Vinod Koul:

 - Intel idxd fixes for idxd_free() handling, refcount underflow on
   module unload, double free in idxd_setup_wqs()

 - Qualcomm bam dma missing properties and handing for channels with ees

 - dw device reference leak in rzn1_dmamux_route_allocate()

* tag 'dmaengine-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
  dmaengine: dw: dmamux: Fix device reference leak in rzn1_dmamux_route_allocate
  dmaengine: ti: edma: Fix memory allocation size for queue_priority_map
  dmaengine: idxd: Fix double free in idxd_setup_wqs()
  dmaengine: idxd: Fix refcount underflow on module unload
  dmaengine: idxd: Remove improper idxd_free
  dmaengine: qcom: bam_dma: Fix DT error handling for num-channels/ees
  dt-bindings: dma: qcom: bam-dma: Add missing required properties

2 months agoMerge tag 'tty-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 14 Sep 2025 17:54:54 +0000 (10:54 -0700)] 
Merge tag 'tty-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are some small tty and serial driver fixes for 6.17-rc6 that
  resolve some reported problems. Included in here are:

   - 8250 driver dt bindings fixes

   - broadcom serial driver binding fixes

   - hvc_console bugfix

   - xilinx serial driver bugfix

   - sc16is7xx serial driver bugfix

  All of these have been in linux-next for the past week with no
  reported issues"

* tag 'tty-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: xilinx_uartps: read reg size from DTS
  tty: hvc_console: Call hvc_kick in hvc_write unconditionally
  dt-bindings: serial: 8250: allow "main" and "uart" as clock names
  dt-bindings: serial: 8250: move a constraint
  dt-bindings: serial: brcm,bcm7271-uart: Constrain clocks
  serial: sc16is7xx: fix bug in flow control levels init

2 months agoMerge tag 'usb-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 14 Sep 2025 17:28:15 +0000 (10:28 -0700)] 
Merge tag 'usb-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some small USB driver fixes and new device ids for 6.17-rc6.
  Included in here are:

   - new usb-serial driver device ids

   - dummy-hcd locking bugfix for rt-enabled systems (which is crazy,
     but people have odd testing requirements at times...)

   - xhci driver bugfixes for reported issues

   - typec driver bugfix

   - midi2 gadget driver bugfixes

   - usb core sysfs file regression fix from -rc1

  All of these, except for the last usb sysfs file fix, have been in
  linux-next with no reported issues. The sysfs fix was added to the
  tree on Friday, and is "obviously correct" and should not have any
  problems either, it just didn't have any time for linux-next to pick
  up (0-day had no problems with it)"

* tag 'usb-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: core: remove the move buf action
  usb: gadget: midi2: Fix MIDI2 IN EP max packet size
  usb: gadget: midi2: Fix missing UMP group attributes initialization
  usb: typec: tcpm: properly deliver cable vdms to altmode drivers
  USB: gadget: dummy-hcd: Fix locking bug in RT-enabled kernels
  xhci: fix memory leak regression when freeing xhci vdev devices depth first
  xhci: dbc: Fix full DbC transfer ring after several reconnects
  xhci: dbc: decouple endpoint allocation from initialization
  USB: serial: option: add Telit Cinterion LE910C4-WWX new compositions
  USB: serial: option: add Telit Cinterion FN990A w/audio compositions

2 months agoMerge tag 'x86-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 14 Sep 2025 15:39:48 +0000 (08:39 -0700)] 
Merge tag 'x86-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Fix a CPU topology parsing bug on AMD guests, and address
  a lockdep warning in the resctrl filesystem"

* tag 'x86-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  fs/resctrl: Eliminate false positive lockdep warning when reading SNC counters
  x86/cpu/topology: Always try cpu_parse_topology_ext() on AMD/Hygon

2 months agoMerge tag 'timers-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Sep 2025 15:38:05 +0000 (08:38 -0700)] 
Merge tag 'timers-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fix from Ingo Molnar:
 "Fix a lost-timeout CPU hotplug bug in the hrtimer code, which can
  trigger with certain hardware configs and regular HZ"

* tag 'timers-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  hrtimers: Unconditionally update target CPU base after offline timer migration

2 months agoMerge tag 'input-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 14 Sep 2025 15:09:37 +0000 (08:09 -0700)] 
Merge tag 'input-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:

 - a quirk to i8042 for yet another TUXEDO laptop

 - a fix to mtk-pmic-keys driver to properly handle MT6359

 - a fix to iqs7222 driver to only enable proximity interrupt
   if it is mapped to a key or a switch event

 - an update to xpad controller driver to recognize Flydigi Apex 5
   controller

 - an update to maintainers file to drop bounding entry for Melfas
   touch controller

* tag 'input-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  MAINTAINERS: Input: Drop melfas-mip4 section
  Input: mtk-pmic-keys - MT6359 has a specific release irq
  Input: i8042 - add TUXEDO InfinityBook Pro Gen10 AMD to i8042 quirk table
  Input: iqs7222 - avoid enabling unused interrupts
  Input: xpad - add support for Flydigi Apex 5

2 months agoMAINTAINERS: Input: Drop melfas-mip4 section
Krzysztof Kozlowski [Wed, 10 Sep 2025 14:25:27 +0000 (16:25 +0200)] 
MAINTAINERS: Input: Drop melfas-mip4 section

Emails to the sole melfas-mip4 driver maintainer bounce:

  550 <jeesw@melfas.com> No such user here (connected from melfas.com)

so clearly this is not a supported driver anymore.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250910142526.105286-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2 months agoMerge tag 'erofs-for-6.17-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Sep 2025 00:16:52 +0000 (17:16 -0700)] 
Merge tag 'erofs-for-6.17-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs

Pull erofs fixes from Gao Xiang:

 - Fix invalid algorithm dereference in encoded extents

 - Add missing dax_break_layout_final(), since recent FSDAX fixes
   didn't cover EROFS

 - Arrange long xattr name prefixes more properly

* tag 'erofs-for-6.17-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
  erofs: fix long xattr name prefix placement
  erofs: fix runtime warning on truncate_folio_batch_exceptionals()
  erofs: fix invalid algorithm for encoded extents

2 months agoMerge tag 'ceph-for-6.17-rc6' of https://github.com/ceph/ceph-client
Linus Torvalds [Sat, 13 Sep 2025 17:45:11 +0000 (10:45 -0700)] 
Merge tag 'ceph-for-6.17-rc6' of https://github.com/ceph/ceph-client

Pull ceph fixes from Ilya Dryomov:
 "A fix for a race condition around r_parent tracking that took a long
  time to track down from Alex and some fixes for potential crashes on
  accessing invalid memory from Max and myself.

  All marked for stable"

* tag 'ceph-for-6.17-rc6' of https://github.com/ceph/ceph-client:
  libceph: fix invalid accesses to ceph_connection_v1_info
  ceph: fix crash after fscrypt_encrypt_pagecache_blocks() error
  ceph: always call ceph_shift_unused_folios_left()
  ceph: fix race condition where r_parent becomes stale before sending message
  ceph: fix race condition validating r_parent before applying state

2 months agoMerge tag 'regulator-fix-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 13 Sep 2025 17:40:50 +0000 (10:40 -0700)] 
Merge tag 'regulator-fix-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fix from Mark Brown:
 "One fix for sy7636a which got confused about which device to use to
  manage the lifecycle of the power good GPIO because it's looked up
  from the parent device due to the way DT bindings work"

* tag 'regulator-fix-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: sy7636a: fix lifecycle of power good gpio

2 months agoMerge tag 'driver-core-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 13 Sep 2025 17:36:06 +0000 (10:36 -0700)] 
Merge tag 'driver-core-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core

Pull driver core fixes from Danilo Krummrich:

 - Fix UAF in cgroup pressure polling by using kernfs_get_active_of()
   to prevent operations on released file descriptors

 - Fix unresolved intra-doc link in the documentation of struct Device
   when CONFIG_DRM != y

 - Update the DMA Rust MAINTAINERS entry

* tag 'driver-core-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core:
  MAINTAINERS: Update the DMA Rust entry
  kernfs: Fix UAF in polling when open file is released
  rust: device: fix unresolved link to drm::Device

2 months agodrm/gem/shmem: Extract drm_gem_shmem_release() from drm_gem_shmem_free()
Lyude Paul [Thu, 11 Sep 2025 22:57:39 +0000 (18:57 -0400)] 
drm/gem/shmem: Extract drm_gem_shmem_release() from drm_gem_shmem_free()

At the moment, the way that we currently free gem shmem objects is not
ideal for rust bindings. drm_gem_shmem_free() releases all of the
associated memory with a gem shmem object with kfree(), which means that
for us to correctly release a gem shmem object in rust we have to manually
drop all of the contents of our gem object structure in-place by hand
before finally calling drm_gem_shmem_free() to release the shmem resources
and the allocation for the gem object.

Since the only reason this is an issue is because of drm_gem_shmem_free()
calling kfree(), we can fix this by splitting drm_gem_shmem_free() out into
itself and drm_gem_shmem_release(), where drm_gem_shmem_release() releases
the various gem shmem resources without freeing the structure itself. With
this, we can safely re-acquire the KBox for the gem object's memory
allocation and let rust handle cleaning up all of the other struct members
automatically.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Link: https://lore.kernel.org/r/20250911230147.650077-3-lyude@redhat.com
2 months agodrm/gem/shmem: Extract drm_gem_shmem_init() from drm_gem_shmem_create()
Lyude Paul [Thu, 11 Sep 2025 22:57:38 +0000 (18:57 -0400)] 
drm/gem/shmem: Extract drm_gem_shmem_init() from drm_gem_shmem_create()

With gem objects in rust, the most ideal way for us to be able to handle
gem shmem object creation is to be able to handle the memory allocation of
a gem object ourselves - and then have the DRM gem shmem helpers initialize
the object we've allocated afterwards. So, let's split out
drm_gem_shmem_init() from drm_gem_shmem_create() to allow for doing this.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Link: https://lore.kernel.org/r/20250911230147.650077-2-lyude@redhat.com