Commit b060022c authored by Eric Bernstein's avatar Eric Bernstein Committed by Alex Deucher
Browse files

drm/amd/display: Add new DSC interface to disconnect from pipe



[Why & How]
Add new DSC interface to disconnect from pipe.

Reviewed-by: default avatarAlvin Lee <alvin.lee2@amd.com>
Acked-by: default avatarWayne Lin <wayne.lin@amd.com>
Signed-off-by: default avatarEric Bernstein <eric.bernstein@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0292e5b5
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ static void dsc2_set_config(struct display_stream_compressor *dsc, const struct
static bool dsc2_get_packed_pps(struct display_stream_compressor *dsc, const struct dsc_config *dsc_cfg, uint8_t *dsc_packed_pps);
static void dsc2_enable(struct display_stream_compressor *dsc, int opp_pipe);
static void dsc2_disable(struct display_stream_compressor *dsc);
static void dsc2_disconnect(struct display_stream_compressor *dsc);

const struct dsc_funcs dcn20_dsc_funcs = {
	.dsc_get_enc_caps = dsc2_get_enc_caps,
@@ -54,6 +55,7 @@ const struct dsc_funcs dcn20_dsc_funcs = {
	.dsc_get_packed_pps = dsc2_get_packed_pps,
	.dsc_enable = dsc2_enable,
	.dsc_disable = dsc2_disable,
	.dsc_disconnect = dsc2_disconnect,
};

/* Macro definitios for REG_SET macros*/
@@ -276,6 +278,15 @@ static void dsc2_disable(struct display_stream_compressor *dsc)
		DSC_CLOCK_EN, 0);
}

static void dsc2_disconnect(struct display_stream_compressor *dsc)
{
	struct dcn20_dsc *dsc20 = TO_DCN20_DSC(dsc);

	DC_LOG_DSC("disconnect DSC %d", dsc->inst);

	REG_UPDATE(DSCRM_DSC_FORWARD_CONFIG,
		DSCRM_DSC_FORWARD_EN, 0);
}

/* This module's internal functions */
static void dsc_log_pps(struct display_stream_compressor *dsc, struct drm_dsc_config *pps)
+1 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ struct dsc_funcs {
			uint8_t *dsc_packed_pps);
	void (*dsc_enable)(struct display_stream_compressor *dsc, int opp_pipe);
	void (*dsc_disable)(struct display_stream_compressor *dsc);
	void (*dsc_disconnect)(struct display_stream_compressor *dsc);
};

#endif