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

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

Merge "msm-vidc: Modify encoder configuration for power savings mode."

parents 018df480 40236822
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1386,7 +1386,7 @@ int msm_vidc_decide_work_mode(struct msm_vidc_inst *inst)
static inline int msm_vidc_power_save_mode_enable(struct msm_vidc_inst *inst,
	bool enable)
{
	u32 rc = 0, mbs_per_frame;
	u32 rc = 0, mbs_per_frame, mbs_per_sec;
	u32 prop_id = 0;
	void *pdata = NULL;
	struct hfi_device *hdev = NULL;
@@ -1401,8 +1401,10 @@ static inline int msm_vidc_power_save_mode_enable(struct msm_vidc_inst *inst,
		return 0;
	}
	mbs_per_frame = msm_vidc_get_mbs_per_frame(inst);
	mbs_per_sec = mbs_per_frame * msm_vidc_get_fps(inst);

	if (mbs_per_frame > inst->core->resources.max_hq_mbs_per_frame ||
		msm_vidc_get_fps(inst) > inst->core->resources.max_hq_fps) {
		mbs_per_sec > inst->core->resources.max_hq_mbs_per_sec) {
		enable = true;
	}
	/* Power saving always disabled for CQ RC mode. */
+16 −16
Original line number Diff line number Diff line
@@ -194,8 +194,8 @@ static struct msm_vidc_common_data sm6150_common_data[] = {
		.value = 8160,
	},
	{
		.key = "qcom,max-hq-frames-per-sec",
		.value = 30,
		.key = "qcom,max-hq-mbs-per-sec",
		.value = 244800,  /* 1920 x 1088 @ 30 fps */
	},
	{
		.key = "qcom,max-b-frame-size",
@@ -253,8 +253,8 @@ static struct msm_vidc_common_data trinket_common_data[] = {
		.value = 8160,
	},
	{
		.key = "qcom,max-hq-frames-per-sec",
		.value = 30,
		.key = "qcom,max-hq-mbs-per-sec",
		.value = 244800,  /* 1920 x 1088 @ 30 fps */
	},
	{
		.key = "qcom,max-b-frame-size",
@@ -317,8 +317,8 @@ static struct msm_vidc_common_data sm8150_common_data[] = {
		.value = 8160,
	},
	{
		.key = "qcom,max-hq-frames-per-sec",
		.value = 60,
		.key = "qcom,max-hq-mbs-per-sec",
		.value = 244800,  /* 1920 x 1088 @ 30 fps */
	},
	{
		.key = "qcom,max-b-frame-size",
@@ -388,8 +388,8 @@ static struct msm_vidc_common_data sdmmagpie_common_data_v0[] = {
		.value = 8160,
	},
	{
		.key = "qcom,max-hq-frames-per-sec",
		.value = 60,
		.key = "qcom,max-hq-mbs-per-sec",
		.value = 244800,  /* 1920 x 1088 @ 30 fps */
	},
	{
		.key = "qcom,max-b-frame-size",
@@ -459,8 +459,8 @@ static struct msm_vidc_common_data sdmmagpie_common_data_v1[] = {
		.value = 8160,
	},
	{
		.key = "qcom,max-hq-frames-per-sec",
		.value = 60,
		.key = "qcom,max-hq-mbs-per-sec",
		.value = 244800,  /* 1920 x 1088 @ 30 fps */
	},
	{
		.key = "qcom,max-b-frame-size",
@@ -534,8 +534,8 @@ static struct msm_vidc_common_data sdm845_common_data[] = {
		.value = 8160,
	},
	{
		.key = "qcom,max-hq-frames-per-sec",
		.value = 60,
		.key = "qcom,max-hq-mbs-per-sec",
		.value = 244800,  /* 1920 x 1088 @ 30 fps */
	},
	{
		.key = "qcom,max-b-frame-size",
@@ -589,8 +589,8 @@ static struct msm_vidc_common_data sdm670_common_data_v0[] = {
		.value = 8160,
	},
	{
		.key = "qcom,max-hq-frames-per-sec",
		.value = 60,
		.key = "qcom,max-hq-mbs-per-sec",
		.value = 244800,  /* 1920 x 1088 @ 30 fps */
	},
	{
		.key = "qcom,max-b-frame-size",
@@ -640,8 +640,8 @@ static struct msm_vidc_common_data sdm670_common_data_v1[] = {
		.value = 8160,
	},
	{
		.key = "qcom,max-hq-frames-per-sec",
		.value = 60,
		.key = "qcom,max-hq-mbs-per-sec",
		.value = 244800,  /* 1920 x 1088 @ 30 fps */
	},
	{
		.key = "qcom,max-b-frame-size",
+2 −2
Original line number Diff line number Diff line
@@ -761,8 +761,8 @@ int read_platform_resources_from_drv_data(
	res->max_hq_mbs_per_frame = find_key_value(platform_data,
			"qcom,max-hq-mbs-per-frame");

	res->max_hq_fps = find_key_value(platform_data,
			"qcom,max-hq-frames-per-sec");
	res->max_hq_mbs_per_sec = find_key_value(platform_data,
			"qcom,max-hq-mbs-per-sec");

	res->sw_power_collapsible = find_key_value(platform_data,
			"qcom,sw-power-collapse");
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ struct msm_vidc_platform_resources {
	struct buffer_usage_set buffer_usage_set;
	uint32_t max_load;
	uint32_t max_hq_mbs_per_frame;
	uint32_t max_hq_fps;
	uint32_t max_hq_mbs_per_sec;
	struct platform_device *pdev;
	struct regulator_set regulator_set;
	struct clock_set clock_set;