]> git.ipfire.org Git - thirdparty/linux.git/log
thirdparty/linux.git
2 months agopanel/ilitek-ili9806e: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:40 +0000 (22:03 -0500)] 
panel/ilitek-ili9806e: Use refcounted allocation in place of devm_kzalloc()

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

Reviewed-by: Michael Walle <mwalle@kernel.org>
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-9-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/panel-ili9805: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:39 +0000 (22:03 -0500)] 
panel/panel-ili9805: Use refcounted allocation in place of devm_kzalloc()

Start using the new helper that does the refcounted
allocations

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-8-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/ilitek-ili9341: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:38 +0000 (22:03 -0500)] 
panel/ilitek-ili9341: 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-7-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/ilitek-ili9322: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:37 +0000 (22:03 -0500)] 
panel/ilitek-ili9322: 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-6-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/himax-hx8394: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:36 +0000 (22:03 -0500)] 
panel/himax-hx8394: 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-5-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/himax-hx83112a: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:35 +0000 (22:03 -0500)] 
panel/himax-hx83112a: 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-4-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/fy07024di26a30d: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:34 +0000 (22:03 -0500)] 
panel/fy07024di26a30d: 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-3-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/feixin-k101-im2ba02: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:33 +0000 (22:03 -0500)] 
panel/feixin-k101-im2ba02: 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-2-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agopanel/panel-elida-kd35t133: Use refcounted allocation in place of devm_kzalloc()
Anusha Srivatsa [Wed, 21 May 2025 03:03:32 +0000 (22:03 -0500)] 
panel/panel-elida-kd35t133: 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-1-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2 months agodrm/bridge: adv7511: switch to the HDMI connector helpers
Dmitry Baryshkov [Sat, 17 May 2025 01:59:46 +0000 (04:59 +0300)] 
drm/bridge: adv7511: switch to the HDMI connector helpers

Rewrite the ADV7511 driver to use implementation provided by the DRM
HDMI connector framework, including the Audio and CEC bits. Drop the
in-bridge connector support and use drm_bridge_connector if the host
requires the connector to be provided by the bridge.

Note: currently only AVI InfoFrames are supported. Existing driver
doesn't support programming any other InfoFrames directly and Audio
InfoFrame seems to be programmed using individual bits and pieces rather
than programming it directly.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250517-drm-hdmi-connector-cec-v6-10-35651db6f19b@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/display: bridge-connector: handle CEC adapters
Dmitry Baryshkov [Sat, 17 May 2025 01:59:45 +0000 (04:59 +0300)] 
drm/display: bridge-connector: handle CEC adapters

Implement necessary glue code to let DRM bridge drivers to implement CEC
adapters support.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250517-drm-hdmi-connector-cec-v6-9-35651db6f19b@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/display: bridge-connector: hook in CEC notifier support
Dmitry Baryshkov [Sat, 17 May 2025 01:59:44 +0000 (04:59 +0300)] 
drm/display: bridge-connector: hook in CEC notifier support

Allow HDMI DRM bridges to create CEC notifier. Physical address is
handled automatically by drm_atomic_helper_connector_hdmi_hotplug()
being called from .detect() path.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250517-drm-hdmi-connector-cec-v6-8-35651db6f19b@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/display: hdmi-state-helper: handle CEC physical address
Dmitry Baryshkov [Sat, 17 May 2025 01:59:42 +0000 (04:59 +0300)] 
drm/display: hdmi-state-helper: handle CEC physical address

Call HDMI CEC helpers in order to update physical address of the
adapter.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20250517-drm-hdmi-connector-cec-v6-6-35651db6f19b@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/display: add CEC helpers code
Dmitry Baryshkov [Sat, 17 May 2025 01:59:41 +0000 (04:59 +0300)] 
drm/display: add CEC helpers code

Add generic CEC helpers to be used by HDMI drivers. Both notifier and
and adapter are supported for registration. Once registered, the driver
can call common set of functions to update physical address, to
invalidate it or to unregister CEC data. Unlike drm_connector_cec_funcs
(which provides interface common to all implementations, including, but
not limited to the CEC adapter, CEC notifier, CEC pin-based adapter,
etc) the struct drm_connector_hdmi_cec_adapter_ops provides callbacks
specific to the CEC adapter implementations.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250517-drm-hdmi-connector-cec-v6-5-35651db6f19b@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/display: move CEC_CORE selection to DRM_DISPLAY_HELPER
Dmitry Baryshkov [Sat, 17 May 2025 01:59:40 +0000 (04:59 +0300)] 
drm/display: move CEC_CORE selection to DRM_DISPLAY_HELPER

THe Kconfig symbol DRM_DISPLAY_DP_AUX_CEC is a boolean which simply
toggles whether DP_AUX_CEC support should be built into the
drm_display_helper (which can be eithera module or built-in into the
kernel). If DRM_DISPLAY_DP_AUX_CEC is selected, then CEC_CORE is
selected to be built-in into the kernel even if DRM_DISPLAY_HELPER is
selected to be built as a module. Move CEC_CORE selection to the latter
symbol in order to allow it to be built as a module.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250517-drm-hdmi-connector-cec-v6-4-35651db6f19b@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/connector: add CEC-related fields
Dmitry Baryshkov [Sat, 17 May 2025 01:59:39 +0000 (04:59 +0300)] 
drm/connector: add CEC-related fields

As a preparation to adding HDMI CEC helper code, add CEC-related fields
to the struct drm_connector. The callbacks abstract CEC infrastructure
in order to support CEC adapters and CEC notifiers in a universal way.

CEC data is a void pointer as it allows us to make CEC data
helper-specific. For example, currently it will be either cec_notifier
or cec_adapter + drm_connector_hdmi_cec_funcs. Later cec-pin might store
platform callbacks here. DP CEC might need to store AUX pointer, etc.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250517-drm-hdmi-connector-cec-v6-3-35651db6f19b@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/bridge: allow limiting I2S formats
Dmitry Baryshkov [Sat, 17 May 2025 01:59:38 +0000 (04:59 +0300)] 
drm/bridge: allow limiting I2S formats

By default HDMI codec registers all formats supported on the I2S bus.
Allow bridges (and connectors) to limit the list of the PCM formats
supported by the HDMI codec.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20250517-drm-hdmi-connector-cec-v6-2-35651db6f19b@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/bridge: move private data to the end of the struct
Dmitry Baryshkov [Sat, 17 May 2025 01:59:37 +0000 (04:59 +0300)] 
drm/bridge: move private data to the end of the struct

WHen adding HDMI fields I didn't notice the private: declaration for HPD
fields. Move private fields to the end of the struct drm_bride to have
clear distinction between private and public fields.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20250517-drm-hdmi-connector-cec-v6-1-35651db6f19b@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/panel-edp: Add support for AUO G156HAN03.0 panel
Ernest Van Hoecke [Tue, 20 May 2025 12:43:28 +0000 (14:43 +0200)] 
drm/panel-edp: Add support for AUO G156HAN03.0 panel

AUO G156HAN03.0 EDID:

00 ff ff ff ff ff ff 00 06 af ed 30 00 00 00 00
1a 1c 01 04 a5 22 13 78 02 05 b5 94 59 59 92 28
1d 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 78 37 80 b4 70 38 2e 40 6c 30
aa 00 58 c1 10 00 00 18 00 00 00 0f 00 00 00 00
00 00 00 00 00 00 00 00 00 20 00 00 00 fe 00 41
55 4f 0a 20 20 20 20 20 20 20 20 20 00 00 00 fe
00 47 31 35 36 48 41 4e 30 33 2e 30 20 0a 00 bb

Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250520124332.71705-1-ernest.vanhoecke@toradex.com
2 months agodrm/tidss: Add support for AM62L display subsystem
Devarsh Thakkar [Wed, 7 May 2025 18:06:31 +0000 (23:36 +0530)] 
drm/tidss: Add support for AM62L display subsystem

