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

Commit 8581190a 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: add support for loading lowpower bus vectors"

parents 2f0a7856 172620c3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -32,6 +32,9 @@ Optional properties:
	  Passive buses are not scaled by load and are typically just "turned on"
	  to keep certain clocks (that aren't directly controllable by the driver)
	  high.
	- qcom,bus-low-power: A bool indicating the bus is "in low-power".  In
	  this mode the bus load is lower than the regular sesion. This is enabled when
	  power save is enabled in driver.
        - qcom,bus-configs: A bitmap that describes the configuration of the
          bus. The bitmaps are as follows:
          supports mvc encoder = 0x00000001
@@ -166,6 +169,7 @@ Example:
					<63 512 104000 303000>;
				qcom,bus-configs = <0xf>;
				qcom,bus-passive;
				qcom,bus-low-power;
			};
		};
		qcom,vidc-iommu-domains {
+4 −0
Original line number Diff line number Diff line
@@ -2668,6 +2668,10 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
		msm_dcvs_enc_set_power_save_mode(inst,
			venc_mode.mode ==
			V4L2_MPEG_VIDC_VIDEO_PERF_POWER_SAVE);
		if (venc_mode.mode ==
			V4L2_MPEG_VIDC_VIDEO_PERF_POWER_SAVE) {
			inst->flags |= VIDC_POWER_SAVE;
		}
		break;
	case V4L2_CID_MPEG_VIDC_VIDEO_HIER_B_NUM_LAYERS:
		if (inst->fmts[CAPTURE_PORT]->fourcc != V4L2_PIX_FMT_HEVC) {
+1 −1
Original line number Diff line number Diff line
@@ -250,7 +250,6 @@ static int msm_comm_vote_bus(struct msm_vidc_core *core)

	list_for_each_entry(inst, &core->instances, list) {
		int codec = 0;

		codec = inst->session_type == MSM_VIDC_DECODER ?
			inst->fmts[OUTPUT_PORT]->fourcc :
			inst->fmts[CAPTURE_PORT]->fourcc;
@@ -260,6 +259,7 @@ static int msm_comm_vote_bus(struct msm_vidc_core *core)
				get_hal_domain(inst->session_type));
		vote_data[i].load = msm_comm_get_inst_load(inst,
				LOAD_CALC_NO_QUIRKS);
		vote_data[i].low_power = !!(inst->flags & VIDC_POWER_SAVE);
		i++;
	}
	mutex_unlock(&core->lock);
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2015, 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
@@ -225,6 +225,7 @@ enum msm_vidc_modes {
	VIDC_TURBO = 1 << 1,
	VIDC_THUMBNAIL = 1 << 2,
	VIDC_NOMINAL = 1 << 3,
	VIDC_POWER_SAVE = 1 << 4,
};

struct msm_vidc_core_capability {
+5 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2015, 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
@@ -316,10 +316,13 @@ static int msm_vidc_load_bus_vectors(struct msm_vidc_platform_resources *res)

	for_each_child_of_node(bus_node, child_node) {
		bool passive = false;
		bool low_power = false;
		u32 configs = 0;
		struct bus_info *bus = &buses->bus_tbl[c];

		passive = of_property_read_bool(child_node, "qcom,bus-passive");
		low_power = of_property_read_bool(child_node,
			"qcom,bus-low-power");
		rc = of_property_read_u32(child_node, "qcom,bus-configs",
				&configs);
		if (rc) {
@@ -330,6 +333,7 @@ static int msm_vidc_load_bus_vectors(struct msm_vidc_platform_resources *res)
		}

		bus->passive = passive;
		bus->low_power = low_power;
		bus->sessions_supported = configs;
		bus->pdata = msm_bus_pdata_from_node(pdev, child_node);
		if (IS_ERR_OR_NULL(bus->pdata)) {
Loading