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

Commit e5f7848d authored by Oleg Perelet's avatar Oleg Perelet
Browse files

msm: kgsl: Use explicit min/max values for bus votes



Add explicit min/max bus votes to dtsi file for VBIF based bus DCVS.

Change-Id: I6ea44bd42ed9f50e9b31a106d695f243d63326d4
Signed-off-by: default avatarOleg Perelet <operelet@codeaurora.org>
parent 512860c2
Loading
Loading
Loading
Loading
+40 −65
Original line number Diff line number Diff line
@@ -70,39 +70,17 @@
                 * (gpu-bus frequency combination)
                 */
		qcom,msm-bus,name = "grp3d";
		qcom,msm-bus,num-cases = <18>;
		qcom,msm-bus,num-cases = <8>;
		qcom,msm-bus,num-paths = <1>;
		qcom,msm-bus,vectors-KBps =
				<26 512 0 0>,

				/* gpu = 180 */
				<26 512 0 1600000>,  /*1 bus=200 */
				<26 512 0 2400000>,  /*2 bus=300 */
				<26 512 0 3680000>,  /*3 bus=460 */

				/* gpu = 300 */
				<26 512 0 2400000>,  /*4 bus=300 */
				<26 512 0 3680000>,  /*5 bus=460 */
				<26 512 0 4376000>,  /*6 bus=547 */

				/* gpu = 367 */
				<26 512 0 3680000>,  /*7 bus=460 */
				<26 512 0 4376000>,  /*8 bus=547 */
				<26 512 0 5528000>,  /*9 bus=691 */

				/* gpu = 450 */
				<26 512 0 4376000>,  /*10 bus=547 */
				<26 512 0 5528000>,  /*11 bus=691 */
				<26 512 0 6216000>,  /*12 bus=777 */

				/* gpu = 490 */
				<26 512 0 5528000>,  /*13 bus=691 */
				<26 512 0 6216000>,  /*14 bus=777 */
				<26 512 0 7448000>,  /*15 bus=931 */

				/* gpu = 600 */
				<26 512 0 6216000>,  /*16 bus=777 */
				<26 512 0 7448000>;  /*17 bus=931 */
				<26 512 0 4376000>,  /*4 bus=547 */
				<26 512 0 5528000>,  /*5 bus=691 */
				<26 512 0 6216000>,  /*6 bus=777 */
				<26 512 0 7448000>;  /*7 bus=931 */

		/* GDSC oxili regulators */
		vddcx-supply = <&gdsc_oxili_cx>;
@@ -129,43 +107,57 @@
			qcom,gpu-pwrlevel@0 {
				reg = <0>;
				qcom,gpu-freq = <600000000>;
				qcom,bus-freq = <17>;
				qcom,bus-freq = <7>;
				qcom,bus-min = <6>;
				qcom,bus-max = <7>;
			};

                        qcom,gpu-pwrlevel@1 {
                                reg = <1>;
                                qcom,gpu-freq = <490000000>;
				qcom,bus-freq = <14>;
                                qcom,bus-freq = <6>;
				qcom,bus-min = <5>;
				qcom,bus-max = <7>;
                        };

			qcom,gpu-pwrlevel@2 {
				reg = <2>;
				qcom,gpu-freq = <450000000>;
				qcom,bus-freq = <11>;
				qcom,bus-freq = <5>;
				qcom,bus-min = <4>;
				qcom,bus-max = <6>;
			};

                        qcom,gpu-pwrlevel@3 {
                                reg = <3>;
                                qcom,gpu-freq = <367000000>;
				qcom,bus-freq = <8>;
                                qcom,bus-freq = <4>;
				qcom,bus-min = <3>;
				qcom,bus-max = <5>;
                        };

			qcom,gpu-pwrlevel@4 {
				reg = <4>;
				qcom,gpu-freq = <300000000>;
				qcom,bus-freq = <5>;
				qcom,bus-freq = <3>;
				qcom,bus-min = <2>;
				qcom,bus-max = <4>;
			};

			qcom,gpu-pwrlevel@5 {
				reg = <5>;
				qcom,gpu-freq = <180000000>;
				qcom,bus-freq = <2>;
				qcom,bus-min = <1>;
				qcom,bus-max = <3>;
			};

			qcom,gpu-pwrlevel@6 {
				reg = <6>;
				qcom,gpu-freq = <27000000>;
				qcom,bus-freq = <0>;
				qcom,bus-min = <0>;
				qcom,bus-max = <0>;
			};
		};

