From patchwork Thu Nov 9 20:16:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 163569 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp683435vqs; Thu, 9 Nov 2023 12:18:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IHUpbANovGCe3Rxusca/YSHXeTS7yLBDJtoiGProrz8jeyA0ay9z/wjlAkLFBAZf5Ft6aw0 X-Received: by 2002:a05:6a00:1502:b0:6c2:cf23:3e2a with SMTP id q2-20020a056a00150200b006c2cf233e2amr6477639pfu.9.1699561114284; Thu, 09 Nov 2023 12:18:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699561114; cv=none; d=google.com; s=arc-20160816; b=p9C/uF16xehhd+XZ2tsBjpBifobxZBQC7c+ht44e0MD3ArZ7itX4DxZABbwGhHtwus f/XBExykxAXuWFgGMeYlbN7CYuWdpUa9tm6gM9uxqi52f8is3DT5pclof1qeO8EeTUWX NW7a0Hr+Ad4TTRVHK/VBEtan3LNsOrHirJSswv6nQdbG3cOX+pT5dbzCng7gJN9PoiCk 14Dio9JCps4+f0ZpFeVeJ0ZB1w7YHbq2j13SKmDYgVK4unZ0h11gyM2tir4nymv76szJ ua4SUTu0IzxLyn8hZiQH1tROX545icqUFITHb3GR+ZwnnchLqZ2El3YEnexRN9m0o2XV BCdA== 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=g44nGM0ulGdPmsKjAGuOOVpTRwfyVkwDcA7l+uwsI6Y=; fh=M8qUZfOusaea6Ur4z+0hN12yRftygXJFmAmLpxkPNgs=; b=SuDZcPDV75EQgbTxIZfkkxxCTDlXICIarVc7VJ6ku4fgBXdnt3/fdBy+HwFgcwsoCC C2O4lG7o4tWPbw9SpYzhhlQL9wZjcm2hS+U3kSSISTXMxpIuPW29mbNWvL9dTfuFGfJF mxrid0eMKZXobhS6m2ekXgevDy4thGJ+Nt9Ag1q29j55G6XmrGrhsPiPB2RToQHslC3u WikuLetsOm2aUi5zUWvYjSelvN7a5UWJvP5f8ErR2rKDg0c9fpryxUC8sJXIXJZmNs0Y F7MRTMap0CI2nUQr9eVZ1U8G7YL3oZJP8Jvo9k/RN7I7UdP/tdq5AU+s/joopiDiJLSR 3Uow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=j4y3CJax; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id u9-20020a056a00158900b006be1a0457d9si17160374pfk.10.2023.11.09.12.18.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 12:18:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=j4y3CJax; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C2B1E804E2F2; Thu, 9 Nov 2023 12:17:17 -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 S1345150AbjKIURD (ORCPT + 30 others); Thu, 9 Nov 2023 15:17:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229613AbjKIUQ5 (ORCPT ); Thu, 9 Nov 2023 15:16:57 -0500 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75D643AAC; Thu, 9 Nov 2023 12:16:54 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 21C8F1C0008; Thu, 9 Nov 2023 20:16:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1699561012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g44nGM0ulGdPmsKjAGuOOVpTRwfyVkwDcA7l+uwsI6Y=; b=j4y3CJaxX8sR0enPCYnGV1fGz8oN1sM4XbJlVX4NqPWbVT5itq0mQqJKJ3qb65iombJ0Qg U0SBXeRsB0rdLBHMCcibN7qfOGH751/DVhyjiNW1uMYec8gaOW+PHWN30NQqUEGGd59Im4 GeIuTsJVRL0xDEslefgltpHiis5nVxQAzQxWTYou9/IZQ2rww6Q2RLiSMBO8lgPjBSwEhT VxdQVRGUwuEcHjVwiAQBpKLAozY0L5Ehu0XshlsF11RN0z3Kvfm8dsILxjzK+E406YFmK4 FI2GZEBO3R5WjEbx+CY0g3d6avWTlHAK2U63zjw6u81ikBCoAxHzX8unGdhzvQ== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: Ezequiel Garcia , Philipp Zabel , Mauro Carvalho Chehab , Hans Verkuil , Daniel Almeida , Greg Kroah-Hartman , Nicolas Dufresne , Sebastian Fricke , Thomas Petazzoni , Paul Kocialkowski Subject: [PATCH 4/4] media: rkvdec: Hook the (TRY_)DECODER_CMD stateless ioctls Date: Thu, 9 Nov 2023 21:16:40 +0100 Message-ID: <20231109201640.340556-4-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231109201640.340556-1-paul.kocialkowski@bootlin.com> References: <20231109201640.340556-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: paul.kocialkowski@bootlin.com 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]); Thu, 09 Nov 2023 12:17:17 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782118994975015043 X-GMAIL-MSGID: 1782118994975015043 The (TRY_)DECODER_CMD ioctls are used to support flushing when holding capture buffers is supported. This is the case of this driver but the ioctls were never hooked to the ioctl ops. Add them to correctly support flushing. Fixes: ed7bb87d3d03 ("media: rkvdec: Enable capture buffer holding for H264") Signed-off-by: Paul Kocialkowski --- drivers/staging/media/rkvdec/rkvdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c index 84a41792cb4b..ac398b5a9736 100644 --- a/drivers/staging/media/rkvdec/rkvdec.c +++ b/drivers/staging/media/rkvdec/rkvdec.c @@ -461,6 +461,9 @@ static const struct v4l2_ioctl_ops rkvdec_ioctl_ops = { .vidioc_streamon = v4l2_m2m_ioctl_streamon, .vidioc_streamoff = v4l2_m2m_ioctl_streamoff, + + .vidioc_decoder_cmd = v4l2_m2m_ioctl_stateless_decoder_cmd, + .vidioc_try_decoder_cmd = v4l2_m2m_ioctl_stateless_try_decoder_cmd, }; static int rkvdec_queue_setup(struct vb2_queue *vq, unsigned int *num_buffers,