Commit a1619668 authored by Karthi Kandasamy's avatar Karthi Kandasamy Committed by Alex Deucher
Browse files

drm/amd/display: Make dcn401_initialize_min_clocks() available to other compilation units



[Why & How]
Expose dcn401_initialize_min_clocks() for future use and add additional
check for IP register.

Reviewed-by: default avatarNevenko Stupar <nevenko.stupar@amd.com>
Signed-off-by: default avatarKarthi Kandasamy <karthi.kandasamy@amd.com>
Signed-off-by: default avatarIvan Lipski <ivan.lipski@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 26ad78ff
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@ struct dsc_funcs {
	void (*dsc_disable)(struct display_stream_compressor *dsc);
	void (*dsc_disconnect)(struct display_stream_compressor *dsc);
	void (*dsc_wait_disconnect_pending_clear)(struct display_stream_compressor *dsc);
	void (*dsc_get_single_enc_caps)(struct dsc_enc_caps *dsc_enc_caps, unsigned int max_dscclk_khz);
};

#endif
+8 −6
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@
#define FN(reg_name, field_name) \
	hws->shifts->field_name, hws->masks->field_name

static void dcn401_initialize_min_clocks(struct dc *dc)
void dcn401_initialize_min_clocks(struct dc *dc)
{
	struct dc_clocks *clocks = &dc->current_state->bw_ctx.bw.dcn.clk;

@@ -2632,10 +2632,12 @@ void dcn401_plane_atomic_power_down(struct dc *dc,

	DC_LOGGER_INIT(dc->ctx->logger);

	if (REG(DC_IP_REQUEST_CNTL)) {
		REG_GET(DC_IP_REQUEST_CNTL, IP_REQUEST_EN, &org_ip_request_cntl);
		if (org_ip_request_cntl == 0)
			REG_SET(DC_IP_REQUEST_CNTL, 0,
				IP_REQUEST_EN, 1);
	}

	if (hws->funcs.dpp_pg_control)
		hws->funcs.dpp_pg_control(hws, dpp->inst, false);
@@ -2646,7 +2648,7 @@ void dcn401_plane_atomic_power_down(struct dc *dc,
	hubp->funcs->hubp_reset(hubp);
	dpp->funcs->dpp_reset(dpp);

	if (org_ip_request_cntl == 0)
	if (org_ip_request_cntl == 0 && REG(DC_IP_REQUEST_CNTL))
		REG_SET(DC_IP_REQUEST_CNTL, 0,
			IP_REQUEST_EN, 0);

+1 −0
Original line number Diff line number Diff line
@@ -109,4 +109,5 @@ void dcn401_detect_pipe_changes(
void dcn401_plane_atomic_power_down(struct dc *dc,
		struct dpp *dpp,
		struct hubp *hubp);
void dcn401_initialize_min_clocks(struct dc *dc);
#endif /* __DC_HWSS_DCN401_H__ */