Enable display for AM62L DSS [1] which supports only a single display
pipeline using a single overlay manager, single video port and a single
video lite pipeline which does not support scaling.

The output of video port is routed to SoC boundary via DPI interface and
the DPI signals from the video port are also routed to DSI Tx controller
present within the SoC.

[1]: Section 11.7 (Display Subsystem and Peripherals)
Link : https://www.ti.com/lit/pdf/sprujb4

Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://lore.kernel.org/r/20250507180631.874930-4-devarsht@ti.com
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
2 months agodrm/tidss: Update infrastructure to support K3 DSS cut-down versions
Devarsh Thakkar [Wed, 7 May 2025 18:06:30 +0000 (23:36 +0530)] 
drm/tidss: Update infrastructure to support K3 DSS cut-down versions

SoCs like AM62Lx support cut-down version of K3 DSS where although same
register space is supported as in other K3 DSS supported SoCs such as
AM65x, AM62x, AM62Ax but some of the resources such as planes and
corresponding register spaces are truncated.

For e.g. AM62Lx has only single VIDL pipeline supported, so corresponding
register spaces for other video pipelines need to be skipped.

To add a generic support for future SoCs where one or more video pipelines
can get truncated from the parent register space, move the video plane
related information to vid_info struct which will also have a field to
indicate hardware index of each of the available video planes, so that
driver only maps and programs those video pipes and skips the unavailable
ones.

While at it, also change the num_planes field in the features structure to
num_vid so that all places in code which use vid_info structure are
highlighted in the code.

Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://lore.kernel.org/r/20250507180631.874930-3-devarsht@ti.com
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
2 months agodt-bindings: display: ti,am65x-dss: Add support for AM62L DSS
Devarsh Thakkar [Wed, 7 May 2025 18:06:29 +0000 (23:36 +0530)] 
dt-bindings: display: ti,am65x-dss: Add support for AM62L DSS

The DSS controller on TI's AM62L SoC is an update from that on TI's
AM625/AM65x/AM62A7 SoC. The AM62L DSS [1] only supports a single display
pipeline using a single overlay manager, single video port and a single
video lite pipeline which does not support scaling.

The output of video port is routed to SoC boundary via DPI interface and
the DPI signals from the video port are also routed to DSI Tx controller
present within the SoC.

[1]: Section 11.7 (Display Subsystem and Peripherals)
Link : https://www.ti.com/lit/pdf/sprujb4

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Jayesh Choudhary <j-choudhary@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Link: https://lore.kernel.org/r/20250507180631.874930-2-devarsht@ti.com
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
2 months agoaccel/habanalabs: Switch to use %ptTs
Andy Shevchenko [Wed, 5 Mar 2025 11:00:25 +0000 (13:00 +0200)] 
accel/habanalabs: Switch to use %ptTs

Use %ptTs instead of open-coded variant to print contents of time64_t type
in human readable form.

This changes N/A output to 1970-01-01 00:00:00 for zero timestamps,
but it's used only in the dev_err() output and won't break anything.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Yaron Avizrat <yaron.avizrat@intel.com>
Reviewed-by: Koby Elbaz <koby.elbaz@intel.com>
Link: https://lore.kernel.org/r/20250305110126.2134307-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Koby Elbaz <koby.elbaz@intel.com>
2 months agodrm/rockchip: cleanup fb when drm_gem_fb_afbc_init failed
Andy Yan [Fri, 9 May 2025 03:15:59 +0000 (11:15 +0800)] 
drm/rockchip: cleanup fb when drm_gem_fb_afbc_init failed

In the function drm_gem_fb_init_with_funcs, the framebuffer (fb)
and its corresponding object ID have already been registered.

So we need to cleanup the drm framebuffer if the subsequent
execution of drm_gem_fb_afbc_init fails.

Directly call drm_framebuffer_put to ensure that all fb related
resources are cleanup.

Fixes: 7707f7227f09 ("drm/rockchip: Add support for afbc")
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20250509031607.2542187-1-andyshrk@163.com
2 months agodt-bindings: gpu: mali-utgard: Add Rockchip RK3528 compatible
Jonas Karlman [Sun, 18 May 2025 22:54:11 +0000 (22:54 +0000)] 
dt-bindings: gpu: mali-utgard: Add Rockchip RK3528 compatible

Rockchip RK3528 SoC has a Mali-450 MP2. Add a compatible for it.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20250518225418.682182-2-jonas@kwiboo.se
2 months agodrm/panel-edp: Add BOE NV133WUM-N61 panel entry
Rob Clark [Thu, 15 May 2025 21:11:10 +0000 (14:11 -0700)] 
drm/panel-edp: Add BOE NV133WUM-N61 panel entry

Add an eDP panel for BOE NV133WUM-N61, which appears to be a 3rd panel
option on the lenevo x13s laptop.

edid:
00 ff ff ff ff ff ff 00 09 e5 64 09 00 00 00 00
16 1e 01 04 a5 1d 12 78 03 55 8e a7 51 4c 9c 26
0f 52 53 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 74 3c 80 a0 70 b0 28 40 30 20
36 00 1e b3 10 00 00 1a 5d 30 80 a0 70 b0 28 40
30 20 36 00 1e b3 10 00 00 1a 00 00 00 fe 00 42
4f 45 20 48 46 0a 20 20 20 20 20 20 00 00 00 fe
00 4e 56 31 33 33 57 55 4d 2d 4e 36 31 0a 00 7d

datasheet: https://datasheet4u.com/pdf-down/N/V/1/NV133WUM-N61-BOE.pdf

v2: Actually get the panel name correct in the table

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250515211110.8806-1-robdclark@gmail.com
2 months agodrm/nouveau/dp: convert to use ERR_CAST()
Zhang Enpei [Thu, 15 May 2025 12:11:08 +0000 (20:11 +0800)] 
drm/nouveau/dp: convert to use ERR_CAST()

As opposed to open-code, use ERR_CAST to clearly indicate that this is a
pointer to an error value and a type conversion is performed.

Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
Link: https://lore.kernel.org/r/20250515201108576jof-gkjSxRfMaGDgKo-pc@zte.com.cn
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2 months agodrm/nouveau/fifo: small cleanup in nvkm_chan_cctx_get()
Dan Carpenter [Wed, 30 Apr 2025 08:06:32 +0000 (11:06 +0300)] 
drm/nouveau/fifo: small cleanup in nvkm_chan_cctx_get()

"&chan->cgrp->mutex" and "&cgrp->mutex" are the same thing.  Use
"&cgrp->mutex" consistently.  It looks nicer and it silences a
Smatch static checker warning.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/aBHaCM66pXaP84ei@stanley.mountain
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2 months agodrm/nouveau: Check dma_fence in canonical way
Philipp Stanner [Thu, 24 Apr 2025 13:02:54 +0000 (15:02 +0200)] 
drm/nouveau: Check dma_fence in canonical way

In nouveau_fence_done(), a fence is checked for being signaled by
manually evaluating the base fence's bits. This can be done in a
canonical manner through dma_fence_is_signaled().

Replace the bit-check with dma_fence_is_signaled().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250424130254.42046-6-phasta@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2 months agodrm/nouveau: Simplify nouveau_fence_done()
Philipp Stanner [Thu, 24 Apr 2025 13:02:53 +0000 (15:02 +0200)] 
drm/nouveau: Simplify nouveau_fence_done()

nouveau_fence_done() contains an if branch that checks whether a
nouveau_fence has either of the two existing nouveau_fence backend ops,
which will always evaluate to true.

Remove the surplus check.

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250424130254.42046-5-phasta@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2 months agodrm/nouveau: Simplify calls to nvif_event_block()
Philipp Stanner [Thu, 24 Apr 2025 13:02:52 +0000 (15:02 +0200)] 
drm/nouveau: Simplify calls to nvif_event_block()

