drm/msm/hdmi: move msm_hdmi_audio_update() out of msm_hdmi_set_timings()
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Tue, 8 Apr 2025 13:54:26 +0000 (16:54 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Fri, 2 May 2025 00:54:03 +0000 (03:54 +0300)
There is a duplication between msm_hdmi_audio_update() calls in
msm_hdmi_set_timings() and msm_hdmi_bridge_atomic_pre_enable(). Merge
those two calls to be performed unconditionally at
msm_hdmi_bridge_atomic_pre_enable().

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/647505/
Link: https://lore.kernel.org/r/20250408-drm-hdmi-acr-v2-2-dee7298ab1af@oss.qualcomm.com
drivers/gpu/drm/msm/hdmi/hdmi_bridge.c

index 7f71956806a25a1ab23293284da83ed4a8759c98..9f1191e4c02081c99caa75e1c9c99051f7cd14d1 100644 (file)
@@ -324,10 +324,11 @@ static void msm_hdmi_bridge_atomic_pre_enable(struct drm_bridge *bridge,
                msm_hdmi_phy_resource_enable(phy);
                msm_hdmi_power_on(bridge);
                hdmi->power_on = true;
-               if (connector->display_info.is_hdmi)
-                       msm_hdmi_audio_update(hdmi);
        }
 
+       if (connector->display_info.is_hdmi)
+               msm_hdmi_audio_update(hdmi);
+
        drm_atomic_helper_connector_hdmi_update_infoframes(connector, state);
 
        msm_hdmi_phy_powerup(phy, hdmi->pixclock);
@@ -411,9 +412,6 @@ static void msm_hdmi_set_timings(struct hdmi *hdmi,
                frame_ctrl |= HDMI_FRAME_CTRL_INTERLACED_EN;
        DBG("frame_ctrl=%08x", frame_ctrl);
        hdmi_write(hdmi, REG_HDMI_FRAME_CTRL, frame_ctrl);
-
-       if (hdmi->connector->display_info.is_hdmi)
-               msm_hdmi_audio_update(hdmi);
 }
 
 static const struct drm_edid *msm_hdmi_bridge_edid_read(struct drm_bridge *bridge,