drm: msm: add dsi swap feature support
This feature only works on top of dsi split mode. When enabling it, DSI output will be swapped. CRs-Fixed: 2266483 Change-Id: I84a10814e2bec5e229b2a734153e82cb5fac7e10 Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
This commit is contained in:
parent
4926f1bce0
commit
f1e4bd81e0
2 changed files with 18 additions and 0 deletions
|
@ -1166,6 +1166,13 @@ static int dsi_display_parse_dt(struct dsi_display *display)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Only read swap property in split case */
|
||||||
|
if (display->ctrl_count > 1) {
|
||||||
|
display->dsi_split_swap =
|
||||||
|
of_property_read_bool(display->pdev->dev.of_node,
|
||||||
|
"qcom,dsi-split-swap");
|
||||||
|
}
|
||||||
|
|
||||||
if (of_get_property(display->pdev->dev.of_node, "qcom,dsi-panel",
|
if (of_get_property(display->pdev->dev.of_node, "qcom,dsi-panel",
|
||||||
&size)) {
|
&size)) {
|
||||||
display->panel_count = size / sizeof(int);
|
display->panel_count = size / sizeof(int);
|
||||||
|
@ -2281,6 +2288,14 @@ int dsi_display_get_info(struct msm_display_info *info, void *disp)
|
||||||
for (i = 0; i < info->num_of_h_tiles; i++)
|
for (i = 0; i < info->num_of_h_tiles; i++)
|
||||||
info->h_tile_instance[i] = display->ctrl[i].ctrl->index;
|
info->h_tile_instance[i] = display->ctrl[i].ctrl->index;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* h_tile_instance[2] = {0, 1} means DSI0 left(master), DSI1 right
|
||||||
|
* h_tile_instance[2] = {1, 0} means DSI1 left(master), DSI0 right
|
||||||
|
* So in case of split case and swap property is set, swap two DSIs.
|
||||||
|
*/
|
||||||
|
if (info->num_of_h_tiles > 1 && display->dsi_split_swap)
|
||||||
|
swap(info->h_tile_instance[0], info->h_tile_instance[1]);
|
||||||
|
|
||||||
info->is_connected = true;
|
info->is_connected = true;
|
||||||
info->width_mm = phy_props.panel_width_mm;
|
info->width_mm = phy_props.panel_width_mm;
|
||||||
info->height_mm = phy_props.panel_height_mm;
|
info->height_mm = phy_props.panel_height_mm;
|
||||||
|
|
|
@ -121,6 +121,8 @@ struct dsi_display_clk_info {
|
||||||
* @bridge: Pointer to DRM bridge object.
|
* @bridge: Pointer to DRM bridge object.
|
||||||
* @cmd_engine_refcount: Reference count enforcing single instance of cmd eng
|
* @cmd_engine_refcount: Reference count enforcing single instance of cmd eng
|
||||||
* @root: Debugfs root directory
|
* @root: Debugfs root directory
|
||||||
|
* @cont_splash_enabled: Early splash status.
|
||||||
|
* @dsi_split_swap: Swap dsi output in split mode.
|
||||||
*/
|
*/
|
||||||
struct dsi_display {
|
struct dsi_display {
|
||||||
struct platform_device *pdev;
|
struct platform_device *pdev;
|
||||||
|
@ -160,6 +162,7 @@ struct dsi_display {
|
||||||
struct dentry *root;
|
struct dentry *root;
|
||||||
|
|
||||||
bool cont_splash_enabled;
|
bool cont_splash_enabled;
|
||||||
|
bool dsi_split_swap;
|
||||||
};
|
};
|
||||||
|
|
||||||
int dsi_display_dev_probe(struct platform_device *pdev);
|
int dsi_display_dev_probe(struct platform_device *pdev);
|
||||||
|
|
Loading…
Add table
Reference in a new issue