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

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

Merge "msm: vidc: limit only OCMEM vote to lowest vector"

parents 823da6b0 c035ae81
Loading
Loading
Loading
Loading
+12 −7
Original line number Original line Diff line number Diff line
@@ -935,13 +935,18 @@ static int venus_hfi_vote_buses(void *dev, struct vidc_bus_vote_data *data,
			continue;
			continue;
		}
		}


		/* Annoying little hack here: if the bus vector is 0, it
		bus_vector = venus_hfi_get_bus_vector(device, bus, load);
		 * actually means "unvote".  However if the client is calling
		/*
		 * vote_bus, it's probably not very nice to unvote the buses.
		 * Annoying little hack here: if the bus vector for ocmem is 0,
		 * So pick up the lowest bandwidth table and use that instead.
		 * we end up unvoting for ocmem bandwidth. This ends up
		 * If client wants to unvote, it'll call venus_hfi_unvote\
		 * resetting the ocmem core on some targets, due to some ocmem
		 * _buses */
		 * clock being tied to the virtual ocmem noc clk. As a result,
		bus_vector = venus_hfi_get_bus_vector(device, bus, load) ?: 1;
		 * just lower our ocmem vote to the lowest level.
		*/
		if (strnstr(bus->pdata->name, "ocmem",
					strlen(bus->pdata->name)))
			bus_vector = bus_vector ?: 1;

		rc = msm_bus_scale_client_update_request(bus->priv, bus_vector);
		rc = msm_bus_scale_client_update_request(bus->priv, bus_vector);
		if (rc) {
		if (rc) {
			dprintk(VIDC_ERR, "Failed voting for bus %s @ %d: %d\n",
			dprintk(VIDC_ERR, "Failed voting for bus %s @ %d: %d\n",