Skip to content

Linux 7.0.2 fix 6490#553

Open
CodeChenL wants to merge 7 commits into
radxa:linux-7.0.2from
CodeChenL:linux-7.0.2-fix_6490
Open

Linux 7.0.2 fix 6490#553
CodeChenL wants to merge 7 commits into
radxa:linux-7.0.2from
CodeChenL:linux-7.0.2-fix_6490

Conversation

@CodeChenL
Copy link
Copy Markdown
Member

@CodeChenL CodeChenL commented May 12, 2026

1:修复DP audio/apm/lpass等的启动时序
2-3:cherry-pick from linux-6.18.2
4-5:逻辑来自 linux-6.18.2 进行破坏性更小的重构

amazingfate and others added 7 commits May 12, 2026 08:53
…dio_ops

After reusing drm_hdmi_audio_* helpers and drm_bridge_connector
integration in drm/msm/dp, we have dropped msm_dp_audio_hw_params and
use msm_dp_audio_prepare instead. While userspace is still calling
hw_params to do audio initialization, and we get the following errors:

q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback

msm_dp_audio_prepare is not called because hdmi-codec driver only checks
and runs hw_params before q6apm_lpass_dai_prepare(). This commit will
add hw_params callback same as drm_connector_hdmi_audio_prepare, so that
hdmi-codec driver can work with userspace alsa.

Tested with Radxa Dragon Q6A.

Fixes: 98a8920 ("drm/msm/dp: reuse generic HDMI codec implementation")
Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Start the graph at trigger callback. Staring the graph at prepare does
not make sense as there is no data transfer at this point.
Moving this to trigger will also help cope situation where pipewire
is not happy if display port is not connected during start.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260402081118.348071-12-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jiali Chen <chenjiali@radxa.com>
FIXME: Only sc7280, sc8280xp and x1e80100 catalogs are modified.

Add max_dsc_encoder_width to dpu_caps struct and max_linewidth to
dpu_pingpong_cfg for all chipsets within the HW catalog.

Note: The max supported PINGPONG width was 4096 but increased to 5120
after DPU 6.x. In addition, DPU 8.x+ increases the max supported width
of PINGPONG_0 specifically to 8960.

Signed-off-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
Signed-off-by: Jiali Chen <chenjiali@radxa.com>
Validate requested mode and topology based on the PINGPONG or DSC encoder
max width. In addition, drop MAX_HDISPLAY_SPLIT and base LM reservation
off of PINGPONG or DSC encoder max width

As noted in the patch, while DPU 8.x+ supports a max linewidth of 8960
for PINGPONG_0, there is some additional logic that needs to be added to
the resource manager to specifically try and reserve PINGPONG_0 for
modes that are greater than 5k.

Since this is out of the scope of this series, add a helper that will
get the overall minimum PINGPONG max linewidth for a given chipset.

Signed-off-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
Signed-off-by: Jiali Chen <chenjiali@radxa.com>
Since the max mixer width is not a strict hardware limit, use the actual
hardware limit (the writeback maxlinewidth) to filter modes.

Signed-off-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
Signed-off-by: Jiali Chen <chenjiali@radxa.com>
Document the opt-in property used when
a remote processor reset lineis owned by another entity,
so KVM overlays can describe attach-only PAS instances.

Signed-off-by: Jiali Chen <chenjiali@radxa.com>
Honor qcom,broken-reset as an opt-in attach-only mode for
PAS instances whose reset line is owned by another entity.
This keeps the generic PAS and SoCCP ping/pong paths unchanged while
preventing another owned DSPs from being booted or shut down through SCM.

Signed-off-by: Jiali Chen <chenjiali@radxa.com>
@CodeChenL
Copy link
Copy Markdown
Member Author

@BigfootACA @strongtz 有空也可以review一下,谢谢

Copy link
Copy Markdown
Member

@RadxaYuntian RadxaYuntian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

topology.num_lm = 2;
else if (dpu_kms->catalog->caps->has_3d_merge)
topology.num_lm = (mode->hdisplay > MAX_HDISPLAY_SPLIT) ? 2 : 1;
topology.num_lm = (mode->hdisplay > max_hdisplay_split) ? 2 : 1;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这儿会让 sc8280xp 对于 4k@120 的mode使用单个 lm 而不是之前的两个,导致输出蓝屏,具体原因暂不确定

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我也发现这个改动在我的采集卡上好像不能设置大于1080P,显示器可以

Copy link
Copy Markdown
Member Author

@CodeChenL CodeChenL May 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

但是之前不加这三个补丁会导致某些分辨率显示不全,我在复测看看,经过那么多更改了,说不定被其他内容修好了

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

取消这三个补丁会报错

[   37.371959] [drm:_dpu_rm_check_lm_and_get_connected_blks] [dpu error]LM_2, invalid DSPP_-1
[   37.380610] [drm:_dpu_rm_check_lm_and_get_connected_blks] [dpu error]LM_3, invalid DSPP_-1
[   37.389462] [drm:_dpu_rm_make_reservation] [dpu error]unable to find appropriate mixers
[   37.397990] [drm:dpu_rm_reserve] [dpu error]failed to reserve hw resources: -119

而且只显示左上角

还在调试怎么解决比较好,而且不影响q8b

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

之前revert掉drm/msm的13个改动倒是没啥问题

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

除了还会报错

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对了蓝屏现象你有尝试过clk_ignore_unused吗
不加这个参数在6490上+drm/msm的13个改动也会蓝屏

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我现在所有测试都是默认加 clk_ignore_unused 的

int crash_reason_smem;
unsigned int smem_host_id;
bool decrypt_shutdown;
bool broken_reset;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这种改法可能不太能upstream,最好是不引入qcom,broken-reset,直接能够判断dsp是否已经启动了,至于dsp如果真的crash了那让它restart remoteproc的时候直接fail就行

不过如果功能正常的话先保持这样合进去也行,我后面再想想办法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants