msm: vidc: make realtime as default

By default, a session is realtime. Client can
overwrite as non-realtime.Fixed realtime value
for decoder.Deprecated VIDC_REALTIME flag usage.

Change-Id: I5a1d1c9bdab18d3dfb73f3b21a23054de07d77a1
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
This commit is contained in:
Darshana Patil 2019-08-05 10:51:50 -07:00
commit af0e01c383
5 changed files with 9 additions and 15 deletions

View file

@ -375,7 +375,7 @@ static struct msm_vidc_ctrl msm_vdec_ctrls[] = {
.type = V4L2_CTRL_TYPE_BOOLEAN,
.minimum = V4L2_MPEG_MSM_VIDC_DISABLE,
.maximum = V4L2_MPEG_MSM_VIDC_ENABLE,
.default_value = V4L2_MPEG_MSM_VIDC_DISABLE,
.default_value = V4L2_MPEG_MSM_VIDC_ENABLE,
.step = 1,
},
{
@ -902,9 +902,6 @@ int msm_vdec_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
inst->buffer_size_limit = ctrl->val;
break;
case V4L2_CID_MPEG_VIDC_VIDEO_PRIORITY:
inst->flags &= ~VIDC_REALTIME;
if (ctrl->val)
inst->flags |= VIDC_REALTIME;
break;
case V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE:
inst->clk_data.operating_rate = ctrl->val;
@ -1269,7 +1266,6 @@ int msm_vdec_set_priority(struct msm_vidc_inst *inst)
{
int rc = 0;
struct hfi_device *hdev;
struct v4l2_ctrl *ctrl;
struct hfi_enable hfi_property;
if (!inst || !inst->core) {
@ -1278,8 +1274,7 @@ int msm_vdec_set_priority(struct msm_vidc_inst *inst)
}
hdev = inst->core->device;
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_PRIORITY);
hfi_property.enable = (bool)ctrl->val;
hfi_property.enable = is_realtime_session(inst);
dprintk(VIDC_HIGH, "%s: %#x\n", __func__, hfi_property.enable);
rc = call_hfi_op(hdev, session_set_property, inst->session,

View file

@ -755,7 +755,7 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = {
.type = V4L2_CTRL_TYPE_BOOLEAN,
.minimum = V4L2_MPEG_MSM_VIDC_DISABLE,
.maximum = V4L2_MPEG_MSM_VIDC_ENABLE,
.default_value = V4L2_MPEG_MSM_VIDC_DISABLE,
.default_value = V4L2_MPEG_MSM_VIDC_ENABLE,
.step = 1,
},
{
@ -2016,7 +2016,6 @@ int msm_venc_set_priority(struct msm_vidc_inst *inst)
{
int rc = 0;
struct hfi_device *hdev;
struct v4l2_ctrl *ctrl;
struct hfi_enable enable;
if (!inst || !inst->core) {
@ -2025,8 +2024,7 @@ int msm_venc_set_priority(struct msm_vidc_inst *inst)
}
hdev = inst->core->device;
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_PRIORITY);
enable.enable = !!ctrl->val;
enable.enable = is_realtime_session(inst);
dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable);
rc = call_hfi_op(hdev, session_set_property, inst->session,

View file

@ -1628,7 +1628,7 @@ static u32 get_core_load(struct msm_vidc_core *core,
list_for_each_entry(inst, &core->instances, list) {
u32 cycles, lp_cycles;
real_time_mode = inst->flags & VIDC_REALTIME ? true : false;
real_time_mode = is_realtime_session(inst);
if (!(inst->clk_data.core_id & core_id))
continue;
if (real_time_mode != real_time)
@ -1792,7 +1792,7 @@ void msm_print_core_status(struct msm_vidc_core *core, u32 core_id)
"WORK_MODE_1" : "WORK_MODE_2",
inst->clk_data.work_route,
inst->flags & VIDC_LOW_POWER ? "LP" : "HQ",
inst->flags & VIDC_REALTIME ? "RealTime" : "NonRTime",
is_realtime_session(inst) ? "RealTime" : "NonRTime",
inst->clk_data.min_freq);
}
mutex_unlock(&core->lock);

View file

@ -97,7 +97,9 @@ static inline bool is_image_session(struct msm_vidc_inst *inst)
static inline bool is_realtime_session(struct msm_vidc_inst *inst)
{
return !!(inst->flags & VIDC_REALTIME);
struct v4l2_ctrl *ctrl;
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_PRIORITY);
return !!ctrl->val;
}
static inline bool is_secure_session(struct msm_vidc_inst *inst)

View file

@ -432,7 +432,6 @@ enum msm_vidc_modes {
VIDC_TURBO = BIT(1),
VIDC_THUMBNAIL = BIT(2),
VIDC_LOW_POWER = BIT(3),
VIDC_REALTIME = BIT(4),
};
struct msm_vidc_core_ops {