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

Commit b2a64065 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Fix DCVS enablement"

parents a142beb8 e6a44aae
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1228,6 +1228,8 @@ static inline int start_streaming(struct msm_vidc_inst *inst)
		__func__, inst->batch.enable ? "enabled" : "disabled",
		inst, hash32_ptr(inst->session));

	msm_dcvs_try_enable(inst);

	/*
	 * For seq_changed_insufficient, driver should set session_continue
	 * to firmware after the following sequence
@@ -1960,7 +1962,6 @@ void *msm_vidc_open(int core_id, int session_type)
		goto fail_init;
	}

	msm_dcvs_try_enable(inst);
	if (msm_comm_check_for_inst_overload(core)) {
		dprintk(VIDC_ERR,
			"Instance count reached Max limit, rejecting session");
+5 −3
Original line number Diff line number Diff line
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1015,15 +1015,17 @@ int msm_comm_scale_clocks_and_bus(struct msm_vidc_inst *inst)

int msm_dcvs_try_enable(struct msm_vidc_inst *inst)
{
	if (!inst) {
	if (!inst || !inst->core) {
		dprintk(VIDC_ERR, "%s: Invalid args: %p\n", __func__, inst);
		return -EINVAL;
	}

	if (msm_vidc_clock_voting ||
			!inst->core->resources.dcvs ||
			inst->flags & VIDC_THUMBNAIL ||
			inst->clk_data.low_latency_mode ||
			inst->batch.enable) {
			inst->batch.enable ||
			inst->grid_enable) {
		dprintk(VIDC_PROF, "DCVS disabled: %pK\n", inst);
		inst->clk_data.dcvs_mode = false;
		return false;