diff --git a/driver/vidc/src/msm_vidc_power.c b/driver/vidc/src/msm_vidc_power.c index 9ed55d4e7b..7a6f4fb588 100644 --- a/driver/vidc/src/msm_vidc_power.c +++ b/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;