@@ -177,33 +169,16 @@
                 */
                qcom,ocmem-bus-client {
                        qcom,msm-bus,name = "gpu-ocmem";
                        qcom,msm-bus,num-cases = <18>;
                        qcom,msm-bus,num-cases = <8>;
                        qcom,msm-bus,num-paths = <1>;
                        qcom,msm-bus,vectors-KBps =
                                <89 662 0 0>,

                                <89 662 0 2880000>,     /* gpu=180 */
                                <89 662 0 2880000>,     /* gpu=180 */
                                <89 662 0 2880000>,     /* gpu=180 */

                                <89 662 0 4800000>,     /* gpu=300 */
                                <89 662 0 4800000>,     /* gpu=300 */
                                <89 662 0 4800000>,     /* gpu=300 */

                                <89 662 0 5872000>,     /* gpu=367 */
                                <89 662 0 5872000>,     /* gpu=367 */
                                <89 662 0 5872000>,     /* gpu=367 */

                                <89 662 0 7200000>,     /* gpu=450 */
                                <89 662 0 7200000>,     /* gpu=450 */
                                <89 662 0 7200000>,     /* gpu=450 */

                                <89 662 0 7840000>,     /* gpu=490 */
                                <89 662 0 7840000>,     /* gpu=490 */
                                <89 662 0 7840000>,     /* gpu=490 */

				<89 662 0 9600000>,     /* gpu=600 */
                                <89 662 0 9600000>;     /* gpu=600 */
				<89 662 0 7840000>,     /* gpu=490 */
				<89 662 0 7200000>,     /* gpu=450 */
				<89 662 0 5872000>,     /* gpu=367 */
				<89 662 0 4800000>,     /* gpu=300 */
				<89 662 0 2880000>,     /* gpu=180 */
                                <89 662 0 0>;
                };
	};
};
+28 −36
Original line number Diff line number Diff line
@@ -84,25 +84,18 @@
		 * (gpu-bus frequency combination)
		 */
		qcom,msm-bus,name = "grp3d";
		qcom,msm-bus,num-cases = <12>;
		qcom,msm-bus,num-cases = <9>;
		qcom,msm-bus,num-paths = <1>;
		qcom,msm-bus,vectors-KBps =
				<26 512 0 0>,

				<26 512 0 1200000>,  /* gpu=150 bus=150 */
				<26 512 0 2400000>,  /* gpu=150 bus=300 */
				<26 512 0 3200000>,  /* gpu=150 bus=400 */

				<26 512 0 2400000>,  /* gpu=300 bus=300 */
				<26 512 0 4224000>,  /* gpu=300 bus=528 */
				<26 512 0 5376000>,  /* gpu=300 bus=672 */

				<26 512 0 5376000>,  /* gpu=400 bus=672 */
				<26 512 0 6681600>,  /* gpu=400 bus=835.2  */
				<26 512 0 8448000>,  /* gpu=400 bus=1056   */

				<26 512 0 8448000>,  /* gpu=600 bus=1056   */
				<26 512 0 12748800>; /* gpu=600 bus=1593.6 */
				<26 512 0 1200000>,  /* 1 bus=150 */
				<26 512 0 2400000>,  /* 2 bus=300 */
				<26 512 0 3200000>,  /* 3 bus=460 */
				<26 512 0 4224000>,  /* 4 bus=533 */
				<26 512 0 5376000>,  /* 5 bus=672 */
				<26 512 0 6681600>,  /* 6 bus=777  */
				<26 512 0 8448000>,  /* 7 bus=1036 */
				<26 512 0 12748800>; /* 8 bus=1555 */

		/* GDSC oxili regulators */
		vddcx-supply = <&gdsc_oxili_cx>;
@@ -129,30 +122,40 @@
			qcom,gpu-pwrlevel@0 {
				reg = <0>;
				qcom,gpu-freq = <600000000>;
				qcom,bus-freq = <11>;
				qcom,bus-freq = <8>;
				qcom,bus-min = <7>;
				qcom,bus-max = <8>;
			};

			qcom,gpu-pwrlevel@1 {
				reg = <1>;
				qcom,gpu-freq = <400000000>;
				qcom,bus-freq = <8>;
				qcom,bus-freq = <6>;
				qcom,bus-min = <5>;
				qcom,bus-max = <7>;
			};

			qcom,gpu-pwrlevel@2 {
				reg = <2>;
				qcom,gpu-freq = <300000000>;
				qcom,bus-freq = <5>;
				qcom,bus-freq = <4>;
				qcom,bus-min = <2>;
				qcom,bus-max = <5>;
			};

			qcom,gpu-pwrlevel@3 {
				reg = <3>;
				qcom,gpu-freq = <150000000>;
				qcom,bus-freq = <2>;
				qcom,bus-min = <1>;
				qcom,bus-max = <3>;
			};

			qcom,gpu-pwrlevel@4 {
				reg = <4>;
				qcom,gpu-freq = <27000000>;
				qcom,bus-min = <0>;
				qcom,bus-max = <0>;
				qcom,bus-freq = <0>;
			};
		};
