Connor Abbott
2b520c6104
drm/msm/a7xx: Call CP_RESET_CONTEXT_STATE
...
Calling this packet is necessary when we switch contexts because there
are various pieces of state used by userspace to synchronize between BR
and BV that are persistent across submits and we need to make sure that
they are in a "safe" state when switching contexts. Otherwise a
userspace submission in one context could cause another context to
function incorrectly and hang, effectively a denial of service (although
without leaking data). This was missed during initial a7xx bringup.
Fixes: af66706acc ("drm/msm/a6xx: Add skeleton A7xx support")
Signed-off-by: Connor Abbott <cwabbott0@gmail.com >
Patchwork: https://patchwork.freedesktop.org/patch/654924/
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com >
2025-06-09 12:48:55 -07:00
Connor Abbott
b1c9e797ad
drm/msm: Fix CP_RESET_CONTEXT_STATE bitfield names
...
Based on kgsl.
Fixes: af66706acc ("drm/msm/a6xx: Add skeleton A7xx support")
Signed-off-by: Connor Abbott <cwabbott0@gmail.com >
Patchwork: https://patchwork.freedesktop.org/patch/654922/
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com >
2025-06-09 12:48:55 -07:00
Connor Abbott
b13044092c
drm/msm: Temporarily disable stall-on-fault after a page fault
...
When things go wrong, the GPU is capable of quickly generating millions
of faulting translation requests per second. When that happens, in the
stall-on-fault model each access will stall until it wins the race to
signal the fault and then the RESUME register is written. This slows
processing page faults to a crawl as the GPU can generate faults much
faster than the CPU can acknowledge them. It also means that all
available resources in the SMMU are saturated waiting for the stalled
transactions, so that other transactions such as transactions generated
by the GMU, which shares translation resources with the GPU, cannot
proceed. This causes a GMU watchdog timeout, which leads to a failed
reset because GX cannot collapse when there is a transaction pending and
a permanently hung GPU.
On older platforms with qcom,smmu-v2, it seems that when one transaction
is stalled subsequent faulting transactions are terminated, which avoids
this problem, but the MMU-500 follows the spec here.
To work around these problems, disable stall-on-fault as soon as we get a
page fault until a cooldown period after pagefaults stop. This allows
the GMU some guaranteed time to continue working. We only use
stall-on-fault to halt the GPU while we collect a devcoredump and we
always terminate the transaction afterward, so it's fine to miss some
subsequent page faults. We also keep it disabled so long as the current
devcoredump hasn't been deleted, because in that case we likely won't
capture another one if there's a fault.
After this commit HFI messages still occasionally time out, because the
crashdump handler doesn't run fast enough to let the GMU resume, but the
driver seems to recover from it. This will probably go away after the
HFI timeout is increased.
Signed-off-by: Connor Abbott <cwabbott0@gmail.com >
Reviewed-by: Rob Clark <robdclark@gmail.com >
Patchwork: https://patchwork.freedesktop.org/patch/654891/
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com >
2025-06-09 11:37:34 -07:00
Connor Abbott
dedf404be8
drm/msm: Delete resume_translation()
...
Unused since the previous commit.
Signed-off-by: Connor Abbott <cwabbott0@gmail.com >
Patchwork: https://patchwork.freedesktop.org/patch/654890/
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com >
2025-06-09 11:36:42 -07:00
Connor Abbott
0c5fea1eb0
drm/msm: Don't use a worker to capture fault devcoredump
...
Now that we use a threaded IRQ, it should be safe to do this in the
fault handler.
We can also remove fault_info from struct msm_gpu and just pass it
directly.
Signed-off-by: Connor Abbott <cwabbott0@gmail.com >
Patchwork: https://patchwork.freedesktop.org/patch/654889/
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com >
2025-06-09 11:36:21 -07:00
Rob Clark
f681c2aa86
drm/msm: Fix another leak in the submit error path
...
put_unused_fd() doesn't free the installed file, if we've already done
fd_install(). So we need to also free the sync_file.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Patchwork: https://patchwork.freedesktop.org/patch/653583/
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com >
2025-06-09 11:27:28 -07:00
Rob Clark
5d319f75cc
drm/msm: Fix a fence leak in submit error path
...
In error paths, we could unref the submit without calling
drm_sched_entity_push_job(), so msm_job_free() will never get
called. Since drm_sched_job_cleanup() will NULL out the
s_fence, we can use that to detect this case.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Patchwork: https://patchwork.freedesktop.org/patch/653584/
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com >
2025-06-09 11:27:28 -07:00
Krzysztof Kozlowski
8a48e35bec
drm/msm/dsi/dsi_phy_10nm: Fix missing initial VCO rate
...
Driver unconditionally saves current state on first init in
dsi_pll_10nm_init(), but does not save the VCO rate, only some of the
divider registers. The state is then restored during probe/enable via
msm_dsi_phy_enable() -> msm_dsi_phy_pll_restore_state() ->
dsi_10nm_pll_restore_state().
Restoring calls dsi_pll_10nm_vco_set_rate() with
pll_10nm->vco_current_rate=0, which basically overwrites existing rate of
VCO and messes with clock hierarchy, by setting frequency to 0 to clock
tree. This makes anyway little sense - VCO rate was not saved, so
should not be restored.
If PLL was not configured configure it to minimum rate to avoid glitches
and configuring entire in clock hierarchy to 0 Hz.
Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Link: https://lore.kernel.org/r/sz4kbwy5nwsebgf64ia7uq4ee7wbsa5uy3xmlqwcstsbntzcov@ew3dcyjdzmi2/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Fixes: a4ccc37693 ("drm/msm/dsi_pll_10nm: restore VCO rate during
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Patchwork: https://patchwork.freedesktop.org/patch/654796/
Link: https://lore.kernel.org/r/20250520111325.92352-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-06-09 08:33:41 +03:00
James A. MacInnes
146e87f3e1
drm/msm/disp: Correct porch timing for SDM845
...
Type-C DisplayPort inoperable due to incorrect porch settings.
- Re-used wide_bus_en as flag to prevent porch shifting
Fixes: c943b4948b ("drm/msm/dp: add displayPort driver support")
Signed-off-by: James A. MacInnes <james.a.macinnes@gmail.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Patchwork: https://patchwork.freedesktop.org/patch/636945/
Link: https://lore.kernel.org/r/20250212-sdm845_dp-v2-2-4954e51458f4@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-06-09 01:36:03 +03:00
James A. MacInnes
83c4c67076
drm/msm/dp: Disable wide bus support for SDM845
...
When widebus was enabled for DisplayPort in commit c7c4122026
("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: c7c4122026 ("drm/msm/dp: enable widebus on all relevant chipsets")
Signed-off-by: James A. MacInnes <james.a.macinnes@gmail.com >
[DB: reworded commit text following Marijn's suggestion]
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/636944/
Link: https://lore.kernel.org/r/20250212-sdm845_dp-v2-1-4954e51458f4@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-06-09 01:31:42 +03:00
Rob Clark
ee11d953fd
MAINTAINERS: .mailmap: update Rob Clark's email address
...
Remap historical email addresses to @oss.qualcomm.com.
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com >
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Reviewed-by: Bjorn Andersson <andersson@kernel.org >
Patchwork: https://patchwork.freedesktop.org/patch/656974/
2025-06-04 13:26:41 -07:00
Akhil P Oommen
cb46078168
mailmap: Update entry for Akhil P Oommen
...
A new policy within qualcomm requires me to use a new email address
for all future contributions to Linux kernel. Update the mailmap to
map my old email addresses to the new one, ie akhilpo@oss.qualcomm.com
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com >
Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com >
Link: https://lore.kernel.org/lkml/20250603121508.296678-1-quic_akhilpo@quicinc.com
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com >
2025-06-04 13:24:56 -07:00
Abhinav Kumar
d6984d0c0a
MAINTAINERS: update my email address
...
My current email address will stop working soon. Use
linux.dev email instead.
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Acked-by: Rob Clark <robdclark@gmail.com >
Patchwork: https://patchwork.freedesktop.org/patch/655555/
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com >
2025-06-04 13:21:05 -07:00
Abhinav Kumar
11bb662bfa
MAINTAINERS: drop myself as maintainer
...
I will no longer regularly work on this platform. Hence will
step down from maintainer duties.
Also, add Jessica as a reviewer to the MSM DRM subsystem to help
out with the reviews.
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Acked-by: Rob Clark <robdclark@gmail.com >
Patchwork: https://patchwork.freedesktop.org/patch/655558/
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com >
2025-06-04 13:19:27 -07:00
Dmitry Baryshkov
fc5c669c90
dt-bindings: display: msm: correct example in SM8350 MDSS schema
...
Fix the interconnects in the example to follow the schema changes.
Fixes: 60b8d3a236 ("dt-bindings: display: msm: sm8350-mdss: Describe the CPU-CFG icc path")
Reported-by: Rob Herring <robh@kernel.org >
Closes: http://lore.kernel.org/r/CAL_JsqKr8Xd8uxFzE0YJTyD+V6N++VV8SX-GB5Xt0_BKkeoGUQ@mail.gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Patchwork: https://patchwork.freedesktop.org/patch/651775/
Link: https://lore.kernel.org/r/20250505-sm8350-fix-example-v1-1-36d5d9ccba66@oss.qualcomm.com
2025-05-13 21:53:34 +03:00
Rob Herring (Arm)
d92801d8e6
dt-bindings: display/msm: hdmi: Fix constraints on additional 'port' properties
...
The MSM HDMI port nodes are missing any restrictions on additional
properties. The $ref should be to "/properties/port" rather than
"/$defs/port-base" as there are not additional properties in the nodes
to define.
Signed-off-by: Rob Herring (Arm) <robh@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Patchwork: https://patchwork.freedesktop.org/patch/652299/
Link: https://lore.kernel.org/r/20250507215912.2748964-1-robh@kernel.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:49 +03:00
Aleksandrs Vinarskis
5a0436e92a
drm/msm/dp: Introduce link training per-segment for LTTPRs
...
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: 72d0af4acc ("drm/msm/dp: Add support for LTTPR handling")
Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com > # SA8775P
Tested-by: Johan Hovold <johan+linaro@kernel.org >
Tested-by: Rob Clark <robdclark@gmail.com >
Tested-by: Stefan Schmidt <stefan.schmidt@linaro.org >
Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com >
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 >
Patchwork: https://patchwork.freedesktop.org/patch/652305/
Link: https://lore.kernel.org/r/20250507230113.14270-5-alex.vinarskis@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:49 +03: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
Aleksandrs Vinarskis
9351d3d302
drm/msm/dp: Fix support of LTTPR initialization
...
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: 72d0af4acc ("drm/msm/dp: Add support for LTTPR handling")
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/652301/
Link: https://lore.kernel.org/r/20250507230113.14270-2-alex.vinarskis@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:49 +03:00
Dmitry Baryshkov
de01fc9fa1
drm/msm/dpu: remove DPU_CTL_SPLIT_DISPLAY from SAR2130P CTL blocks
...
Follow the changes in the commit a2649952f6 ("drm/msm/dpu: remove
DPU_CTL_SPLIT_DISPLAY from CTL blocks on DPU >= 5.0") and remove
DPU_CTL_SPLIT_DISPLAY from the CTL blocks on the SAR2130P platform.
Single CTL is used for all interfaces used by a single path
Fixes: 1785751734 ("drm/msm/dpu: add catalog entry for SAR2130P")
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org >
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/651883/
Link: https://lore.kernel.org/r/20250506-dpu-sar2130p-no-split-display-v1-1-b619c0fddea5@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:49 +03:00
Krzysztof Kozlowski
7520803bb9
drm/msm/dpu: Add handling of LM_6 and LM_7 bits in pending flush mask
...
MDSS/MDP v12 comes with new bits in flush registers (e.g.
MDP_CTL_0_FLUSH) for Layer Mixer 6 and 7.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651260/
Link: https://lore.kernel.org/r/20250430-b4-sm8750-display-v5-13-8cab30c3e4df@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:49 +03:00
Krzysztof Kozlowski
a5539d0fbb
drm/msm/dpu: Add LM_7, DSC_[67], PP_[67] and MERGE_3D_5
...
Add IDs for new blocks present in MDSS/MDP v12 for LM, DSC, PINGPONG and
MERGE_3D blocks.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651262/
Link: https://lore.kernel.org/r/20250430-b4-sm8750-display-v5-12-8cab30c3e4df@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:49 +03:00
Krzysztof Kozlowski
b82dd6d258
drm/msm/dpu: Drop useless comments
...
Drop comments about SoC before each 'struct dpu_lm_sub_blks' for given
SoC because it's duplicating the actual name of structure.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651251/
Link: https://lore.kernel.org/r/20250430-b4-sm8750-display-v5-11-8cab30c3e4df@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:49 +03:00
Krzysztof Kozlowski
2e162df9f6
drm/msm/dpu: Clear CTL_FETCH_PIPE_ACTIVE before blend setup
...
Before blend setup, all existing blend stages are cleared, so shall be
active fetch pipes.
Fixes: b3652e87c0 ("drm/msm/disp/dpu1: add support to program fetch active in ctl path")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651263/
Link: https://lore.kernel.org/r/20250430-b4-sm8750-display-v5-10-8cab30c3e4df@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:49 +03:00
Krzysztof Kozlowski
3c072d50ae
drm/msm/dpu: Clear CTL_FETCH_PIPE_ACTIVE on ctl_path reset
...
Resetting entire CTL path should also include resetting active fetch
pipes.
Fixes: e1a950eec2 ("drm/msm/dpu: add reset_intf_cfg operation for dpu_hw_ctl")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651252/
Link: https://lore.kernel.org/r/20250430-b4-sm8750-display-v5-9-8cab30c3e4df@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:49 +03:00
Krzysztof Kozlowski
164e00a9e6
drm/msm/dpu: Clear CTL_FETCH_PIPE_ACTIVE on mixer reset
...
Resetting mixers should also include resetting active fetch pipes.
Fixes: ae4d721ce1 ("drm/msm/dpu: add an API to reset the encoder related hw blocks")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651246/
Link: https://lore.kernel.org/r/20250430-b4-sm8750-display-v5-8-8cab30c3e4df@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Krzysztof Kozlowski
1d0a6c9e3b
drm/msm/dpu: Add missing "fetch" name to set_active_pipes()
...
The set_active_pipes() callback configures CTL_FETCH_PIPE_ACTIVE and
newer DPU v12.0 comes with CTL_PIPE_ACTIVE, thus rename it to
set_active_fetch_pipes() to better match the purpose.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651261/
Link: https://lore.kernel.org/r/20250430-b4-sm8750-display-v5-7-8cab30c3e4df@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Dmitry Baryshkov
666832f7c2
drm/msm/hdmi: wire in hpd_enable/hpd_disable bridge ops
...
The HDMI driver already has msm_hdmi_hpd_enable() and
msm_hdmi_hpd_disable() functions. Wire them into the
msm_hdmi_bridge_funcs, so that HPD can be enabled and disabled
dynamically rather than always having HPD events generation enabled.
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-13-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Dmitry Baryshkov
b93f19d8d0
drm/msm/hdmi: ensure that HDMI is up if HPD is requested
...
The HDMI block needs to be enabled to properly generate HPD events. Make
sure it is not turned off in the disable paths if HPD delivery is enabled.
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651722/
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-12-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Dmitry Baryshkov
969bbbf7fb
drm/msm/hdmi: expand the HDMI_CFG macro
...
Expand the HDMI_CFG() macro in HDMI config description. It has no added
value other than hiding some boilerplate declarations.
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651724/
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-11-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Dmitry Baryshkov
a7a1550d04
drm/msm/hdmi: rename hpd_clks to pwr_clks
...
As these clocks are now used in the runtime PM callbacks, they have no
connection to 'HPD'. Rename corresponding fields to follow clocks
purpose, to power up the HDMI controller.
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651720/
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-10-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Dmitry Baryshkov
0c5ec818cc
drm/msm/hdmi: implement proper runtime PM handling
...
It is completely not obvious, but the so-called 'hpd' clocks and
regulators are required for the HDMI host to function properly. Merge
pwr and hpd regulators. Use regulators, clocks and pinctrl to implement
proper runtime PM callbacks.
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651715/
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-9-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Dmitry Baryshkov
531b4e2c20
drm/msm/hdmi: add runtime PM calls to DDC transfer function
...
We must be sure that the HDMI controller is powered on, while performing
the DDC transfer. Add corresponding runtime PM calls to
msm_hdmi_i2c_xfer().
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651727/
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-8-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Dmitry Baryshkov
81aa834197
drm/msm/hdmi: switch to pm_runtime_resume_and_get()
...
The pm_runtime_get_sync() function is a bad choise for runtime power
management. Switch HDMI driver to pm_runtime_resume_and_get() and add
proper error handling, while we are at it.
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651713/
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-7-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Dmitry Baryshkov
15a5223dc6
drm/msm/hdmi: switch to clk_bulk API
...
The last platform using legacy clock names for HDMI block (APQ8064)
switched to new clock names in 5.16. It's time to stop caring about old
DT, drop hand-coded helpers and switch to clk_bulk_* API.
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651716/
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-6-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Dmitry Baryshkov
a6984a3f9a
drm/msm/hdmi: drop clock frequency assignment
...
The only clock which has frequency being set through hpd_freqs is the
"core" aka MDSS_HDMI_CLK clock. It always has the specified frequency,
so we can drop corresponding clk_set_rate() call together with the
hpd_freq infrastructure.
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651717/
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-5-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Dmitry Baryshkov
7e53b0a98f
drm/msm/hdmi: simplify extp clock handling
...
With the extp being the only "power" clock left, remove the surrounding
loops and handle the extp clock directly.
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651710/
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-4-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Dmitry Baryshkov
e300f26b7e
drm/msm/hdmi: move the alt_iface clock to the hpd list
...
According to the vendor kernel [1] , the alt_iface clock should be
enabled together with the rest of HPD clocks, to make HPD to work
properly.
[1] e07a5487e5
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651709/
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-3-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Dmitry Baryshkov
72dff0b04e
drm/msm/hdmi: convert clock and regulator arrays to const arrays
...
As a preparation to the next patches convert 'static const char *'
arrays to 'static const char * const', as required by the checkpatch.pl
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Patchwork: https://patchwork.freedesktop.org/patch/651705/
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-2-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Dmitry Baryshkov
90957ca46a
dt-bindings: display/msm/hdmi: drop obsolete GPIOs from schema
...
The commit 68e674b13b ("drm/msm/hdmi: drop unused GPIO support")
dropped support for obsolete qcom,hdmi-tx-mux-* gpios. They were not
used by any of the upstream platforms. Drop them from the bindings too.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/651708/
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-1-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
2025-05-12 19:18:48 +03:00
Rob Clark
8f5264d302
drm/msm/adreno: Remove MODULE_FIRMWARE()'s
...
The driver handles the case where gpu fw is not in the initrd. OTOH it
doesn't always handle the case where _some_ fw is in the initrd, but
others are not. In particular the zap fw tends to be signed with an OEM
specific key, so the paths/names differ across devices with the same
SoC/GPU, so we cannot sanely list them with MODULE_FIRMWARE().
So MODULE_FIRMWARE() just ends up causing problems without actually
solving anything. Remove them!
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com >
Patchwork: https://patchwork.freedesktop.org/patch/652195/
2025-05-10 09:06:36 -07:00
Konrad Dybcio
5a9c1bea01
drm/msm/a6xx: Disable rgb565_predicator on Adreno 7c3
...
This feature is supposed to be enabled with UBWC v4 or later.
Implementations of this SKU feature an effective UBWC version of 3, so
disable it, in line with the BSP kernel.
Reported-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com >
Fixes: 192f4ee3e4 ("drm/msm/a6xx: Add support for Adreno 7c Gen 3 gpu")
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com >
Patchwork: https://patchwork.freedesktop.org/patch/651759/
Signed-off-by: Rob Clark <robdclark@chromium.org >
2025-05-10 09:05:20 -07:00
Akhil P Oommen
25f0f9be83
arm64: dts: qcom: x1e80100: Add OPPs up to Turbo L3 for GPU
...
Now that we have ACD support for GPU, add additional OPPs up to
Turbo L3 which are supported across all existing SKUs.
Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com >
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com >
Tested-by: Maya Matuszczyk <maccraft123mc@gmail.com >
Tested-by: Anthony Ruhier <aruhier@mailbox.org >
Acked-by: Bjorn Andersson <andersson@kernel.org >
Patchwork: https://patchwork.freedesktop.org/patch/649354/
Signed-off-by: Rob Clark <robdclark@chromium.org >
2025-05-10 09:04:13 -07:00
Akhil P Oommen
e153e35bb1
arm64: dts: qcom: x1e80100: Add ACD levels for GPU
...
Update GPU node to include acd level values.
Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com >
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com >
Tested-by: Maya Matuszczyk <maccraft123mc@gmail.com >
Tested-by: Anthony Ruhier <aruhier@mailbox.org >
Acked-by: Bjorn Andersson <andersson@kernel.org >
Patchwork: https://patchwork.freedesktop.org/patch/649352/
Signed-off-by: Rob Clark <robdclark@chromium.org >
2025-05-10 09:03:30 -07:00
Akhil P Oommen
db76003ade
dt-bindings: opp: Add v2-qcom-adreno vendor bindings
...
Add a new schema which extends opp-v2 to support a new vendor specific
property required for Adreno GPUs found in Qualcomm's SoCs. The new
property called "qcom,opp-acd-level" carries a u32 value recommended
for each opp needs to be shared to GMU during runtime.
Also, update MAINTAINERS file include the new opp-v2-qcom-adreno.yaml.
Cc: Rob Clark <robdclark@gmail.com >
Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com >
Tested-by: Maya Matuszczyk <maccraft123mc@gmail.com >
Tested-by: Anthony Ruhier <aruhier@mailbox.org >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Patchwork: https://patchwork.freedesktop.org/patch/649351/
Signed-off-by: Rob Clark <robdclark@chromium.org >
2025-05-04 09:20:29 -07:00
Akhil P Oommen
19c17841e3
drm/msm/adreno: Add module param to disable ACD
...
Add a module param to disable ACD which will help to quickly rule it
out for any GPU issues.
Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com >
Tested-by: Maya Matuszczyk <maccraft123mc@gmail.com >
Tested-by: Anthony Ruhier <aruhier@mailbox.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com >
Patchwork: https://patchwork.freedesktop.org/patch/649349/
Signed-off-by: Rob Clark <robdclark@chromium.org >
2025-05-04 09:20:29 -07:00
Akhil P Oommen
8e98a81da2
drm/msm: a6x: Rework qmp_get() error handling
...
Fix the following for qmp_get() errors:
1. Correctly handle probe defer for A6x GPUs
2. Ignore other errors because those are okay when GPU ACD is
not required. They are checked again during gpu acd probe.
Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com >
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com >
Tested-by: Maya Matuszczyk <maccraft123mc@gmail.com >
Tested-by: Anthony Ruhier <aruhier@mailbox.org >
Patchwork: https://patchwork.freedesktop.org/patch/649346/
Signed-off-by: Rob Clark <robdclark@chromium.org >
2025-05-04 09:20:29 -07:00
Akhil P Oommen
5f02f5e78e
drm/msm/a6xx: Increase HFI response timeout
...
When ACD feature is enabled, it triggers some internal calibrations
which result in a pretty long delay during the first HFI perf vote.
So, increase the HFI response timeout to match the downstream driver.
Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com >
Tested-by: Maya Matuszczyk <maccraft123mc@gmail.com >
Tested-by: Anthony Ruhier <aruhier@mailbox.org >
Patchwork: https://patchwork.freedesktop.org/patch/649344/
Signed-off-by: Rob Clark <robdclark@chromium.org >
2025-05-04 09:20:29 -07:00
Akhil P Oommen
b733fe7bff
drm/msm/adreno: Add support for ACD
...
ACD a.k.a Adaptive Clock Distribution is a feature which helps to reduce
the power consumption. In some chipsets, it is also a requirement to
support higher GPU frequencies. This patch adds support for GPU ACD by
sending necessary data to GMU and AOSS. The feature support for the
chipset is detected based on devicetree data.
Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com >
Tested-by: Maya Matuszczyk <maccraft123mc@gmail.com >
Tested-by: Anthony Ruhier <aruhier@mailbox.org >
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com >
Patchwork: https://patchwork.freedesktop.org/patch/649342/
Signed-off-by: Rob Clark <robdclark@chromium.org >
2025-05-04 09:20:28 -07:00