drm/amd/display: fix typos in several function pointer checks
authorVitaliy Shevtsov <v.shevtsov@maxima.ru>
Fri, 20 Sep 2024 21:43:40 +0000 (02:43 +0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 26 Sep 2024 21:06:18 +0000 (17:06 -0400)
Fix several copypaste mistakes in *_disable_link_output() functions where
an improper function pointer is checked before dereference.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Signed-off-by: Vitaliy Shevtsov <v.shevtsov@maxima.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c

index 4fbed0298adfa7cedfbb7ecda87b36a5fe54ba85..9d00d8dc5ae8775ce5c3eac8f42db505bec1c347 100644 (file)
@@ -3315,7 +3315,7 @@ void dce110_disable_link_output(struct dc_link *link,
         * from enable/disable link output and only call edp panel control
         * in enable_link_dp and disable_link_dp once.
         */
-       if (dmcu != NULL && dmcu->funcs->lock_phy)
+       if (dmcu != NULL && dmcu->funcs->unlock_phy)
                dmcu->funcs->unlock_phy(dmcu);
        dc->link_srv->dp_trace_source_sequence(link, DPCD_SOURCE_SEQ_AFTER_DISABLE_LINK_PHY);
 }
index 4e93eeedfc1bbde51c63666236455301d22b2367..5b6cf2a8e38da6659aca7220c4f7fc3075f2e617 100644 (file)
@@ -478,7 +478,7 @@ void dcn314_disable_link_output(struct dc_link *link,
         * from enable/disable link output and only call edp panel control
         * in enable_link_dp and disable_link_dp once.
         */
-       if (dmcu != NULL && dmcu->funcs->lock_phy)
+       if (dmcu != NULL && dmcu->funcs->unlock_phy)
                dmcu->funcs->unlock_phy(dmcu);
        dc->link_srv->dp_trace_source_sequence(link, DPCD_SOURCE_SEQ_AFTER_DISABLE_LINK_PHY);
 
index 2e8c9f738259688fa5200c74e2cba7db1cd2da0c..a985d191f5007d242881aa57f9c0c2b2a059ef7d 100644 (file)
@@ -1398,10 +1398,10 @@ void dcn32_disable_link_output(struct dc_link *link,
        link->phy_state.symclk_state = SYMCLK_OFF_TX_OFF;
 
        if (signal == SIGNAL_TYPE_EDP &&
-                       link->dc->hwss.edp_backlight_control &&
+                       link->dc->hwss.edp_power_control &&
                        !link->skip_implict_edp_power_control)
                link->dc->hwss.edp_power_control(link, false);
-       else if (dmcu != NULL && dmcu->funcs->lock_phy)
+       else if (dmcu != NULL && dmcu->funcs->unlock_phy)
                dmcu->funcs->unlock_phy(dmcu);
 
        dc->link_srv->dp_trace_source_sequence(link, DPCD_SOURCE_SEQ_AFTER_DISABLE_LINK_PHY);