nouveau_fence_signal() returns a de-facto boolean to indicate when
nvif_event_block() shall be called.

The code can be made more compact and readable by calling
nvif_event_block() in nouveau_fence_update() directly.

Make those calls in nouveau_fence.c more canonical.

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250424130254.42046-4-phasta@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2 months agodrm/nouveau: nouveau_fence: Standardize list iterations
Philipp Stanner [Thu, 24 Apr 2025 13:02:51 +0000 (15:02 +0200)] 
drm/nouveau: nouveau_fence: Standardize list iterations

nouveau_fence.c iterates over lists in a non-canonical way. Since the
operations done are just basic for-each-loops and list-empty checks,
they should be written in the standard form.

Use standard list operations.

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250424130254.42046-3-phasta@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2 months agoudmabuf: fix vmap missed offset page
Huan Yang [Mon, 28 Apr 2025 07:38:30 +0000 (15:38 +0800)] 
udmabuf: fix vmap missed offset page

Before invoke vmap, we need offer a pages pointer array which each page
need to map in vmalloc area.

But currently vmap_udmabuf only set each folio's head page into pages,
missed each offset pages when iter.

This patch set the correctly offset page in each folio into array.

Signed-off-by: Huan Yang <link@vivo.com>
Fixes: 5e72b2b41a21 ("udmabuf: convert udmabuf driver to use folios")
Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Link: https://lore.kernel.org/r/20250428073831.19942-3-link@vivo.com
2 months agoRevert "udmabuf: fix vmap_udmabuf error page set"
Huan Yang [Mon, 28 Apr 2025 07:38:29 +0000 (15:38 +0800)] 
Revert "udmabuf: fix vmap_udmabuf error page set"

This reverts commit 18d7de823b7150344d242c3677e65d68c5271b04.

We cannot use vmap_pfn() in vmap_udmabuf() as it would fail the pfn_valid()
check in vmap_pfn_apply(). This is because vmap_pfn() is intended to be
used for mapping non-struct-page memory such as PCIe BARs. Since, udmabuf
mostly works with pages/folios backed by shmem/hugetlbfs/THP, vmap_pfn()
is not the right tool or API to invoke for implementing vmap.

Signed-off-by: Huan Yang <link@vivo.com>
Suggested-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reported-by: Bingbu Cao <bingbu.cao@linux.intel.com>
Closes: https://lore.kernel.org/dri-devel/eb7e0137-3508-4287-98c4-816c5fd98e10@vivo.com/T/#mbda4f64a3532b32e061f4e8763bc8e307bea3ca8
Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Link: https://lore.kernel.org/r/20250428073831.19942-2-link@vivo.com
2 months agodma-fence: Change signature of __dma_fence_is_later
Tvrtko Ursulin [Thu, 15 May 2025 09:49:56 +0000 (10:49 +0100)] 
dma-fence: Change signature of __dma_fence_is_later

With the goal of reducing the need for drivers to touch (and dereference)
fence->ops, we change the prototype of __dma_fence_is_later() to take
fence instead of fence->ops.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250515095004.28318-2-tvrtko.ursulin@igalia.com
Signed-off-by: Christian König <christian.koenig@amd.com>
2 months agodrm/hyperv: Replace simple-KMS with regular atomic helpers
Ryosuke Yasuoka [Sun, 27 Apr 2025 10:18:23 +0000 (19:18 +0900)] 
drm/hyperv: Replace simple-KMS with regular atomic helpers

Drop simple-KMS in favor of regular atomic helpers to make the code more
modular. The simple-KMS helper mix up plane and CRTC state, so it is
obsolete and should go away [1]. Since it just split the simple-pipe
functions into per-plane and per-CRTC, no functional changes is
expected.

[1] https://lore.kernel.org/lkml/dae5089d-e214-4518-b927-5c4149babad8@suse.de/

Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Ryosuke Yasuoka <ryasuoka@redhat.com>
Link: https://lore.kernel.org/r/20250427101825.812766-1-ryasuoka@redhat.com
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
2 months agodrm/vmwgfx: Use non-hybrid PCI devres API
Philipp Stanner [Wed, 14 May 2025 07:31:27 +0000 (09:31 +0200)] 
drm/vmwgfx: Use non-hybrid PCI devres API

vmwgfx enables its PCI device with pcim_enable_device(). This,
implicitly, switches the function pci_request_regions() into managed
mode, where it becomes a devres function.

The PCI subsystem wants to remove this hybrid nature from its
interfaces. To do so, users of the aforementioned combination of
functions must be ported to non-hybrid functions.

Moreover, since both functions are already managed in this driver, the
calls to pci_release_regions() are unnecessary.

Remove the calls to pci_release_regions().

Replace the call to sometimes-managed pci_request_regions() with one to
always-managed pcim_request_all_regions().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Zack Rusin <zack.rusin@broadcom.com>
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://lore.kernel.org/r/20250514073126.85443-2-phasta@kernel.org
2 months agoMAINTAINERS: Add maintainer for i.MX8qxp Display Controller
Liu Ying [Mon, 14 Apr 2025 03:50:22 +0000 (11:50 +0800)] 
MAINTAINERS: Add maintainer for i.MX8qxp Display Controller

Add myself as the maintainer of i.MX8qxp Display Controller.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250414035028.1561475-14-victor.liu@nxp.com
2 months agodrm/imx: Add i.MX8qxp Display Controller KMS
Liu Ying [Mon, 14 Apr 2025 03:50:21 +0000 (11:50 +0800)] 
drm/imx: Add i.MX8qxp Display Controller KMS

i.MX8qxp Display Controller(DC) is comprised of three main components that
include a blit engine for 2D graphics accelerations, display controller for
display output processing, as well as a command sequencer.  Add kernel
mode setting support for the display controller part with two CRTCs and
two primary planes(backed by FetchLayer and FetchWarp respectively).  The
registers of the display controller are accessed without command sequencer
involved, instead just by using CPU.  The command sequencer is supposed to
be used by the blit engine.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Link: https://lore.kernel.org/r/20250414035028.1561475-13-victor.liu@nxp.com
2 months agodrm/imx: Add i.MX8qxp Display Controller interrupt controller
Liu Ying [Mon, 14 Apr 2025 03:50:20 +0000 (11:50 +0800)] 
drm/imx: Add i.MX8qxp Display Controller interrupt controller

i.MX8qxp Display Controller has a built-in interrupt controller to support
Enable/Status/Preset/Clear interrupt bit.  Add driver for it.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Link: https://lore.kernel.org/r/20250414035028.1561475-12-victor.liu@nxp.com
2 months agodrm/imx: Add i.MX8qxp Display Controller pixel engine
Liu Ying [Mon, 14 Apr 2025 03:50:19 +0000 (11:50 +0800)] 
drm/imx: Add i.MX8qxp Display Controller pixel engine

i.MX8qxp Display Controller pixel engine consists of all processing
units that operate in the AXI bus clock domain.  Add drivers for
ConstFrame, ExtDst, FetchLayer, FetchWarp and LayerBlend units, as
well as a pixel engine driver, so that two displays with primary
planes can be supported.  The pixel engine driver and those unit
drivers are components to be aggregated by a master registered in
the upcoming DRM driver.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20250414035028.1561475-11-victor.liu@nxp.com
2 months agodrm/imx: Add i.MX8qxp Display Controller display engine
Liu Ying [Mon, 14 Apr 2025 03:50:18 +0000 (11:50 +0800)] 
drm/imx: Add i.MX8qxp Display Controller display engine

i.MX8qxp Display Controller display engine consists of all processing
units that operate in a display clock domain.  Add minimal feature
support with FrameGen and TCon so that the engine can output display
timings.  The FrameGen driver, TCon driver and display engine driver
are components to be aggregated by a master registered in the upcoming
DRM driver.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20250414035028.1561475-10-victor.liu@nxp.com
2 months agodt-bindings: display: imx: Add i.MX8qxp Display Controller
Liu Ying [Mon, 14 Apr 2025 03:50:17 +0000 (11:50 +0800)] 
dt-bindings: display: imx: Add i.MX8qxp Display Controller

