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: 742724 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C50ADC4167B for ; Thu, 9 Nov 2023 20:16:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345139AbjKIURA (ORCPT ); Thu, 9 Nov 2023 15:17:00 -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-media@vger.kernel.org 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 Reviewed-by: Daniel Almeida --- 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,