Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp404751rwn; Wed, 14 Sep 2022 23:55:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR5dGqEMPF0YEse3VxWb07kaX/n99DtF4xHa+zJNqqCTzOFi1I5xqW35WPfNtXPmBFS7/FoW X-Received: by 2002:a17:90a:4f4f:b0:202:7ab1:46ec with SMTP id w15-20020a17090a4f4f00b002027ab146ecmr9200563pjl.32.1663224953314; Wed, 14 Sep 2022 23:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663224953; cv=none; d=google.com; s=arc-20160816; b=Hkxo7n4kaLZt7TBRjlBt+2YXhsBLnnNCMAjrKW16bmd3fDWWO7nRef0wkWW9chG0Iu thb7L0m0/hSAUNaLsZYQGVbBNccyiFsyLGh+K2N3bDsgVWo3LTCG9n0LlylfhZBckRdK F6+eYD8mnljsKTMyW5EhNLgebPLL28hV8ImQhFI8AOn7NyORcU29h5fBqv1QUO5sRdSG SRa7WtFfhQelKZoiyDu4jJFBvOi8l13iE1EfdtQqWZq/I6Rh/17q7rCVy1eLtHkvx2cw QYZkm7kK0YfpdRwf1/LvF3oltl4Q+lni6a+Mhk1vBBZ6+qi7E3JWaIUF5WczMn/71FI4 EUNw== 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=Q4wLYBW96Tx7o8A1V5stxuh2HtcfnqFvSW9gYmXrIWg=; b=gPBDlUhOnvTHpH6FFtcmL01TyPWbCm/cMlGWJU0yjNfdsK0sfpptfBkVlp4WY8LW+l VUMoJrXoL/JS0GuFs7o55DwPDZLlhFDxDEln9OKwmd4h33U5VP3ErHbjwMDp0m1iNiPh nfA7GK1/86pcU+PQ/5ezjxvwUCFWl9Hi8rxdBs7gIZdD6Nhno3vq3tbnuhKVaAox3k/u RJDHi6WmlFHKXhelkVZKYSap5ejlzaC9JJDcPMbqU/Ft/W+/yclfBXn9saxb4+IDrHy+ QN54IFBrFY0yYyWABX4tHcPWKTA+sqxeCdSLOzm7aIncVfjJKYHTs2zrSW6v4sZl0+H5 J4MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=e2NbcXt5; 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 v17-20020a170902d09100b00176b4e9985esi15958343plv.439.2022.09.14.23.55.41; Wed, 14 Sep 2022 23:55:53 -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=e2NbcXt5; 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 S229938AbiIOGpD (ORCPT + 99 others); Thu, 15 Sep 2022 02:45:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229736AbiIOGoK (ORCPT ); Thu, 15 Sep 2022 02:44:10 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA6E795E6B; Wed, 14 Sep 2022 23:44:07 -0700 (PDT) X-UUID: ba7e8eac1a50466ea8f3a67a8ccbd895-20220915 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=Q4wLYBW96Tx7o8A1V5stxuh2HtcfnqFvSW9gYmXrIWg=; b=e2NbcXt5Nmx5QcNK4gBVxGU5kEo5f+N0bniKVD7FsB3zCtfe2qMZdzphsZbKHXCHQIC0EuAIwTRy54oZF/OlKbN7IUD2FcqELru90D4Z8z0IJL/ApLxJTx2LlQG2wUDS7EfiuoE97umIUHwynZfl/7PXPZbkeRNMkWw1DLIyuB4=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:cd66c243-0951-45df-ad6d-4d38eed0e990,IP:0,U RL: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:39a5ff1,CLOUDID:8c91bb5d-5ed4-4e28-8b00-66ed9f042fbd,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: ba7e8eac1a50466ea8f3a67a8ccbd895-20220915 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1463837170; Thu, 15 Sep 2022 14:44:02 +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; Thu, 15 Sep 2022 14:44:00 +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; Thu, 15 Sep 2022 14:43:59 +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: [V14,07/15] mtk-jpegenc: add stop cmd interface for jpgenc Date: Thu, 15 Sep 2022 14:43:35 +0800 Message-ID: <20220915064337.2686-8-irui.wang@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220915064337.2686-1-irui.wang@mediatek.com> References: <20220915064337.2686-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 0d4e7220e509..e60363e38a90 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