Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3222535rdh; Mon, 27 Nov 2023 08:57:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IH4tkCtubOi4YfJj3IYEH8833H6XnkZI/xUZaJ8IHVxf36fcFv5w+KwiyH1rz1CxGYSDSCf X-Received: by 2002:a17:90a:b946:b0:285:a734:f0e with SMTP id f6-20020a17090ab94600b00285a7340f0emr5669753pjw.39.1701104224406; Mon, 27 Nov 2023 08:57:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701104224; cv=none; d=google.com; s=arc-20160816; b=G/rpzp3SEZ3R+LGnhtFAMC2g4lTLLT+JSulGCQe6OaXRsIdyleQ48snZloI8um26Sr eHUwQF0j/f5WT3bg2gDFwM/GCxhX/cx+PWJpfgNE+vS6Fx+FV8dL3Jx+qBx1GRdr/Xlu /WWcdBMfwYRged/bZZNwPWB6BCK6Npp7yWQ03iz9cQ8hOzSF9/pBCRs13HM8PTqWat72 mJdFc3KV3Slynt3DblhqNH4S2btpGjar024wxDlSSO9Ccz4LCLDMHY7rnL0AASt7yl+u Nt/JXbEQ0RYWml7XhZ0+/Pgcq4HFOi7q2xQO8Yh+9B6LeM8Kho8ZRHPLeFuhJEhXKcxn 54Aw== 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=hU+X0RUAC9esVidQ/yn/ESBumqnHQqVWpkWOugkfS6g=; fh=1G14ja0N/gmjq+ba9Y73sDvqtNnP4Tgplds/+tu011I=; b=te1563qvxVZ0EsYNmmNEDu/bwtYbHYEzViHBKXemAxSMHaNEz4f+bR0qhqi/fQP9BX fDrsd+vihoGOlZ0AkYJwtdaktVmu5ZGh+r6CKhSPL10Ka1jBhRgPuPssjlZYHvqheYj0 M4y8hEgUtTTu5ypkDZOmFldvlWLTUOgat/jbnglOGeYLGwGsv7A9o3eJBNLv2qGC+F+W FLP0eL5fDL7hQoz1XdlL1rqOkjorojD+tDvpZexaERC/Ec9a+BVAXLA0DVIvEr7zPiXB eH5QwGCgupUThF+PuneLz5r69PEc6JG4Tck/ZMAKYeoB62PUYcONR3rCmirqpmosOJLZ /+5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XBGt7xdM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id fz4-20020a17090b024400b00285923a2797si7549112pjb.106.2023.11.27.08.57.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 08:57:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XBGt7xdM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D884B805648A; Mon, 27 Nov 2023 08:57:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234192AbjK0Q4Q (ORCPT + 99 others); Mon, 27 Nov 2023 11:56:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234445AbjK0Qzn (ORCPT ); Mon, 27 Nov 2023 11:55:43 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EED6619B3; Mon, 27 Nov 2023 08:55:21 -0800 (PST) Received: from benjamin-XPS-13-9310.. (ec2-34-240-57-77.eu-west-1.compute.amazonaws.com [34.240.57.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by madras.collabora.co.uk (Postfix) with ESMTPSA id 0D86466072C1; Mon, 27 Nov 2023 16:55:20 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104120; bh=QToV8lElzrqp6zWG2/Ij9Fy7YYCaGPBAPbmtKiSOV+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XBGt7xdMVEDvZuVk9Ad14jb83KoEdPpGetmdJSap2lBA2z5MJ403Xorerc4Bnbt1J fMUQrg/YddUn0oxlaDoWJ8uL25YiWdqYKXzah8zc76vIuqATvru2IgmKIz3v4O/GE8 md/ixY3FvptKrTjOwT0L6St5UlZvDV4DWTKm6ZOPPpwrEprsmKVRAnQBjz4wtiaNSp U1QUNctewxrMvCLj7IzvCbP3+xTxNvobqU3TZAnO9VZr5HD77oypyU6GEzcibztO5b p4Cat7dlxH/Sx+i9JGbFd3+rIlZJTGjE8ouelk/vcaO0fw0hSNhicljgodjU1Bw+x5 uBbSq6hrdGDEw== From: Benjamin Gaignard To: hverkuil@xs4all.nl, mchehab@kernel.org, tfiga@chromium.org, m.szyprowski@samsung.com, matt.ranostay@konsulko.com Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, kernel@collabora.com, Benjamin Gaignard , Chen-Yu Tsai , Samuel Holland Subject: [PATCH 19/55] media: sun8i-rotate: Stop abusing of min_buffers_needed field Date: Mon, 27 Nov 2023 17:54:18 +0100 Message-Id: <20231127165454.166373-20-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231127165454.166373-1-benjamin.gaignard@collabora.com> References: <20231127165454.166373-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 27 Nov 2023 08:57:02 -0800 (PST) 'min_buffers_needed' is suppose to be used to indicate the number of buffers needed by DMA engine to start streaming. sun8i-rotate driver doesn't use DMA engine and just want to specify the minimum number of buffers to allocate when calling VIDIOC_REQBUFS. That 'min_reqbufs_allocation' field purpose so use it. Signed-off-by: Benjamin Gaignard CC: Chen-Yu Tsai CC: Samuel Holland --- drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c b/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c index 0b025ec91826..14cd0afd7c6a 100644 --- a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c +++ b/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c @@ -536,7 +536,7 @@ static int rotate_queue_init(void *priv, struct vb2_queue *src_vq, src_vq->io_modes = VB2_MMAP | VB2_DMABUF; src_vq->drv_priv = ctx; src_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer); - src_vq->min_buffers_needed = 1; + src_vq->min_reqbufs_allocation = 1; src_vq->ops = &rotate_qops; src_vq->mem_ops = &vb2_dma_contig_memops; src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; @@ -551,7 +551,7 @@ static int rotate_queue_init(void *priv, struct vb2_queue *src_vq, dst_vq->io_modes = VB2_MMAP | VB2_DMABUF; dst_vq->drv_priv = ctx; dst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer); - dst_vq->min_buffers_needed = 2; + dst_vq->min_reqbufs_allocation = 2; dst_vq->ops = &rotate_qops; dst_vq->mem_ops = &vb2_dma_contig_memops; dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; -- 2.39.2