Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp585171rwb; Mon, 26 Sep 2022 03:17:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7KYTSjsZHDK6W4Hz7yf6/Gro3iWn5Yogv0NnFCdiywjFGaxxpS73gA6hfqqh4kqKcSm8uk X-Received: by 2002:a05:6402:510f:b0:451:624f:2f02 with SMTP id m15-20020a056402510f00b00451624f2f02mr21427615edd.40.1664187434418; Mon, 26 Sep 2022 03:17:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664187434; cv=none; d=google.com; s=arc-20160816; b=QimoAbXGqAINZJPSPNI3h9FUK3rfJp39RNONKwESP/u1H6WQfrJqS0+nHB7sVMVpMi Dn5bw3aTo1HprDMDwXl4aBzGjdtXI42NR0Hfxf95zxQH738rzRovT18w5Ko36zb0VoRg KjL1nFQdnxH6ZtTj4FriYZWO/JS3QLT7G30VjxFb74DnNhsWFFwlLckwA6IFI9SNwUn1 j//8Zr5mtvnd01Y36+3bk9u7VZfIMq5uVSiLA/IIspGxQWj5LIr85DYEIWR92VWVX/ac i8EWZWZ1SSpKnoAhv7p+2o10BdbTu57upSly0u8tiumiqpXGsyZsCodLj+eyvQl0qm+d 8e/g== 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=NBR8QmUeMiBDVZLr6HKkZ0PuOOzWjo8Y+R0R0H2lhBU56soEkdwvQKwH8P2KYdtVIH U+xN7TZNT5zPoZQdxY0TVmQzDVWO0dIfwV28hJQaE7c4UcmyUBUIV7FxcxeHgEqR/Jfw 08uzUCfNmtW3nkoMTPunBgKoO0ziyVn9DTSLKIrDxmfKPXvLDPiftiSRvHHtC/tthi/a Cy9C7XirA/tEX6b5rKZLb2EwdXyaKOukaujlLu9f292MEpJeuSt8zbSGXXG1w+oI5v2B h+3rsvabnMVTzS8XSTKbmnbtw81A6AR3TdVppZyrERWDK3bfIQ0qxOD7CK1TU9PkKT3F D3YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Z9riln7Y; 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 b6-20020a056402278600b00445ec4df14asi16892010ede.173.2022.09.26.03.16.48; Mon, 26 Sep 2022 03:17:14 -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=Z9riln7Y; 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 S234817AbiIZJQW (ORCPT + 99 others); Mon, 26 Sep 2022 05:16:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234853AbiIZJPI (ORCPT ); Mon, 26 Sep 2022 05:15:08 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D72FFD25; Mon, 26 Sep 2022 02:14:52 -0700 (PDT) X-UUID: cb627817b5614d0b84e0cc4d64da1ca1-20220926 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=Z9riln7Y3UKjqrWqrvFAF4QJSd8cAtvrabfvYnmFXtdE0AUffmorDdK/XxBFPhnFATvGpLlZc+fK1uBWewUqQk26OO/UIdj44la1XoGwzQ//4z+jJijvm7FT5Vl35CqN46t557vA0PH8rYq5vdEVLNPJ3c4PncEwVrowhWuPtpE=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:84ee23b8-28b9-4c1e-bd97-90ea1ecda69b,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:678815a3-dc04-435c-b19b-71e131a5fc35,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: cb627817b5614d0b84e0cc4d64da1ca1-20220926 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 1537042739; Mon, 26 Sep 2022 17:14:47 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) 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; Mon, 26 Sep 2022 17:14:45 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Mon, 26 Sep 2022 17:14:44 +0800 From: Irui Wang To: Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Krzysztof Kozlowski , Tzung-Bi Shih , , , , kyrie wu CC: , , , , , , Tomasz Figa , , , irui wang Subject: [V15,07/15] mtk-jpegenc: add stop cmd interface for jpgenc Date: Mon, 26 Sep 2022 17:14:25 +0800 Message-ID: <20220926091433.18633-8-irui.wang@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220926091433.18633-1-irui.wang@mediatek.com> References: <20220926091433.18633-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,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