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

Commit 9fffca4f 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: Do not power off Venus if already powered off"

parents 46b095a7 0d6396df
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -4026,6 +4026,10 @@ static int __disable_regulators(struct venus_hfi_device *device)
static int __venus_power_on(struct venus_hfi_device *device)
{
	int rc = 0;

	if (device->power_enabled)
		return 0;

	device->power_enabled = true;
	/* Vote for all hardware resources */
	rc = __vote_buses(device, device->bus_vote.data,
@@ -4089,6 +4093,9 @@ fail_vote_buses:

static void __venus_power_off(struct venus_hfi_device *device, bool halt_axi)
{
	if (!device->power_enabled)
		return;

	if (!(device->intr_status & VIDC_WRAPPER_INTR_STATUS_A2HWD_BMSK))
		disable_irq_nosync(device->hal_data->irq);
	device->intr_status = 0;