drm/amd/display: explicitly set is_dsc_supported to false before use
Subsystems (3)
PATCH 1/1 drm/amd/display: explicitly set is_dsc_supported to false before use
When UBSAN is enabled a case is shown on unplugging the display that this variable hasn't been initialized by update_dsc_caps, presumably when the display was unplugged it wasn't copied from the DPCD.
Signed-off-by Mario Limonciello <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
@@ -6093,6 +6093,7 @@ static void update_dsc_caps(struct amdgpu_dm_connector *aconnector, struct dsc_dec_dpcd_caps *dsc_caps) { stream->timing.flags.DSC =0 ; + dsc_caps->is_dsc_supported = false;if (aconnector->dc_link && (sink->sink_signal ==SIGNAL_TYPE_DISPLAY_PORT || sink->sink_signal ==SIGNAL_TYPE_EDP )) {
Signature · 1 line
2.25.1
Acked-by Alex Deucher <[email protected]>
Quoted 26 lines · Mario Limonciello
When UBSAN is enabled a case is shown on unplugging the display that this variable hasn't been initialized by
update_dsc_caps, presumably when the display was unplugged it wasn't copied from the DPCD.Signed-off-by Mario Limonciello <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-1@@ -6093,6 +6093,7 @@ static void update_dsc_caps(struct amdgpu_dm_connector *aconnector, struct dsc_dec_dpcd_caps *dsc_caps) { stream->timing.flags.DSC =0 ; + dsc_caps->is_dsc_supported = false;if (aconnector->dc_link && (sink->sink_signal ==SIGNAL_TYPE_DISPLAY_PORT || sink->sink_signal ==SIGNAL_TYPE_EDP )) { --2.25.1