From patchwork Mon Jul 6 18:37:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 11646679 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4FBE392A for ; Mon, 6 Jul 2020 18:39:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39583207C4 for ; Mon, 6 Jul 2020 18:39:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="v7sin85r" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730046AbgGFSjQ (ORCPT ); Mon, 6 Jul 2020 14:39:16 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:45198 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730040AbgGFSjP (ORCPT ); Mon, 6 Jul 2020 14:39:15 -0400 Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CC80E25D3; Mon, 6 Jul 2020 20:38:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1594060714; bh=fOIJ4Ff6gMAfOdhq5J67E4+fsb5Ps19k26BSCyjUdm4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v7sin85ryvV+Nv7+UZgCYi0NDZkTC5Zxaqf4q5B1u2O8InmxiYcweIPRlx7iGkrwa Td0H1wbdJe1E+PNR9bzwBDZN/VnMuR3/Z2QfB3z7U8s9b9XKDjMo9UTwq3W8bny2fU ghOvZASc5jQwHXncOei73D/jDI+NS6xlAfFNCTsQ= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Tomi Valkeinen , Benoit Parrot Subject: [PATCH v2 102/108] media: ti-vpe: cal: Remove DMA queue empty check at start streaming time Date: Mon, 6 Jul 2020 21:37:03 +0300 Message-Id: <20200706183709.12238-103-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200706183709.12238-1-laurent.pinchart@ideasonboard.com> References: <20200706183709.12238-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The vb2 queue ensures that the start streaming operation will only be called with a minimal number of buffers queued to the driver. There's thus no need to manually check if the DMA queue is empty. Remove the check. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot --- drivers/media/platform/ti-vpe/cal-video.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/media/platform/ti-vpe/cal-video.c b/drivers/media/platform/ti-vpe/cal-video.c index 6d6ea02bf0b2..d10c8c16abd3 100644 --- a/drivers/media/platform/ti-vpe/cal-video.c +++ b/drivers/media/platform/ti-vpe/cal-video.c @@ -512,12 +512,6 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count) int ret; spin_lock_irq(&ctx->slock); - if (list_empty(&dma_q->active)) { - spin_unlock_irq(&ctx->slock); - ctx_dbg(3, ctx, "buffer queue is empty\n"); - return -EIO; - } - buf = list_entry(dma_q->active.next, struct cal_buffer, list); ctx->cur_frm = buf; ctx->next_frm = buf;