Skip to content
/ linux Public

Commit c10fe94

Browse files
charliu-AMDENGSasha Levin
authored andcommitted
drm/amd/display: Fix dsc eDP issue
[ Upstream commit 878a4b7 ] [why] Need to add function hook check before use Reviewed-by: Mohit Bawa <mohit.bawa@amd.com> Signed-off-by: Charlene Liu <Charlene.Liu@amd.com> Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 0b1005d commit c10fe94

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,6 +1790,9 @@ static void disable_vga_and_power_gate_all_controllers(
17901790
struct timing_generator *tg;
17911791
struct dc_context *ctx = dc->ctx;
17921792

1793+
if (dc->caps.ips_support)
1794+
return;
1795+
17931796
for (i = 0; i < dc->res_pool->timing_generator_count; i++) {
17941797
tg = dc->res_pool->timing_generators[i];
17951798

@@ -1866,13 +1869,16 @@ static void clean_up_dsc_blocks(struct dc *dc)
18661869
/* disable DSC in OPTC */
18671870
if (i < dc->res_pool->timing_generator_count) {
18681871
tg = dc->res_pool->timing_generators[i];
1869-
tg->funcs->set_dsc_config(tg, OPTC_DSC_DISABLED, 0, 0);
1872+
if (tg->funcs->set_dsc_config)
1873+
tg->funcs->set_dsc_config(tg, OPTC_DSC_DISABLED, 0, 0);
18701874
}
18711875
/* disable DSC in stream encoder */
18721876
if (i < dc->res_pool->stream_enc_count) {
18731877
se = dc->res_pool->stream_enc[i];
1874-
se->funcs->dp_set_dsc_config(se, OPTC_DSC_DISABLED, 0, 0);
1875-
se->funcs->dp_set_dsc_pps_info_packet(se, false, NULL, true);
1878+
if (se->funcs->dp_set_dsc_config)
1879+
se->funcs->dp_set_dsc_config(se, OPTC_DSC_DISABLED, 0, 0);
1880+
if (se->funcs->dp_set_dsc_pps_info_packet)
1881+
se->funcs->dp_set_dsc_pps_info_packet(se, false, NULL, true);
18761882
}
18771883
/* disable DSC block */
18781884
if (dccg->funcs->set_ref_dscclk)

0 commit comments

Comments
 (0)