]> git.itanic.dy.fi Git - linux-stable/commitdiff
media: venus: hfi_parser: Don't initialize parser on v1
authorStanimir Varbanov <stanimir.varbanov@linaro.org>
Sun, 7 Mar 2021 11:16:03 +0000 (12:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 May 2021 12:47:39 +0000 (14:47 +0200)
commit 834124c596e2dddbbdba06620835710ccca32fd0 upstream.

The Venus v1 behaves differently comparing with the other Venus
version in respect to capability parsing and when they are send
to the driver. So we don't need to initialize hfi parser for
multiple invocations like what we do for > v1 Venus versions.

Fixes: 10865c98986b ("media: venus: parser: Prepare parser for multiple invocations")
Cc: stable@vger.kernel.org # v5.10+
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/qcom/venus/hfi_parser.c

index 363ee2a65453c11a596c8098ebffc922d1b930fb..2dcf7eaea4ce2b9b06f4cdb75c74e4d940cedcd1 100644 (file)
@@ -239,8 +239,10 @@ 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));
+       if (core->res->hfi_version > HFI_VERSION_1XX) {
+               core->codecs_count = 0;
+               memset(core->caps, 0, sizeof(core->caps));
+       }
 
        while (words_count) {
                data = word + 1;