i.MX8qxp Display Controller(DC) is comprised of three main components that
include a blit engine for 2D graphics accelerations, display controller for
display output processing, as well as a command sequencer.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250414035028.1561475-9-victor.liu@nxp.com
2 months agodt-bindings: interrupt-controller: Add i.MX8qxp Display Controller interrupt controller
Liu Ying [Mon, 14 Apr 2025 03:50:16 +0000 (11:50 +0800)] 
dt-bindings: interrupt-controller: Add i.MX8qxp Display Controller interrupt controller

i.MX8qxp Display Controller has a built-in interrupt controller to support
Enable/Status/Preset/Clear interrupt bit.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250414035028.1561475-8-victor.liu@nxp.com
2 months agodt-bindings: display: imx: Add i.MX8qxp Display Controller command sequencer
Liu Ying [Mon, 14 Apr 2025 03:50:15 +0000 (11:50 +0800)] 
dt-bindings: display: imx: Add i.MX8qxp Display Controller command sequencer

i.MX8qxp Display Controller contains a command sequencer is designed to
autonomously process command lists.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250414035028.1561475-7-victor.liu@nxp.com
2 months agodt-bindings: display: imx: Add i.MX8qxp Display Controller AXI performance counter
Liu Ying [Mon, 14 Apr 2025 03:50:14 +0000 (11:50 +0800)] 
dt-bindings: display: imx: Add i.MX8qxp Display Controller AXI performance counter

i.MX8qxp Display Controller contains a AXI performance counter which allows
measurement of average bandwidth and latency during operation.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250414035028.1561475-6-victor.liu@nxp.com
2 months agodt-bindings: display: imx: Add i.MX8qxp Display Controller pixel engine
Liu Ying [Mon, 14 Apr 2025 03:50:13 +0000 (11:50 +0800)] 
dt-bindings: display: imx: Add i.MX8qxp Display Controller pixel engine

i.MX8qxp Display Controller pixel engine consists of all processing units
that operate in the AXI bus clock domain.  Command sequencer and interrupt
controller of the Display Controller work with AXI bus clock, but they are
not in pixel engine.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250414035028.1561475-5-victor.liu@nxp.com
2 months agodt-bindings: display: imx: Add i.MX8qxp Display Controller display engine
Liu Ying [Mon, 14 Apr 2025 03:50:12 +0000 (11:50 +0800)] 
dt-bindings: display: imx: Add i.MX8qxp Display Controller display engine

i.MX8qxp Display Controller display engine consists of all processing units
that operate in a display clock domain.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250414035028.1561475-4-victor.liu@nxp.com
2 months agodt-bindings: display: imx: Add i.MX8qxp Display Controller blit engine
Liu Ying [Mon, 14 Apr 2025 03:50:11 +0000 (11:50 +0800)] 
dt-bindings: display: imx: Add i.MX8qxp Display Controller blit engine

i.MX8qxp Display Controller contains a blit engine for raster graphics.
It may read up to 3 source images from memory and computes one destination
image from it, which is written back to memory.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250414035028.1561475-3-victor.liu@nxp.com
2 months agodt-bindings: display: imx: Add i.MX8qxp Display Controller processing units
Liu Ying [Mon, 14 Apr 2025 03:50:10 +0000 (11:50 +0800)] 
dt-bindings: display: imx: Add i.MX8qxp Display Controller processing units

Freescale i.MX8qxp Display Controller is implemented as construction set of
building blocks with unified concept and standardized interfaces.  Document
all existing processing units.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250414035028.1561475-2-victor.liu@nxp.com
2 months agodrm: rz-du: Support panels connected directly to the DPAD output
hienhuynh [Thu, 8 May 2025 09:50:35 +0000 (10:50 +0100)] 
drm: rz-du: Support panels connected directly to the DPAD output

This patch is based on the commit 73eb5476df72 ("drm: rcar-du: Support
panels connected directly to the DPAD outputs").

The RZ DU driver assumes that a bridge is always connected to the DU
output. This is valid for the HDMI output, but the DPAD output can be
connected directly to a panel, in which case no bridge is available.

To support this use case, detect whether the entities connected to the DU
DPAD output is encoders or panels based on the number of ports of their DT
node, and retrieve the corresponding type of DRM objects. For panels,
additionally create panel bridge instances.

Signed-off-by: hienhuynh <hien.huynh.px@renesas.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Tested-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Link: https://lore.kernel.org/r/20250508095042.25164-1-biju.das.jz@bp.renesas.com
2 months agodrm/shmem-helper: Add lockdep asserts to vmap/vunmap
Asahi Lina [Tue, 18 Mar 2025 19:22:35 +0000 (16:22 -0300)] 
drm/shmem-helper: Add lockdep asserts to vmap/vunmap

Since commit 21aa27ddc582 ("drm/shmem-helper: Switch to reservation
lock"), the drm_gem_shmem_vmap and drm_gem_shmem_vunmap functions
require that the caller holds the DMA reservation lock for the object.
Add lockdep assertions to help validate this.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://lore.kernel.org/r/20250318-drm-gem-shmem-v1-1-64b96511a84f@collabora.com
2 months agodrm/sched: Remove kthread header
Philipp Stanner [Fri, 14 Mar 2025 10:10:24 +0000 (11:10 +0100)] 
drm/sched: Remove kthread header

The kthread header doesn't need to be included anymore. It's a relict
from commit a6149f039369 ("drm/sched: Convert drm scheduler to use a
work queue rather than kthread").

Remove the unneeded includes.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250314101023.111248-3-phasta@kernel.org
2 months agodrm/sched: Fix outdated comments referencing thread
Philipp Stanner [Fri, 14 Mar 2025 10:10:23 +0000 (11:10 +0100)] 
drm/sched: Fix outdated comments referencing thread

The GPU scheduler's comments refer to a "thread" at various places.
Those are leftovers from commit a6149f039369 ("drm/sched: Convert drm
scheduler to use a work queue rather than kthread").

Replace all references to kthreads.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250314101023.111248-2-phasta@kernel.org
2 months agoMAINTAINERS: Add entries for drm_panic, drm_panic_qr_code and drm_log
Jocelyn Falempe [Wed, 7 May 2025 07:51:47 +0000 (09:51 +0200)] 
MAINTAINERS: Add entries for drm_panic, drm_panic_qr_code and drm_log

Add myself and Javier as maintainer for drm_panic, drm_panic_qr_code
and drm_log.

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250507075529.263355-1-jfalempe@redhat.com
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
2 months agodrm/virtio: Fix NULL pointer deref in virtgpu_dma_buf_free_obj()
Vivek Kasireddy [Thu, 1 May 2025 23:24:19 +0000 (16:24 -0700)] 
drm/virtio: Fix NULL pointer deref in virtgpu_dma_buf_free_obj()

There is a chance that obj->dma_buf would be NULL by the time
virtgpu_dma_buf_free_obj() is called. This can happen for imported
prime objects, when drm_gem_object_exported_dma_buf_free() gets
called on them before drm_gem_object_free(). This is because
drm_gem_object_exported_dma_buf_free() explicitly sets
obj->dma_buf to NULL.

Therefore, fix this issue by storing the dma_buf pointer in the
virtio_gpu_object instance and using it in virtgpu_dma_buf_free_obj.
This stored pointer is guaranteed to be valid until the object is
freed as we took a reference on it in virtgpu_gem_prime_import().

Fixes: 415cb45895f4 ("drm/virtio: Use dma_buf from GEM object instance")
Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://lore.kernel.org/r/20250501232419.180337-1-vivek.kasireddy@intel.com
2 months agodrm/sitronix: move tiny Sitronix drivers to their own subdir
Marcus Folkesson [Mon, 12 May 2025 07:15:11 +0000 (09:15 +0200)] 
drm/sitronix: move tiny Sitronix drivers to their own subdir

We start to have support many Sitronix displays in the tiny directory,
and we expect more to come.

Move them to their own subdirectory.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Suggested-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250512-sitronix-v3-1-bbf6cc413698@gmail.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2 months agodrm/i915/display: Indexed 8bit format does not support async flip
Arun R Murthy [Mon, 7 Apr 2025 05:43:49 +0000 (11:13 +0530)] 
drm/i915/display: Indexed 8bit format does not support async flip

Async flip is not supported with Indexed 8 bit format as it depends on
LUT and can't be updated atomically.

Note: This may change the alignment for C8 framebuffers on some
platforms.

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://lore.kernel.org/r/20250407-asyn-v13-5-b93ef83076c5@intel.com
2 months agodrm/i915/display: Add i915 hook for format_mod_supported_async
Arun R Murthy [Mon, 7 Apr 2025 05:43:48 +0000 (11:13 +0530)] 
drm/i915/display: Add i915 hook for format_mod_supported_async

Hook up the newly added plane function pointer
format_mod_supported_async to populate the modifiers/formats supported
by asynchronous flips.

v5: Correct the if condition for modifier support check (Chaitanya)
v6: Replace uint32_t/uint64_t with u32/u64 (Jani)
v7: Move plannar check from intel_async_flip_check_hw() to
intel_plane_format_mod_supported_async() (Ville)
v8: In case of error print format/modifier (Chaitanya)
v9: Exclude C8 format as its not supported by hardware
v10: filter only planar formats
     move changes in can_async_flip to new patch (Ville)

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://lore.kernel.org/r/20250407-asyn-v13-4-b93ef83076c5@intel.com
2 months agodrm/i915/display: Acomodate format check in intel_plane_can_async_flip()
Arun R Murthy [Mon, 7 Apr 2025 05:43:47 +0000 (11:13 +0530)] 
drm/i915/display: Acomodate format check in intel_plane_can_async_flip()

The function intel_plane_can_async_flip() checks for async supported
modifier, add format support check also in the same function.

Note: on ADL the surface base addr is required to be 16k aligned and if
not might generate DMAR and GGTT faults leading to glitches. This patch
changes the 16k alignment to 4k for planar formats.

v11: Move filtering Indexed 8bit to a separate patch (Ville)
v12: correct the commit msg and remove unwanted debug print (Ville)

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://lore.kernel.org/r/20250407-asyn-v13-3-b93ef83076c5@intel.com
2 months agodrm/plane: modify create_in_formats to acommodate async
Arun R Murthy [Mon, 7 Apr 2025 05:43:46 +0000 (11:13 +0530)] 
drm/plane: modify create_in_formats to acommodate async

create_in_formats creates the list of supported format/modifiers for
synchronous flips, modify the same function so as to take the
format_mod_supported as argument and create list of format/modifier for
async as well.

v5: create_in_formats can return -ve value in failure case, correct the
if condition to check the creation of blob <Chaitanya>
Dont add the modifier for which none of the formats is not supported.
v6: Remove the code for masking the unsupported modifiers as UMD can
leave with it. (Naveen/Chaitanya)
v7: Retain the unsupported modifiers, userspace should have no
impact, return pointer to blob instead of blob_id(Ville)

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Acked-by: Xaver Hugl <xaver.hugl@kde.org>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: Naveen Kumar <naveen1.kumar@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://lore.kernel.org/r/20250407-asyn-v13-2-b93ef83076c5@intel.com
2 months agodrm/plane: Add new plane property IN_FORMATS_ASYNC
Arun R Murthy [Mon, 7 Apr 2025 05:43:45 +0000 (11:13 +0530)] 
drm/plane: Add new plane property IN_FORMATS_ASYNC

There exists a property IN_FORMATS which exposes the plane supported
modifiers/formats to the user. In some platforms when asynchronous flip
are used all of modifiers/formats mentioned in IN_FORMATS are not
supported. This patch adds a new plane property IN_FORMATS_ASYNC to
expose the async flip supported modifiers/formats so that user can use
this information ahead and do flip with unsupported
formats/modifiers. This will save flip failures.
Add a new function pointer similar to format_mod_supported specifically
for asynchronous flip.

v2: Remove async variable from drm_plane (Ville)
v3: Add new function pointer for async (Ville)
v5: Typo corrected in commit message & some correction in the kernel
documentation. (Chaitanya)
v7: Place IN_FORMATS_ASYNC next to IN_FORMATS (Ville)
v8: replace uint32_t with u32 and uint64_t with u64 (Chaitanya)

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Acked-by: Xaver Hugl <xaver.hugl@kde.org>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: Naveen Kumar <naveen1.kumar@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://lore.kernel.org/r/20250407-asyn-v13-1-b93ef83076c5@intel.com
2 months agodrm/cirrus: Use non-hybrid PCI devres API
Philipp Stanner [Thu, 17 Apr 2025 09:40:10 +0000 (11:40 +0200)] 
drm/cirrus: Use non-hybrid PCI devres API

cirrus enables its PCI device with pcim_enable_device(). This,
implicitly, switches the function pci_request_regions() into managed
mode, where it becomes a devres function.

The PCI subsystem wants to remove this hybrid nature from its
interfaces. To do so, users of the aforementioned combination of
functions must be ported to non-hybrid functions.

Replace the call to sometimes-managed pci_request_regions() with one to
the always-managed pcim_request_all_regions().

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250417094009.29297-2-phasta@kernel.org
2 months agoaccel/amdxdna: Support submit commands without arguments
Lizhi Hou [Wed, 7 May 2025 16:15:00 +0000 (09:15 -0700)] 
accel/amdxdna: Support submit commands without arguments

The latest userspace runtime allows generating commands which do not
have any argument. Remove the corresponding check in driver IOCTL to
enable this use case.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://lore.kernel.org/r/20250507161500.2339701-1-lizhi.hou@amd.com
Link: https://lore.kernel.org/r/20250507161500.2339701-1-lizhi.hou@amd.com
2 months agodrm/panel: Add Novatek NT37801 panel driver
Krzysztof Kozlowski [Thu, 8 May 2025 14:34:48 +0000 (16:34 +0200)] 
drm/panel: Add Novatek NT37801 panel driver

Add driver for the Novatek NT37801 or NT37810 AMOLED DSI 1440x3200
panel in CMD mode, used on Qualcomm MTP8750 board (SM8750).

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250508-sm8750-display-panel-v2-2-3ca072e3d1fa@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250508-sm8750-display-panel-v2-2-3ca072e3d1fa@linaro.org
2 months agodt-bindings: display: panel: Add Novatek NT37801
Krzysztof Kozlowski [Thu, 8 May 2025 14:34:47 +0000 (16:34 +0200)] 
dt-bindings: display: panel: Add Novatek NT37801

Add bindings for the Novatek NT37801 or NT37810 AMOLED DSI panel.
Sources, like downstream DTS, schematics and hardware manuals, use two
model names (NT37801 and NT37810), so choose one and hope it is correct.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20250508-sm8750-display-panel-v2-1-3ca072e3d1fa@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250508-sm8750-display-panel-v2-1-3ca072e3d1fa@linaro.org
2 months agodt-bindings: display: panel: convert truly,nt35597.txt to dt-schema
Neil Armstrong [Wed, 7 May 2025 09:19:21 +0000 (11:19 +0200)] 
dt-bindings: display: panel: convert truly,nt35597.txt to dt-schema

Convert the Truly NT35597 2K display panel bindings to dt-schema.

The vdispp-supply & vdispn-supply are not marked as required since
in practice they are not defined in sdm845-mtp.dts which is the
only used of these bindings.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20250507-topic-misc-truly-nt35597-yaml-v1-1-bc719ad8dfff@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250507-topic-misc-truly-nt35597-yaml-v1-1-bc719ad8dfff@linaro.org
2 months agodma-buf/sw-sync: Remove unused debug code
Dr. David Alan Gilbert [Mon, 5 May 2025 23:38:38 +0000 (00:38 +0100)] 
dma-buf/sw-sync: Remove unused debug code

sync_file_debug_add() and sync_file_debug_remove() have been unused
since 2016's
commit d4cab38e153d ("staging/android: prepare sync_file for de-staging")

Remove them.

Since sync_file_debug_add was the only thing to add to
sync_file_list_head, the code that dumps it in part of
sync_info_debugfs_show can be removed, and the declaration of
the list and it's associated lock can be removed.
(The 'fences:\n...' marker in that debugfs file is left in
so as not to change the output)

That leaves the sync_print_sync_file() helper unused, and
is thus removed.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250505233838.105668-1-linux@treblig.org
2 months agogpu: host1x: Use for_each_available_child_of_node_scoped()
Jinjie Ruan [Fri, 30 Aug 2024 07:38:24 +0000 (15:38 +0800)] 
gpu: host1x: Use for_each_available_child_of_node_scoped()

Avoids the need for manual cleanup of_node_put() in early exits
from the loop.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20240830073824.3539690-1-ruanjinjie@huawei.com
2 months agodrm/tegra: Fix a possible null pointer dereference
Qiu-ji Chen [Wed, 6 Nov 2024 09:59:06 +0000 (17:59 +0800)] 
drm/tegra: Fix a possible null pointer dereference

In tegra_crtc_reset(), new memory is allocated with kzalloc(), but
no check is performed. Before calling __drm_atomic_helper_crtc_reset,
state should be checked to prevent possible null pointer dereference.

Fixes: b7e0b04ae450 ("drm/tegra: Convert to using __drm_atomic_helper_crtc_reset() for reset.")
Cc: stable@vger.kernel.org
Signed-off-by: Qiu-ji Chen <chenqiuji666@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20241106095906.15247-1-chenqiuji666@gmail.com
2 months agodrm/tegra: rgb: Fix the unbound reference count
Biju Das [Wed, 5 Feb 2025 11:21:35 +0000 (11:21 +0000)] 
drm/tegra: rgb: Fix the unbound reference count

The of_get_child_by_name() increments the refcount in tegra_dc_rgb_probe,
but the driver does not decrement the refcount during unbind. Fix the
unbound reference count using devm_add_action_or_reset() helper.

Fixes: d8f4a9eda006 ("drm: Add NVIDIA Tegra20 support")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20250205112137.36055-1-biju.das.jz@bp.renesas.com
2 months agogpu: host1x: Remove mid-job CDMA flushes
Mikko Perttunen [Tue, 4 Feb 2025 02:45:46 +0000 (02:45 +0000)] 
gpu: host1x: Remove mid-job CDMA flushes

The current code can issue CDMA flushes (DMAPUT bumps) in the middle
of a job, before all opcodes have been written into the pushbuffer.
This can happen when pushbuffer fills up. Presumably this made sense
at some point in the past, but it doesn't anymore, as it cannot lead
to more space appearing in the pushbuffer as it is only cleaned full
jobs at a time.

Mid-job flushes can also cause problems, as in an extreme situation
(seen in practice), the hardware can run through the entire pushbuffer
including the prefix of a partially written job without the driver
being able to process any CDMA updates. This can cause the engine
MLOCK to be taken and held for extended periods as the tail of the
job is not yet available to hardware.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20250204024546.1168126-1-mperttunen@nvidia.com
2 months agodrm/tegra: falcon: Pipeline firmware copy
Mikko Perttunen [Wed, 5 Feb 2025 06:10:27 +0000 (06:10 +0000)] 
drm/tegra: falcon: Pipeline firmware copy

The Falcon DMA engine allows queueing multiple operations for
improved performance. Do this to optimize firmware loading.
A performance improvement of 4x to 6x is observed.

Co-developed-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Signed-off-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20250205061027.1205748-1-mperttunen@nvidia.com
2 months agodrm/tegra: dpaux: Use dev_err_probe()
Zhang Enpei [Wed, 2 Apr 2025 11:37:58 +0000 (19:37 +0800)] 
drm/tegra: dpaux: Use dev_err_probe()

Replace the open-code with dev_err_probe() to simplify the code.

Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20250402193758365XauggSF2EWBYY-e_jgNch@zte.com.cn
2 months agodrm/tegra: Remove unneeded include
Jon Hunter [Mon, 28 Apr 2025 15:34:35 +0000 (16:34 +0100)] 
drm/tegra: Remove unneeded include

The header file 'tegra_drm.h' is included in gem.c, but this file is
already include 'drm.h'. Although there is no harm in including this
file again, it is also not necessary. Furthermore, the header file is
located under 'include/uapi/drm' so ideally the full path would be
used to be explicit. For now, just remove from gem.c.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20250428153435.1013101-1-jonathanh@nvidia.com
2 months agodrm/tegra: Assign plane type before registration
Thierry Reding [Mon, 21 Apr 2025 16:13:05 +0000 (11:13 -0500)] 
drm/tegra: Assign plane type before registration

Changes to a plane's type after it has been registered aren't propagated
to userspace automatically. This could possibly be achieved by updating
the property, but since we can already determine which type this should
be before the registration, passing in the right type from the start is
a much better solution.

Suggested-by: Aaron Kling <webgeek1234@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Cc: stable@vger.kernel.org
Fixes: 473079549f27 ("drm/tegra: dc: Add Tegra186 support")
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20250421-tegra-drm-primary-v2-1-7f740c4c2121@gmail.com
2 months agocheckpatch: remove %p4cn
Aditya Garg [Wed, 30 Apr 2025 13:49:08 +0000 (19:19 +0530)] 
checkpatch: remove %p4cn

%p4cn was recently removed and replaced by %p4chR in vsprintf. So,
remove the check for %p4cn from checkpatch.pl.

Fixes: 37eed892cc5f ("vsprintf: Use %p4chR instead of %p4cn for reading data in reversed host ordering")
Signed-off-by: Aditya Garg <gargaditya08@live.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Tested-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/PN3PR01MB959760B89BF7E4B43852700CB8832@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2 months agodrm/panel: simple: Update timings for AUO G101EVN010
Kevin Baker [Mon, 5 May 2025 17:02:56 +0000 (12:02 -0500)] 
drm/panel: simple: Update timings for AUO G101EVN010

Switch to panel timings based on datasheet for the AUO G101EVN01.0
LVDS panel. Default timings were tested on the panel.

Previous mode-based timings resulted in horizontal display shift.

Signed-off-by: Kevin Baker <kevinb@ventureresearch.com>
Fixes: 4fb86404a977 ("drm/panel: simple: Add AUO G101EVN010 panel support")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250505170256.1385113-1-kevinb@ventureresearch.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/vkms: Adjust vkms_state->active_planes allocation type
Kees Cook [Sat, 26 Apr 2025 06:14:32 +0000 (23:14 -0700)] 
drm/vkms: Adjust vkms_state->active_planes allocation type

In preparation for making the kmalloc family of allocators type aware,
we need to make sure that the returned type from the allocation matches
the type of the variable being assigned. (Before, the allocator would
always return "void *", which can be implicitly cast to any pointer type.)

The assigned type is "struct vkms_plane_state **", but the returned type
will be "struct drm_plane **". These are the same size (pointer size), but
the types don't match. Adjust the allocation type to match the assignment.

Signed-off-by: Kees Cook <kees@kernel.org>
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Fixes: 8b1865873651 ("drm/vkms: totally reworked crc data tracking")
Link: https://lore.kernel.org/r/20250426061431.work.304-kees@kernel.org
Signed-off-by: Louis Chauvet <contact@louischauvet.fr>
2 months agoMerge drm/drm-next into drm-misc-next
Thomas Zimmermann [Tue, 6 May 2025 07:09:49 +0000 (09:09 +0200)] 
Merge drm/drm-next into drm-misc-next

Backmerging drm-next to get fixes from v6.15-rc5.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
2 months agoBackMerge tag 'v6.15-rc5' into drm-next
Dave Airlie [Tue, 6 May 2025 06:39:25 +0000 (16:39 +1000)] 
BackMerge tag 'v6.15-rc5' into drm-next

Linux 6.15-rc5, requested by tzimmerman for fixes required in drm-next.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2 months agodocs: backlight: Clarify `actual_brightness`
Mario Limonciello [Tue, 15 Apr 2025 19:20:59 +0000 (14:20 -0500)] 
docs: backlight: Clarify `actual_brightness`

Currently userspace software systemd treats `brightness` and
`actual_brightness` identically due to a bug found in an out of tree
driver.

This however causes problems for in-tree drivers that use brightness
to report user requested `brightness` and `actual_brightness` to report
what the hardware actually has programmed.

Clarify the documentation to match the behavior described in commit
6ca017658b1f9 ("[PATCH] backlight: Backlight Class Improvements").

Cc: Lee Jones <lee@kernel.org>
Cc: Lennart Poettering <lennart@poettering.net>
Cc: richard.purdie@linuxfoundation.org
Link: https://github.com/systemd/systemd/pull/36881
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Link: https://lore.kernel.org/r/20250415192101.2033518-1-superm1@kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2 months agodrm/bridge: anx7625: change the gpiod_set_value API
Ayushi Makhija [Mon, 5 May 2025 09:42:45 +0000 (15:12 +0530)] 
drm/bridge: anx7625: change the gpiod_set_value API

Use gpiod_set_value_cansleep() instead of gpiod_set_value()
to fix the below call trace in the boot log:

[    5.690534] Call trace:
[    5.690536]  gpiod_set_value+0x40/0xa4
[    5.690540]  anx7625_runtime_pm_resume+0xa0/0x324 [anx7625]
[    5.690545]  __rpm_callback+0x48/0x1d8
[    5.690549]  rpm_callback+0x6c/0x78

Certain GPIO controllers require access via message-based buses
such as I2C or SPI, which may cause the GPIOs to enter a sleep
state. Therefore, use the gpiod_set_value_cansleep().

Signed-off-by: Ayushi Makhija <quic_amakhija@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20250505094245.2660750-7-quic_amakhija@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/bridge: anx7625: fix anx7625_sink_detect() to return correct hpd status
Ayushi Makhija [Mon, 5 May 2025 09:42:44 +0000 (15:12 +0530)] 
drm/bridge: anx7625: fix anx7625_sink_detect() to return correct hpd status

In the anx7625_sink_detect(), the device is checked to see
if it is a panel bridge, and it always sends a "connected"
status to the connector. When adding the DP port on port 1 of the
anx7625, it incorrectly treats it as a panel bridge and sends an
always "connected" status. Instead of checking the status on the
panel bridge, it's better to check the hpd_status for connectors
that supports hot-plugging. This way, it verifies the hpd_status
variable before sending the status to the connector.

In case of eDP, anx7625_bridge_detect() will not get called because
the bridge->ops condition in anx7625_link_bridge() will not be
satisfied. Since anx7625_sink_detect() is called from
anx7625_bridge_detect(), this results in the sink_detect logic not
being executed for eDP.

Signed-off-by: Ayushi Makhija <quic_amakhija@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250505094245.2660750-6-quic_amakhija@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/bridge: anx7625: fix drm_bridge ops flags to support hot-plugging
Ayushi Makhija [Mon, 5 May 2025 09:42:43 +0000 (15:12 +0530)] 
drm/bridge: anx7625: fix drm_bridge ops flags to support hot-plugging

The anx7625_link_bridge() checks if a device is not a panel
bridge and add DRM_BRIDGE_OP_HPD and DRM_BRIDGE_OP_DETECT
flags to the drm_bridge->ops. However, on port 1 of the anx7625
bridge, any device added is always treated as a panel bridge,
preventing connector_detect() from being called. To resolve
this, instead of just checking if it is a panel bridge, verify
the type of device based on aux whether it is a DisplayPort or
eDP panel. If the device is not of the eDP type, add
DRM_BRIDGE_OP_HPD and DRM_BRIDGE_OP_DETECT flags to the to
the drm_bridge->ops.

Signed-off-by: Ayushi Makhija <quic_amakhija@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250505094245.2660750-5-quic_amakhija@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/bridge: anx7625: enable HPD interrupts
Ayushi Makhija [Mon, 5 May 2025 09:42:42 +0000 (15:12 +0530)] 
drm/bridge: anx7625: enable HPD interrupts

When the device enters the suspend state, it prevents
HPD interrupts from occurring. To address this, implement
.hpd_enable() and .hpd_disable() callbacks functions of
the drm_bridge.

Signed-off-by: Ayushi Makhija <quic_amakhija@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250505094245.2660750-4-quic_amakhija@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrivers: gpu: drm: panel: Add BOE TD4320
Barnabás Czémán [Wed, 30 Apr 2025 19:42:13 +0000 (21:42 +0200)] 
drivers: gpu: drm: panel: Add BOE TD4320

Add driver for BOE TD4320 DSI panel, used in Xiaomi Redmi Note 7
mobile phone.

Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250430-lavender-panel-v3-2-7625e62d62b2@mainlining.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250430-lavender-panel-v3-2-7625e62d62b2@mainlining.org
2 months agodt-bindings: display: panel: Add BOE TD4320
Barnabás Czémán [Wed, 30 Apr 2025 19:42:12 +0000 (21:42 +0200)] 
dt-bindings: display: panel: Add BOE TD4320

Document BOE TD4320 6.3" 2340x1080 panel
found in Xiaomi Redmi Note 7 smartphone.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
Link: https://lore.kernel.org/r/20250430-lavender-panel-v3-1-7625e62d62b2@mainlining.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250430-lavender-panel-v3-1-7625e62d62b2@mainlining.org
2 months agoLinux 6.15-rc5 v6.15-rc5
Linus Torvalds [Sun, 4 May 2025 20:55:04 +0000 (13:55 -0700)] 
Linux 6.15-rc5

2 months agoMerge tag 'perf-tools-fixes-for-v6.15-2025-05-04' of git://git.kernel.org/pub/scm...
Linus Torvalds [Sun, 4 May 2025 19:57:18 +0000 (12:57 -0700)] 
Merge tag 'perf-tools-fixes-for-v6.15-2025-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

Pull perf tools fixes from Namhyung Kim:
 "Just a couple of build fixes on arm64"

* tag 'perf-tools-fixes-for-v6.15-2025-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools:
  perf tools: Fix in-source libperf build
  perf tools: Fix arm64 build by generating unistd_64.h

2 months agoMerge tag 'trace-v6.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
Linus Torvalds [Sun, 4 May 2025 17:15:42 +0000 (10:15 -0700)] 
Merge tag 'trace-v6.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing fixes from Steven Rostedt:

 - Fix read out of bounds bug in tracing_splice_read_pipe()

   The size of the sub page being read can now be greater than a page.
   But the buffer used in tracing_splice_read_pipe() only allocates a
   page size. The data copied to the buffer is the amount in sub buffer
   which can overflow the buffer.

   Use min((size_t)trace_seq_used(&iter->seq), PAGE_SIZE) to limit the
   amount copied to the buffer to a max of PAGE_SIZE.

 - Fix the test for NULL from "!filter_hash" to "!*filter_hash"

   The add_next_hash() function checked for NULL at the wrong pointer
   level.

 - Do not use the array in trace_adjust_address() if there are no
   elements

   The trace_adjust_address() finds the offset of a module that was
   stored in the persistent buffer when reading the previous boot buffer
   to see if the address belongs to a module that was loaded in the
   previous boot. An array is created that matches currently loaded
   modules with previously loaded modules. The trace_adjust_address()
   uses that array to find the new offset of the address that's in the
   previous buffer. But if no module was loaded, it ends up reading the
   last element in an array that was never allocated.

   Check if nr_entries is zero and exit out early if it is.

 - Remove nested lock of trace_event_sem in print_event_fields()

   The print_event_fields() function iterates over the ftrace_events
   list and requires the trace_event_sem semaphore held for read. But
   this function is always called with that semaphore held for read.

   Remove the taking of the semaphore and replace it with
   lockdep_assert_held_read(&trace_event_sem)

* tag 'trace-v6.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing: Do not take trace_event_sem in print_event_fields()
  tracing: Fix trace_adjust_address() when there is no modules in scratch area
  ftrace: Fix NULL memory allocation check
  tracing: Fix oob write in trace_seq_to_buffer()

2 months agoMerge tag 'parisc-for-6.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 4 May 2025 15:47:18 +0000 (08:47 -0700)] 
Merge tag 'parisc-for-6.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc fix from Helge Deller:
 "Fix a double SIGFPE crash"

* tag 'parisc-for-6.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Fix double SIGFPE crash

2 months agoparisc: Fix double SIGFPE crash
Helge Deller [Sat, 3 May 2025 16:24:01 +0000 (18:24 +0200)] 
parisc: Fix double SIGFPE crash

Camm noticed that on parisc a SIGFPE exception will crash an application with
a second SIGFPE in the signal handler.  Dave analyzed it, and it happens
because glibc uses a double-word floating-point store to atomically update
function descriptors. As a result of lazy binding, we hit a floating-point
store in fpe_func almost immediately.

When the T bit is set, an assist exception trap occurs when when the
co-processor encounters *any* floating-point instruction except for a double
store of register %fr0.  The latter cancels all pending traps.  Let's fix this
by clearing the Trap (T) bit in the FP status register before returning to the
signal handler in userspace.

The issue can be reproduced with this test program:

root@parisc:~# cat fpe.c

static void fpe_func(int sig, siginfo_t *i, void *v) {
        sigset_t set;
        sigemptyset(&set);
        sigaddset(&set, SIGFPE);
        sigprocmask(SIG_UNBLOCK, &set, NULL);
        printf("GOT signal %d with si_code %ld\n", sig, i->si_code);
}

int main() {
        struct sigaction action = {
                .sa_sigaction = fpe_func,
                .sa_flags = SA_RESTART|SA_SIGINFO };
        sigaction(SIGFPE, &action, 0);
        feenableexcept(FE_OVERFLOW);
        return printf("%lf\n",1.7976931348623158E308*1.7976931348623158E308);
}

root@parisc:~# gcc fpe.c -lm
root@parisc:~# ./a.out
 Floating point exception

root@parisc:~# strace -f ./a.out
 execve("./a.out", ["./a.out"], 0xf9ac7034 /* 20 vars */) = 0
 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
 ...
 rt_sigaction(SIGFPE, {sa_handler=0x1110a, sa_mask=[], sa_flags=SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
 --- SIGFPE {si_signo=SIGFPE, si_code=FPE_FLTOVF, si_addr=0x1078f} ---
 --- SIGFPE {si_signo=SIGFPE, si_code=FPE_FLTOVF, si_addr=0xf8f21237} ---
 +++ killed by SIGFPE +++
 Floating point exception

Signed-off-by: Helge Deller <deller@gmx.de>
Suggested-by: John David Anglin <dave.anglin@bell.net>
Reported-by: Camm Maguire <camm@maguirefamily.org>
Cc: stable@vger.kernel.org
2 months agoMerge tag 'edac_urgent_for_v6.15_rc5' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 4 May 2025 15:20:17 +0000 (08:20 -0700)] 
Merge tag 'edac_urgent_for_v6.15_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras

Pull EDAC fixes from Borislav Petkov:

 - Test the correct structure member when handling correctable errors
   and avoid spurious interrupts, in altera_edac

* tag 'edac_urgent_for_v6.15_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
  EDAC/altera: Set DDR and SDMMC interrupt mask before registration
  EDAC/altera: Test the correct error reg offset

2 months agoMerge tag 'x86-urgent-2025-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 4 May 2025 15:12:03 +0000 (08:12 -0700)] 
Merge tag 'x86-urgent-2025-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fix from Ingo Molnar:
 "Fix SEV-SNP memory acceptance from the EFI stub for guests
  running at VMPL >0"

* tag 'x86-urgent-2025-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/boot/sev: Support memory acceptance in the EFI stub under SVSM

2 months agoMerge tag 'perf-urgent-2025-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 4 May 2025 15:06:42 +0000 (08:06 -0700)] 
Merge tag 'perf-urgent-2025-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull misc perf fixes from Ingo Molnar:

 - Require group events for branch counter groups and
   PEBS counter snapshotting groups to be x86 events.

 - Fix the handling of counter-snapshotting of non-precise
   events, where counter values may move backwards a bit,
   temporarily, confusing the code.

 - Restrict perf/KVM PEBS to guest-owned events.

* tag 'perf-urgent-2025-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel: KVM: Mask PEBS_ENABLE loaded for guest with vCPU's value.
  perf/x86/intel/ds: Fix counter backwards of non-precise events counters-snapshotting
  perf/x86/intel: Check the X86 leader for pebs_counter_event_group
  perf/x86/intel: Only check the group flag for X86 leader

2 months agoMerge tag 'irq-urgent-2025-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 4 May 2025 14:58:53 +0000 (07:58 -0700)] 
Merge tag 'irq-urgent-2025-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Ingo Molnar:

 - Prevent NULL pointer dereference in msi_domain_debug_show()

 - Fix crash in the qcom-mpm irqchip driver when configuring
   interrupts for non-wake GPIOs

* tag 'irq-urgent-2025-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/qcom-mpm: Prevent crash when trying to handle non-wake GPIOs
  genirq/msi: Prevent NULL pointer dereference in msi_domain_debug_show()

2 months agodrm/rockchip: inno-hdmi: Fix video timing HSYNC/VSYNC polarity setting for rk3036
Andy Yan [Tue, 22 Apr 2025 07:04:43 +0000 (15:04 +0800)] 
drm/rockchip: inno-hdmi: Fix video timing HSYNC/VSYNC polarity setting for rk3036

The HSYNC/VSYNC polarity of rk3036 HDMI are controlled by GRF.
Without the polarity configuration in GRF, it can be observed
from the HDMI protocol analyzer that the H/V front/back timing
output by RK3036 HDMI are currently not in line with the specifications.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Tested-by: Heiko Stuebner <heiko@sntech.de> #rk3036-kylin
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20250422070455.432666-5-andyshrk@163.com
2 months agodrm/rockchip: inno-hdmi: Simplify error handler with dev_err_probe
Andy Yan [Tue, 22 Apr 2025 07:04:42 +0000 (15:04 +0800)] 
drm/rockchip: inno-hdmi: Simplify error handler with dev_err_probe

Use dev_err_probe simplify the error handle.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Tested-by: Heiko Stuebner <heiko@sntech.de> #rk3036-kylin
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20250422070455.432666-4-andyshrk@163.com
2 months agodt-bindings: display: rockchip,inno-hdmi: Document GRF for RK3036 HDMI
Andy Yan [Tue, 22 Apr 2025 07:04:41 +0000 (15:04 +0800)] 
dt-bindings: display: rockchip,inno-hdmi: Document GRF for RK3036 HDMI

HDMI on RK3036 use GRF control the HSYNC/VSYNC polarity, but this part
is missing when it first landing upstream.

Document that it is mandatory for RK3036 HDMI.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20250422070455.432666-3-andyshrk@163.com