disp: msm: support 8bit and 10bit bpp switch

Support 8bit and 10bit bpp switch for display.

Change-Id: Ia5fcb330df95618596377773d0598be2b5609de1
Signed-off-by: Yahui Wang <quic_yahuiw@quicinc.com>
This commit is contained in:
Yahui Wang
2023-03-29 11:17:20 +08:00
والد 8360bd82c9
کامیت e280657f7f
10فایلهای تغییر یافته به همراه169 افزوده شده و 29 حذف شده

مشاهده پرونده

@@ -7517,6 +7517,10 @@ bool dsi_display_mode_match(const struct dsi_display_mode *mode1,
mode1->priv_info->dsc_enabled != mode2->priv_info->dsc_enabled)
return false;
if ((match_flags & DSI_MODE_MATCH_NONDSC_BPP_CONFIG) &&
mode1->pixel_format_caps != mode2->pixel_format_caps)
return false;
return true;
}
@@ -7573,6 +7577,21 @@ int dsi_display_find_mode(struct dsi_display *display,
MSM_DISPLAY_DSC_MODE_ENABLED) ? true : false;
}
if (sub_mode) {
switch (sub_mode->pixel_format_mode) {
case MSM_DISPLAY_PIXEL_FORMAT_RGB888:
cmp->pixel_format_caps = DSI_PIXEL_FORMAT_RGB888;
match_flags |= DSI_MODE_MATCH_NONDSC_BPP_CONFIG;
break;
case MSM_DISPLAY_PIXEL_FORMAT_RGB101010:
cmp->pixel_format_caps = DSI_PIXEL_FORMAT_RGB101010;
match_flags |= DSI_MODE_MATCH_NONDSC_BPP_CONFIG;
break;
default:
break;
}
}
if (dsi_display_mode_match(cmp, m, match_flags)) {
*out_mode = m;
rc = 0;
@@ -7668,6 +7687,12 @@ int dsi_display_validate_mode_change(struct dsi_display *display,
SDE_EVT32(SDE_EVTLOG_FUNC_CASE3, cur_mode->timing.dsc_enabled,
adj_mode->timing.dsc_enabled);
DSI_DEBUG("DSC mode change detected\n");
} else if (cur_mode->pixel_format_caps != adj_mode->pixel_format_caps) {
adj_mode->dsi_mode_flags |= DSI_MODE_FLAG_NONDSC_BPP_SWITCH;
display->panel->host_config.dst_format = adj_mode->pixel_format_caps;
SDE_EVT32(SDE_EVTLOG_FUNC_CASE4, cur_mode->pixel_format_caps,
adj_mode->pixel_format_caps);
DSI_DEBUG("BPP mode change detected\n");
} else {
dyn_clk_caps = &(display->panel->dyn_clk_caps);
/* dfps and dynamic clock with const fps use case */
@@ -7677,7 +7702,7 @@ int dsi_display_validate_mode_change(struct dsi_display *display,
dyn_clk_caps->maintain_const_fps) {
DSI_DEBUG("Mode switch is seamless variable refresh\n");
adj_mode->dsi_mode_flags |= DSI_MODE_FLAG_VRR;
SDE_EVT32(SDE_EVTLOG_FUNC_CASE4,
SDE_EVT32(SDE_EVTLOG_FUNC_CASE5,
cur_mode->timing.refresh_rate,
adj_mode->timing.refresh_rate,
cur_mode->timing.h_front_porch,
@@ -7710,7 +7735,7 @@ int dsi_display_validate_mode_change(struct dsi_display *display,
adj_mode->dsi_mode_flags |=
DSI_MODE_FLAG_DYN_CLK;
SDE_EVT32(SDE_EVTLOG_FUNC_CASE5,
SDE_EVT32(SDE_EVTLOG_FUNC_CASE6,
cur_mode->pixel_clk_khz,
adj_mode->pixel_clk_khz);
}