From patchwork Thu Jul 30 11:46:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 247277 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2331113ilg; Thu, 30 Jul 2020 04:47:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxelxy1BeDohy04VaauDg75JnyxjgWfxsoIKIYKgIoLJOQs4AoHIleKhYDXaIdOKCIsp5E2 X-Received: by 2002:a05:6402:1846:: with SMTP id v6mr2240097edy.179.1596109646500; Thu, 30 Jul 2020 04:47:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596109646; cv=none; d=google.com; s=arc-20160816; b=KnBL2qabN9dfopfcMu2VHHrx5b0MvGMUg0YKZvXNi67/lVnVLBCWkV00I2l/LEZB5r UPuzk483YM7n1LWdlrjVs62U5TqDcPFJx7Rgax1tXEcnwTYFUUXQgL77UGdIBGJ0bPvN pBGHRb+FtxnsFl90s+ov1c2JKcojMiZvzk8FRW3cxziAQ/plO7h3gVylpb5asd1xvBdt 9VPtnmeT8Qs5qqMgOnEFB3+Sh4cKviQjQD+93wUaITPBe1GRAMoOaRNiSZD5cS02/M9e KVMicmsh7o6moBBkRaRag1Jmuk6N/ku5+ahXXrUk55m8d2vRFqgJI5OZiT0rvaAtEJTR fZWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=CTatHtGbJyhfIe07LyOFqsBAVFHXpCGvt0MRleoAwFM=; b=lIFStc7JbbcnnB/jm7x+NVtC28vludoDfNriWBDLt0+fBPK77m9hh41qGcffNpuYFI f1tMSq0QWaTp8d0JAWI7cZGjIoShj0/m4dHy8cR1xTfoAN2KDyv/FeywCprEqYXI2qa7 HyNwheXzbGepEWRaXRQg8Ez2KwulXIZrx/oPAnP04G39zwfezkQAKyEIDdGrbDWmC8gM 4CXBWfBi87dzEuNSH8Bnh1DSKs4kFMPB0t6It6i9Jb4vQy4Sz/ihP3MJFJO1IE7EH9YQ KjUQ/0/BdBpxaHNb66nk2JlLrY6ilKPEBOOdBB+XCu2Evh4Bi+EbIULsbLu+ZYBdHAWI tFKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uaEmjOC2; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i4si3225159edt.77.2020.07.30.04.47.26; Thu, 30 Jul 2020 04:47:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uaEmjOC2; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727956AbgG3LrW (ORCPT + 4 others); Thu, 30 Jul 2020 07:47:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727942AbgG3LrV (ORCPT ); Thu, 30 Jul 2020 07:47:21 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6E0AC0619D8 for ; Thu, 30 Jul 2020 04:47:18 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id r12so24548050wrj.13 for ; Thu, 30 Jul 2020 04:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CTatHtGbJyhfIe07LyOFqsBAVFHXpCGvt0MRleoAwFM=; b=uaEmjOC2l9sHxKq7NHLH6ZQ/+FQ9P8LnKs3PJp993cAdhk0pREg2Wiryu6EtJVV4/t 9PSq1/5a8rp94P/DPRkFKBMb44gE/F5+TSyztqX0OSRMKgsNABOl8UacD1ia2FwnxeLI YnpfZ9Wprk8Sq/Q3DWDoXEd1Ba0uBG+DmAhlk/4OEygcCkGPbpuEwtXdrgKRRd1kSuSM gv9WSizuUKm8a6VOGRTObtnR6vZ142SDrrbiGt7lxr1PnoU4Mk2pOsQ+DWQeClt6T7CD WVHny8bvWrDgog3DcOj4SD4/341IqiLTqEPzTSgyEeueBPtpyyrq5iZSu7DmuO7TUz+U ahhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CTatHtGbJyhfIe07LyOFqsBAVFHXpCGvt0MRleoAwFM=; b=TiFatuI0Glo8MIhJbJ39JJz+5hHg0nCy7bs+12ZXMr+L5BuFJsm/e+iqSk0hXUXXdB 369yKhg8GdSIXrEkX2f5w/zcii7UEGNA8kdSHsMvtqHwbMq+TO1PEAb1YcAYPFerenc0 tjdT9LxaZjF5WK7YSQmFANkgqIxPSzqx4Bk3PZt/XZXu3KpL2THKS3oTpkLQny3SIyxd jSvu8m6JVRTiQaOpnu0ncOlxGbL8TNywJLbVwIxfZJpoSVVgh+LitlDYg2yOxBdEi91O Jg8F3gJRwXva8lYamTcJq0mLaIROiXkxv0HYVe/5kkaDpQPgHRQ/KLkETms9oKpCHEWT jNVg== X-Gm-Message-State: AOAM531t5DEOzQ6iDqYJg9kaDBM7AvbKZPfNubIZ726nRT6UeVxa0U1j NyOPDR9mbUDMqoPWhZk9vzY3pFHK0XmLHQ== X-Received: by 2002:adf:a192:: with SMTP id u18mr2704077wru.158.1596109637205; Thu, 30 Jul 2020 04:47:17 -0700 (PDT) Received: from localhost.localdomain ([195.24.90.54]) by smtp.gmail.com with ESMTPSA id 32sm9636691wrn.86.2020.07.30.04.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2020 04:47:16 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Stanimir Varbanov Subject: [PATCH 1/3] venus: parser: Prepare parser for multiple invocations Date: Thu, 30 Jul 2020 14:46:30 +0300 Message-Id: <20200730114632.6717-2-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200730114632.6717-1-stanimir.varbanov@linaro.org> References: <20200730114632.6717-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 --- drivers/media/platform/qcom/venus/hfi_parser.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 Reviewed-by: Fritz Koenig diff --git a/drivers/media/platform/qcom/venus/hfi_parser.c b/drivers/media/platform/qcom/venus/hfi_parser.c index 7f515a4b9bd1..363ee2a65453 100644 --- a/drivers/media/platform/qcom/venus/hfi_parser.c +++ b/drivers/media/platform/qcom/venus/hfi_parser.c @@ -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;