Message ID | 20231213081105.25817-7-aakarsh.jain@samsung.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp7690539dys; Wed, 13 Dec 2023 03:01:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNQ2bwMryoRU3Q21tNBYrEwqOu4qOfdLtN8/pkbMtNNg3/ViDhe9nt5EqFED/pDGa+aH9v X-Received: by 2002:a05:6e02:17c8:b0:35d:6d18:cf5 with SMTP id z8-20020a056e0217c800b0035d6d180cf5mr12068230ilu.53.1702465310560; Wed, 13 Dec 2023 03:01:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702465310; cv=none; d=google.com; s=arc-20160816; b=jWn/furNZ7ym+hiV70GO5Fb2EkHUupgu0buswx5HkEe7P9hM264NJC7h2a/GQeDsAq rnO+OhpWee4wyirphzH9qSwE8o/ITjO9q9T/nq+VbYmBt8KBe8haTQIJnOSjK6ZCPwWI mjsXr3r27PNTfGv2euPlOtMwzN2ugZ/Bnuci0TXjH7m8PsLW1nW+tQl7bQfD95pZrtBB S6KzxWHCeO2opa9lP/3c6pc96rCmed6SnK15T8D72S6xxLKU7Rac3brhzqeQKGI3idvt RfEs8PEoJpJSkZtYiaZhdsaK1iPZGOd4EFDbhhUEZj8fyBo/4PpkamBTXaoY9VIuVABa ibjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=jJOiJAOqUxw+8lfnjEPGdmszClcTNpX1R54Qh3u+3n4=; fh=jRZx2CGeeFZcE3BVWyyQfQMU6DACuExpX/LJhkP3QWU=; b=EljqP/OmVwO01IwP8KbLjfSlv5JyksGQl2WmD/C30Hz8JcoAqyVbaXv1i9zeKbSM3k P76e/bZiKuS+gZ941HBs/GG8lvARhFP1ApXW7w/Tny9hRjBrXPWybV6iEPXg8GTOA58k Qaoo30FvoopK4ejRoxmUah5G/kHki964w4uX17dxeAV89C+EVBywP+VWwZqTY2RhoCHe MQG1Owke1Hz9kZHMxtH5Fhk6wghKpbka7hADVYtUHZu5iO17zwSSbNjsD3KSXb+tJCdf n1ipFQsg1i9p5IMMHZ3M2R3cMl1PD7FhpMErEg6XJ6ul5e+xv0iTaoyIkxGPKKTq3R+P Q6wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=n84PAUaI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id bj7-20020a056a02018700b005b8f1c4aa49si9747235pgb.895.2023.12.13.03.01.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 03:01:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=n84PAUaI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 950E28045C5D; Wed, 13 Dec 2023 03:01:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378316AbjLMLBQ (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Wed, 13 Dec 2023 06:01:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378486AbjLMLBL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 13 Dec 2023 06:01:11 -0500 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8143A112 for <linux-kernel@vger.kernel.org>; Wed, 13 Dec 2023 03:01:15 -0800 (PST) Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20231213110114epoutp01be14afabe8f5e5b86c28440ef8eacf8a~gXyWOz5yu1005610056epoutp01Y for <linux-kernel@vger.kernel.org>; Wed, 13 Dec 2023 11:01:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20231213110114epoutp01be14afabe8f5e5b86c28440ef8eacf8a~gXyWOz5yu1005610056epoutp01Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1702465274; bh=jJOiJAOqUxw+8lfnjEPGdmszClcTNpX1R54Qh3u+3n4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n84PAUaI4yE0NwP+/MFeEVwoCI5SUTxx/FKN8KXNO6PWd18tUisgKUdP+hORkDrxV tEpn2qJIDKvS+gmimZGpV87w/mFSINgpME0vOABgk5eul8ixkcbT85ZE/RW1m47RpW MYg1x4YIzY/ZZViteXgEQDPXbsOlLuUmtECaCctQ= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20231213110113epcas5p2f9e4708ddad5bac4de66fcded37c9802~gXyVsZlKv0140701407epcas5p2n; Wed, 13 Dec 2023 11:01:13 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.182]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4Sqswl5pPgz4x9Px; Wed, 13 Dec 2023 11:01:11 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 31.CB.09634.7FE89756; Wed, 13 Dec 2023 20:01:11 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20231213081134epcas5p2fdbd2577fe46b848c87ea5d89cbb96f5~gVeN8TZwS1902319023epcas5p2M; Wed, 13 Dec 2023 08:11:34 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20231213081134epsmtrp261701888e93dfa0492b9a960185aa747~gVeN1KWmM2150821508epsmtrp2Z; Wed, 13 Dec 2023 08:11:34 +0000 (GMT) X-AuditID: b6c32a49-eebff700000025a2-fa-65798ef7a089 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 19.E2.08817.63769756; Wed, 13 Dec 2023 17:11:34 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20231213081131epsmtip2e566b3614165bf4d6ea63c67f2ac5475~gVeLCGAi41539415394epsmtip2x; Wed, 13 Dec 2023 08:11:31 +0000 (GMT) From: Aakarsh Jain <aakarsh.jain@samsung.com> To: linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: m.szyprowski@samsung.com, andrzej.hajda@intel.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, conor+dt@kernel.org, linux-samsung-soc@vger.kernel.org, andi@etezian.org, gost.dev@samsung.com, alim.akhtar@samsung.com, aswani.reddy@samsung.com, pankaj.dubey@samsung.com, ajaykumar.rs@samsung.com, aakarsh.jain@samsung.com, linux-fsd@tesla.com, Smitha T Murthy <smithatmurthy@gmail.com> Subject: [Patch v6 06/10] media: s5p-mfc: Add support for UHD encoding. Date: Wed, 13 Dec 2023 13:41:01 +0530 Message-Id: <20231213081105.25817-7-aakarsh.jain@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231213081105.25817-1-aakarsh.jain@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WTe0xTVxzHc+5tb0uX4hWpOxZhzY1j0VhsWdsdDFUXmFy2sZCQPYJ/wE17 A4zSdn0M2eaGBDLXOCI6QmEVCA8T8cFLWJWHpbAQcQKGDefaBgg+QCMwQCHZRtZycfvvc36/ 7+/7O+d3zhHiET2EVJhntLEWI2OgCBGve3DvG/K18iJWsXB3P3roruYjz+IAD03XdhOocf0x hqYaV3jI29klQJf7RjFUNzTKR/c91zF0tzrAQ+VzMzjqmJ3ko5knH6OJGy4CnW7r4iPnWD+G rgwFBOhCx98YauhaFaCyviEBKj3ZxD8ioe81LeP09ZqAgG7sncfojpbvCNo/2UvQnU3f0OXX WgC9UXJeQK90xNAjz1cE6aLM/MRcltGzFhlr1Jn0ecYcLfVeRlZSllqjUMqVCegtSmZkClgt lfx+uvxoniF4Rkr2OWOwB0PpjNVKHTiUaDHZbaws12S1aSnWrDeYVeY4K1NgtRtz4oys7aBS oYhXB4XZ+bmBm2N88+3tx1dHavjFYDrcAYRCSKrg2CrjAGHCCLIHwOo2uQOIgrwM4LCzWMAt XgDY1lIGQqpQQePQzxiX6ANw+tG3BLcow6Brql0QsiVIObzzkyFUEEmeBHD2lC2kwclhHNaf qeaFEjvIFOion8NDzCNfh21zzzdZTGph+2w/znV7DV5q82xyGHkILpTcBCEjSI4LocdXJeBE yfDOwDzG8Q74ZPjaVlwKVxb6CI51cLZhfsvUAFt7f+BxfBh6fnXxQpvGyb2w9cYBLhw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shLrN5wAMzmFLCTeNe0nxHiIluJ5btv M09g5FvAyLCKUTK1oDg3PbfYsMAoL7Vcrzgxt7g0L10vOT93EyM4YrS0djDuWfVB7xAjEwfj IUYJDmYlEd6TO8pThXhTEiurUovy44tKc1KLDzFKc7AoifN+e92bIiSQnliSmp2aWpBaBJNl 4uCUamDivlhc5vND9b1B8hWp47ohOXdMi36+KgrR2ijQkeX7oPPXfNFDnw+2d2aZP0qoWvzf p+zK4UO9i/dWhV29ErPBc4cXQ+G9NV8zou9cVpidrLtw05dZkq+WrKzJYnwioM7y9fnny/Mf XNevmligV1lgm5C146n3GXsOi6JzFgccjb0Lt4jEmjRbc9m7Zytwdsp+Wr5trdh2/iKVpQYc 3AphK8PLWI58tVQQ8tFxZlYOnKBwr3tz3/yD+Ty8b8MW2lgoasUc9nv6JaVY8v/zA6kCZc5P rs02dZBM4eS9cOhgt9m/4yyXWTwVdtsd1DdkaVhrWOAbXcFSaW1xM3NZRdFnxbMPsjnYHhmx hfnoKbEUZyQaajEXFScCACiPNpsHAwAA X-CMS-MailID: 20231213081134epcas5p2fdbd2577fe46b848c87ea5d89cbb96f5 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20231213081134epcas5p2fdbd2577fe46b848c87ea5d89cbb96f5 References: <20231213081105.25817-1-aakarsh.jain@samsung.com> <CGME20231213081134epcas5p2fdbd2577fe46b848c87ea5d89cbb96f5@epcas5p2.samsung.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 13 Dec 2023 03:01:42 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785164265298945272 X-GMAIL-MSGID: 1785164265298945272 |
Series |
Add MFC v12 support
|
|
Commit Message
Aakarsh Jain
Dec. 13, 2023, 8:11 a.m. UTC
MFC driver had restriction on max resolution of 1080p, updated it for UHD. Added corresponding support to set recommended profile and level for H264 in UHD scenario. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by: Aakarsh Jain <aakarsh.jain@samsung.com> --- drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c | 9 ++++++--- .../media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c | 12 ++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c index 2f11a1e861e1..67fe0302464f 100644 --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c @@ -1461,9 +1461,12 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f) mfc_err("Unsupported format by this MFC version.\n"); return -EINVAL; } - - v4l_bound_align_image(&pix_fmt_mp->width, 8, 1920, 1, - &pix_fmt_mp->height, 4, 1080, 1, 0); + if (IS_MFCV12(dev)) + v4l_bound_align_image(&pix_fmt_mp->width, 8, 3840, 1, &pix_fmt_mp + ->height, 4, 2160, 1, 0); + else + v4l_bound_align_image(&pix_fmt_mp->width, 8, 1920, 1, &pix_fmt_mp + ->height, 4, 1080, 1, 0); } else { mfc_err("invalid buf type\n"); return -EINVAL; diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c index 4a0d0e228e78..572293f3b190 100644 --- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c +++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c @@ -1071,6 +1071,18 @@ static int s5p_mfc_set_enc_params_h264(struct s5p_mfc_ctx *ctx) reg |= ((p->num_b_frame & 0x3) << 16); writel(reg, mfc_regs->e_gop_config); + /* UHD encoding case */ + if (ctx->img_width == 3840 && ctx->img_height == 2160) { + if (p_h264->level < 51) { + mfc_debug(2, "Set Level 5.1 for UHD\n"); + p_h264->level = 51; + } + if (p_h264->profile != 0x2) { + mfc_debug(2, "Set High profile for UHD\n"); + p_h264->profile = 0x2; + } + } + /* profile & level */ reg = 0; /** level */