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

Commit 0dc9c49a 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: Remove unnecessary scale clocks"

parents 24478498 d3a37b62
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -83,6 +83,8 @@ static int __disable_regulators(struct venus_hfi_device *device);
static int __enable_regulators(struct venus_hfi_device *device);
static inline int __prepare_enable_clks(struct venus_hfi_device *device);
static inline void __disable_unprepare_clks(struct venus_hfi_device *device);
static int __scale_clocks(struct venus_hfi_device *device, int load,
		int codecs_enabled, unsigned long instant_bitrate);
static void __flush_debug_queue(struct venus_hfi_device *device, u8 *packet);
static int __initialize_packetization(struct venus_hfi_device *device);
static struct hal_session *__get_session(struct venus_hfi_device *device,
@@ -1573,12 +1575,6 @@ static int __iface_cmdq_write_relaxed(struct venus_hfi_device *device,
			goto err_q_write;
		}

		if (__scale_clocks(device, device->clk_load,
			 device->codecs_enabled, device->clk_bitrate)) {
			dprintk(VIDC_ERR, "Clock scaling failed\n");
			goto err_q_write;
		}

		if (device->res->sw_power_collapsible) {
			dprintk(VIDC_DBG,
				"Cancel and queue delayed work again\n");
@@ -4187,6 +4183,14 @@ static int __venus_power_on(struct venus_hfi_device *device)
		goto fail_enable_clks;
	}

	rc = __scale_clocks(device, device->clk_load, device->codecs_enabled,
			device->clk_bitrate);
	if (rc) {
		dprintk(VIDC_WARN,
				"Failed to scale clocks, performance might be affected\n");
		rc = 0;
	}

	/* Hand off control of regulators to h/w _after_ enabling clocks */
	if (__enable_hw_power_collapse(device))
		dprintk(VIDC_ERR, "Failed to enabled inter-frame PC\n");