Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b595d4f authored by Yuan Zhao's avatar Yuan Zhao Committed by Gerrit - the friendly Code Review server
Browse files

disp: msm: dsi: defer clk setting when doing const_fps RFI



When doing const fps RFI, dynamic refresh clock was done
in the next frame kick off, so as the orginal RFI work flow,
the clock setting also should be done here.

Change-Id: Ic3e6a35dc7264df028f5d848ac6f1eea04a95126
Signed-off-by: default avatarYuan Zhao <yzhao@codeaurora.org>
parent e050ac91
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
 */

#include <linux/list.h>
@@ -4625,7 +4625,6 @@ static int _dsi_display_dyn_update_clks(struct dsi_display *display,
		dsi_phy_dynamic_refresh_clear(ctrl->phy);
	}

defer_dfps_wait:
	rc = dsi_clk_update_parent(enable_clk,
			&display->clock_info.mux_clks);
	if (rc)
@@ -4657,9 +4656,22 @@ static int _dsi_display_dyn_update_clks(struct dsi_display *display,
exit:
	dsi_clk_disable_unprepare(&display->clock_info.src_clks);

defer_dfps_wait:
	return rc;
}

void dsi_display_dfps_update_parent(struct dsi_display *display)
{
	int rc = 0;

	rc = dsi_clk_update_parent(&display->clock_info.src_clks,
			      &display->clock_info.mux_clks);
	if (rc)
		DSI_ERR("could not switch back to src clks %d\n", rc);

	dsi_clk_disable_unprepare(&display->clock_info.src_clks);
}

static int dsi_display_dynamic_clk_switch_vid(struct dsi_display *display,
					  struct dsi_display_mode *mode)
{
+7 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
 */

#ifndef _DSI_DISPLAY_H_
@@ -785,4 +785,10 @@ int dsi_display_get_panel_vfp(void *display,
 */
int dsi_display_dump_clks_state(struct dsi_display *display);

/**
 * dsi_display_dfps_update_parent() - update dsi clock parent to src clock
 * @display:         Handle to display
 */
void dsi_display_dfps_update_parent(struct dsi_display *display);

#endif /* _DSI_DISPLAY_H_ */
+3 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
 */


@@ -1065,6 +1065,8 @@ int dsi_conn_post_kickoff(struct drm_connector *connector,
						ctrl->ctrl);
				if (rc)
					DSI_ERR("wait4dfps refresh failed\n");
				dsi_display_dfps_update_parent(display);
				dsi_phy_dynamic_refresh_clear(ctrl->phy);
			}
		}