From patchwork Thu Nov 9 20:16:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 163570 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp683438vqs; Thu, 9 Nov 2023 12:18:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5mBFUQRCBFLGwYZ2DgRx3VAmR2Pf1lsIyNMuZVXs6a5aagWT241egsy9L18xqzP7XHnWl X-Received: by 2002:a17:90a:9f91:b0:280:37c3:3bcf with SMTP id o17-20020a17090a9f9100b0028037c33bcfmr459958pjp.13.1699561114508; 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=y4u1RLCalWnBSttns9H2D/2Q1u3KkXkuuvF5YeDBJmNzSuh9VqG+C3mRay4ELLoaJt 2wB09RgaH6OGREqXPLskjONlNuertMo+hPWDMb1ShL8x6ds8LrX14hJ+s+BnIz8nzoME 2WbpabrAI4yvZbnE0+ZxYgyQdqRRpjoHmsi9RZE1ZCpd0VfGX2El+HnF45btcmMrb0En PGdsbaZJNSuHgdAUDgPO+cYR3lfbkluPlBrQmQajIJq+0Vk7hNunkrZYD9pijOGlGMJ5 S5/joFZwFy0dfE4d1rrnIEZ0my5u5sRPrpIyn81DHIYXgSkNISHwWmniqJPKWslR9Mme uAaw== 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=zbTVYuvmRUaQtmj4VIv+6MHR+6X+gUKoXAkYu3nSfeI=; fh=M8qUZfOusaea6Ur4z+0hN12yRftygXJFmAmLpxkPNgs=; b=H5BpzmgomLLoQpoXfxoJ70RCEwEo+a6DSlmr2RSaYO9LvK3ikio03rQ9isVPuU/TjI L9v/YQCxsUk27dBx42Yn6Es70MKbhDnbIA7AVqXRtBGLead1RYeis9Gpm2CEgNm88ORJ ZCwnDpDtCE+nam76Nv2oGwUPHuBxqOXxrrgWZ/gp61Q7VWhJ569iGABeed97ozRrnnNH 34RVCTWIRVzRV0jmAZPfYWXSnLyWoxVcKOcKmSvU6o/3ESwyYglC0JfbPcv/YlbagsDi iErmqlTr+MAo6MJI7aqT8ns2sm+O49g9ZO4kkRnypYXi3WUFf+J+tTGd7uC8c+thyo2w mW2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="ZK5e/wDc"; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id b16-20020a170902d51000b001c5e0672f53si6336214plg.466.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 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="ZK5e/wDc"; 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=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 CE00580AB1CD; 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 S1345133AbjKIURB (ORCPT + 30 others); Thu, 9 Nov 2023 15:17:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230398AbjKIUQ5 (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 75E8644B0; Thu, 9 Nov 2023 12:16:54 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 93FD01C0006; Thu, 9 Nov 2023 20:16:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1699561011; 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=zbTVYuvmRUaQtmj4VIv+6MHR+6X+gUKoXAkYu3nSfeI=; b=ZK5e/wDc09qPgtZXCY6x5stZszvLgejTsenovmCcTYYN//u7hv//TDM2gA3Jw3bYHIHuF+ rjIHacq6EC/gtVzTHzcGpbb8DKHjRTnFlQunL08hd+GiWHKs9ezS4SISbT9Qjnnai2DIVN 7RAf7X40ynDSQreWM5dcNUTA2skN5UkEGkyj4Ayi75H/irUJ5uqyCSkJ0ZF0DpKYPiaTL0 oPjp205T8rEmqMUAZ/MOpudemsoEW1oW85DlbLW2pOWo81VHoxr6yUL/0DMc3HA4viHbCG tYOi0Hy8p3grRakL3cCTKL6Aqx+9LYhVnYD15zmD7rjAB2Z1ci+X0W8CwD9LIQ== 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 2/4] media: visl: Hook the (TRY_)DECODER_CMD stateless ioctls Date: Thu, 9 Nov 2023 21:16:38 +0100 Message-ID: <20231109201640.340556-2-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: 1782118995283464187 X-GMAIL-MSGID: 1782118995283464187 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: 0c078e310b6d ("media: visl: add virtual stateless decoder driver") Signed-off-by: Paul Kocialkowski Reviewed-by: Daniel Almeida --- drivers/media/test-drivers/visl/visl-video.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/test-drivers/visl/visl-video.c b/drivers/media/test-drivers/visl/visl-video.c index 7cac6a6456eb..9303a3e118d7 100644 --- a/drivers/media/test-drivers/visl/visl-video.c +++ b/drivers/media/test-drivers/visl/visl-video.c @@ -525,6 +525,9 @@ const struct v4l2_ioctl_ops visl_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, + .vidioc_subscribe_event = v4l2_ctrl_subscribe_event, .vidioc_unsubscribe_event = v4l2_event_unsubscribe, };