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

Commit fb47a9df authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Update bandwidth vote using the right API"

parents cfb1b363 b592dc27
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -404,8 +404,10 @@ static int tz_handler(struct devfreq *devfreq, unsigned int event, void *data)

static void _do_partner_event(struct work_struct *work, unsigned int event)
{
	partner_gpu_profile->bus_devfreq->governor->event_handler
			(partner_gpu_profile->bus_devfreq, event, NULL);
	struct devfreq *bus_devfreq = partner_gpu_profile->bus_devfreq;

	if (bus_devfreq->governor && bus_devfreq->governor->event_handler)
		bus_devfreq->governor->event_handler(bus_devfreq, event, NULL);
}

static void do_partner_start_event(struct work_struct *work)
+26 −11
Original line number Diff line number Diff line
@@ -274,6 +274,7 @@ void kgsl_pwrctrl_buslevel_update(struct kgsl_device *device,
		msm_bus_scale_client_update_request(pwr->pcl, buslevel);

	/* ask a governor to vote on behalf of us */
	if (pwr->devbw)
		devfreq_vbif_update_bw(ib_votes[last_vote_buslevel], ab);
}
EXPORT_SYMBOL(kgsl_pwrctrl_buslevel_update);
@@ -1551,6 +1552,8 @@ int kgsl_pwrctrl_init(struct kgsl_device *device)
		&pwr->bus_width))
		pwr->bus_width = 0;

	/* Check if gpu bandwidth vote device is defined in dts */
	if (pwr->bus_control) {
		/* Check if gpu bandwidth vote device is defined in dts */
		gpubw_dev_node = of_parse_phandle(pdev->dev.of_node,
					"qcom,gpubw-dev", 0);
@@ -1561,8 +1564,20 @@ int kgsl_pwrctrl_init(struct kgsl_device *device)
		 */
		if (gpubw_dev_node) {
			p2dev = of_find_device_by_node(gpubw_dev_node);
		if (p2dev)
			if (p2dev) {
				pwr->devbw = &p2dev->dev;
			} else {
				KGSL_PWR_ERR(device,
					"gpubw-dev not available");
				result = -EINVAL;
				goto done;
			}
		} else {
			KGSL_PWR_ERR(device,
				"Unable to find gpubw-dev device in dts");
			result = -EINVAL;
			goto done;
		}
	} else {
		/*
		 * Register for gpu bus scaling if governor support