diff --git a/msm/dsi/dsi_display.c b/msm/dsi/dsi_display.c index 2f442bd4..b7fc3baa 100644 --- a/msm/dsi/dsi_display.c +++ b/msm/dsi/dsi_display.c @@ -7044,6 +7044,17 @@ int dsi_display_get_modes_helper(struct dsi_display *display, return rc; } + /* + * Update the host_config.dst_format for compressed RGB101010 pixel format. + */ + if (display->panel->host_config.dst_format == DSI_PIXEL_FORMAT_RGB101010 && + display_mode.timing.dsc_enabled) { + display->panel->host_config.dst_format = DSI_PIXEL_FORMAT_RGB888; + DSI_DEBUG("updated dst_format from %d to %d\n", + DSI_PIXEL_FORMAT_RGB101010, + display->panel->host_config.dst_format); + } + if (display->cmdline_timing == display_mode.mode_idx) { topology_override = display->cmdline_topology; is_preferred = true; diff --git a/msm/dsi/dsi_panel.c b/msm/dsi/dsi_panel.c index b996cbbd..652ceb38 100644 --- a/msm/dsi/dsi_panel.c +++ b/msm/dsi/dsi_panel.c @@ -964,6 +964,15 @@ static int dsi_panel_parse_pixel_format(struct dsi_host_common_cfg *host, fmt = DSI_PIXEL_FORMAT_RGB666; break; case 30: + /* + * The destination pixel format (host->dst_format) depends + * upon the compression, and should be RGB888 if the DSC is + * enable. + * The DSC status information is inside the timing modes, that + * is parsed during first dsi_display_get_modes() call. + * The dst_format will be updated there depending upon the + * DSC status. + */ fmt = DSI_PIXEL_FORMAT_RGB101010; break; case 24: