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

Commit 561a7a9c authored by Huaibin Yang's avatar Huaibin Yang
Browse files

msm: mdss: support mdp prefill bandwith for multiple platforms



To calculate mdp prefill bandwidth, mdp driver needs to get h/w
dependent buffer constants from device tree. Also add h/w feature
dependent logic.

Change-Id: I8d56ec502a6fd56eaae5b65a326ef966be46f14b
Signed-off-by: default avatarHuaibin Yang <huaibiny@codeaurora.org>
parent 8aed5b3d
Loading
Loading
Loading
Loading
+49 −0
Original line number Diff line number Diff line
@@ -173,6 +173,46 @@ Bus Scaling Data:
				bare no logic except for the use-case 0 where ab
				and ib values needs to be 0.

- qcom,mdss-prefill-outstanding-buffer-bytes: The size of mdp outstanding buffer
				in bytes. The buffer is filled during prefill
				time and the buffer size shall be included in
				prefill bandwidth calculation.
- qcom,mdss-prefill-y-buffer-bytes: The size of mdp y plane buffer in bytes. The
				buffer is filled during prefill time when format
				is YUV and the buffer size shall be included in
				prefill bandwidth calculation.
- qcom,mdss-prefill-scaler-buffer-lines-bilinear: The value indicates how many lines
				of scaler line buffer need to be filled during
				prefill time. If bilinear scalar is enabled, then this
				number of lines is used to determine how many bytes
				of scaler buffer to be included in prefill bandwidth
				calculation.
- qcom,mdss-prefill-scaler-buffer-lines-caf: The value indicates how many lines of
				of scaler line buffer need to be filled during
				prefill time. If CAF mode filter is enabled, then
				this number of lines is used to determine how many
				bytes of scaler buffer to be included in prefill
				bandwidth calculation.
- qcom,mdss-prefill-post-scaler-buffer: The size of post scaler buffer in bytes.
				The buffer is used to smooth the output of the
				scaler. If the buffer is present in h/w, it is
				filled during prefill time and the number of bytes
				shall be included in prefill bandwidth calculation.
- qcom,mdss-prefill-pingpong-buffer-pixels: The size of pingpong buffer in pixels.
				The buffer is used to keep pixels flowing to the
				panel interface. If the vertical start position of a
				layer is in the beginning of the active area, pingpong
				buffer must be filled during prefill time to generate
				starting lines. The number of bytes to be filled is
				determined by the line width, starting position,
				byte per pixel and scaling ratio, this number shall be
				included in prefill bandwidth calculation.
- qcom,mdss-prefill-fbc-lines:  The value indicates how many lines are required to fill
				fbc buffer during prefill time if FBC (Frame Buffer
				Compressor) is enabled. The number of bytes to be filled
				is determined by the line width, bytes per pixel and
				scaling ratio, this number shall be included in prefill bandwidth
				calculation.
Optional properties:
- batfet-supply :	Phandle for battery FET regulator device node.
- vdd-cx-supply :	Phandle for vdd CX regulator device node.
@@ -360,6 +400,15 @@ Example:
		qcom,mdss-mixer-intf-len = <0x00000400>;
		qcom,mdss-dspp-len = <0x00000400>;

		/* buffer parameters to calculate prefill bandwidth */
		qcom,mdss-prefill-outstanding-buffer-bytes = <1024>;
		qcom,mdss-prefill-y-buffer-bytes = <4096>;
		qcom,mdss-prefill-scaler-buffer-lines-bilinear = <2>;
		qcom,mdss-prefill-scaler-buffer-lines-caf = <4>;
		qcom,mdss-prefill-post-scaler-buffer-pixels = <2048>;
		qcom,mdss-prefill-pingpong-buffer-pixels = <5120>;
		qcom,mdss-prefill-fbc-lines = <2>;

		mdss_fb0: qcom,mdss_fb_primary {
			cell-index = <0>;
			compatible = "qcom,mdss-fb";
+9 −0
Original line number Diff line number Diff line
@@ -106,6 +106,15 @@
				    <0x04B8 0xCCCCC0C0>,
				    <0x04D0 0x00CCC000>;

		/* buffer parameters to calculate prefill bandwidth */
		qcom,mdss-prefill-outstanding-buffer-bytes = <1024>;
		qcom,mdss-prefill-y-buffer-bytes = <4096>;
		qcom,mdss-prefill-scaler-buffer-lines-bilinear = <2>;
		qcom,mdss-prefill-scaler-buffer-lines-caf = <4>;
		qcom,mdss-prefill-post-scaler-buffer-pixels = <2048>;
		qcom,mdss-prefill-pingpong-buffer-pixels = <5120>;
		qcom,mdss-prefill-fbc-lines = <2>;

		mdss_fb0: qcom,mdss_fb_primary {
			cell-index = <0>;
			compatible = "qcom,mdss-fb";
+9 −0
Original line number Diff line number Diff line
@@ -70,6 +70,15 @@
		qcom,mdp-settings = <0x02E0 0x000000A5>,
				    <0x02E4 0x00000055>;

		/* buffer parameters to calculate prefill bandwidth */
		qcom,mdss-prefill-outstanding-buffer-bytes = <1024>;
		qcom,mdss-prefill-y-buffer-bytes = <0>;
		qcom,mdss-prefill-scaler-buffer-lines-bilinear = <2>;
		qcom,mdss-prefill-scaler-buffer-lines-caf = <4>;
		qcom,mdss-prefill-post-scaler-buffer-pixels = <0>;
		qcom,mdss-prefill-pingpong-buffer-pixels = <4096>;
		qcom,mdss-prefill-fbc-lines = <0>;

		mdss_fb0: qcom,mdss_fb_primary {
			cell-index = <0>;
			compatible = "qcom,mdss-fb";
+9 −0
Original line number Diff line number Diff line
@@ -84,6 +84,15 @@
				    <0x04B0 0xCCCCC0C0>,
				    <0x04B8 0xCCCCC000>;

		/* buffer parameters to calculate prefill bandwidth */
		qcom,mdss-prefill-outstanding-buffer-bytes = <1024>;
		qcom,mdss-prefill-y-buffer-bytes = <4096>;
		qcom,mdss-prefill-scaler-buffer-lines-bilinear = <2>;
		qcom,mdss-prefill-scaler-buffer-lines-caf = <4>;
		qcom,mdss-prefill-post-scaler-buffer-pixels = <0>;
		qcom,mdss-prefill-pingpong-buffer-pixels = <4096>;
		qcom,mdss-prefill-fbc-lines = <2>;

		mdss_fb0: qcom,mdss_fb_primary {
			cell-index = <0>;
			compatible = "qcom,mdss-fb";
+11 −0
Original line number Diff line number Diff line
@@ -84,6 +84,16 @@ struct mdss_intr {
	spinlock_t lock;
};

struct mdss_prefill_data {
	u32 ot_bytes;
	u32 y_buf_bytes;
	u32 y_scaler_lines_bilinear;
	u32 y_scaler_lines_caf;
	u32 post_scaler_pixels;
	u32 pp_pixels;
	u32 fbc_lines;
};

struct mdss_data_type {
	u32 mdp_rev;
	struct clk *mdp_clk[MDSS_MAX_CLK];
@@ -182,6 +192,7 @@ struct mdss_data_type {
	struct mdss_debug_inf debug_inf;
	bool mixer_switched;
	struct mdss_panel_cfg pan_cfg;
	struct mdss_prefill_data prefill_data;
};
extern struct mdss_data_type *mdss_res;

Loading