Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp177135rwe; Fri, 26 Aug 2022 03:04:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR5JX7FfeqiBeqFxdpWAudzkKLDWztfXtqJWet8nYhUELPW5pk9EURov0xWTRTIxkdi13xX3 X-Received: by 2002:a65:5c82:0:b0:42b:b14:7b4a with SMTP id a2-20020a655c82000000b0042b0b147b4amr2588218pgt.588.1661508267451; Fri, 26 Aug 2022 03:04:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661508267; cv=none; d=google.com; s=arc-20160816; b=QgG9In0QGFXvXMBhCwQFT4OOPrv8Ui4exFxUZV01utYSKwGhd2eVJE4eqIkuNHwRFE EXHmxK68VirdYiPEdRETuJf1luZyT1g5vkqH8ootTD7m+gsW2pFIx5VlKK16CJlVsejm QVo16zovBS82nWAiQNlbbjUQbvIy4I++PJ5OZCr0ohkeJmgWKIHyXjxBaPKC0+nsj82x sOjvFrCyz9Te09o+3p9SvQFZZTnZm+zJBfvkMQ5AxZCYS48dalxbAuYaSkXum4/JkTFY 6yswP54fTmIN8akH3tlu/G4ofJnC64TiA5recSxcp/DANokE9rigBzzW/WzH4GOx7Jam 2Mdg== 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=4NUUlIjHM9Y51ZBHYNbT+B+AuEXi9tkhX4DZHnNGQGA=; b=MoLzemOn4koYXs7adasAoQyr3eY7pnmGv3Ysr+BaRzN7mnW4Trbb4qbRBGtFItTGUU DBRlHH5g7I2lW0D4ge5palYBK4HyIB0ZMq6Nn87fk4+J4tHOqii10za7/rjVK9kXV9xT P68M060lPtCqzbyh6OwQi+pWTcLLE7uYWhB4nKZHSfZezUdC/emQM8YW6XgfHg4/QpqD Lsdonx5hDY1Qz+yuQSMWnMAdiGbiqBlkXTCFnWwHoBfSByU2DnViLbBF/VC1VFaZRc+D KmQCkCGFWCNrnEpCklTDvFH1f0HaN6UivdVRBMJOQ3g+w6+wIrRHPFW5WaZeawede5Vl oFDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=GPv6Cuq9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d19-20020a056a0024d300b0053745aa3301si1568621pfv.14.2022.08.26.03.04.15; Fri, 26 Aug 2022 03:04:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=GPv6Cuq9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344061AbiHZJbf (ORCPT + 99 others); Fri, 26 Aug 2022 05:31:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343921AbiHZJas (ORCPT ); Fri, 26 Aug 2022 05:30:48 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFA281CE; Fri, 26 Aug 2022 02:30:25 -0700 (PDT) X-UUID: 4d7a79a5a5b74586b8783a3898b7f7df-20220826 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=4NUUlIjHM9Y51ZBHYNbT+B+AuEXi9tkhX4DZHnNGQGA=; b=GPv6Cuq9zwC46fpWbUcPl5Dq3Clax+OXImNLUCqg4BIIQIlJjUScMUAfU2JD9D2Fs52Ytc+3FwM5qGttuQqh9A/ng+pXrfIIiT00NhQA+Ks3FYEyZFdaZYw7Rw6dql9jlxnVwkcNiVQd/keEod9ntxMmaHKh14Cu6aP0YaOxs8Y=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.10,REQID:7cc3d7b7-e06a-4a0b-8711-ceec61604da2,OB:0,L OB:0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release _Ham,ACTION:release,TS:-5 X-CID-META: VersionHash:84eae18,CLOUDID:ac653320-1c20-48a5-82a0-25f9c331906d,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:11|1,File: nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 4d7a79a5a5b74586b8783a3898b7f7df-20220826 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 820820441; Fri, 26 Aug 2022 17:30:18 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Fri, 26 Aug 2022 17:30:07 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Fri, 26 Aug 2022 17:30:06 +0800 From: Irui Wang To: Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tzung-Bi Shih , , , , kyrie wu CC: , , , , , , Tomasz Figa , , , irui wang Subject: [V13,7/7] mtk-jpegenc: add stop cmd interface for jpgenc Date: Fri, 26 Aug 2022 17:29:56 +0800 Message-ID: <20220826092956.10340-8-irui.wang@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220826092956.10340-1-irui.wang@mediatek.com> References: <20220826092956.10340-1-irui.wang@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,URIBL_CSS 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 From: kyrie wu Add stop cmd interface for jpgenc to stop stream Signed-off-by: kyrie wu Signed-off-by: irui wang --- drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c index cd38b02648af..7ef762496556 100644 --- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c +++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c @@ -613,6 +613,9 @@ static const struct v4l2_ioctl_ops mtk_jpeg_enc_ioctl_ops = { .vidioc_streamoff = v4l2_m2m_ioctl_streamoff, .vidioc_unsubscribe_event = v4l2_event_unsubscribe, + + .vidioc_encoder_cmd = v4l2_m2m_ioctl_encoder_cmd, + .vidioc_try_encoder_cmd = v4l2_m2m_ioctl_try_encoder_cmd, }; static const struct v4l2_ioctl_ops mtk_jpeg_dec_ioctl_ops = { @@ -1391,6 +1394,7 @@ static int mtk_jpeg_open(struct file *file) } else { v4l2_ctrl_handler_init(&ctx->ctrl_hdl, 0); } + mtk_jpeg_set_default_params(ctx); mutex_unlock(&jpeg->lock); return 0; -- 2.18.0