@@ -165,25 +168,14 @@
		 */
		qcom,ocmem-bus-client {
                        qcom,msm-bus,name = "gpu-ocmem";
                        qcom,msm-bus,num-cases = <12>;
                        qcom,msm-bus,num-cases = <5>;
                        qcom,msm-bus,num-paths = <1>;
                        qcom,msm-bus,vectors-KBps =
                                <89 662 0 0>,

                                <89 662 0 2400000>,     /* gpu=150 */
                                <89 662 0 2400000>,     /* gpu=150 */
                                <89 662 0 2400000>,     /* gpu=150 */

                                <89 662 0 4800000>,     /* gpu=300 */
                                <89 662 0 4800000>,     /* gpu=300 */
                                <89 662 0 4800000>,     /* gpu=300 */

                                <89 662 0 6400000>,     /* gpu=400 */
                                <89 662 0 6400000>,     /* gpu=400 */
                                <89 662 0 6400000>,     /* gpu=400 */

				<89 662 0 9600000>,     /* gpu=600 */
                                <89 662 0 9600000>;     /* gpu=600 */
				<89 662 0 6400000>,     /* gpu=400 */
				<89 662 0 4800000>,     /* gpu=300 */
				<89 662 0 2400000>,     /* gpu=150 */
                                <89 662 0 0>;
                };
	};
};
+38 −69
Original line number Diff line number Diff line
@@ -305,39 +305,18 @@
	qcom,chipid = <0x04030001>;

	qcom,initial-pwrlevel = <4>;
	qcom,msm-bus,num-cases = <19>;
	qcom,msm-bus,num-cases = <10>;
	qcom,msm-bus,vectors-KBps =
		<26 512 0 0>,

			/* gpu = 190 */
			<26 512 0 1600000>,  /* bus=200  */
			<26 512 0 2400000>,  /* bus=300  */
			<26 512 0 3680000>,  /* bus=460  */

			/* gpu = 305 */
			<26 512 0 2400000>,  /* bus=300  */
			<26 512 0 3680000>,  /* bus=460  */
			<26 512 0 4376000>,  /* bus=547  */

			/* gpu = 390 */
			<26 512 0 4376000>,  /* bus=547  */
			<26 512 0 5528000>,  /* bus=691  */
			<26 512 0 6216000>,  /* bus=777  */

			/* gpu = 450 */
			<26 512 0 5528000>,  /* bus=691  */
			<26 512 0 6216000>,  /* bus=777  */
			<26 512 0 8288000>,  /* bus=1036 */

			/* gpu = 510 */
			<26 512 0 6216000>,  /* bus=777  */
			<26 512 0 8288000>,  /* bus=1036 */
			<26 512 0 10368000>, /* bus=1296 */

			/* gpu = 600 */
			<26 512 0 8288000>,  /* bus=1036 */
			<26 512 0 10368000>, /* bus=1296 */
			<26 512 0 12440000>; /* bus=1555 */
		<26 512 0 1600000>,  /* 1 bus=200  */
		<26 512 0 2400000>,  /* 2 bus=300  */
		<26 512 0 3680000>,  /* 3 bus=460  */
		<26 512 0 4376000>,  /* 4 bus=547  */
		<26 512 0 5528000>,  /* 5 bus=691  */
		<26 512 0 6216000>,  /* 6 bus=777  */
		<26 512 0 8288000>,  /* 7 bus=1036 */
		<26 512 0 10368000>, /* 8 bus=1296 */
		<26 512 0 12440000>; /* 9 bus=1555 */

	/* Power levels */
	qcom,gpu-pwrlevels {
@@ -349,41 +328,55 @@
		qcom,gpu-pwrlevel@0 {
			reg = <0>;
			qcom,gpu-freq = <600000000>;
			qcom,bus-freq = <17>;
			qcom,bus-freq = <8>;
			qcom,bus-min = <7>;
			qcom,bus-max = <9>;
		};

		qcom,gpu-pwrlevel@1 {
			reg = <1>;
			qcom,gpu-freq = <510000000>;
			qcom,bus-freq = <14>;
			qcom,bus-freq = <7>;
			qcom,bus-min = <6>;
			qcom,bus-max = <8>;
		};

		qcom,gpu-pwrlevel@2 {
			reg = <2>;
			qcom,gpu-freq = <450000000>;
			qcom,bus-freq = <11>;
			qcom,bus-freq = <6>;
			qcom,bus-min = <5>;
			qcom,bus-max = <7>;
		};

		qcom,gpu-pwrlevel@3 {
			reg = <3>;
			qcom,gpu-freq = <390000000>;
			qcom,bus-freq = <8>;
			qcom,bus-freq = <5>;
			qcom,bus-min = <4>;
			qcom,bus-max = <6>;
		};

		qcom,gpu-pwrlevel@4 {
			reg = <4>;
			qcom,gpu-freq = <305000000>;
			qcom,bus-freq = <5>;
			qcom,bus-freq = <3>;
			qcom,bus-min = <2>;
			qcom,bus-max = <4>;
		};
		qcom,gpu-pwrlevel@5 {
			reg = <5>;
			qcom,gpu-freq = <190000000>;
			qcom,bus-freq = <2>;
			qcom,bus-min = <1>;
			qcom,bus-max = <3>;
		};
		qcom,gpu-pwrlevel@6 {
			reg = <6>;
			qcom,gpu-freq = <27000000>;
			qcom,bus-freq = <0>;
			qcom,bus-min = <0>;
			qcom,bus-max = <0>;
		};
	};

