Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1917319pxb; Thu, 16 Sep 2021 20:11:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznVYUOtHG7XqYwgSNf99rxNI5l3SdV5465ebXinV3Fdzsf4X2s9f3S1H8VRqKoDdSm+VE8 X-Received: by 2002:a17:906:12d8:: with SMTP id l24mr9584813ejb.126.1631848301446; Thu, 16 Sep 2021 20:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631848301; cv=none; d=google.com; s=arc-20160816; b=u4VZC9LPr9nVvkIFPVMQRCas5Q4014UHJ63T+kAZpnJrf4gDgeXjslk2Qzk+aV1diH RGJ4z5tCnp6LfJfoYB9bPnl0CjXNVRiGlHcDhBEckuOnKjGcI46Sb4YETEa6rDyb1piG qTuyz0WpyGc+cDHmYGJ5XADaecdeixiZlTJNP7CutCxq4Vylkj8xXZ1d9kbI7Xmm6QVL S58dXi0I57s4guNibAAQN1XDCmN9NGkfyjzFlMemVJ9broFYpnh5nRxxkvJ0NnaKtvqt csGrijTSA7x8wbFmPnS75QoPMVZJ2AnGX+L/3IgWlnQuojTwf3MoSo6dTHQW7N5sSVnL xHiA== 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=0aQUs0erY4Lt03bgqhJcRHv8fSF+/egz6Rq3D953kXA=; b=Mi4bP0aLgCG1tm4umv5CBAjIIsGk7mr88WM0UHiau423QsCYr8MY2za6R2bxA++efm kskbzm11YDNKHURPfZ2SpHz3FDAnOfretwAd5Nm1FIXGAO9Aie2bykK+Xz12vvCvnCky dQookjWTnV1pQSUzb0fnCJiN35o47wDD5oZgmr7KpyqfIKaN0HyGlzqHPvQdaVF7a/8d aieWx8X5ZW8HwgQ7+95JtgBaY6vZFzhhTcbSlfOTWJHloLVFZKL+tFEWF3GRmY7945je yXEH56O+1bN+OgrMsdL45uMatAaCzHwOh6ydD3Hbe2nGc4QKHtUj4gMuDltDVKSUsW2J 1R8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fxMamucK; 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 h24si6310132ejt.376.2021.09.16.20.11.17; Thu, 16 Sep 2021 20:11:41 -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=fxMamucK; 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 S1353068AbhIPR3y (ORCPT + 99 others); Thu, 16 Sep 2021 13:29:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:43650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351987AbhIPRUI (ORCPT ); Thu, 16 Sep 2021 13:20:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2697E61B98; Thu, 16 Sep 2021 16:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810518; bh=c323T6Wqo3q2L7ddcaBBJ9RIMgtHs3MhyoR6BFl6Kgw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fxMamucK7TAu2dFpZiFyHYdo3KPkXdLz41PYiM7jIAl935AMyMZtHi53fOUkbSNrK xQZR4dbxvF+h3fiXyNr/RzRan8CFhbw3V7HgrEuyjcskSoht/aTAvXJzqVDYJJoAfN h4Rt71sssHF4AARbKGsQ6YsDTMF+k4brJj89CtyQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tomi Valkeinen , Laurent Pinchart , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.14 171/432] media: ti-vpe: cal: fix queuing of the initial buffer Date: Thu, 16 Sep 2021 17:58:40 +0200 Message-Id: <20210916155816.535673741@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@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: 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