aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/dp
Commit message (Collapse)AuthorAgeFilesLines
* drm/bridge: Pass down connector to drm bridge detect hookAndy Yan2025-07-141-1/+2
| | | | | | | | | | | | | | | | | | | | In some application scenarios, we hope to get the corresponding connector when the bridge's detect hook is invoked. In most cases, we can get the connector by drm_atomic_get_connector_for_encoder if the encoder attached to the bridge is enabled, however there will still be some scenarios where the detect hook of the bridge is called but the corresponding encoder has not been enabled yet. For instance, this occurs when the device is hot plug in for the first time. Since the call to bridge's detect is initiated by the connector, passing down the corresponding connector directly will make things simpler. Signed-off-by: Andy Yan <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] [DB: added the chunk to the cdn-dp driver] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: Make dp/hdmi_audio_* callback keep the same paramter order with ↵Andy Yan2025-07-142-8/+8
| | | | | | | | | | | | | get_modes Make the dp/hdmi_audio_* callback maintain the same parameter order as get_modes and edid_read: first the bridge, then the connector. Signed-off-by: Andy Yan <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] [DB: added the chunk to the cdn-dp driver] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/msm: make it possible to disable KMS-related code.Dmitry Baryshkov2025-07-051-0/+4
| | | | | | | | | | If the Adreno device is used in a headless mode, there is no need to build all KMS components. Build corresponding parts conditionally, only selecting them if modeset support is actually required. Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/662581/ Signed-off-by: Rob Clark <[email protected]>
* drm/msm: move KMS driver data to msm_kmsDmitry Baryshkov2025-07-051-4/+2
| | | | | | | | | | | Data for HDMI, DSI and DP blocks only makes sense for the KMS parts of the driver. Move corresponding data pointers from struct msm_drm_private to struct msm_kms. Suggested-by: Abhinav Kumar <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/662580/ Signed-off-by: Rob Clark <[email protected]>
* drm/msm/dp: add linux/io.h header to fix build errorsRandy Dunlap2025-07-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add <linux/io.h> header to pull in readl/writel and friends. This eliminates the following build errors: drivers/gpu/drm/msm/dp/dp_panel.c: In function 'msm_dp_read_link': drivers/gpu/drm/msm/dp/dp_panel.c:33:16: error: implicit declaration of function 'readl_relaxed' [-Wimplicit-function-declaration] 33 | return readl_relaxed(panel->link_base + offset); drivers/gpu/drm/msm/dp/dp_panel.c: In function 'msm_dp_write_link': drivers/gpu/drm/msm/dp/dp_panel.c:43:9: error: implicit declaration of function 'writel' [-Wimplicit-function-declaration] 43 | writel(data, panel->link_base + offset); Fixes: 603fc0fc30bf ("drm/msm/dp: drop the msm_dp_catalog module") Signed-off-by: Randy Dunlap <[email protected]> Cc: Stephen Boyd <[email protected]> Cc: Dmitry Baryshkov <[email protected]> Cc: Dmitry Baryshkov <[email protected]> Cc: Dmitry Baryshkov <[email protected]> Cc: Rob Clark <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Thomas Zimmermann <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/659442/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/msm/dp: drop the msm_dp_catalog moduleDmitry Baryshkov2025-07-0414-520/+434
| | | | | | | | | | | | Now as the msm_dp_catalog module became nearly empty, drop it, accessing registers directly from the corresponding submodules. Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/654332/ Link: https://lore.kernel.org/r/[email protected]
* drm/msm/dp: move interrupt handling to dp_ctrlDmitry Baryshkov2025-07-048-160/+145
| | | | | | | | | | | It makes it easier to keep all interrupts-related code in dp_ctrl submodule. Move all functions to dp_ctrl.c. Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/654330/ Link: https://lore.kernel.org/r/[email protected]
* drm/msm/dp: move more AUX functions to dp_aux.cDmitry Baryshkov2025-07-047-93/+113
| | | | | | | | | | | Move several misnamed functions accessing AUX bus to dp_aux.c, further cleaning up dp_catalog submodule. Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/654333/ Link: https://lore.kernel.org/r/[email protected]
* drm/msm/dp: move/inline ctrl register functionsDmitry Baryshkov2025-07-045-451/+415
| | | | | | | | | | | | | Move CTRL-related functions to dp_ctrl.c, inlining one line wrappers during this process. The enable/disable functions have been split to the enable/disable or enter/exit pairs. The IRQ and HPD related functions are left in dp_catalog.c, pending later cleanup. Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/654328/ Link: https://lore.kernel.org/r/[email protected]
* drm/msm/dp: move/inline audio related functionsDmitry Baryshkov2025-07-043-196/+98
| | | | | | | | | | | | Move audio-related functions to dp_audio.c, following up the cleanup done by the rest of the submodules. Inline functions with simple register access patterns. Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/654325/ Link: https://lore.kernel.org/r/[email protected]
* drm/msm/dp: move/inline panel related functionsDmitry Baryshkov2025-07-045-220/+206
| | | | | | | | | | | Move panel-related functions to dp_panel.c, following up the cleanup done by the rest of the submodules. Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/654321/ Link: https://lore.kernel.org/r/[email protected]
* drm/msm/dp: move/inline AUX register functionsDmitry Baryshkov2025-07-043-119/+82
| | | | | | | | | | | Move all register-level functions to dp_aux.c, inlining one line wrappers during this process. Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/654322/ Link: https://lore.kernel.org/r/[email protected]
* drm/msm/dp: move I/O functions to global headerDmitry Baryshkov2025-07-042-65/+62
| | | | | | | | | | | Move msm_dp_read()/msm_write_foo() functions to the dp_catalog.h, allowing other modules to access the data directly. Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/654318/ Link: https://lore.kernel.org/r/[email protected]
* drm/msm/dp: pull I/O data out of msm_dp_catalog_private()Dmitry Baryshkov2025-07-042-316/+230
| | | | | | | | | | | | Having I/O regions inside a msm_dp_catalog_private() results in extra layers of one-line wrappers for accessing the data. Move I/O region base and size to the globally visible struct msm_dp_catalog. Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/654319/ Link: https://lore.kernel.org/r/[email protected]
* drm/msm/dp: read hw revision only onceDmitry Baryshkov2025-07-042-22/+9
| | | | | | | | | | | There is little point in rereading DP controller revision over and over again. Read it once, after the first software reset. Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/654316/ Link: https://lore.kernel.org/r/[email protected]
* drm/msm/dp: split MMSS_DP_DSC_DTO register write to a separate functionDmitry Baryshkov2025-07-043-1/+12
| | | | | | | | | | | | It's the dp_panel's duty to clear the MMSS_DP_DSC_DTO register. Once DP driver gets DSC support, it will handle that register in other places too. Split a call to write 0x0 to that register to a separate function. Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/654314/ Link: https://lore.kernel.org/r/[email protected]
* drm/msm/dp: Disable wide bus support for SDM845James A. MacInnes2025-06-081-1/+6
| | | | | | | | | | | | | | | | | | | | | | When widebus was enabled for DisplayPort in commit c7c412202623 ("drm/msm/dp: enable widebus on all relevant chipsets") it was clarified that it is only supported on DPU 5.0.0 onwards which includes SC7180 on DPU revision 6.2. However, this patch missed that the description structure for SC7180 is also reused for SDM845 (because of identical io_start address) which is only DPU 4.0.0, leading to a wrongly enbled widebus feature and corruption on that platform. Create a separate msm_dp_desc_sdm845 structure for this SoC compatible, with the wide_bus_supported flag turned off. Fixes: c7c412202623 ("drm/msm/dp: enable widebus on all relevant chipsets") Signed-off-by: James A. MacInnes <[email protected]> [DB: reworded commit text following Marijn's suggestion] Reviewed-by: Abhinav Kumar <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/636944/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/msm/dp: Introduce link training per-segment for LTTPRsAleksandrs Vinarskis2025-05-121-37/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DisplayPort requires per-segment link training when LTTPR are switched to non-transparent mode, starting with LTTPR closest to the source. Only when each segment is trained individually, source can link train to sink. Implement per-segment link traning when LTTPR(s) are detected, to support external docking stations. On higher level, changes are: * Pass phy being trained down to all required helpers * Run CR, EQ link training per phy * Set voltage swing, pre-emphasis levels per phy Since at least some LTTPRs (eg. Parade PS8830) do not correctly report voltage-swing, pre-emphasis level 3 support, always assume level 3 is supported. This is permitted under DP 2.1(a) section 3.6.7.2 stating that LTTPR shall set its transmitter levels as close as possible to those requested by the DPTX, if the DPTX sets the voltage swing or pre-emphasis to a level that the LTTPR does not support. It shall be noted that LTTPR’s level choosing is implementation-specific. This ensures successful link training both when connected directly to the monitor (single LTTPR onboard most X1E laptops) and via the docking station (at least two LTTPRs). Fixes: 72d0af4accd9 ("drm/msm/dp: Add support for LTTPR handling") Tested-by: Jessica Zhang <[email protected]> # SA8775P Tested-by: Johan Hovold <[email protected]> Tested-by: Rob Clark <[email protected]> Tested-by: Stefan Schmidt <[email protected]> Signed-off-by: Aleksandrs Vinarskis <[email protected]> Reviewed-by: Abel Vesa <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/652305/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/msm/dp: Prepare for link training per-segment for LTTPRsAleksandrs Vinarskis2025-05-122-6/+12
| | | | | | | | | | | | | | | | | Per-segment link training requires knowing the number of LTTPRs (if any) present. Store the count during LTTPRs' initialization. Fixes: 72d0af4accd9 ("drm/msm/dp: Add support for LTTPR handling") Reviewed-by: Abel Vesa <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Aleksandrs Vinarskis <[email protected]> Tested-by: Jessica Zhang <[email protected]> # SA8775P Tested-by: Johan Hovold <[email protected]> Tested-by: Rob Clark <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/652306/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/msm/dp: Account for LTTPRs capabilitiesAleksandrs Vinarskis2025-05-123-4/+16
| | | | | | | | | | | | | | | | | Take into account LTTPR capabilities when selecting maximum allowed link rate, number of data lines. Fixes: 72d0af4accd9 ("drm/msm/dp: Add support for LTTPR handling") Reviewed-by: Abel Vesa <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Aleksandrs Vinarskis <[email protected]> Tested-by: Jessica Zhang <[email protected]> # SA8775P Tested-by: Johan Hovold <[email protected]> Tested-by: Rob Clark <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/652302/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/msm/dp: Fix support of LTTPR initializationAleksandrs Vinarskis2025-05-121-4/+9
| | | | | | | | | | | | | | | | | Initialize LTTPR before msm_dp_panel_read_sink_caps, as DPTX shall (re)read DPRX caps after LTTPR detection, as required by DP 2.1a, Section 3.6.7.6.1. Fixes: 72d0af4accd9 ("drm/msm/dp: Add support for LTTPR handling") Reviewed-by: Abhinav Kumar <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Aleksandrs Vinarskis <[email protected]> Tested-by: Jessica Zhang <[email protected]> # SA8775P Tested-by: Johan Hovold <[email protected]> Tested-by: Rob Clark <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/652301/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/msm/dp: reuse generic HDMI codec implementationDmitry Baryshkov2025-05-025-170/+30
| | | | | | | | | | | | | | The MSM DisplayPort driver implements several HDMI codec functions in the driver, e.g. it manually manages HDMI codec device registration, returning ELD and plugged_cb support. In order to reduce code duplication reuse drm_hdmi_audio_* helpers and drm_bridge_connector integration. Signed-off-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/649728/ Link: https://lore.kernel.org/r/[email protected]
* drm/msm/dp: convert to devm_drm_bridge_alloc() APILuca Ceresoli2025-04-291-4/+5
| | | | | | | | | This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Luca Ceresoli <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-16-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <[email protected]>
* Merge drm/drm-next into drm-misc-nextThomas Zimmermann2025-04-073-16/+18
|\ | | | | | | | | | | | | Backmerging to get v6.15-rc1 into drm-misc-next. Also fixes a build issue when enabling CONFIG_DRM_SCHED_KUNIT_TEST. Signed-off-by: Thomas Zimmermann <[email protected]>
| * drm/msm: Use str_enable_disable-like helpersKrzysztof Kozlowski2025-02-253-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/632406/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/display: dp: change drm_dp_dpcd_read_link_status() return valueDmitry Baryshkov2025-03-252-28/+14
|/ | | | | | | | | | | | | | | drm_dp_dpcd_read_link_status() follows the "return error code or number of bytes read" protocol, with the code returning less bytes than requested in case of some errors. However most of the drivers interpreted that as "return error code in case of any error". Switch drm_dp_dpcd_read_link_status() to drm_dp_dpcd_read_data() and make it follow that protocol too. Acked-by: Jani Nikula <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/20250324-drm-rework-dpcd-access-v4-2-e80ff89593df@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/msm/dp: Add support for LTTPR handlingAbel Vesa2025-02-251-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Link Training Tunable PHY Repeaters (LTTPRs) are defined in DisplayPort 1.4a specification. As the name suggests, these PHY repeaters are capable of adjusting their output for link training purposes. According to the DisplayPort standard, LTTPRs have two operating modes: - non-transparent - it replies to DPCD LTTPR field specific AUX requests, while passes through all other AUX requests - transparent - it passes through all AUX requests. Switching between these two modes is done by the DPTX by issuing an AUX write to the DPCD PHY_REPEATER_MODE register. The msm DP driver is currently lacking any handling of LTTPRs. This means that if at least one LTTPR is found between DPTX and DPRX, the link training would fail if that LTTPR was not already configured in transparent mode. The section 3.6.6.1 from the DisplayPort v2.0 specification mandates that before link training with the LTTPR is started, the DPTX may place the LTTPR in non-transparent mode by first switching to transparent mode and then to non-transparent mode. This operation seems to be needed only on first link training and doesn't need to be done again until device is unplugged. It has been observed on a few X Elite-based platforms which have such LTTPRs in their board design that the DPTX needs to follow the procedure described above in order for the link training to be successful. So add support for reading the LTTPR DPCD caps to figure out the number of such LTTPRs first. Then, for platforms (or Type-C dongles) that have at least one such an LTTPR, set its operation mode to transparent mode first and then to non-transparent, just like the mentioned section of the specification mandates. Tested-by: Johan Hovold <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Johan Hovold <[email protected]> Signed-off-by: Abel Vesa <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Acked-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20250203-drm-dp-msm-add-lttpr-transparent-mode-set-v5-4-c865d0e56d6e@linaro.org Signed-off-by: Dmitry Baryshkov <[email protected]>
* Merge tag 'v6.14-rc4' into drm-nextDave Airlie2025-02-252-6/+10
|\ | | | | | | | | | | | | Backmerge Linux 6.14-rc4 at the request of tzimmermann so misc-next can base on rc4. Signed-off-by: Dave Airlie <[email protected]>
| * Merge tag 'drm-msm-fixes-2025-02-20' of ↵Dave Airlie2025-02-212-6/+10
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.freedesktop.org/drm/msm into drm-fixes Fixes for v6.14-rc4 Display: * More catalog fixes: - to skip watchdog programming through top block if its not present - fix the setting of WB mask to ensure the WB input control is programmed correctly through ping-pong - drop lm_pair for sm6150 as that chipset does not have any 3dmerge block * Fix the mode validation logic for DP/eDP to account for widebus (2ppc) to allow high clock resolutions * Fix to disable dither during encoder disable as otherwise this was causing kms_writeback failure due to resource sharing between * WB and DSI paths as DSI uses dither but WB does not * Fixes for virtual planes, namely to drop extraneous return and fix uninitialized variables * Fix to avoid spill-over of DSC encoder block bits when programming the bits-per-component * Fixes in the DSI PHY to protect against concurrent access of PHY_CMN_CLK_CFG regs between clock and display drivers Core/GPU: * Fix non-blocking fence wait incorrectly rounding up to 1 jiffy timeout * Only print GMU fw version once, instead of each time the GPU resumes Signed-off-by: Dave Airlie <[email protected]> From: Rob Clark <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGtt2AODBXdod8ULXcAygf_qYvwRDVeUVtODx=2jErp6cA@mail.gmail.com
| | * drm/msm/dp: account for widebus and yuv420 during mode validationAbhinav Kumar2025-02-152-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Widebus allows the DP controller to operate in 2 pixel per clock mode. The mode validation logic validates the mode->clock against the max DP pixel clock. However the max DP pixel clock limit assumes widebus is already enabled. Adjust the mode validation logic to only compare the adjusted pixel clock which accounts for widebus against the max DP pixel clock. Also fix the mode validation logic for YUV420 modes as in that case as well, only half the pixel clock is needed. Cc: [email protected] Fixes: 757a2f36ab09 ("drm/msm/dp: enable widebus feature for display port") Fixes: 6db6e5606576 ("drm/msm/dp: change clock related programming for YUV420 over DP") Reviewed-by: Dmitry Baryshkov <[email protected]> Tested-by: Dale Whinham <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/635789/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abhinav Kumar <[email protected]>
* | | drm/bridge: Pass full state to atomic_post_disableMaxime Ripard2025-02-193-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's pretty inconvenient to access the full atomic state from drm_bridges, so let's change the atomic_post_disable hook prototype to pass it directly. Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Tested-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Maxime Ripard <[email protected]>
* | | drm/bridge: Pass full state to atomic_disableMaxime Ripard2025-02-193-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's pretty inconvenient to access the full atomic state from drm_bridges, so let's change the atomic_disable hook prototype to pass it directly. Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Tested-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Maxime Ripard <[email protected]>
* | | drm/bridge: Pass full state to atomic_enableMaxime Ripard2025-02-193-12/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | It's pretty inconvenient to access the full atomic state from drm_bridges, so let's change the atomic_enable hook prototype to pass it directly. Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Tested-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Maxime Ripard <[email protected]>
* | Merge tag 'drm-msm-next-2025-01-07' of gitlab.freedesktop.org:drm/msm into ↵Dave Airlie2025-01-1310-403/+121
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm-next Updates for v6.14 MDSS: - properly described UBWC registers - added SM6150 (aka QCS615) support MDP4: - several small fixes DPU: - added SM6150 (aka QCS615) support - enabled wide planes if virtual planes are enabled (by using two SSPPs for a single plane) - fixed modes filtering for platforms w/o 3DMux - fixed DSPP DSPP_2 / _3 links on several platforms - corrected DSPP definitions on SDM670 - added CWB hardware blocks support - added VBIF to DPU snapshots - dropped struct dpu_rm_requirements DP: - reworked DP audio support DSI: - added SM6150 (aka QCS615) support GPU: - Print GMU core fw version - GMU bandwidth voting for a740 and a750 - Expose uche trap base via uapi - UAPI error reporting Signed-off-by: Dave Airlie <[email protected]> From: Rob Clark <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGsutUu4ff6OpXNXxqf1xaV0rV6oV23VXNRiF0_OEfe72Q@mail.gmail.com
| * drm/msm/dp: stop passing panel to msm_dp_audio_get()Dmitry Baryshkov2024-12-223-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | The dp_audio module doesn't make any use of the passed DP panel instance. Drop the argument. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/629056/ Link: https://lore.kernel.org/r/[email protected]
| * drm/msm/dp: drop struct msm_dp_panel_inDmitry Baryshkov2024-12-223-23/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | All other submodules pass arguments directly. Drop struct msm_dp_panel_in that is used to wrap dp_panel's submodule args and pass all data to msm_dp_panel_get() directly. Reviewed-by: Stephen Boyd <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/629055/ Link: https://lore.kernel.org/r/[email protected]
| * drm/msm/dp: drop obsolete audio headers access through catalogDmitry Baryshkov2024-12-223-102/+0
| | | | | | | | | | | | | | | | | | | | | | | | Drop obsolete functions to access audio packet headers. The dp_audio.c now writes them using msm_dp_write_link() directly. Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/629052/ Link: https://lore.kernel.org/r/[email protected]
| * drm/msm/dp: use msm_dp_utils_pack_sdp_header() for audio packetsDmitry Baryshkov2024-12-223-222/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | Use msm_dp_utils_pack_sdp_header() and call msm_dp_write_link() directly to program audio packet data. Use 0 as Packet ID, as it was not programmed earlier. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/629051/ Link: https://lore.kernel.org/r/[email protected]
| * drm/msm/dp: drop msm_dp_panel_dump_regs() and msm_dp_catalog_dump_regs()Dmitry Baryshkov2024-12-224-50/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The msm_dp_panel_dump_regs() and msm_dp_catalog_dump_regs() are not called anywhere. If there is a necessity to dump registers, the snapshotting should be used instead. Drop these two functions. Reviewed-by: Stephen Boyd <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Tested-by: Stephen Boyd <[email protected]> # sc7180-trogdor Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/629049/ Link: https://lore.kernel.org/r/[email protected]
| * drm/msm/dp: disable the opp table request even for dp_ctrl_off_link()Abhinav Kumar2024-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dp_ctrl_off_link() was created to handle a case where we received a cable connect and then get a cable disconnect without the corresponding dp_display_enable(). For such cases the pixel clock will be off but the link clock will still be on. dp_ctrl_off_link() handles this case by turning off the link clock only. However, the vote removal to the opp table for this case was missed. Remove the opp table vote in dp_ctrl_off_link(). Fixes: 375a126090b9 ("drm/msm/dp: tear down main link at unplug handle immediately") Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/627487/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abhinav Kumar <[email protected]>
| * drm/msm/dp: dont call dp_catalog_ctrl_mainlink_ctrl in ↵Abhinav Kumar2024-12-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | dp_ctrl_configure_source_params() Once the link has already been setup there is no need to call dp_catalog_ctrl_mainlink_ctrl() as this does a reset on the mainlink thereby tearing down the link briefly. Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/627479/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abhinav Kumar <[email protected]>
| * drm/msm/dp: do not touch the MMSS_DP_INTF_CONFIG for tpgAbhinav Kumar2024-12-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MMSS_DP_INTF_CONFIG has already been setup by the main datapath for DP to account for widebus to be used/unused etc. In current implementation, TPG only switches the DP controller to use the main datapath stream OR use the test pattern but expects the rest of the controller to be already setup. Keeping the same behavior intact, drop the clearing of MMSS_DP_INTF_CONFIG from the msm_dp_catalog_panel_tpg_enable() API. Fixes: 757a2f36ab09 ("drm/msm/dp: enable widebus feature for display port") Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/626888/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abhinav Kumar <[email protected]>
| * drm/msm/dp: fix msm_dp_utils_pack_sdp_header interfaceDmitry Baryshkov2024-12-032-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The msm_dp_utils_pack_sdp_header() accepts an unlimited-size u32 pointer for the header output, while it expects a two-element array. It performs a sizeof check which is always true on 64-bit platforms (since sizeof(u32*) is 8) and is always false on 32-bit platforms. It returns an error code which nobody actually checks. Fix the function interface to accept u32[2] and return void, skipping all the checks. Fixes: 55fb8ffc1802 ("drm/msm/dp: add VSC SDP support for YUV420 over DP") Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/626806/ Link: https://lore.kernel.org/r/[email protected] [[email protected]: minor fix in the commit message] Signed-off-by: Abhinav Kumar <[email protected]>
| * drm/msm/dp: set safe_to_exit_level before printing itDmitry Baryshkov2024-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than printing random garbage from stack and pretending that it is the default safe_to_exit_level, set the variable beforehand. Fixes: d13e36d7d222 ("drm/msm/dp: add audio support for Display Port on MSM") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/626804/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abhinav Kumar <[email protected]>
* | drm/msm/dp: use eld_mutex to protect access to connector->eldDmitry Baryshkov2024-12-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Reading access to connector->eld can happen at the same time the drm_edid_to_eld() updates the data. Take the newly added eld_mutex in order to protect connector->eld from concurrent access. Reviewed-by: Maxime Ripard <[email protected]> Acked-by: Abhinav Kumar <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | Get rid of 'remove_new' relic from platform driver structLinus Torvalds2024-12-011-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | The continual trickle of small conversion patches is grating on me, and is really not helping. Just get rid of the 'remove_new' member function, which is just an alias for the plain 'remove', and had a comment to that effect: /* * .remove_new() is a relic from a prototype conversion of .remove(). * New drivers are supposed to implement .remove(). Once all drivers are * converted to not use .remove_new any more, it will be dropped. */ This was just a tree-wide 'sed' script that replaced '.remove_new' with '.remove', with some care taken to turn a subsequent tab into two tabs to make things line up. I did do some minimal manual whitespace adjustment for places that used spaces to line things up. Then I just removed the old (sic) .remove_new member function, and this is the end result. No more unnecessary conversion noise. Signed-off-by: Linus Torvalds <[email protected]>
* drm/msm/dp: tidy up platform data namesDmitry Baryshkov2024-10-311-19/+19
| | | | | | | | | | Follow the established symbol name pattern and rename platform data structures. Reviewed-by: Abhinav Kumar <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/622213/ Link: https://lore.kernel.org/r/[email protected]
* drm/msm/dp: rename edp_ bridge functions and structDmitry Baryshkov2024-10-311-18/+18
| | | | | | | | | | Follow the estalished prefix and rename eDP bridge symbols to use msm_edp_ prefix, moving the edp to the end of the symbol name. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/622210/ Link: https://lore.kernel.org/r/[email protected]
* drm/msm/dp: prefix all symbols with msm_dp_Dmitry Baryshkov2024-10-3120-1881/+1881
| | | | | | | | | | | | | | | | | | | | | | | For historical reasons a lot of symbols in the MSM DisplayPort driver used the generic dp_ prefix. Perform a mass-rename of those symbols to use msm_dp prefix. Basically this is a result of the following script: sed drivers/gpu/drm/msm/dp/* -i -e 's/\<dp_/msm_dp_/g' sed drivers/gpu/drm/msm/dp/* -i -e 's/"msm_dp_/"dp_/g' sed drivers/gpu/drm/msm/dp/* -i -e 's/msm_\(dp_sdp_header\|dp_sdp\)\>/\1/g' Yes, this also results in renaming of several struct fields in addition to renaming the structs and functions, but I think the simple solution is better than the more complex one. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Reviewed-by: Abhinav Kumar <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/622211/ Link: https://lore.kernel.org/r/[email protected]
* Merge remote-tracking branch 'drm-misc/drm-misc-next' into msm-nextRob Clark2024-10-303-11/+10
|\ | | | | | | | | | | | | Merging to pick up commit 785324db2d7a ("drm/msm/dp: migrate the ycbcr_420_allowed to drm_bridge"). Signed-off-by: Rob Clark <[email protected]>