@@ -395,40 +388,16 @@
	 */
	qcom,ocmem-bus-client {
                qcom,msm-bus,name = "gpu-ocmem";
                qcom,msm-bus,num-cases = <19>;
                qcom,msm-bus,num-cases = <7>;
                qcom,msm-bus,num-paths = <1>;
                qcom,msm-bus,vectors-KBps =
			<89 662 0 0>,

			/* gpu = 190 */
			<89 662 0 3040000>,
			<89 662 0 3040000>,
			<89 662 0 3040000>,

			/* gpu = 305 */
			<89 662 0 4880000>,
			<89 662 0 4880000>,
			<89 662 0 4880000>,

			/* gpu = 390 */
			<89 662 0 6240000>,
			<89 662 0 6240000>,
			<89 662 0 6240000>,

			/* gpu = 450 */
			<89 662 0 7200000>,
			<89 662 0 7200000>,
			<89 662 0 7200000>,

			/* gpu = 510 */
			<89 662 0 8160000>,
			<89 662 0 8160000>,
			<89 662 0 8160000>,

			/* gpu = 600 */
			<89 662 0 9600000>,
			<89 662 0 9600000>,
			<89 662 0 9600000>;
			<89 662 0 9600000>, /* gpu= 600 */
			<89 662 0 8160000>, /* gpu= 510 */
			<89 662 0 7200000>, /* gpu= 450 */
			<89 662 0 6240000>, /* gpu= 390 */
			<89 662 0 4880000>, /* gpu= 305 */
			<89 662 0 3040000>, /* gpu= 190 */
			<89 662 0 0>;
	};
};

+7 −4
Original line number Diff line number Diff line
@@ -216,8 +216,9 @@ void kgsl_pwrctrl_buslevel_update(struct kgsl_device *device,
	last_vote_buslevel = buslevel;
	/* buslevel is the IB vote, update the AB */
	_ab_buslevel_update(pwr, &ab);
	/* vote for ocmem */
	msm_bus_scale_client_update_request(pwr->pcl, buslevel);
	/* vote for ocmem, shut down based on "on" parameter */
	msm_bus_scale_client_update_request(pwr->pcl,
		on ? pwr->active_pwrlevel : pwr->num_pwrlevels - 1);
	/* ask a governor to vote on behalf of us */
	devfreq_vbif_update_bw(ib_votes[last_vote_buslevel], ab);
}
@@ -1446,6 +1447,7 @@ int kgsl_pwrctrl_init(struct kgsl_device *device)
	 * file.
	 */
	freq_i = pwr->min_pwrlevel;
	if (set_bus == 1)
		pwr->pwrlevels[freq_i].bus_min = 1;

	/*
@@ -1501,6 +1503,7 @@ int kgsl_pwrctrl_init(struct kgsl_device *device)
			}
		}
	}
	if (set_bus == 1)
		pwr->pwrlevels[0].bus_max = i - 1;

	INIT_WORK(&pwr->thermal_cycle_ws, kgsl_thermal_cycle);