Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1778890pxb; Thu, 16 Sep 2021 15:40:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTfuIRbQHEnDd8H1TlMEzGHNtUQoRV5TYxmkKKqGa1NdBG3zcuEoHLYSqVWy2DzEvRhLbE X-Received: by 2002:a6b:ba57:: with SMTP id k84mr6022730iof.131.1631832034932; Thu, 16 Sep 2021 15:40:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631832034; cv=none; d=google.com; s=arc-20160816; b=MBvfM/8+dK3veXo4sP03DwRUsGefcNy9/fKqVFgUmUihFOAi6UuzlCG4Mb+VghYRAA FiLHkz8doyzFGHxnwywesk7L1ZjuHw6LmycofswAfyn0SZhmGO+trXlMNEXmxk1Q8hXo FArj/t2drxIQPHTdE6HM6CqOOsigAilAObssHWz1NCceywlQEG3FnauNTV38Oxgo4+Th DcLZTFeSzYdGgYj/fxxeJQkP4xxSdAe3PRvJ/aU487omX64Kf7YLZlP1u2fmVIzj3hPJ MJqPQyhfpOvZP04jbYB5nnkh/Rs4EmEjM/FL+3VbO1P8GIyfXGyrBmSKdhPcV3Hj13dR Yalg== 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=eaB/vyYsd47C82W8o+q39WaWvysQ+5UU6YPxEWOBI3k=; b=J8FF8dIhq+GuYsXnD6Rct+FEP6cDjHdu1ufMqiE7/NAGCkw8XPvUb6ki9Q00LeDe7N i900unvBAKf2nsj1uPY9XXwE2ggx5AJUj+t/0+3/kz1n8OHoF8ecmmdgpEOfekWIZB2q o8gZGY4Ol4A/SP02ppNrEP9GFsSzicqxyAcyJhoLCIaZfZ8csx8nw5WOzJnGcDduD8Rl bqmIT3T/kOBpJ055rgSbntCN5HBtoWLV+6LqWns8mV6i+I03a+bqD7YeI0Tdil4z1iyF 2pDVDZdqO2TP9yH402xzO5rFyY7zousd49RQKgeaQfGJXwIkVOEmh4scMwhwBpMlr5JX BbJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RXNGtmsr; 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 r11si4236992ilc.144.2021.09.16.15.40.24; Thu, 16 Sep 2021 15:40:34 -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=RXNGtmsr; 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 S244887AbhIPQsW (ORCPT + 99 others); Thu, 16 Sep 2021 12:48:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:58604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343662AbhIPQnb (ORCPT ); Thu, 16 Sep 2021 12:43:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9E0B061A51; Thu, 16 Sep 2021 16:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631809507; bh=QPnP8Y83eXrqB45XfSTnst6zMUhMxU7dGsBKRkwtUKA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RXNGtmsrHB+DlPWMYDMojhiQV7sLEhDFXzw7qoFVLznH60tVoMgM4c+vSoQMAqwRl FhnmbddxUuLIrtYq9kQTeT13z4eYsWJkEvMQ8SbGmfTpDQ+q4f7pIkIXyKbATfuWL1 /twUTSEAJe3izlXdb7SUIE5O/TgCyYD0T9YD68xM= 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.13 148/380] media: ti-vpe: cal: fix queuing of the initial buffer Date: Thu, 16 Sep 2021 17:58:25 +0200 Message-Id: <20210916155809.096006550@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155803.966362085@linuxfoundation.org> References: <20210916155803.966362085@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 7b7436a355ee..b9405f70af9f 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