Dale Whinham
ed100aa239
drm/msm/dp: Enable support for eDP v1.4+ link rates table
...
The MSM DRM driver currently does not support panels which report their
supported link rates via the SUPPORTED_LINK_RATES table.
For panels which do not offer the optional eDP v1.3 fallback via
MAX_LINK_RATE, this will cause a panel probe failure (e.g. Samsung
ATNA30DW01-1 as found in Microsoft Surface Pro 11).
Detect eDP v1.4 panels and parse the SUPPORTED_LINK_RATES table when
present.
Additionally, set the rate using LINK_RATE_SET instead of LINK_BW_SET,
but only if LINK_BW_SET hasn't already been written to.
Signed-off-by: Dale Whinham <daleyo@gmail.com >
Tested-by: Jérôme de Bretagne <jerome.debretagne@gmail.com >
Tested-by: Steev Klimaszewski <threeway@gmail.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Patchwork: https://patchwork.freedesktop.org/patch/695064/
Link: https://lore.kernel.org/r/20251218-drm-msm-edp14-v2-1-2e56c2338ab1@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2026-01-06 05:30:08 +02:00
Randy Dunlap
23bee889e3
drm/msm/dp: fix all kernel-doc warnings
...
Correct and add kernel-doc comments to eliminate all warnings:
Warning: ../drivers/gpu/drm/msm/dp/dp_debug.h:31 expecting prototype for
msm_dp_debug_get(). Prototype was for msm_dp_debug_init() instead
Warning: ../drivers/gpu/drm/msm/dp/dp_drm.c:24 function parameter
'connector' not described in 'msm_dp_bridge_detect'
Warning: ../drivers/gpu/drm/msm/dp/dp_link.h:90 expecting prototype for
mdss_dp_test_bit_depth_to_bpp(). Prototype was for
msm_dp_link_bit_depth_to_bpp() instead
Warning: ../drivers/gpu/drm/msm/dp/dp_link.h:126 function parameter
'aux' not described in 'msm_dp_link_get'
Warning: ../drivers/gpu/drm/msm/dp/dp_link.h:126 function parameter
'dev' not described in 'msm_dp_link_get'
Warning: ../drivers/gpu/drm/msm/dp/dp_panel.h:70 function parameter
'bw_code' not described in 'is_link_rate_valid'
Warning: ../drivers/gpu/drm/msm/dp/dp_panel.h:84 expecting prototype for
msm_dp_link_is_lane_count_valid(). Prototype was for
is_lane_count_valid() instead
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Patchwork: https://patchwork.freedesktop.org/patch/695647/
Link: https://lore.kernel.org/r/20251219184638.1813181-3-rdunlap@infradead.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-12-24 11:24:18 +02:00
Xiangxu Yin
6fb0cf3e7c
drm/msm/dp: Add support for lane mapping configuration
...
QCS615 platform requires non-default logical-to-physical lane mapping due
to its unique hardware routing. Unlike the standard mapping sequence
<0 1 2 3>, QCS615 uses <3 2 0 1>, which necessitates explicit
configuration via the data-lanes property in the device tree. This ensures
correct signal routing between the DP controller and PHY.
For partial definitions, fill remaining lanes with unused physical lanes
in ascending order.
Signed-off-by: Xiangxu Yin <xiangxu.yin@oss.qualcomm.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Patchwork: https://patchwork.freedesktop.org/patch/675645/
Link: https://lore.kernel.org/r/20250919-add-displayport-support-for-qcs615-platform-v5-14-eae6681f4002@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-11-14 16:59:27 +02:00
Xiangxu Yin
c8fc72804d
drm/msm/dp: move link-specific parsing from dp_panel to dp_link
...
Since max_dp_lanes and max_dp_link_rate are link-specific parameters, move
their parsing from dp_panel to dp_link for better separation of concerns.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Signed-off-by: Xiangxu Yin <xiangxu.yin@oss.qualcomm.com >
Patchwork: https://patchwork.freedesktop.org/patch/675643/
Link: https://lore.kernel.org/r/20250919-add-displayport-support-for-qcs615-platform-v5-13-eae6681f4002@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-11-14 16:59:27 +02:00
Aleksandrs Vinarskis
7513ccb884
drm/msm/dp: Prepare for link training per-segment for LTTPRs
...
Per-segment link training requires knowing the number of LTTPRs
(if any) present. Store the count during LTTPRs' initialization.
Fixes: 72d0af4acc ("drm/msm/dp: Add support for LTTPR handling")
Reviewed-by: Abel Vesa <abel.vesa@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com >
Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com > # SA8775P
Tested-by: Johan Hovold <johan+linaro@kernel.org >
Tested-by: Rob Clark <robdclark@gmail.com >
Patchwork: https://patchwork.freedesktop.org/patch/652306/
Link: https://lore.kernel.org/r/20250507230113.14270-4-alex.vinarskis@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:49 +03:00
Aleksandrs Vinarskis
c156fe2dd4
drm/msm/dp: Account for LTTPRs capabilities
...
Take into account LTTPR capabilities when selecting maximum allowed
link rate, number of data lines.
Fixes: 72d0af4acc ("drm/msm/dp: Add support for LTTPR handling")
Reviewed-by: Abel Vesa <abel.vesa@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com >
Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com > # SA8775P
Tested-by: Johan Hovold <johan+linaro@kernel.org >
Tested-by: Rob Clark <robdclark@gmail.com >
Patchwork: https://patchwork.freedesktop.org/patch/652302/
Link: https://lore.kernel.org/r/20250507230113.14270-3-alex.vinarskis@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:49 +03:00
Dmitry Baryshkov
fb7d509b17
drm/msm/dp: prefix all symbols with msm_dp_
...
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 <lkp@intel.com >
Closes: https://lore.kernel.org/oe-kbuild-all/202410250305.UHKDhtxy-lkp@intel.com/
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/622211/
Link: https://lore.kernel.org/r/20241029-msm-dp-rename-v2-1-13c5c03fad44@linaro.org
2024-10-31 21:08:01 +02:00
Bjorn Andersson
670574c970
drm/msm/dp: Remove unused defines and members
...
Throughout the Qualcomm Displayport driver a number of defines and
struct members has become unused, but lingers in the code. Remove these.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/585345/
Link: https://lore.kernel.org/r/20240328-msm-dp-cleanup-v2-3-a5aed9798d32@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-04-22 16:22:49 +03:00
Dmitry Baryshkov
22578178e5
drm/msm/dp: allow voltage swing / pre emphasis of 3
...
Both dp_link_adjust_levels() and dp_ctrl_update_vx_px() limit swing and
pre-emphasis to 2, while the real maximum value for the sum of the
voltage swing and pre-emphasis is 3. Fix the DP code to remove this
limitation.
Fixes: c943b4948b ("drm/msm/dp: add displayPort driver support")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Kuogee Hsieh <quic_khsieh@quicinc.com >
Tested-by: Kuogee Hsieh <quic_khsieh@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/577006/
Link: https://lore.kernel.org/r/20240203-dp-swing-3-v1-1-6545e1706196@linaro.org
2024-04-08 18:56:35 +03:00
Kuogee Hsieh
72b557c159
drm/msm/dp: remove mdss_dp_test_bit_depth_to_bpc()
...
mdss_dp_test_bit_depth_to_bpc() can be replace by
mdss_dp_test_bit_depth_to_bpp() / 3. Hence remove it.
Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/574279/
Link: https://lore.kernel.org/r/1704993255-12753-1-git-send-email-quic_khsieh@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2024-02-11 22:38:06 +02:00
Tanmay Shah
6625e2637d
drm/msm/dp: DisplayPort PHY compliance tests fixup
...
Bandwidth code was being used as test link rate. Fix this by converting
bandwidth code to test link rate
Do not reset voltage and pre-emphasis level during IRQ HPD attention
interrupt. Also fix pre-emphasis parsing during test link status process
Signed-off-by: Tanmay Shah <tanmay@codeaurora.org >
Fixes: 8ede2ecc3e ("drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets")
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Rob Clark <robdclark@chromium.org >
2020-11-04 08:26:25 -08:00
Abhinav Kumar
de3ee25473
drm/msm/dp: add debugfs nodes for video pattern tests
...
Add the debugfs nodes needed for the video pattern
compliance tests to MSM DP driver.
Changes in v2: rebase on top of latest patchset of dependency
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org >
Signed-off-by: Rob Clark <robdclark@chromium.org >
2020-09-15 10:54:35 -07:00
Chandan Uddaraju
c943b4948b
drm/msm/dp: add displayPort driver support
...
Add the needed displayPort files to enable DP driver
on msm target.
"dp_display" module is the main module that calls into
other sub-modules. "dp_drm" file represents the interface
between DRM framework and DP driver.
Changes in v12:
-- Add support of pm ops in display port driver
-- Clear bpp depth bits before writing to MISC register
-- Fix edid read
Previous Change log:
https://lkml.kernel.org/lkml/20200818051137.21478-3-tanmay@codeaurora.org/
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org >
Signed-off-by: Vara Reddy <varar@codeaurora.org >
Signed-off-by: Tanmay Shah <tanmay@codeaurora.org >
Co-developed-by: Abhinav Kumar <abhinavk@codeaurora.org >
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org >
Co-developed-by: Kuogee Hsieh <khsieh@codeaurora.org >
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org >
Co-developed-by: Guenter Roeck <groeck@chromium.org >
Signed-off-by: Guenter Roeck <groeck@chromium.org >
Co-developed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Rob Clark <robdclark@chromium.org >
2020-09-15 10:54:34 -07:00