disp: msm: dp: set DSC capabilities in mode only if panel supports DSC

During mode validation, DSC book-keeping logic is executed irrespective
of the panel DSC status. If the DSC blocks are available then the
corresponding mode is also set as DSC capable. This step is uncalled for
in a non-DSC panel scenario and might lead to unexpected behavior. This
change checks for panel DSC status before updating DSC book-keeping and
capability for the mode.

Change-Id: I30d6a4d7f3e772b7b13fcca6e318e96372a8becb
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
This commit is contained in:
Sandeep Gangadharaiah
2022-07-26 19:47:36 -07:00
parent b7c83aa3f8
commit 24d4662c83
2 changed files with 21 additions and 20 deletions

View File

@@ -1952,7 +1952,7 @@ static u32 dp_panel_get_supported_bpp(struct dp_panel *dp_panel,
if (bpp < min_supported_bpp)
DP_ERR("bpp %d is below minimum supported bpp %d\n", bpp,
min_supported_bpp);
if (dp_panel->dsc_en && bpp != 24 && bpp != 30 && bpp != 36)
if (dsc_en && bpp != 24 && bpp != 30 && bpp != 36)
DP_ERR("bpp %d is not supported when dsc is enabled\n", bpp);
return bpp;
@@ -3013,7 +3013,7 @@ static void dp_panel_convert_to_dp_mode(struct dp_panel *dp_panel,
dp_mode->timing.bpp = dp_panel_get_mode_bpp(dp_panel,
dp_mode->timing.bpp, dp_mode->timing.pixel_clk_khz, dsc_en);
if (dp_panel->dsc_en && dsc_en) {
if (dsc_en) {
if (dp_panel_dsc_prepare_basic_params(comp_info,
dp_mode, dp_panel)) {
DP_DEBUG("prepare DSC basic params failed\n");