Commit b8201f3e authored by Stanimir Varbanov's avatar Stanimir Varbanov Committed by Mauro Carvalho Chehab

media: venus: vdec,core: Handle picture structure event

Handle progressive/interlaced bitstream event by similar way as
bit depth.
Signed-off-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent e2992926
...@@ -375,6 +375,7 @@ struct venus_inst { ...@@ -375,6 +375,7 @@ struct venus_inst {
union hfi_get_property hprop; union hfi_get_property hprop;
unsigned int core_acquired: 1; unsigned int core_acquired: 1;
unsigned int bit_depth; unsigned int bit_depth;
unsigned int pic_struct;
bool next_buf_last; bool next_buf_last;
bool drain_active; bool drain_active;
}; };
......
...@@ -1371,6 +1371,9 @@ static void vdec_event_change(struct venus_inst *inst, ...@@ -1371,6 +1371,9 @@ static void vdec_event_change(struct venus_inst *inst,
if (inst->bit_depth != ev_data->bit_depth) if (inst->bit_depth != ev_data->bit_depth)
inst->bit_depth = ev_data->bit_depth; inst->bit_depth = ev_data->bit_depth;
if (inst->pic_struct != ev_data->pic_struct)
inst->pic_struct = ev_data->pic_struct;
dev_dbg(dev, VDBGM "event %s sufficient resources (%ux%u)\n", dev_dbg(dev, VDBGM "event %s sufficient resources (%ux%u)\n",
sufficient ? "" : "not", ev_data->width, ev_data->height); sufficient ? "" : "not", ev_data->width, ev_data->height);
...@@ -1539,6 +1542,7 @@ static int vdec_open(struct file *file) ...@@ -1539,6 +1542,7 @@ static int vdec_open(struct file *file)
inst->clk_data.core_id = VIDC_CORE_ID_DEFAULT; inst->clk_data.core_id = VIDC_CORE_ID_DEFAULT;
inst->core_acquired = false; inst->core_acquired = false;
inst->bit_depth = VIDC_BITDEPTH_8; inst->bit_depth = VIDC_BITDEPTH_8;
inst->pic_struct = HFI_INTERLACE_FRAME_PROGRESSIVE;
init_waitqueue_head(&inst->reconf_wait); init_waitqueue_head(&inst->reconf_wait);
venus_helper_init_instance(inst); venus_helper_init_instance(inst);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment