summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-07-15drm/amd/display: Test helper_check_state rejectsAlex Hung
[WHAT] Add KUnit tests for amdgpu_dm_plane_helper_check_state() covering the small viewport width, small viewport height, bottom-edge clipping and scaling-caps rejection paths. Assisted-by: Copilot:Claude-Opus-4.8 GPT-5.5 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test DCC and cursor edge casesAlex Hung
[WHAT] Add KUnit tests for the capability-callback-failure and not-capable paths of amdgpu_dm_plane_validate_dcc(), and for the bad-size path of amdgpu_dm_plane_get_cursor_position(). Assisted-by: Copilot:Claude-Opus-4.8 GPT-5.5 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test GFX12 DCC plane attributesAlex Hung
[WHAT] Add KUnit tests for amdgpu_dm_plane_fill_gfx12_plane_attributes_from_modifiers() covering the block0, unconstrained-block and validation-failure cases. Add the dm_test_gfx12_attrs() helper used to build the GFX12 inputs. Assisted-by: Copilot:Claude-Opus-4.8 GPT-5.5 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test GFX9 DCC plane attributesAlex Hung
[WHAT] Add KUnit tests for amdgpu_dm_plane_fill_gfx9_plane_attributes_from_modifiers() covering DCC enablement, validation failure, and the RB+ 64B/128B and GFX9 64B/unconstrained block modes. Add the dm_test_gfx9_attrs(), dm_test_setup_gfx9_dcc_device() and dm_test_gfx9_dcc_modifier() helpers used to build the GFX9 DCC inputs. Assisted-by: Copilot:Claude-Opus-4.8 GPT-5.5 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test plane buffer attributesAlex Hung
[WHAT] Add KUnit tests for the video and GFX12 paths of amdgpu_dm_plane_fill_plane_buffer_attributes(). Introduce the dm_test_plane_attrs(), dm_test_video_attrs() and dm_test_graphics_attrs() helpers that drive the buffer-attribute fill with representative plane states. Assisted-by: Copilot:Claude-Opus-4.8 GPT-5.5 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test plane scaling info pathsAlex Hung
[WHAT] Add KUnit tests covering the NV12 DCN1.x and plane-caps paths of amdgpu_dm_plane_fill_dc_scaling_info() and the FP16 path of amdgpu_dm_plane_get_min_max_dc_plane_scaling(). Assisted-by: Copilot:Claude-Opus-4.8 GPT-5.5 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test GFX11/GFX12 plane modifiersAlex Hung
[WHAT] Add KUnit tests for amdgpu_dm_plane_get_plane_modifiers() on GFX11 (64K-first and 256K-first) and GFX12 devices. Add a register-read mock (dm_test_gfx11_reg_ctx and friends) and device-setup helpers so the GFX11 DCC modifier ordering can be checked without real hardware. Assisted-by: Copilot:Claude-Opus-4.8 GPT-5.5 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test GFX9/GFX10 plane modifiersAlex Hung
[WHAT] Add KUnit tests for amdgpu_dm_plane_get_plane_modifiers() on GFX9, Raven, Raven constant-encode, GFX10.1 and GFX10.3 devices. Introduce the dm_test_expect_mods_terminated(), dm_test_mods_contain() and dm_test_get_primary_mods() helpers used to validate the generated modifier lists. Assisted-by: Copilot:Claude-Opus-4.8 GPT-5.5 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test format info and blendingAlex Hung
[WHAT] Add KUnit coverage for amdgpu_dm_plane_get_format_info(), the overlay universal-plane path of get_plane_formats(), the D-swizzle rejection path of format_mod_supported(), and the DCN4.2 variant of fill_blending_from_plane_state(). These exercise format-query and blending code paths that the existing suite did not cover. Assisted-by: Copilot:Claude-Opus-4.8 GPT-5.5 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Add FBC init tests for connectorBhawanpreet Lakha
Add KUnit coverage for amdgpu_dm_fbc_init() on the amdgpu_dm_connector tests: - No FBC present - Non-eDP link - Buffer already allocated Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Add subconnector property tests for connectorBhawanpreet Lakha
Add KUnit coverage for update_subconnector_property() on the amdgpu_dm_connector suite: - DP connector with a sink: subconnector property is resolved from the dongle type (VGA converter -> VGA). - DP connector without a sink: dongle type is ignored and the property stays Unknown. - Non-DP connector: function early-returns and leaves a pre-seeded property value untouched. Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Add color space and timing tests for connectorBhawanpreet Lakha
Add KUnit coverage for adjust_colour_depth_from_display_info() 420 reduction, amdgpu_dm_get_output_color_space() Y_ONLY/YCbCr601/BT2020 fallbacks, to_drm_connector_type() dual-link DVI-D, and copy_crtc_timing_for_drm_display_mode(). Export copy_crtc_timing_for_drm_display_mode via EXPORT_IF_KUNIT so the tests can reach it. Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: More Kunit tests for audioBhawanpreet Lakha
Split audio init to make the initialization modular Test the audio pin initialization Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Add more tests for HDCPBhawanpreet Lakha
Adds a few more test cases to the hdcp code - process_output(): make sure work gets requeued when callback and watchdog are stopped but also asked to run again - event_property_update(): bail out when the connector is NULL - hdcp_handle_cpirq(): schedules the work and picks the right link - hdcp_update_display(): schedules property validation on enable, resets status and cancels validation on disable - hdcp_create_workqueue(): returns NULL when max links is zero Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Tear down dangling pipe on boot to fix s0i3Tom Chung
[Why] If an external monitor is connected at power-on and then unplugged before the driver loads (e.g. at the GRUB menu), the system can no longer enter the s0i3 deepest suspend state, even though all connectors report disconnected. The pre-OS firmware (GOP/vBIOS) lights up a front-end for the display that is present at power-on. The driver never fully tears this inherited pipe down, and the leftover pipe keeps the DCN block from reaching idle, which blocks s0i3. [How] Add dc_disable_dangling_timing_generators() to DC core and call it from amdgpu_dm right after dc_hardware_init(). It scans every enabled timing generator and classifies it as in-use or dangling. If a dangling pipe exists and nothing needs to be preserved, power down the hw blocks so DCN can reach idle. Assisted-by: Cursor:claude-opus-4.8 Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Fix 8K Mode Not Parsed by EDIDFangzhi Zuo
[why] The 8K120/8K240 timings live in DisplayID extension blocks 2 and 3 of this EDID. The EDID is a 4-block (512-byte) HDMI 2.1 EDID that uses HF-EEODB. drm core reads and parses this correctly, but amdgpu rebuilds its own copy. Only 2 of 4 blocks were copied into sink->dc_edid, that leads to drm_edid_connector_add_modes() never sees blocks 2 and 3. [how] Directly populate edid_blob_ptr with a blob whose length is the full, and HF-EEODB-aware size. Reviewed-by: Sun peng (Leo) Li <sunpeng.li@amd.com> Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test top-level IRQ handler and vmin/vmax workerAlex Hung
[WHAT] Add KUnit coverage for the two remaining uncovered functions in amdgpu_dm_irq.c: amdgpu_dm_irq_handler() and dm_handle_vmin_vmax_update(). amdgpu_dm_irq_handler() is driven with a fake dc whose irq_service maps the hardware IRQ entry to a DC source and whose per-source info table lets dc_interrupt_ack() succeed; high- and low-context counting handlers verify the immediate and scheduled dispatch paths. Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test high-IRQ and handler registrationAlex Hung
[WHAT] Add the final batch of amdgpu_dm_irq KUnit tests covering the high-IRQ callbacks (dm_pflip_high_irq, dm_vupdate_high_irq, dm_crtc_high_irq), dm_handle_hpd_work, the DMUB outbox1 low IRQ, and the per-ASIC IRQ handler registration helpers (DCE110, DCN10 and outbox). Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test dmub HPD callbacks and handlersAlex Hung
[WHAT] Add KUnit tests for the DMUB HPD notification callbacks (dmub_hpd_callback, dmub_hpd_sense_callback) and for amdgpu_dm_register_hpd_handlers(). Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test HPD interrupt handlingAlex Hung
Add KUnit coverage for the HPD interrupt-handling helpers: the HPD-RX offload worker, the HDMI HPD debounce worker, handle_hpd_irq_helper(), handle_hpd_irq(), schedule_hpd_rx_offload_work() and handle_hpd_rx_irq(). Expose these statics for KUnit and add the stub link-service callbacks, sink helpers and fixtures the tests rely on. Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test HPD init/finiAlex Hung
Add KUnit coverage for amdgpu_dm_hpd_init() and amdgpu_dm_hpd_fini(): empty connector list, the per-connector HW fallback path, the analog polling enable/disable path, and the base-driver irq-ref path. Export both functions for KUnit and add shared drm_connector test helpers. Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test irq state setters and workAlex Hung
[WHAT] Add KUnit tests for the per-source IRQ state callbacks (HPD, pflip, CRTC, vline0, vupdate, dmub outbox/trace), the immediate and scheduled IRQ work paths, and amdgpu_dm_outbox_init. Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test irq funcs/suspend/workqueueAlex Hung
[WHAT] Expand the amdgpu_dm_irq KUnit suite with the first batch of tests covering IRQ source-function setup, suspend/resume of the IRQ clients, and the HPD RX offload workqueue lifecycle. Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Test MST payload and DSC enable helpersAlex Hung
[WHAT] Add KUnit coverage for dm_helpers_construct_old_payload, the DP MST payload allocation, poll-for-ACT and deallocation success paths, the full dm_helpers_dp_write_dsc_enable matrix and dm_helpers_dp_handle_test_pattern_request. Assisted-by: Copilot:Claude-Opus-4.8 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Run FP-disabled MST stub test only without DC FPSrinivasan Shanmugam
dm_mst_test_fp_guarded_public_stubs() passes NULL arguments to dm_dp_mst_is_port_support_mode() to test the stub implementation when CONFIG_DRM_AMD_DC_FP is disabled. However, this test is always registered. When CONFIG_DRM_AMD_DC_FP is enabled, the real implementation is used instead of the stub. The real implementation expects valid pointers, so passing NULL can lead to a NULL pointer dereference. Register this test only when CONFIG_DRM_AMD_DC_FP is disabled. Reported-by: Dan Carpenter <error27@gmail.com> Cc: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Cc: Alex Hung <alex.hung@amd.com> Cc: George Zhang <george.zhang@amd.com> Cc: Roman Li <roman.li@amd.com> Cc: Tom Chung <chiahsuan.chung@amd.com> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Add dp_skip_rbr flag for NUTMEGTimur Kristóf
No functional changes. Just clean up a conceptual mismatch. Based on feedback on the NUTMEG code in DC, the preferred_link_setting is meant to force the DP link to a specific setting, meaning both the link rate and lane count should be locked to an exact value. What NUTMEG needs is a lower bound on the link rate, which is not the same concept. Implement this as a HW workaround flag instead. Suggested-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Fix preferred link rate for NUTMEGTimur Kristóf
When there is a preferred link rate setting, it needs to be applied to both the current and initial link rate. This was regressed by a "coding style" fix, which caused the current link rate to not respect the preferred value. This commit restores the functionality of NUTMEG, the DP bridge encoder found on old APUs such as Kaveri. Fixes: a62346043a89 ("drm/amd/display: Fix coding style issue") Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/5465 Cc: Chuanyu Tseng <Chuanyu.Tseng@amd.com> Reviewed-by: Fangzhi Zuo <Jerry.Zuo@amd.com> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amd/display: Fix DM I2C teardown raceGeoffrey McRae
DM I2C adapters can remain visible to userspace while DM teardown is already in progress. A concurrent i2c-dev transfer may then enter amdgpu_dm_i2c_xfer() after the backing DM state has been torn down, leading to a NULL pointer dereference. Create a devres group around the DM I2C adapter lifetime and release it at the start of dm_hw_fini(), before HPD, IRQ, and DM state are torn down. This removes the I2C adapters first and waits for in-flight users to drain before the structures used by amdgpu_dm_i2c_xfer() disappear. This fixes a teardown ordering race seen during device removal: BUG: kernel NULL pointer dereference RIP: amdgpu_dm_i2c_xfer+0x122/0x1c0 [amdgpu] Call Trace: __i2c_transfer i2c_transfer i2cdev_ioctl_rdwr Fixes: 5b3eca05cfb0 ("drm/amd/display: Use devm_i2c_add_adapter to simplify i2c cleanup logic") Signed-off-by: Geoffrey McRae <geoffrey.mcrae@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Leo Li <sunpeng.li@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amdgpu: deduplicate JPEG v5.0 interrupt routineAndre Luiz Batista Bueno
Both jpeg_v5_0_1.c and jpeg_v5_0_2.c implement identical interrupt processing routines. To avoid code duplication, make the implementation in jpeg_v5_0_1.c non-static and call it directly from jpeg_v5_0_2.c. Signed-off-by: Andre Luiz Batista Bueno <andrebueno.mac@gmail.com> Co-developed-by: Enzo Furegatti Spinella <enzo.spinella@usp.br> Signed-off-by: Enzo Furegatti Spinella <enzo.spinella@usp.br> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15drm/amdkfd: Do not fail process debugfs setup on debugfs errorsSrinivasan Shanmugam
debugfs is intended for debugging only, and failures to create debugfs entries should not affect normal operation. Remove the check for debugfs_create_dir() in kfd_debugfs_add_process(). If debugfs entries cannot be created, continue without them instead of reporting an unnecessary error. Fixes: 325de6bf3328 ("drm/amdkfd: expose pasid of secondary contexts by debugfs") Reported-by: Dan Carpenter <error27@gmail.com> Cc: Zhu Lingshan <lingshan.zhu@amd.com> Cc: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-15PCI: dwc: Use common speed conversion functionHans Zhang
Replace the private switch-based speed conversion in dw_pcie_link_set_max_speed() with the public pci_bus_speed2lnkctl2() function. This eliminates duplicate conversion logic and ensures consistency with other PCIe drivers, while handling invalid speeds by falling back to hardware capabilities. Signed-off-by: Hans Zhang <18255117159@163.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Acked-by: Manivannan Sadhasivam <mani@kernel.org> Link: https://patch.msgid.link/20260407130450.1489318-4-18255117159@163.com
2026-07-15PCI: Move pci_bus_speed2lnkctl2() to public headerHans Zhang
Move the static array-based pci_bus_speed2lnkctl2() function from bwctrl.c to pci.h as a public inline function. This provides efficient O(1) speed-to-LNKCTL2 value conversion using static array lookup, maintaining optimal performance while enabling code reuse by other PCIe drivers. Signed-off-by: Hans Zhang <18255117159@163.com> [mani: replaced <asm/bug.h> with <linux/bug.h> as per checkpatch] Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20260407130450.1489318-3-18255117159@163.com
2026-07-15PCI: Add public pcie_valid_speed() for shared validationHans Zhang
Extract the PCIe speed validation logic from bwctrl.c's static pcie_valid_speed() into a public static inline function in pci.h. This allows consistent speed range checks (2.5GT/s to 64.0GT/s) across multiple drivers and functions, avoiding duplicate code and ensuring validation consistency as per PCIe specifications. Signed-off-by: Hans Zhang <18255117159@163.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20260407130450.1489318-2-18255117159@163.com
2026-07-15cpu/hotplug: Remove CPUHP_AP_ARM_CORESIGHT_CTI_STARTINGZenghui Yu
Thestate CPUHP_AP_ARM_CORESIGHT_CTI_STARTING has become unused since commit 59213b4be5c1 ("coresight: cti: Remove CPU power management code"). Remove it as well. Signed-off-by: Zenghui Yu <zenghui.yu@linux.dev> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260711135154.94276-1-zenghui.yu@linux.dev
2026-07-15calibrate: Rework delay timer calibrationThomas Gleixner
The header define in asm/timex,h and the naming of the function to read the delay timer are confusing at best. Convert it to a config switch selected by the archictures which provide the functionality and rename the function to delay_read_timer(), which makes the purpose clear. Move the declaration to linux/delay.h where it belongs. Remove the resulting empty asm/timex.h files as well. No functional change. Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260410120317.978403520@kernel.org
2026-07-15treewide: Remove CLOCK_TICK_RATEThomas Gleixner
This has been scheduled for removal more than a decade ago and the comments related to it have been dutifully ignored. The last dependencies are gone. Remove it along with various now empty asm/timex.h files. Signed-off-by: Thomas Gleixner <tglx@kernel.org> Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> Link: https://patch.msgid.link/20260410120317.910770161@kernel.org
2026-07-15x86: Use PIT_TICK_RATE instead of CLOCK_TICK_RATEThomas Gleixner
CLOCK_TICK_RATE is only used in x86 but defined all over the tree for no reason with comments that it's scheduled for removal for more than a decade. Use PIT_TICK_RATE for registering refined jiffies to get rid of the last dependency. Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260410120317.843419270@kernel.org
2026-07-15wifi: nxp: add nxpwifi driver for IW61xJeff Chen
Add support for the NXP IW61x wireless devices. The nxpwifi driver implements a full-MAC design and integrates with cfg80211 for configuration and control, supporting both station (STA) and access point (AP) modes. The driver provides a firmware-based command/event interface using TLV messages, with the core handling command processing, event dispatching, and device lifecycle management. A SDIO transport layer is implemented to support IW61x devices. Key features include: - 802.11n/ac/ax (HT/VHT/HE) capability support - Scan, association, and connection management - Data path handling for TX/RX, including aggregation and reorder - WMM QoS support and traffic prioritization - 802.11h (DFS/TPC) support for regulatory compliance - cfg80211 integration for STA and AP operations - Debugfs and ethtool support - Wake-on-LAN support The driver translates cfg80211 configuration into firmware commands and implements required data path processing in software where needed. Signed-off-by: Jeff Chen <jeff.chen_1@nxp.com>
2026-07-15ASoC: tegra: Simplify error handlingMark Brown
bui duc phuc <phucduc.bui@gmail.com> says: This series contains a few small cleanups for the Tegra ASoC drivers. - Use dev_err_probe() for regmap initialization failures. - Return the original error from snd_soc_add_component_controls(). - Use devm_clk_get_optional() for the optional sync_input clock. Overall, this simplifies the error paths and makes the code more consistent. Link: https://patch.msgid.link/20260715051115.17385-1-phucduc.bui@gmail.com
2026-07-15ASoC: tegra: tegra210: Use devm_clk_get_optional() for sync_input clockbui duc phuc
The existing comment states that the sync_input clock is only needed when another I/O is configured to use the current I2S instance as its input clock, and the current code does not treat its absence as an error. Use devm_clk_get_optional() to match the existing behaviour while still reporting real failures via dev_err_probe(). Update the comment to describe the optional nature of the clock rather than the previous error handling. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Link: https://patch.msgid.link/20260715051115.17385-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-15ASoC: tegra: tegra210_amx: Return the original error directlybui duc phuc
snd_soc_add_component_controls() already reports failures internally. Return its error code directly instead of logging the error again in the component probe callback. Also remove the now unnecessary local error variable. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Link: https://patch.msgid.link/20260715051115.17385-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-15ASoC: tegra: tegra210_adx: Return the original error directlybui duc phuc
snd_soc_add_component_controls() already reports failures internally. Return its error code directly instead of logging the error again in the component probe callback. Also remove the now unnecessary local error variable. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Link: https://patch.msgid.link/20260715051115.17385-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-15ASoC: tegra: tegra20_das: Use dev_err_probe() for error handlingbui duc phuc
Replace the existing dev_err() and PTR_ERR() sequence with dev_err_probe(), preserving the original error code while simplifying the error handling. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260715051115.17385-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-15KVM: riscv: Fix Spectre-v1 in vector register accessZongmin Zhou
User-controlled register indices from the ONE_REG ioctl are used to index into the vector register buffer (v0..v31). Sanitize the calculated offset with array_index_nospec() to prevent speculative out-of-bounds access. Signed-off-by: Zongmin Zhou <zhouzongmin@kylinos.cn> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20260715030818.75657-1-min_halo@163.com Signed-off-by: Anup Patel <anup@brainfault.org>
2026-07-15drm/panthor: Check debugfs GEM lock initializationLinmao Li
drmm_mutex_init() can fail while registering the managed cleanup action. When that happens, drmm_add_action_or_reset() destroys the mutex before returning the error. Continuing initialization would therefore leave the debugfs GEM object list with an unusable lock. Propagate the error as is already done for the other managed mutexes in panthor_device_init(). Fixes: a3707f53eb3f ("drm/panthor: show device-wide list of DRM GEM objects over DebugFS") Signed-off-by: Linmao Li <lilinmao@kylinos.cn> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Link: https://patch.msgid.link/20260713082912.321021-1-lilinmao@kylinos.cn Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
2026-07-15drm/panthor: return error on truncated firmwareOsama Abdelkader
panthor_fw_load() detects truncated firmware images, but jumps to the common cleanup path without setting ret. If no previous error was recorded, the function can return 0 and treat the invalid firmware as successfully loaded. Set ret to -EINVAL before leaving the truncated-image path. Fixes: 2718d91816ee ("drm/panthor: Add the FW logical block") Cc: stable@vger.kernel.org Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://patch.msgid.link/20260714163056.22329-1-osama.abdelkader@gmail.com Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
2026-07-15gpiolib: tolerate gpio-hogs lacking a hogging stateDaniel Golle
Commit d1d564ec4992 ("gpio: move hogs into GPIO core") made gpiochip_add_hog() return -EINVAL for hog nodes lacking any of the 'input', 'output-low' or 'output-high' properties. The error is propagated by gpiochip_hog_lines() and fails registration of the whole GPIO chip. The previous OF-specific implementation tolerated such nodes: of_parse_own_gpio() warned "no hogging state specified, bailing out" and of_gpiochip_add_hog() stopped processing the node without failing chip registration. Some boards deliberately ship hog nodes without a hogging state in their base devicetree and supply the state via overlay, e.g. the PCIe slot key selection hogs on the BananaPi R4 Pro added in commit e309fa232d12 ("arm64: dts: mediatek: mt7988a-bpi-r4pro: rework pcie gpio-hog handling"), as the polarity set in the base devicetree could not be overridden from an overlay. Booting such a board without an overlay applied now fails to register the gpiochip. On the BananaPi R4 Pro this means the MT7988A pinctrl device fails to probe, all peripherals including the console UART defer forever, and the board finally hangs when clk_disable_unused() gates the clocks of the UART still in use by earlycon: gpiochip_add_data_with_key: GPIOs 512..595 (pinctrl_moore) failed to register, -22 mt7988-pinctrl 1001f000.pinctrl: error -EINVAL: Failed to add gpio_chip ... clk: Disabling unused clocks (hangs) Restore the previous behaviour by warning about hog nodes lacking a hogging state and skipping them instead of failing the registration of the whole GPIO chip. Fixes: d1d564ec4992 ("gpio: move hogs into GPIO core") Cc: stable@vger.kernel.org Signed-off-by: Daniel Golle <daniel@makrotopia.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/4c67cf0839ccf57db35a826df6d8fc779531509a.1783974733.git.daniel@makrotopia.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-07-15gpio: sloppy-logic-analyzer: Fix memory leak in gpio_la_poll_probe()Abdun Nihaal
The memory allocated for priv->blob.data is not freed in the error paths that follow the fops_buf_size_set() call in gpio_la_poll_probe(), as well as in the remove function. Fix that by using device managed action to free the memory on remove. Fixes: 7828b7bbbf20 ("gpio: add sloppy logic analyzer using polling") Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://patch.msgid.link/20260715075311.527753-1-nihaal@cse.iitm.ac.in Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-07-15drm/i915/selftests: Fix GT PM sort comparatorsEmre Cecanpunar
Compare the sampled clock values instead of their addresses. Comparing addresses leaves the samples unsorted, preventing the code from discarding the minimum and maximum samples. Fixes: 1a5392479207 ("drm/i915/selftests: Measure CS_TIMESTAMP") Signed-off-by: Emre Cecanpunar <emreleno@gmail.com> Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net> Link: https://lore.kernel.org/r/20260714220430.238433-1-emreleno@gmail.com
2026-07-15soc: document mergesAlexandre Belloni
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>