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

Commit 9aa061c7 authored by Alan Kwong's avatar Alan Kwong
Browse files

drm/msm/sde: add dynamic clock and bandwidth commit support



Current crtc supports static clock and bandwidth defined in
device tree.  Add support for dynamic clock and bandwidth
control using new atomic crtc properties. User mode
can adjust core clock rate, instantaneous and arbitrated
bandwidth per crtc commit.

CRs-Fixed: 2005348
Change-Id: I753a141bbc023d89f1532943f48252875883d684
Signed-off-by: default avatarAlan Kwong <akwong@codeaurora.org>
parent 67a3f79e
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -107,6 +107,20 @@ Required properties:
Optional properties:
- qcom,dsi-phy-regulator-ldo-mode: Boolean value indicating if the LDO mode PHY
  regulator is wanted.
- qcom,mdss-mdp-transfer-time-us:	Specifies the dsi transfer time for command mode
					panels in microseconds. Driver uses this number to adjust
					the clock rate according to the expected transfer time.
					Increasing this value would slow down the mdp processing
					and can result in slower performance.
					Decreasing this value can speed up the mdp processing,
					but this can also impact power consumption.
					As a rule this time should not be higher than the time
					that would be expected with the processing at the
					dsi link rate since anyways this would be the maximum
					transfer time that could be achieved.
					If ping pong split is enabled, this time should not be higher
					than two times the dsi link rate time.
					If the property is not specified, then the default value is 14000 us.

[1] Documentation/devicetree/bindings/clocks/clock-bindings.txt
[2] Documentation/devicetree/bindings/graph.txt
@@ -157,6 +171,8 @@ Example:
		qcom,master-dsi;
		qcom,sync-dual-dsi;

		qcom,mdss-mdp-transfer-time-us = <12000>;

		pinctrl-names = "default", "sleep";
		pinctrl-0 = <&dsi_active>;
		pinctrl-1 = <&dsi_suspend>;
+15 −0
Original line number Diff line number Diff line
@@ -253,6 +253,18 @@ Optional properties:
				for particular chipset.
				These paths must be defined after rt-paths in
				"qcom,msm-bus,vectors-KBps" vector request.
- qcom,sde-max-bw-low-kbps:	This value indicates the max bandwidth in Kbps
				that can be supported without underflow.
				This is a low bandwidth threshold which should
				be applied in most scenarios to be safe from
				underflows when unable to satisfy bandwidth
				requirements.
- qcom,sde-max-bw-high-kbps:	This value indicates the max bandwidth in Kbps
				that can be supported without underflow.
				This is a high bandwidth threshold which can be
				applied in scenarios where panel interface can
				be more tolerant to memory latency such as
				command mode panels.

Bus Scaling Subnodes:
- qcom,sde-reg-bus:		Property to provide Bus scaling for register access for
@@ -431,6 +443,9 @@ Example:
    qcom,sde-dram-channels = <2>;
    qcom,sde-num-nrt-paths = <1>;

    qcom,sde-max-bw-high-kbps = <9000000>;
    qcom,sde-max-bw-low-kbps = <9000000>;

    qcom,sde-sspp-vig-blocks {
        qcom,sde-vig-csc-off = <0x320>;
        qcom,sde-vig-qseed-off = <0x200>;
+14 −0
Original line number Diff line number Diff line
@@ -80,3 +80,17 @@ Optional properties:
					-- qcom,supply-post-on-sleep: time to sleep (ms) after turning on
					-- qcom,supply-pre-off-sleep: time to sleep (ms) before turning off
					-- qcom,supply-post-off-sleep: time to sleep (ms) after turning off
- qcom,mdss-mdp-transfer-time-us:	Specifies the dsi transfer time for command mode
					panels in microseconds. Driver uses this number to adjust
					the clock rate according to the expected transfer time.
					Increasing this value would slow down the mdp processing
					and can result in slower performance.
					Decreasing this value can speed up the mdp processing,
					but this can also impact power consumption.
					As a rule this time should not be higher than the time
					that would be expected with the processing at the
					dsi link rate since anyways this would be the maximum
					transfer time that could be achieved.
					If ping pong split enabled, this time should not be higher
					than two times the dsi link rate time.
					If the property is not specified, then the default value is 14000 us.
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -318,12 +318,15 @@ struct dsi_video_engine_cfg {
 * @wr_mem_continue:               DCS command for write_memory_continue.
 * @insert_dcs_command:            Insert DCS command as first byte of payload
 *                                 of the pixel data.
 * @mdp_transfer_time_us   Specifies the mdp transfer time for command mode
 *                         panels in microseconds
 */
struct dsi_cmd_engine_cfg {
	u32 max_cmd_packets_interleave;
	u32 wr_mem_start;
	u32 wr_mem_continue;
	bool insert_dcs_command;
	u32 mdp_transfer_time_us;
};

/**
+2 −0
Original line number Diff line number Diff line
@@ -313,6 +313,8 @@ int dsi_conn_post_init(struct drm_connector *connector,
		break;
	case DSI_OP_CMD_MODE:
		sde_kms_info_add_keystr(info, "panel mode", "command");
		sde_kms_info_add_keyint(info, "mdp_transfer_time_us",
				panel->cmd_config.mdp_transfer_time_us);
		break;
	default:
		pr_debug("invalid panel type:%d\n", panel->mode.panel_mode);
Loading