From 9619e7336d6b51b716f6af86644ad657db36b93a Mon Sep 17 00:00:00 2001 From: Vikash Garodia Date: Thu, 1 Jul 2021 06:22:42 +0530 Subject: [PATCH] driver: retain real time priority even if rate is not set There are few apk which does not set the rate. As per the design, video sessions should run in non real time mode for such sessions. It is leading to high power as the resources are clocked to max in non realtime mode. Keeping the mode as real time for such sessions. Change-Id: I072b33038b1169788f37711ebf6cb069d0f07381 Signed-off-by: Vikash Garodia --- driver/vidc/src/msm_vidc_control.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/driver/vidc/src/msm_vidc_control.c b/driver/vidc/src/msm_vidc_control.c index de343daf9c..4dda2b7a4b 100644 --- a/driver/vidc/src/msm_vidc_control.c +++ b/driver/vidc/src/msm_vidc_control.c @@ -2154,12 +2154,11 @@ int msm_vidc_adjust_session_priority(void *instance, struct v4l2_ctrl *ctrl) } /* - * For RT, check for resource feasability if rate is set by client. - * For RT, move to NRT, if rate is not set by client. + * For RT, check for resource feasability. * For NRT, sessions with rate set by client takes higher order * among NRT sessions. They are constraint RT or low priority RT. */ - if (adjusted_value == 0 && rate_by_client) { + if (adjusted_value == 0) { rc = msm_vidc_check_core_mbps(inst); if (rc) { i_vpr_e(inst, "%s: unsupported load\n", __func__); @@ -2183,9 +2182,6 @@ int msm_vidc_adjust_session_priority(void *instance, struct v4l2_ctrl *ctrl) } } - if (adjusted_value == 0 && !rate_by_client) - adjusted_value = 1; - msm_vidc_update_cap_value(inst, PRIORITY, adjusted_value, __func__); exit: