From patchwork Mon Mar 8 10:52:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 395378 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1600688jai; Mon, 8 Mar 2021 02:53:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdOIBO7mlFJ5IMvbjwwxiEA8Q94zcaouZRGbPX2QB3cj37Kj3ccbSSsFtHeVvcimmbVG0U X-Received: by 2002:a05:6402:1d95:: with SMTP id dk21mr21299150edb.280.1615200788316; Mon, 08 Mar 2021 02:53:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615200788; cv=none; d=google.com; s=arc-20160816; b=iH4LGJP68m/o7VuzF8oGXLqZcloXNLozs45aqqCEkQhKtp1zgiMstU+CkLMjeEP80w ywYfWxcUHkbuolRRSc9lJ/OwU4YYhuAkc9w1h606TceF10XTp3Dq0EwY2IwdTpbkZ/ur cNRqm/AYHPhvjeUyKkwbJdT5OqxdEiiDGoVw8PIiSYsEINaIyvJEruFfORPKu1Fd8Yx4 NgCUE8IVHQUy82/1EZyTplEJy2V28fyCjhezGzEMZXfi93rLHQ0yVzpTR9XSIxfxof4B pFJ+ULSR/96dAHLd/6LoxELl4LWUE0hn/vPSOq674E7/s2H0gKcEpif3zAnAcXwkA4qk +qFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=a1XuaInoR0tuPlY8Xeovw7fyTewNoHYbnAtL2fQF1jw=; b=0xTmZX2yqhqB/1PIbk05vJV6+BSDUnYYw4ww8vmqKZLLBgbxsb3YusfAz0IndsudQX UaHrWdHgFn5CjkQuKK1lsHINAh9Fk10zv5+eDlgyQ2LKi5aUQ92EAuRSnjiHgdvQeDt2 I/FA83jHGAvgci5/TJdMGmmE8Yh5giLsbK//0wTQtFyGGEaPMdDkljU5QO3U4TIkaUPs I4p4nP9WeM/S4OEsMglVH7c+Jf4Y7JnEMdnU3HHLfqU4dqEUwTNlEWBvnc33AF3ZWgqD xd5LopVUXIzFhfNahwjj6zmHYVRtHoe2+iJw24dPh9k78+CqUrn6SZ7pGvt7N/AAV8xi 0A0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B6EOG3eE; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 a4si6492505ejy.263.2021.03.08.02.53.07; Mon, 08 Mar 2021 02:53:08 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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=B6EOG3eE; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S230343AbhCHKwg (ORCPT + 13 others); Mon, 8 Mar 2021 05:52:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230444AbhCHKwZ (ORCPT ); Mon, 8 Mar 2021 05:52:25 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30FC7C06175F for ; Mon, 8 Mar 2021 02:52:25 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id jt13so19420915ejb.0 for ; Mon, 08 Mar 2021 02:52:25 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=a1XuaInoR0tuPlY8Xeovw7fyTewNoHYbnAtL2fQF1jw=; b=B6EOG3eEDx+Oq57f8XKABz8GGzN0l2eN6WPn8VX6m4aDlgPmjORd1DkwyCup85xFv9 md/fvXE7/rZ/ZdyT+mHt4QU7hohPSHIQ4PSd5RVHkBwZg3Mg76shM8kQizn/2IJNQaTi 4DHbm2JTmTy/uQqdiT0IO8iv2s7BZLf90C0HEZkWInFBREhFnQlhZkaaoj/51mVu3jVB hycNuaCsudNIvFqSITsfzDXS4mmVXbyJDTAJOSqG9SNtfjXosX0VWtQslSH3cn2Kwc6i ObkYDgZd6oJKcQjbQ4PnAKIR7Ul8GBJk6PLXa0B60m1DKWyylB76nCigzyzvfbY/kAUg fdEg== 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:mime-version:content-transfer-encoding; bh=a1XuaInoR0tuPlY8Xeovw7fyTewNoHYbnAtL2fQF1jw=; b=TEsBieKzCbysHr0wuSx3SUeX18x6fs2+P79/ZKUb7VrFqfobYITOpa53bl/FjLKymA DQq3rnKPt9vaxWe76g5N/zTEibdw8wX8kNd8cQQ3lgp0xTGrVZ0BV2uqBwClvhw85sXB RLJMjBhMQz/lhmLRWpjoHHJ8K7I7f0LHEFhC+iEm/WgKtzu+Fcev7/W+CXWiq41YHEs4 kztkDPmlNTQwgH5Ztbtw7j2WtaojAjabICiqXCN9+cti68WBNPjzWmanrvYroR46rcZG eTrquEKvzkfoiBNSPloESHLg1B+cSTrM6m0H8XAtOSyiydn8LpIo/FfsNUvGdpZYqftK hdPQ== X-Gm-Message-State: AOAM531RjBIOrzezzCOk68pXoUTrLcvORUBSIbFW6j/nPDxeEkJLzgbh eNzVa1Er2TMvVMCfHe8l/rmr+g== X-Received: by 2002:a17:906:e84:: with SMTP id p4mr14252657ejf.30.1615200743927; Mon, 08 Mar 2021 02:52:23 -0800 (PST) Received: from localhost.localdomain (95-43-196-84.ip.btc-net.bg. [95.43.196.84]) by smtp.gmail.com with ESMTPSA id y9sm6386297ejd.110.2021.03.08.02.52.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 02:52:23 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: bryan.odonoghue@linaro.org, Stanimir Varbanov , stable@vger.kernel.org Subject: [PATCH 1/5] venus: hfi_parser: Don't initialize parser on v1 Date: Mon, 8 Mar 2021 12:52:01 +0200 Message-Id: <20210308105205.445148-2-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210308105205.445148-1-stanimir.varbanov@linaro.org> References: <20210308105205.445148-1-stanimir.varbanov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 --- drivers/media/platform/qcom/venus/hfi_parser.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.25.1 diff --git a/drivers/media/platform/qcom/venus/hfi_parser.c b/drivers/media/platform/qcom/venus/hfi_parser.c index 7263c0c32695..ce230974761d 100644 --- a/drivers/media/platform/qcom/venus/hfi_parser.c +++ b/drivers/media/platform/qcom/venus/hfi_parser.c @@ -277,8 +277,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;