]> git.hungrycats.org Git - linux/commitdiff
drm/msm/dp: return 0 from audio_prepare when cable is disconnected
authorKumar Anurag <kumar.singh@oss.qualcomm.com>
Tue, 16 Jun 2026 15:12:52 +0000 (08:12 -0700)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Fri, 31 Jul 2026 13:35:32 +0000 (16:35 +0300)
PipeWire treats a non-zero return from prepare as fatal, marking the
DP audio device as a dummy sink when the cable is unplugged. The
active_stream_cnt guard already prevents any unclocked hardware access,
so return success instead of -EINVAL when the link is not active.

Signed-off-by: Kumar Anurag <kumar.singh@oss.qualcomm.com>
Suggested-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> # same behaviour
Patchwork: https://patchwork.freedesktop.org/patch/733663/
Link: https://lore.kernel.org/r/20260616151252.3599089-2-kumar.singh@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
drivers/gpu/drm/msm/dp/dp_audio.c

index 41018e82efa10ec863eb4b60d8df66c23c432fa5..df222943ae57f97a10866593275a0226e215c199 100644 (file)
@@ -284,10 +284,8 @@ int msm_dp_audio_prepare(struct drm_bridge *bridge,
         * such cases check for connection status and bail out if not
         * connected.
         */
-       if (!msm_dp_display->power_on) {
-               rc = -EINVAL;
+       if (!msm_dp_display->power_on)
                goto end;
-       }
 
        audio = msm_dp_audio_get_data(msm_dp_display);
        if (IS_ERR(audio)) {