disp: msm: dsi: follow the HPG guidelines for DATABUS_WIDEN
In case of DATABUS_WIDEN, follow the HPG to calculate bitclk, byteclk and pclk. Configure the DST_FORMAT and the clock dividers in DSI PHY and DISP_CC w.r.t. the bpp before compression. Change-Id: I526eab5bc88b8d667b8b1a0d257b2f147998286a Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com> Signed-off-by: Kirill Shpin <quic_kshpin@quicinc.com>
This commit is contained in:
@@ -7083,12 +7083,23 @@ int dsi_display_get_modes_helper(struct dsi_display *display,
|
||||
|
||||
memset(&display_mode, 0, sizeof(display_mode));
|
||||
|
||||
display_mode.priv_info = kzalloc(sizeof(*display_mode.priv_info), GFP_KERNEL);
|
||||
if (!display_mode.priv_info) {
|
||||
rc = -ENOMEM;
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* Setup widebus support */
|
||||
display_mode.priv_info->widebus_support = ctrl->ctrl->hw.widebus_support;
|
||||
|
||||
rc = dsi_panel_get_mode(display->panel, mode_idx,
|
||||
&display_mode,
|
||||
topology_override);
|
||||
if (rc) {
|
||||
DSI_ERR("[%s] failed to get mode idx %d from panel\n",
|
||||
display->name, mode_idx);
|
||||
kfree(display_mode.priv_info);
|
||||
display_mode.priv_info = NULL;
|
||||
rc = -EINVAL;
|
||||
return rc;
|
||||
}
|
||||
@@ -7106,9 +7117,18 @@ int dsi_display_get_modes_helper(struct dsi_display *display,
|
||||
else
|
||||
nondsc_modes++;
|
||||
|
||||
/* Setup widebus support */
|
||||
display_mode.priv_info->widebus_support =
|
||||
ctrl->ctrl->hw.widebus_support;
|
||||
/*
|
||||
* Update the host_config.dst_format for compressed RGB101010 pixel format
|
||||
* when there is no widebus support.
|
||||
*/
|
||||
if (host->dst_format == DSI_PIXEL_FORMAT_RGB101010 &&
|
||||
display_mode.timing.dsc_enabled &&
|
||||
!display_mode.priv_info->widebus_support) {
|
||||
host->dst_format = DSI_PIXEL_FORMAT_RGB888;
|
||||
DSI_DEBUG("updated dst_format from %d to %d\n",
|
||||
DSI_PIXEL_FORMAT_RGB101010, host->dst_format);
|
||||
}
|
||||
|
||||
num_dfps_rates = ((!dfps_caps.dfps_support ||
|
||||
!support_video_mode) ? 1 : dfps_caps.dfps_list_len);
|
||||
|
||||
|
Reference in New Issue
Block a user