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

Commit 903f112c authored by Deva Ramasubramanian's avatar Deva Ramasubramanian
Browse files

msm: vidc: Vote for buses immediately after allocing and freeing ocmem



Currently, ocmem bus is voted for accidently when vote_buses is called
as part of a qbuf or a dqbuf. However, this relies on some other driver
helpfully voting for the bus so that Venus isn't blocked on processing a
frame.

The Venus driver needs to vote the ocmem bus well before Venus does
anything with ocmem, as such vote immediately after allocating ocmem.

Change-Id: I34d5a48c721d6c55d351fa9a7cf702c5127ea116
Signed-off-by: default avatarDeva Ramasubramanian <dramasub@codeaurora.org>
parent 8b606f17
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -1015,6 +1015,15 @@ static int __alloc_ocmem(void *dev, unsigned long size, bool locked)
			dprintk(VIDC_ERR, "Failed to set ocmem: %d\n", rc);
			dprintk(VIDC_ERR, "Failed to set ocmem: %d\n", rc);
			goto ocmem_set_failed;
			goto ocmem_set_failed;
		}
		}

		rc = venus_hfi_vote_buses(device, device->bus_load,
				device->res->bus_set.count);
		if (rc) {
			dprintk(VIDC_ERR,
					"Failed to scale buses after setting ocmem: %d\n",
					rc);
			goto ocmem_set_failed;
		}
	} else
	} else
		dprintk(VIDC_DBG,
		dprintk(VIDC_DBG,
			"OCMEM is enough. reqd: %lu, available: %lu\n",
			"OCMEM is enough. reqd: %lu, available: %lu\n",