Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp444123pxb; Thu, 9 Sep 2021 04:44:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfb8VjetjWG0/7PPlt/ggTdmdSERvpeiz/gZ+k743i7rmjUzcVNh1b9RHKEHREKbqU256N X-Received: by 2002:a50:c90b:: with SMTP id o11mr2756721edh.216.1631187867242; Thu, 09 Sep 2021 04:44:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631187867; cv=none; d=google.com; s=arc-20160816; b=xDE48q5A5QznltVSuEfPuDEXLQSm1Amk7aK/nlRrmTj4/2OG5DRT67Iksteqe2Bl/O 7fL27ItCqpgc2476MFX84lXWuA/Mm4kBNrnefoFbkTRbCQGCmTPvrSpTS7V/1XXkNQ7s a4kwwq5G10gknzIBXI5u8D4+d00rsH8jxYiqqEKf1g1a328uNPNItfaMXtdUZtBk+PDZ nc/TK0DgjCdrv6rE5n47koQz1fQk7DjWNQ7m2gKD1YMCsWvEhvTHJCb3oai93TqQGxV5 dSuF0pmogRNZnqm07zi4egAedFrr/FNVhUbarfoqWB9jwgAzo9sAH7PXbgUqRT1q3XsF mXHg== 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=0aQUs0erY4Lt03bgqhJcRHv8fSF+/egz6Rq3D953kXA=; b=LfqFyOdejV6nZLVio0SA6WCxqH1+7htpqpb+31RC03NaynrhOD4PTYNV2A5jg2aYId gSqQoOeMo1aCbZqgPI89u4cHYaEULEMNMsSr/FVkFiOjXi4yA/b1GmZYvM64O8z14IFj Nl4E3dUE1ZcCvTQG7U2pY21MT/0hSEVjNe7W9/W1UDZ47FKlexLHUZnV9o5wYcxKKWoc e0u34LFL5r37tiupcI5862Y0/YchOmQPYoAD7ab3KyLz3YBQz7NpazLhQ4kTrGKsMwKU frJ4US04f3oLBS1QROjzCcZNMd9wq300zZdkv9hvIgqx4IZhk6V75dPjlXDd7zr6Au78 sUWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UJnX+DF3; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v28si1896313ejk.276.2021.09.09.04.44.00; Thu, 09 Sep 2021 04:44:27 -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=@kernel.org header.s=k20201202 header.b=UJnX+DF3; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238185AbhIILn3 (ORCPT + 99 others); Thu, 9 Sep 2021 07:43:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:45990 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236625AbhIILmh (ORCPT ); Thu, 9 Sep 2021 07:42:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5204A61100; Thu, 9 Sep 2021 11:41:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187688; bh=c323T6Wqo3q2L7ddcaBBJ9RIMgtHs3MhyoR6BFl6Kgw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UJnX+DF3+lVVjdkaxIpgJToh/Y66Oa7vLQO+LBE8kYIczcwpb+/N0iMiZzI7cIQuR DyXLI+/pwd/iQs2u+vtPdKaGh9T5U+2jfKKY3nWgLJtftTL7AjceSU2tt4v6LwJLIU qdQmGEUlAtPf1k8eafIh8GSxgYWlGb3lR3ToTfllCoXegK97W/vYlCAyC/ZuvMuJJS ceqyjnON5PrYcjhmh78N7cDQUwwakwoz44GwLSyO2F/4pK+5Dn/n++pfM5t+den9Nz /+oiu5AxMBPT5Q1SGJI8P5UrP8qcA/yySZw2nctzEADLxHR1FYe3HCRr1TfXULJnhk zdSGQzLMUw+AQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tomi Valkeinen , Laurent Pinchart , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org Subject: [PATCH AUTOSEL 5.14 016/252] media: ti-vpe: cal: fix queuing of the initial buffer Date: Thu, 9 Sep 2021 07:37:10 -0400 Message-Id: <20210909114106.141462-16-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tomi Valkeinen [ Upstream commit 892c37f8a3d673b945e951a8754695c119a2b1b0 ] When starting streaming the driver currently programs the buffer address to the CAL base-address register and assigns the buffer pointer to ctx->dma.pending. This is not correct, as the buffer is not "pending", but active, and causes the first buffer to be needlessly written twice. Fix this by assigning the buffer pointer to ctx->dma.active. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/ti-vpe/cal-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/ti-vpe/cal-video.c b/drivers/media/platform/ti-vpe/cal-video.c index 15fb5360cf13..552619cb81a8 100644 --- a/drivers/media/platform/ti-vpe/cal-video.c +++ b/drivers/media/platform/ti-vpe/cal-video.c @@ -694,7 +694,7 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count) spin_lock_irq(&ctx->dma.lock); buf = list_first_entry(&ctx->dma.queue, struct cal_buffer, list); - ctx->dma.pending = buf; + ctx->dma.active = buf; list_del(&buf->list); spin_unlock_irq(&ctx->dma.lock); -- 2.30.2