Merge "video: driver: createbufs and controls v4l2-compliance fixes"

This commit is contained in:
qctecmdr
2022-04-13 16:45:34 -07:00
committato da Gerrit - the friendly Code Review server
2 ha cambiato i file con 2 aggiunte e 13 eliminazioni

Vedi File

@@ -859,9 +859,7 @@ int msm_vidc_ctrl_init(struct msm_vidc_inst *inst)
ctrl_cfg.type = V4L2_CTRL_TYPE_BITMASK;
else
ctrl_cfg.type = V4L2_CTRL_TYPE_INTEGER;
/* allow all metadata modes from v4l2 side */
if (is_meta_cap(idx)) {
ctrl_cfg.max = V4L2_MPEG_VIDC_META_MAX - 1;
/* bitmask is expected to be enabled for meta controls */
if (ctrl_cfg.type != V4L2_CTRL_TYPE_BITMASK) {
i_vpr_e(inst,
@@ -1117,15 +1115,6 @@ static int msm_vidc_update_static_property(struct msm_vidc_inst *inst,
msm_vidc_update_cap_value(inst, LAYER_ENABLE, enable, __func__);
}
if (is_meta_cap(cap_id)) {
/* validate metadata control value against allowed settings */
if ((ctrl->val & inst->capabilities->cap[cap_id].max) != ctrl->val) {
i_vpr_e(inst,
"%s: allowed bits for cap %s is %#x, client set %#x\n",
__func__, cap_name(cap_id),
inst->capabilities->cap[cap_id].max,
ctrl->val);
return -EINVAL;
}
rc = msm_vidc_update_meta_port_settings(inst);
if (rc)
return rc;

Vedi File

@@ -121,10 +121,10 @@ int msm_vidc_queue_setup(struct vb2_queue *q,
if (port < 0)
return -EINVAL;
if (*num_planes) {
if (*num_planes && (port == INPUT_PORT || port == OUTPUT_PORT)) {
f = &inst->fmts[port];
if (*num_planes != f->fmt.pix_mp.num_planes) {
i_vpr_i(inst, "%s: requested num_planes %d not supported\n",
i_vpr_e(inst, "%s: requested num_planes %d not supported %d\n",
__func__, *num_planes, f->fmt.pix_mp.num_planes);
return -EINVAL;
}