Dmitry Baryshkov
4d793a02c4
drm/msm/dp: fix panel bridge attachment
...
In commit 8a3b4c17f8 ("drm/msm/dp: employ bridge mechanism for display
enable and disable") the DP driver received a drm_bridge instance, which
is always attached to the encoder as a root bridge. However it conflicts
with the panel_bridge support for eDP panels. The panel bridge attaches
to the encoder before the "dp" bridge (DP driver's drm_bridge instance
created in msm_dp_bridge_init()) has a chance to do so. Change
panel bridge attachment to come after the "dp" bridge attachment (and to
use it as a previous bridge).
Fixes: 8a3b4c17f8 ("drm/msm/dp: employ bridge mechanism for display enable and disable")
Cc: Kuogee Hsieh <quic_khsieh@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Tested-by: Kuogee Hsieh <quic_khsieh@quicinc.com >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Link: https://lore.kernel.org/r/20220211224006.1797846-2-dmitry.baryshkov@linaro.org
[db: fixed commit message according to Stephen's suggestions]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-19 05:28:29 +03:00
Matt Roper
2f8a6699c9
drm/i915/dg2: Enable 5th port
...
DG2 supports a 5th display output which the hardware refers to as "TC1,"
even though it isn't a Type-C output. This behaves similarly to the TC1
on past platforms with just a couple minor differences:
* DG2's TC1 bit in SDEISR is at bit 25 rather than 24 as it is on
ICP/TGP/ADP.
* DG2 doesn't need the hpd inversion setting that we had to use on DG1
v2:
intel_ddi_init(dev_priv, PORT_TC1); [Matt]
Cc: Swathi Dhanavanthri <swathi.dhanavanthri@intel.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Cc: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: Ramalingam C <ramalingam.c@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220218010328.183423-3-lucas.demarchi@intel.com
2022-02-18 16:03:31 -08:00
Matt Roper
9b693453a4
drm/i915/dg2: Drop 38.4 MHz MPLLB tables
...
Our early understanding of DG2 was incorrect; since the 5th display
isn't actually a Type-C output, 38.4 MHz input clocks are never used on
this platform and we can drop the corresponding MPLLB tables.
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com >
Cc: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: Ramalingam C <ramalingam.c@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Reviewed-by: Uma Shankar <uma.shankar@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220218010328.183423-2-lucas.demarchi@intel.com
2022-02-18 16:03:31 -08:00
Jouni Högander
d1af7b6f91
drm/i915: Fix for PHY_MISC_TC1 offset
...
Currently ICL_PHY_MISC macro is returning offset 0x64C10 for PHY_E.
The PORT_TC1 port is not yet enabled properly in the driver, but
intel_phy_snps.c is relying on intel_phy_is_snps() to filter out
unavailable phys. That function was already considering the last phy as
available. Just correct the offset of the last phy to 0x64C14 as the
rest of the support for it is coming on next commits.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: Jouni Högander <jouni.hogander@intel.com >
Signed-off-by: Ramalingam C <ramalingam.c@intel.com >
Reviewed-by: Uma Shankar <uma.shankar@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220218010328.183423-1-lucas.demarchi@intel.com
2022-02-18 16:03:30 -08:00
Ville Syrjälä
1d82ef6552
drm/i915: Pimp icl+ sagv pre/post update
...
Add some debugs on what exactly we're doing to the QGV point mask
in the icl+ sagv pre/post plane update hooks. Currently we're just
guessing.
v2: s/u32/u16/ for consistency with the mask sizes (Stan)
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220218064039.12834-5-ville.syrjala@linux.intel.com
2022-02-18 21:36:26 +02:00
Ville Syrjälä
f257879182
drm/i915: Split pre-icl vs. icl+ SAGV hooks apart
...
To further reduce the confusion between the pre-icl vs. icl+
SAGV codepaths let's do a full split.
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220218064039.12834-4-ville.syrjala@linux.intel.com
2022-02-18 21:36:17 +02:00
Ville Syrjälä
6b728595ff
drm/i915: Fix bw atomic check when switching between SAGV vs. no SAGV
...
If the only thing that is changing is SAGV vs. no SAGV but
the number of active planes and the total data rates end up
unchanged we currently bail out of intel_bw_atomic_check()
early and forget to actually compute the new WGV point
mask and thus won't actually enable/disable SAGV as requested.
This ends up poorly if we end up running with SAGV enabled
when we shouldn't. Usually ends up in underruns.
To fix this let's go through the QGV point mask computation
if either the data rates/number of planes, or the state
of SAGV is changing.
v2: Check more carefully if things are changing to avoid
the extra calculations/debugs from introducing unwanted
overhead
Cc: stable@vger.kernel.org
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com > #v1
Fixes: 20f505f225 ("drm/i915: Restrict qgv points which don't have enough bandwidth.")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220218064039.12834-3-ville.syrjala@linux.intel.com
2022-02-18 21:36:03 +02:00
Ville Syrjälä
8dd8ffb824
drm/i915: Correctly populate use_sagv_wm for all pipes
...
When changing between SAGV vs. no SAGV on tgl+ we have to
update the use_sagv_wm flag for all the crtcs or else
an active pipe not already in the state will end up using
the wrong watermarks. That is especially bad when we end up
with the tighter non-SAGV watermarks with SAGV enabled.
Usually ends up in underruns.
Cc: stable@vger.kernel.org
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Fixes: 7241c57d31 ("drm/i915: Add TGL+ SAGV support")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220218064039.12834-2-ville.syrjala@linux.intel.com
2022-02-18 21:35:13 +02:00
Yifan Zhang
181ebed7dc
drm/amdgpu: add dm ip block for dcn 3.1.5
...
this patch adds dm ip block for dcn 3.1.5.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:01 -05:00
Qingqing Zhuo
b5b8ed444a
drm/amd/display: Add DCN315 DM Support
...
Add display manager support for DCN 3.1.5.
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:01 -05:00
Qingqing Zhuo
501867d0d2
drm/amd/display: Add DCN315 CORE
...
DC core changes for DCN 3.1.5.
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:01 -05:00
Qingqing Zhuo
0b208d60ad
drm/amd/display: Add DCN315 blocks to Makefile
...
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:01 -05:00
Qingqing Zhuo
f9806a1720
drm/amd/display: Add DCN315 Command Table Helper
...
Add vbios table support for DCN 3.1.5.
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:01 -05:00
Qingqing Zhuo
9cc57625a6
drm/amd/display: Add DCN315 Resource
...
Add display resource management for DCN 3.1.5.
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:01 -05:00
Qingqing Zhuo
5559c7ba93
drm/amd/display: Add DCN315 DMUB
...
Add support for the DMUB firmware for DCN 3.1.5.
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:01 -05:00
Qingqing Zhuo
92d0c2ebe5
drm/amd/display: Add DCN315 IRQ
...
Add irq interfaces for DCN 3.1.5.
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:00 -05:00
Qingqing Zhuo
b9d7eb6a31
drm/amd/display: Add DCN315 GPIO
...
Add GPIO interfaces for DCN 3.1.5.
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:00 -05:00
Qingqing Zhuo
f949039961
drm/amd/display: Add DCN315 CLK_MGR
...
Clk and SMU interfaces for DCN 3.1.5.
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:00 -05:00
Qingqing Zhuo
574dce2d24
drm/amd/display: Add DCN315 family information
...
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:00 -05:00
Qingqing Zhuo
5b723b1230
drm/amd/include: add DCN 3.1.5 registers
...
Add DCN 3.1.5 and DPCS 4.2.2 register headers.
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com >
Change-Id: I5588a1c422ae384cc76aa42380545dfc1aad1948
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:00 -05:00
Yifan Zhang
62640f251f
drm/amdgpu: add mp 13.0.5 header files
...
This patch is to add mp 13.0.5 header files.
v2: update headers
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:00 -05:00
Yifan Zhang
068ea8bdc0
drm/amd/pm: add smu_v13_0_5_ppt implementation
...
this patch adds smu_v13_0_5_ppt implementation.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:00 -05:00
Yifan Zhang
cec24112e1
drm/amd/pm: update smc message sequence for smu 13.0.5
...
this patch updates smc message sequence for smu 13.0.5.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:00 -05:00
Yifan Zhang
e8c487a6b7
drm/admgpu/pm: add smu 13.0.5 driver interface headers
...
This patch is to add smu 13.0.5 driver interface headers.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:00 -05:00
Yifan Zhang
d7fd297cb0
drm/amdgpu: add support for psp 13.0.5
...
Enabl psp support for psp 13.0.5.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:00 -05:00
Yifan Zhang
ec3ca07885
drm/amdgpu: add smuio support for smuio 13.0.10
...
this patch adds smuio support for smuio 13.0.10.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:00 -05:00
Yifan Zhang
935ad3a74c
drm/amdgpu: add support for nbio 7.3.0
...
this patch adds support for nbio 7.3.0.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:07:00 -05:00
Boyuan Zhang
87b5e77f02
drm/amdgpu: enable vcn pg and cg for vcn 3.1.2
...
Enable PG and CG for VCN/JPEG
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:06:59 -05:00
Boyuan Zhang
afc2f27605
drm/amdgpu/vcn: add vcn support for vcn 3.1.2
...
Load VCN FW, set caps.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:06:59 -05:00
Yifan Zhang
93afe15837
drm/amdgpu: add support for sdma 5.2.6
...
This patch adds support for sdma 5.2.6.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:06:59 -05:00
Chen Gong
89bfcd82b3
drm/amdgpu: do not enable asic reset for raven2
...
The GPU reset function of raven2 is not maintained or tested, so it should be
very unstable.
Now the amdgpu_asic_reset function is added to amdgpu_pmops_suspend, which
causes the S3 test of raven2 to fail, so the asic_reset of raven2 is ignored
here.
Fixes: daf8de0874 ("drm/amdgpu: always reset the asic in suspend (v2)")
Signed-off-by: Chen Gong <curry.gong@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-02-18 14:06:59 -05:00
AngeloGioacchino Del Regno
050770cbbd
drm/msm/dpu: Fix timeout issues on command mode panels
...
In function dpu_encoder_phys_cmd_wait_for_commit_done we are always
checking if the relative CTL is started by waiting for an interrupt
to fire: it is fine to do that, but then sometimes we call this
function while the CTL is up and has never been put down, but that
interrupt gets raised only when the CTL gets a state change from
0 to 1 (disabled to enabled), so we're going to wait for something
that will never happen on its own.
Solving this while avoiding to restart the CTL is actually possible
and can be done by just checking if it is already up and running
when the wait_for_commit_done function is called: in this case, so,
if the CTL was already running, we can say that the commit is done
if the command transmission is complete (in other terms, if the
interface has been flushed).
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org >
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20210911163919.47173-2-angelogioacchino.delregno@somainline.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:28:13 +03:00
AngeloGioacchino Del Regno
787067989c
drm/msm/dpu: Add a function to retrieve the current CTL status
...
Add a function that returns whether the requested CTL is active or not:
this will be used in a later commit to fix command mode panel issues.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org >
Link: https://lore.kernel.org/r/20210911163919.47173-1-angelogioacchino.delregno@somainline.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:28:08 +03:00
Dmitry Baryshkov
5752c921d2
drm/msm/dpu: simplify clocks handling
...
DPU driver contains code to parse clock items from device tree into
special data struct and then enable/disable/set rate for the clocks
using that data struct. However the DPU driver itself uses only parsing
and enabling/disabling part (the rate setting is used by DP driver).
Move this implementation to the DP driver (which actually uses rate
setting) and replace hand-coded enable/disable/get loops in the DPU
with the respective clk_bulk operations. Put operation is removed
completely because, it is handled using devres instead.
DP implementation is unchanged for now.
Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com > # RB3 (sdm845) and RB5 (qrb5165)
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220217055529.499829-2-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:12 +03:00
Dmitry Baryshkov
6b6921e553
drm/msm/dpu: pull connector from dpu_encoder_phys to dpu_encoder_virt
...
All physical encoders used by virtual encoder share the same connector,
so pull the connector field from dpu_encoder_phys into dpu_encoder_virt
structure. Otherwise code suggests that different phys_encs
can have different connectors.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220217035358.465904-8-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:12 +03:00
Dmitry Baryshkov
764332bf96
drm/msm/dpu: switch dpu_encoder to use atomic_mode_set
...
Make dpu_encoder use atomic_mode_set to receive connector and CRTC
states as arguments rather than finding connector and CRTC by manually
looping through the respective lists.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220217035358.465904-7-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:12 +03:00
Dmitry Baryshkov
3177589c6e
drm/msm/dpu: encoder: drop unused mode_fixup callback
...
Both cmd and vid backends provide useless mode_fixup() callback. Drop
it.
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220217035358.465904-6-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:12 +03:00
Dmitry Baryshkov
66175f1942
drm/msm/dpu: drop bus_scaling_client field
...
We do not use MSM bus client, so drop bus_scaling_client field from
dpu_encoder_virt.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220217035358.465904-5-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:12 +03:00
Dmitry Baryshkov
b78f30a5c8
drm/msm/dpu: remove msm_dp cached in dpu_encoder_virt
...
Stop caching msm_dp instance in dpu_encoder_virt since it's not used
now.
Fixes: 8a3b4c17f8 ("drm/msm/dp: employ bridge mechanism for display enable and disable")
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220217035358.465904-4-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:12 +03:00
Dmitry Baryshkov
b7420739f1
drm/msm: move struct msm_display_info to dpu driver
...
The msm_display_info structure is not used by the rest of msm driver, so
move it into the dpu1 (dpu_encoder.h to be precise).
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220217035358.465904-3-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:11 +03:00
Dmitry Baryshkov
1e0505a5a7
drm/msm/dpu: fix dp audio condition
...
DP audio enablement code which is comparing intf_type,
DRM_MODE_ENCODER_TMDS (= 2) with DRM_MODE_CONNECTOR_DisplayPort (= 10).
Which would never succeed. Fix it to check for DRM_MODE_ENCODER_TMDS.
Fixes: d13e36d7d2 ("drm/msm/dp: add audio support for Display Port on MSM")
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220217035358.465904-2-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:11 +03:00
Dmitry Baryshkov
77e113351f
drm/msm/dpu: drop unused access macros
...
The access macros BLK_foo are not used by the code, drop them.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Link: https://lore.kernel.org/r/20220215145306.3470924-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:11 +03:00
Bjorn Andersson
7c175aa1cc
drm/msm/dpu: Only create debugfs for PRIMARY minor
...
dpu_kms_debugfs_init() is invoked for each minor being registered. Most
of the files created are unrelated to the minor, so there's no reason to
present them per minor.
The exception to this is the DisplayPort code, which ends up invoking
dp_debug_get() for each minor, each time associate the allocated object
with dp->debug.
As such dp_debug will create debugfs files in both the PRIMARY and the
RENDER minor's debugfs directory, but only the last reference will be
remembered.
The only use of this reference today is in the cleanup path in
dp_display_deinit_sub_modules() and the dp_debug_private object does
outlive the debugfs entries in either case, so there doesn't seem to be
any adverse effects of this, but per the code the current behavior is
unexpected, so change it to only create debugfs files for the PRIMARY
minor.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
[DB: slightly change description and in-patch comment]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Link: https://lore.kernel.org/r/20220212003811.1818774-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:11 +03:00
Rob Clark
f3af2d6ee9
drm/msm/dpu: Add SC8180x to hw catalog
...
Add SC8180x to the hardware catalog, for initial support for the
platform. Due to limitations in the DP driver only one of the four DP
interfaces is left enabled.
The SC8180x platform supports the newly added DPU_INTF_WIDEBUS flag and
the Windows-on-Snapdragon bootloader leaves the widebus bit set, so this
is flagged appropriately to ensure widebus is disabled - for now.
Signed-off-by: Rob Clark <robdclark@chromium.org >
[bjorn: Reworked intf and irq definitions]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:11 +03:00
Bjorn Andersson
148e852f29
drm/msm/dpu: Add INTF_5 interrupts
...
SC8180x has the eDP controller wired up to INTF_5, so add the interrupt
register block for this interface to the list.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220215043353.1256754-1-bjorn.andersson@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:11 +03:00
Dmitry Baryshkov
740828c73a
drm/msm/dpu: fix error handling in dpu_rm_init
...
Using IS_ERR_OR_NULL() together with PTR_ERR() is a typical mistake. If
the value is NULL, then the function will return 0 instead of a proper
return code. Moreover none of dpu_hw_*_init() functions can return NULL.
So, replace all dpu_rm_init()'s IS_ERR_OR_NULL() calls with IS_ERR().
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Link: https://lore.kernel.org/r/20220121210618.3482550-6-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:11 +03:00
Dmitry Baryshkov
ae57fdf0f2
drm/msm/dpu: stop embedding dpu_hw_blk into dpu_hw_intf
...
Now as dpu_hw_intf is not hanled by dpu_rm_get_assigned_resources, there
is no point in embedding the (empty) struct dpu_hw_blk into dpu_hw_intf
(and using typecasts between dpu_hw_blk and dpu_hw_intf). Drop it and
use dpu_hw_intf directly.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Link: https://lore.kernel.org/r/20220121210618.3482550-5-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:11 +03:00
Dmitry Baryshkov
ef58e0ad34
drm/msm/dpu: get INTF blocks directly rather than through RM
...
INTF blocks are not really handled by resource manager, they are
assigned at dpu_encoder_setup_display using dpu_encoder_get_intf().
Then this allocation is passed to RM and then returned to then
dpu_encoder.
So allocate them outside of RM and use them directly.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Link: https://lore.kernel.org/r/20220121210618.3482550-4-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:11 +03:00
Dmitry Baryshkov
d5c5e78f21
drm/msm/dpu: add DSPP blocks teardown
...
Add missing calls to dpu_hw_dspp_destroy() to free resources allocated
for DSPP hardware blocks.
Fixes: e47616df00 ("drm/msm/dpu: add support for color processing blocks in dpu driver")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Link: https://lore.kernel.org/r/20220121210618.3482550-3-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:11 +03:00
Dmitry Baryshkov
ee216bd1aa
drm/msm/dpu: drop unused lm_max_width from RM
...
No code uses lm_max_width from resource manager, so drop it. Instead of
calculating the lm_max_width, code can use max_mixer_width field from
the hw catalog.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com >
Link: https://lore.kernel.org/r/20220121210618.3482550-2-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
2022-02-18 20:15:11 +03:00