Commit 52ed23dc authored by Wayne Lin's avatar Wayne Lin Committed by Alex Deucher
Browse files

drm/amd/display: fix problems in power_helper



[Why & How]
Fix following problems:
- In abm config, forget to initialize config.ambient_thresholds_lux.
- Adjust the coding style problem
- Restrict to call psr_su_set_dsc_slice_height() under edp only

Reviewed-by: default avatarRobin Chen <robin.chen@amd.com>
Signed-off-by: default avatarWayne Lin <Wayne.Lin@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a19d9349
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -944,11 +944,11 @@ bool psr_su_set_dsc_slice_height(struct dc *dc, struct dc_link *link,
	uint16_t slice_height;

	config->dsc_slice_height = 0;
	if ((link->connector_signal & SIGNAL_TYPE_EDP) &&
	    (!dc->caps.edp_dsc_support ||
	if (!(link->connector_signal & SIGNAL_TYPE_EDP) ||
	    !dc->caps.edp_dsc_support ||
	    link->panel_config.dsc.disable_dsc_edp ||
	    !link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_SUPPORT ||
	    !stream->timing.dsc_cfg.num_slices_v))
	    !stream->timing.dsc_cfg.num_slices_v)
		return true;

	pic_height = stream->timing.v_addressable +