Эх сурвалжийг харах

video: driver: sessions without input data are skipped for power votes

Video driver has a logic to vote for maximum power resources for
initial few frames. If any video session remains within those
initial few frames, the votes calculated would reflect as maximum.
To handle such video sessions, there is another logic to check
if the video session has any input buffer to process. If there
are no input buffers to process for that session, there is no
need to consider that session for power resource voting. Hence
skip the votes aggregation for such sessions during concurrency.

Change-Id: Ib5d678b92a81a48100f404421e9356a7226658b0
Signed-off-by: Vikash Garodia <[email protected]>
Vikash Garodia 2 жил өмнө
parent
commit
8ff4bad25b

+ 9 - 0
driver/vidc/src/msm_vidc_power.c

@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include "msm_vidc_power.h"
@@ -148,6 +149,10 @@ static int msm_vidc_set_buses(struct msm_vidc_inst* inst)
 	mutex_lock(&core->lock);
 	curr_time_ns = ktime_get_ns();
 	list_for_each_entry(temp, &core->instances, list) {
+		/* skip for session where no input is there to process */
+		if (!temp->max_input_data_size)
+			continue;
+
 		/* skip inactive session bus bandwidth */
 		if (!is_active_session(temp->last_qbuf_time_ns, curr_time_ns)) {
 			temp->active = false;
@@ -334,6 +339,10 @@ int msm_vidc_set_clocks(struct msm_vidc_inst* inst)
 	freq = 0;
 	curr_time_ns = ktime_get_ns();
 	list_for_each_entry(temp, &core->instances, list) {
+		/* skip for session where no input is there to process */
+		if (!temp->max_input_data_size)
+			continue;
+
 		/* skip inactive session clock rate */
 		if (!is_active_session(temp->last_qbuf_time_ns, curr_time_ns)) {
 			temp->active = false;