media: venus: parser: Prepare parser for multiple invocations
authorStanimir Varbanov <stanimir.varbanov@linaro.org>
Thu, 30 Jul 2020 11:46:30 +0000 (13:46 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 1 Sep 2020 12:13:29 +0000 (14:13 +0200)
Presently the hfi_parser has been called only once during driver
probe. To prepare the parser function to be called multiple times
from recovery we need to initialize few variables which are used
during parsing time.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Fritz Koenig <frkoenig@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/qcom/venus/hfi_parser.c

index 7f515a4..363ee2a 100644 (file)
@@ -239,6 +239,9 @@ u32 hfi_parser(struct venus_core *core, struct venus_inst *inst, void *buf,
 
        parser_init(inst, &codecs, &domain);
 
+       core->codecs_count = 0;
+       memset(core->caps, 0, sizeof(core->caps));
+
        while (words_count) {
                data = word + 1;