aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2026-01-13media: cx88: Add missing unmap in snd_cx88_hw_params()Haoxiang Li1-1/+3
In error path, add cx88_alsa_dma_unmap() to release resource acquired by cx88_alsa_dma_map(). Fixes: b2c75abde0de ("[media] cx88: drop videobuf abuse in cx88-alsa") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13media: radio-keene: fix memory leak in error pathShaurya Rane1-1/+1
Fix a memory leak in usb_keene_probe(). The v4l2 control handler is initialized and controls are added, but if v4l2_device_register() or video_register_device() fails afterward, the handler was never freed, leaking memory. Add v4l2_ctrl_handler_free() call in the err_v4l2 error path to ensure the control handler is properly freed for all error paths after it is initialized. Reported-by: syzbot+a41b73dce23962a74c72@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=a41b73dce23962a74c72 Fixes: 1bf20c3a0c61 ("[media] radio-keene: add a driver for the Keene FM Transmitter") Cc: stable@vger.kernel.org Signed-off-by: Shaurya Rane <ssrane_b23@ee.vjti.ac.in> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13media: adv7180: fix frame interval in progressive modeThorsten Schmelzer1-0/+7
The ADV7280-M may internally convert interlaced video input to progressive video. If this mode is enabled, the ADV7280-M delivers progressive video frames at the field rate of 50 fields per second (PAL) or 60 fields per second (NTSC). Fix the reported frame interval if progressive video is enabled. Signed-off-by: Thorsten Schmelzer <tschmelzer@topcon.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13media: adv7180: implement g_register and s_registerThorsten Schmelzer1-0/+30
The g_register and s_register callbacks are useful for debugging the adv7180. Implement the callbacks to expose the register debugging to userspace. Signed-off-by: Thorsten Schmelzer <tschmelzer@topcon.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13media: adv7180: add support for ancillary devicesThorsten Schmelzer1-8/+10
Depending on other devices on the i2c bus, using a non-default address for the CSI and VPP devices may be necessary. Replace calls to i2c_new_dummy_device with i2c_new_ancillary_device, which can directly use an i2c address from the device tree. Program the actual addresses of the sub-devices when configuring the chip. Signed-off-by: Thorsten Schmelzer <tschmelzer@topcon.com> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13media: aspeed: Fix dram hang at res-changeJammy Huang1-3/+19
Dram hang could happen in the steps below: 1. start capture/compression 2. out-of-lock watchdog raise irq because of res-change. 3. aspeed_video_irq_res_change do clk-off At step3, capture/compression could be not accomplished yet. If clk-off in the middle of video operation, dram controller could hang at ast2500. Use reset rather than clk-off/on to avoid this problem. Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13media: tegra-video: Fix memory leak in __tegra_channel_try_format()Zilin Guan1-5/+8
The state object allocated by __v4l2_subdev_state_alloc() must be freed with __v4l2_subdev_state_free() when it is no longer needed. In __tegra_channel_try_format(), two error paths return directly after v4l2_subdev_call() fails, without freeing the allocated 'sd_state' object. This violates the requirement and causes a memory leak. Fix this by introducing a cleanup label and using goto statements in the error paths to ensure that __v4l2_subdev_state_free() is always called before the function returns. Fixes: 56f64b82356b7 ("media: tegra-video: Use zero crop settings if subdev has no get_selection") Fixes: 1ebaeb09830f3 ("media: tegra-video: Add support for external sensor capture") Cc: stable@vger.kernel.org Signed-off-by: Zilin Guan <zilin@seu.edu.cn> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13media: v4l2-core: simplify v4l2_m2m_register_entity()Dmitry Antipov1-7/+3
Avoid 'strlen()'/'kmalloc()'/'snprintf()' sequence by using the convenient 'kasprintf()' in 'v4l2_m2m_register_entity()'. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13media: saa6588: Remove dprintk macro and use v4l2_info()Shrikant Raskar1-14/+13
The existing 'dprintk' macro used an unwrapped 'if' statement which was flagged by checkpatch, but instead of wrapping it, the debug handling can be simplified. This patch removes the 'dprintk' macro entirely and replaces all its usages with v4l2_info() helper. The unused 'PREFIX' macro is also removed. Signed-off-by: Shrikant Raskar <raskar.shree97@gmail.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-14media: verisilicon: AV1: Set IDR flag for intra_only frame typeBenjamin Gaignard1-1/+1
Intra_only frame could be considered as a key frame so Instantaneous Decoding Refresh (IDR) flag must be set of the both case and not only for key frames. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reported-by: Jianfeng Liu <liujianfeng1994@gmail.com> Fixes: 727a400686a2c ("media: verisilicon: Add Rockchip AV1 decoder") Cc: stable@vger.kernel.org Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13pinctrl: renesas: rzt2h: Add GPIO IRQ chip to handle interruptsCosmin Tanislav2-0/+205
The Renesas RZ/T2H (R9A09G077) and Renesas RZ/N2H (R9A09G087) SoCs have IRQ-capable pins handled by the ICU, which forwards them to the GIC. The ICU supports 16 IRQ lines, the pins map to these lines arbitrarily, and the mapping is not configurable. Add a GPIO IRQ chip to the pin controller that can be used to configure these pins as IRQ lines. The pin controller places the requested pins into IRQ function, disabling GPIO mode. A hierarchical IRQ domain is used to forward other functionality to the parent IRQ domain, the ICU. The ICU does level translation and then forwards other functionality to the GIC. Wakeup capability is implemented by placing the entire pin controller on the wakeup path if any pins are requested to be wakeup-capable. Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/20260109143910.645628-2-cosmin-gabriel.tanislav.xa@renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2026-01-13drm/panel: simple: restore connector_type fallbackLudovic Desroches1-45/+44
The switch from devm_kzalloc() + drm_panel_init() to devm_drm_panel_alloc() introduced a regression. Several panel descriptors do not set connector_type. For those panels, panel_simple_probe() used to compute a connector type (currently DPI as a fallback) and pass that value to drm_panel_init(). After the conversion to devm_drm_panel_alloc(), the call unconditionally used desc->connector_type instead, ignoring the computed fallback and potentially passing DRM_MODE_CONNECTOR_Unknown, which drm_panel_bridge_add() does not allow. Move the connector_type validation / fallback logic before the devm_drm_panel_alloc() call and pass the computed connector_type to devm_drm_panel_alloc(), so panels without an explicit connector_type once again get the DPI default. Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com> Fixes: de04bb0089a9 ("drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()") Cc: stable@vger.kernel.org Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://lore.kernel.org/stable/20251126-lcd_panel_connector_type_fix-v2-1-c15835d1f7cb%40microchip.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20251218-lcd_panel_connector_type_fix-v3-1-ddcea6d8d7ef@microchip.com
2026-01-13drm/panel-simple: fix connector type for DataImage SCF0700C48GGU18 panelMarek Vasut1-0/+1
The connector type for the DataImage SCF0700C48GGU18 panel is missing and devm_drm_panel_bridge_add() requires connector type to be set. This leads to a warning and a backtrace in the kernel log and panel does not work: " WARNING: CPU: 3 PID: 38 at drivers/gpu/drm/bridge/panel.c:379 devm_drm_of_get_bridge+0xac/0xb8 " The warning is triggered by a check for valid connector type in devm_drm_panel_bridge_add(). If there is no valid connector type set for a panel, the warning is printed and panel is not added. Fill in the missing connector type to fix the warning and make the panel operational once again. Cc: stable@vger.kernel.org Fixes: 97ceb1fb08b6 ("drm/panel: simple: Add support for DataImage SCF0700C48GGU18") Signed-off-by: Marek Vasut <marex@nabladev.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260110152750.73848-1-marex@nabladev.com
2026-01-13drm/panel: himax-hx83102: change to gpiod_set_value_cansleepVladimir Yakovlev1-6/+6
It's better to use gpiod_set_value_cansleep because the panel can be connected via i2c/spi expander or similar external devices for reference see Documentation/driver-api/gpio/consumer.rst Signed-off-by: Vladimir Yakovlev <vovchkir@gmail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20251208161613.3763049-1-vovchkir@gmail.com
2026-01-13drm/panel: mantix: Don't turn on MIPI peripheralSebastian Krzyszkowiak1-2/+0
It's not necessary with these panels. Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260105-mantix-halo-fixes-v1-5-1ebc9b195a34@puri.sm
2026-01-13drm/panel: mantix: Drop bank 9 initializationSebastian Krzyszkowiak1-4/+2
This command is part of LIC sequence included in FT8006P firmware. There's no need to repeat it here. Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260105-mantix-halo-fixes-v1-4-1ebc9b195a34@puri.sm
2026-01-13drm/panel: mantix: Improve power off sequenceSebastian Krzyszkowiak1-4/+8
According to the sequence from section 7.3.4 of FT8006P datasheet, TP_RSTN and RESX should be asserted after disabling AVDD and AVEE and together with VDDI. Also, AVEE power down needs to happen at least 150ms after entering sleep mode. Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260105-mantix-halo-fixes-v1-3-1ebc9b195a34@puri.sm
2026-01-13drm/panel: mantix: Improve power on sequence timingsSebastian Krzyszkowiak1-6/+7
FP8006P datasheet mentions: > It is necessary to wait 15msec after releasing RESX before sending > commands. Also Sleep Out command cannot be sent for 120 msec. This hasn't been respected by the driver so far, which could interfere with the LCD init code sequence performed by the controller. In some cases this leads to VCOM voltage being set to a wrong value, causing "halo" effects, temporary burn-in around the edges of the screen and degraded image contrast. T3 and T4 are counted from when VDDI is enabled. There's no need to add them when we've already waited more than that in T2 and T2d. While FT8006P datasheet does not mention a delay between exiting sleep mode and turning the display on, code provided by the vendor uses 120ms there and it happens to be the same value as required in newer datasheets for newer controllers from the same family, so it seems appropriate to use it here as well. Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260105-mantix-halo-fixes-v1-2-1ebc9b195a34@puri.sm
2026-01-13drm/panel: mantix: Enable DSI LPMSebastian Krzyszkowiak1-1/+1
This improves reliability of sending DSI commands. Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260105-mantix-halo-fixes-v1-1-1ebc9b195a34@puri.sm
2026-01-13drm/panel: Fix a possible null-pointer dereference in jdi_panel_dsi_remove()Tuo Li1-1/+3
In jdi_panel_dsi_remove(), jdi is explicitly checked, indicating that it may be NULL: if (!jdi) mipi_dsi_detach(dsi); However, when jdi is NULL, the function does not return and continues by calling jdi_panel_disable(): err = jdi_panel_disable(&jdi->base); Inside jdi_panel_disable(), jdi is dereferenced unconditionally, which can lead to a NULL-pointer dereference: struct jdi_panel *jdi = to_panel_jdi(panel); backlight_disable(jdi->backlight); To prevent such a potential NULL-pointer dereference, return early from jdi_panel_dsi_remove() when jdi is NULL. Signed-off-by: Tuo Li <islituo@gmail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20251218120955.11185-1-islituo@gmail.com
2026-01-13drm/panel: simple: Add Innolux G150XGE-L05 panel entryFabio Estevam1-0/+29
Add support for the Innolux G150XGE-L05 15.0" TFT 1024x768 LVDS panel. Signed-off-by: Fabio Estevam <festevam@nabladev.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260102141706.36842-2-festevam@gmail.com
2026-01-13drm/panel: ilitek-ili9882t: Switch Tianma TL121BVMS07 to DSC 120Hz modeLangyan Ye1-11/+136
Migrate the TL121BVMS07 panel from non-DSC 60 Hz to DSC-enabled 120 Hz, including updated init sequence, DSC configuration, and display timings. Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20251216075530.1966327-1-yelangyan@huaqin.corp-partner.google.com
2026-01-13irqchip/riscv-imsic: Revert "Remove redundant irq_data lookups"Luo Haiyang1-2/+2
Commit c475c0b71314("irqchip/riscv-imsic: Remove redundant irq_data lookups") leads to a NULL pointer deference in imsic_msi_update_msg(): virtio_blk virtio1: 8/0/0 default/read/poll queues Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Current kworker/u32:2 pgtable: 4K pagesize, 48-bit VAs, pgdp=0x0000000081c33000 [0000000000000000] pgd=0000000000000000, p4d=0000000000000000 CPU: 5 UID: 0 PID: 75 Comm: kworker/u32:2 Not tainted 6.19.0-rc4-next-20260109 #1 NONE epc : 0x0 ra : imsic_irq_set_affinity+0x110/0x130 The irq_data argument of imsic_irq_set_affinity() is associated with the imsic domain and not with the top-level MSI domain. As a consequence the code dereferences the wrong interrupt chip, which has the irq_write_msi_msg() callback not populated. Signed-off-by: Luo Haiyang <luo.haiyang@zte.com.cn> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260113111930821RrC26avITHWSFCN0bYbgI@zte.com.cn
2026-01-13media: mediatek: vcodec: Discard pm_runtime_put() return valueRafael J. Wysocki2-10/+2
Printing error messages on pm_runtime_put() returning negative values is not particularly useful. Returning an error code from pm_runtime_put() merely means that it has not queued up a work item to check whether or not the device can be suspended and there are many perfectly valid situations in which that can happen, like after writing "on" to the devices' runtime PM "control" attribute in sysfs for one example. Accordingly, update mtk_vcodec_enc_pw_off() and mtk_vcodec_dec_pw_off() to simply discard the return value of pm_runtime_put(). This will facilitate a planned change of the pm_runtime_put() return type to void in the future. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13media: rockchip: rga: Fix possible ERR_PTR dereference in rga_buf_init()Alper Ak1-0/+3
rga_get_frame() can return ERR_PTR(-EINVAL) when buffer type is unsupported or invalid. rga_buf_init() does not check the return value and unconditionally dereferences the pointer when accessing f->size. Add proper ERR_PTR checking and return the error to prevent dereferencing an invalid pointer. Fixes: 6040702ade23 ("media: rockchip: rga: allocate DMA descriptors per buffer") Cc: stable@vger.kernel.org Signed-off-by: Alper Ak <alperyasinak1@gmail.com> Reviewed-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13media: amphion: Drop min_queued_buffers assignmentMing Qian1-2/+0
The min_queued_buffers field controls when start_streaming() is called by the vb2 core (it delays the callback until at least N buffers are queued). Setting it to 1 affects the timing of start_streaming(), which breaks the seek flow in decoder scenarios and causes test failures. The current driver implementation does not rely on this minimum buffer requirement and handles streaming start correctly with the default value of 0, so remove these assignments. Fixes: 3cd084519c6f ("media: amphion: add vpu v4l2 m2m support") Cc: stable@vger.kernel.org Signed-off-by: Ming Qian <ming.qian@oss.nxp.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13media: amphion: Use kmalloc instead of vmallocMing Qian4-35/+27
Replace vmalloc/vfree with kmalloc/kfree for allocating small driver structures (vpu_inst, vdec_t, venc_t, vpu_cmd_t, and frame objects). vmalloc() is designed for large memory allocations and incurs unnecessary overhead for small objects due to virtual memory mapping. kmalloc() is more appropriate as it allocates physically contiguous memory with lower overhead. ftrace measurements of vpu_alloc_cmd() show significant improvement: Before (vmalloc): 35-72 us (avg ~45.7 us) After (kmalloc): 11-26 us (avg ~16.8 us) This reduces allocation time by approximately 63%. No functional changes are intended. Signed-off-by: Ming Qian <ming.qian@oss.nxp.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13media: amphion: Trigger source change if colorspace changedMing Qian2-22/+40
After encountering a colorspace change in the stream, the decoder sends a V4L2_EVENT_SOURCE_CHANGE event with changes set to V4L2_EVENT_SRC_CH_RESOLUTION. Then the client can detect and handle the colorspace change without any buffer reallocation Signed-off-by: Ming Qian <ming.qian@oss.nxp.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13media: amphion: Clear last_buffer_dequeued flag for DEC_CMD_STARTMing Qian1-0/+1
The V4L2_DEC_CMD_START command may be used to handle the dynamic source change, which will triggers an implicit decoder drain. The last_buffer_dequeued flag is set in the implicit decoder drain, so driver need to clear it to continue the following decoding flow. Signed-off-by: Ming Qian <ming.qian@oss.nxp.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-01-13soc: amlogic: meson-gx-socinfo: add new SoC id for S905Y4Nick Xie1-0/+1
Add new definition for Amlogic S4 S905Y4. Signed-off-by: Nick Xie <nick@khadas.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260113012527.40725-1-nick@khadas.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-01-13drm/msm/dsi_phy_14nm: convert from divider_round_rate() to ↵Brian Masney1-6/+1
divider_determine_rate() The divider_round_rate() function is now deprecated, so let's migrate to divider_determine_rate() instead so that this deprecated API can be removed. Note that when the main function itself was migrated to use determine_rate, this was mistakenly converted to: req->rate = divider_round_rate(...) This is invalid in the case when an error occurs since it can set the rate to a negative value. Fixes: cc41f29a6b04 ("drm/msm/dsi_phy_14nm: convert from round_rate() to determine_rate()") Signed-off-by: Brian Masney <bmasney@redhat.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/697613/ Link: https://lore.kernel.org/r/20260108-clk-divider-round-rate-v1-24-535a3ed73bf3@redhat.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/mdp5: drop support for MSM8998, SDM630 and SDM660Dmitry Baryshkov2-317/+13
Currently MDP5 3.x (MSM8998, SDM630 and SDM660) platforms are support by both DPU and MDP5 drivers. Support for them in the DPU driver is mature enough, so it's no longer sensible to keep them enabled in the MDP5 driver. Not to mention that MSM8998 never used an MDP5 compatible string. Drop support for the MDP5 3.x genration inside the MDP5 driver and migrate those to the DPU driver only. Note: this will break if one uses the DT generated before v6.3 as they had only the generic, "qcom,mdp5" compatible string for SDM630 and SDM660. However granted that we had two LTS releases inbetween I don't think it is an issue. Patchwork: https://patchwork.freedesktop.org/patch/696491/ Link: https://lore.kernel.org/r/20251228-mdp5-drop-dpu3-v4-3-7497c3d39179@oss.qualcomm.com Tested-by: Alexey Minnekhanov <alexeymin@minlexx.ru> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/dpu: fix CMD panels on DPU 1.x - 3.xDmitry Baryshkov1-3/+4
DPU units before 4.x don't have a separate CTL_START IRQ to mark the begin of the data transfer. In such a case, wait for the frame transfer to complete rather than trying to wait for the CTL_START interrupt (and obviously hitting the timeout). Fixes: 050770cbbd26 ("drm/msm/dpu: Fix timeout issues on command mode panels") Reported-by: Alexey Minnekhanov <alexeymin@postmarketos.org> Closes: https://lore.kernel.org/r/8e1d33ff-d902-4ae9-9162-e00d17a5e6d1@postmarketos.org Patchwork: https://patchwork.freedesktop.org/patch/696490/ Link: https://lore.kernel.org/r/20251228-mdp5-drop-dpu3-v4-2-7497c3d39179@oss.qualcomm.com Tested-by: Alexey Minnekhanov <alexeymin@minlexx.ru> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/dpu: drop intr_start from DPU 3.x catalog filesDmitry Baryshkov3-15/+0
DPU 3.x don't have separate intr_start interrupt, drop it from catalog files. Fixes: 94391a14fc27 ("drm/msm/dpu1: Add MSM8998 to hw catalog") Fixes: 7204df5e7e68 ("drm/msm/dpu: add support for SDM660 and SDM630 platforms") Patchwork: https://patchwork.freedesktop.org/patch/696488/ Link: https://lore.kernel.org/r/20251228-mdp5-drop-dpu3-v4-1-7497c3d39179@oss.qualcomm.com Tested-by: Alexey Minnekhanov <alexeymin@minlexx.ru> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/dpu: use standard functions in _dpu_format_populate_plane_sizes_ubwc()Dmitry Baryshkov1-36/+27
The _dpu_format_populate_plane_sizes_ubwc() used MSM_MEDIA_ALIGN() and MSM_MEDIA_ROUNDUP(), macros inherited from the previous implementation, msm_media_info.h. Replace them with the standard Linux macros, round_up() and DIV_ROUND_UP() respectively. Patchwork: https://patchwork.freedesktop.org/patch/688182/ Link: https://lore.kernel.org/r/20251114-dpu-formats-v3-12-cae312379d49@oss.qualcomm.com Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/dpu: rewrite _dpu_format_populate_plane_sizes_ubwc()Dmitry Baryshkov2-1219/+57
Drop extra wrapping layer (msm_media_info.h) and inline all VENUS_*() functions, simplifying the code. Patchwork: https://patchwork.freedesktop.org/patch/688184/ Link: https://lore.kernel.org/r/20251114-dpu-formats-v3-11-cae312379d49@oss.qualcomm.com Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/dpu: drop redundant num_planes assignment in ↵Dmitry Baryshkov1-8/+3
_dpu_format_populate_plane_sizes*() Drop redundant layout->num_planes assignments, using the value assigned from the formats table. RGB UBWC formats need special handling: they use two planes (per the format table), but the uAPI defines plane[1] as empty. Reviewed-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/688180/ Link: https://lore.kernel.org/r/20251114-dpu-formats-v3-10-cae312379d49@oss.qualcomm.com Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/dpu: simplify _dpu_format_populate_plane_sizes_*Dmitry Baryshkov1-22/+19
Move common bits of _dpu_format_populate_plane_sizes_ubwc() and _linear() to dpu_format_populate_plane_sizes(), reducing unnecessary duplication and simplifying code flow fror the UBWC function. Reviewed-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/688178/ Link: https://lore.kernel.org/r/20251114-dpu-formats-v3-9-cae312379d49@oss.qualcomm.com Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/disp: drop PSEUDO_YUV_FMT_LOOSE_TILEDDmitry Baryshkov1-20/+0
Drop PSEUDO_YUV_FMT_LOOSE_TILED(), the macro is unused. Reviewed-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/688176/ Link: https://lore.kernel.org/r/20251114-dpu-formats-v3-8-cae312379d49@oss.qualcomm.com Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/disp: pull in common tiled YUV format parametersDmitry Baryshkov1-15/+13
Pull common params of tiled YUV formats into corresponding macro definitions, simplifying format table. Patchwork: https://patchwork.freedesktop.org/patch/688174/ Link: https://lore.kernel.org/r/20251114-dpu-formats-v3-7-cae312379d49@oss.qualcomm.com Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/disp: pull in common YUV format parametersDmitry Baryshkov1-64/+56
Pull common params of YUV formats into corresponding macro definitions, simplifying format table. Reviewed-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/688171/ Link: https://lore.kernel.org/r/20251114-dpu-formats-v3-6-cae312379d49@oss.qualcomm.com Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/disp: simplify tiled RGB{,A,X} formats definitionsDmitry Baryshkov1-33/+85
Define several additional macros, capturing tiled RGB format classes, in order to simplify defining particular RGB* format. Reviewed-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/688169/ Link: https://lore.kernel.org/r/20251114-dpu-formats-v3-5-cae312379d49@oss.qualcomm.com Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/disp: simplify RGB{,A,X} formats definitionsDmitry Baryshkov1-117/+158
Define several additional macros, capturing RGB format classes, in order to simplify defining particular RGB* format. Reviewed-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/688168/ Link: https://lore.kernel.org/r/20251114-dpu-formats-v3-4-cae312379d49@oss.qualcomm.com Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/disp: set num_planes, fetch_mode and tile_height in ↵Dmitry Baryshkov1-22/+13
INTERLEAVED_RGB_FMT_TILED All interleaved compressed RGB formats use only 2 planes, MDP_FETCH_LINEAR and MDP_TILE_HEIGHT_UBWC. Specify num_planes, fetch_mode and tile_height directly in the macro and remove unused parameters. Patchwork: https://patchwork.freedesktop.org/patch/688166/ Link: https://lore.kernel.org/r/20251114-dpu-formats-v3-3-cae312379d49@oss.qualcomm.com Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/disp: set num_planes and fetch_mode in INTERLEAVED_RGB_FMTDmitry Baryshkov1-75/+39
All interleaved RGB formats use only 1 plane and MDP_FETCH_LINEAR. Specify num_planes and fetch_mode directly in the macro and remove unused parameters. Reviewed-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/688163/ Link: https://lore.kernel.org/r/20251114-dpu-formats-v3-2-cae312379d49@oss.qualcomm.com Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-13drm/msm/disp: set num_planes to 1 for interleaved YUV formatsDmitry Baryshkov1-4/+4
Interleaved YUV formats use only one plane for all pixel data. Specify num_planes = 1 for those formats. This was left unnoticed since _dpu_format_populate_plane_sizes_linear() overrides layout->num_planes. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Reviewed-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/688162/ Link: https://lore.kernel.org/r/20251114-dpu-formats-v3-1-cae312379d49@oss.qualcomm.com Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-01-12net: stmmac: report PCS link changes to phylinkRussell King (Oracle)1-0/+2
Report PCS link changes to phylink, which will allow phylink's inband support to respoind to link events once the PCS is appropriately configured. An expected behavioural change is that should the PCS report that its link has failed, but phylink is operating in outband mode and the PHY reports that link is up, this event will cause the netdev's link to momentarily drop, making the event more noticable, rather than just producing a "stmmac_pcs: Link Down" message. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1vevI1-00000002Yp8-3cM3@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-12net: stmmac: change arguments to PCS handler and use dev_info()Russell King (Oracle)4-25/+12
Change the arguments to the PCS handler so that it can access the struct device pointer and integrated PCS pointers. This allows us to use the PCS register offset stored in struct stmmac_pcs rather than passing it into the function, and also allows the messages to be printed using dev_info() rather than pr_info(), thereby allowing the stmmac instance to be identified. Finally, as dev_info() identifies the driver/device, prefixing with "stmmac_pcs: " is now redundant, so replace this with just "PCS ". Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1vevHw-00000002Yoz-35A7@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-12net: stmmac: pass struct stmmac_priv to host_irq_status() methodRussell King (Oracle)6-10/+10
Rather than passing struct mac_device_info to the host_irq_status() method, pass struct stmmac_priv so that we can pass the integrated PCS to the PCS interrupt handler. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1vevHr-00000002YoY-2X2i@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-12net: stmmac: move and rename dwmac_pcs_isr()Russell King (Oracle)4-32/+39
dwmac_pcs_isr() doesn't need to be inlined into the MAC's host_irq_status method, as handling PCS interrupts isn't performance critical. However, there is little point calling this function unless an interrupt is pending for the PCS. Rename it to stmmac_integrated_pcs_irq() while moving it. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1vevHm-00000002YoS-23RX@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>