Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2489938pxj; Mon, 10 May 2021 04:21:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8TLscvl6l4i2xv4VcGQLoMzUqE9luw1O5UAnd8mQ6yqdmA9jn2UZDGc1YO6VyBwQ7hj35 X-Received: by 2002:a92:c80d:: with SMTP id v13mr12748515iln.247.1620645677045; Mon, 10 May 2021 04:21:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620645677; cv=none; d=google.com; s=arc-20160816; b=Ne4tOr1Sq6Tqp6qxHdQRCs3E9Eo9V2AIyZn+SAmuhgRbK6dYA9gEdnjneyVwMDBg++ wsbhqtc7fgEoIlgMpRUosI7Z5n9Q/XhUnrlDeKMFRDGtIzZE+/kuCc0etAB2VIEnLExu 1x2Be0ebDqrI+wyGE5P0IFFksHMMMe1Zwb38YpaZeJTPG4B3WwY8Wf5zGbOiz7OY0v5A pZIT48M3AeDzcLaE2vagjcIiXfSC1UUfJZ0aV3kAj9lDj/Quf2HlMZ1B1BmQQeT0FlAu /wFJggQu6I0uvp7cvtNCCDP1C0Gr1B+0nYi3eB+WEJAPZW/K211uyXlIEb66Q4cBmzT5 viHQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=U1UN/X9GFJyB3g8rLIGh+fPPjSS6soSgfm+tlnK5b/0=; b=Pv20TH9RRoI1DETMbCypa0K3EL7tf8AzwBffo6DarvAKYIRqci2Cg2Ed85JfaaYni3 yP8Fb2PCn5cOjWY8eNFn0a2v4FLVHDG4ZMSy64TzoC0HGjLJ+eK/bxoOUBj0CH/MQCkP 6yZ1piW8AjI+ZS2oDOeTZgl39Hm9PA9uyUZvwn9C/k+UyCGwgB40B7jqDymw6K7j8Zqh Qf0votdMlBtQ3JhlTUq+/YYo2d5Q8ngo8pju2dPIxt3PR9+YneXTnSqiF2h7GbNiiyW6 z5QWdYxW51tRi/VOEyU2KtJPEdrDujOXvzccSkdSMh/wbmf34RzootXxR+caXM2UiZGw IMPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XBpHrOD3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n4si15260719ion.59.2021.05.10.04.21.03; Mon, 10 May 2021 04:21:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=XBpHrOD3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238652AbhEJLSX (ORCPT + 99 others); Mon, 10 May 2021 07:18:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:46508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233791AbhEJKzN (ORCPT ); Mon, 10 May 2021 06:55:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 738B561C20; Mon, 10 May 2021 10:42:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620643350; bh=w56GKKRSKsUXp2KwYjgoI/xukSB8s82weg6AdfZw8fE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XBpHrOD3Wy2x27lDmkuxLiOevsF4uxt+2g52KjyV4VzNmHHCCbU0cvwmc/EGgK8uF QY1eW0lhgYkeGERsPq8v7MHRfnv0dp4HY7n5CpBxCWRrlizVeYoXmsj+SQocZ+4m1r lPVz1Y+5f7JqtT81x0/b6/yNr7iJbyHmZzskNSW8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stanimir Varbanov , Bryan ODonoghue , Mauro Carvalho Chehab Subject: [PATCH 5.10 280/299] media: venus: hfi_parser: Dont initialize parser on v1 Date: Mon, 10 May 2021 12:21:17 +0200 Message-Id: <20210510102014.181272991@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stanimir Varbanov 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 Tested-by: Bryan O'Donoghue Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/qcom/venus/hfi_parser.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/media/platform/qcom/venus/hfi_parser.c +++ b/drivers/media/platform/qcom/venus/hfi_parser.c @@ -239,8 +239,10 @@ u32 hfi_parser(struct venus_core *core, 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;