Message ID | 20231206063045.97234-7-aakarsh.jain@samsung.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3918464vqy; Tue, 5 Dec 2023 22:37:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHF1U+v5Stvxb0CSW3rwAPdBx61g92CZ8CYyIawNFaao/ax5ZOE2QDRl0bXS52dv9kawxvt X-Received: by 2002:a05:6a00:8e0c:b0:6b1:c1c4:ae98 with SMTP id io12-20020a056a008e0c00b006b1c1c4ae98mr370199pfb.18.1701844653379; Tue, 05 Dec 2023 22:37:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701844653; cv=none; d=google.com; s=arc-20160816; b=EwqcXu6LfzPahIeOmYkHYOHmUgrfBwXEC8HAfiWr2dvrgnvBUyiUTnE9SBiUhE46v9 71MtWCaQCMH+mjMEGgH/lz9kA61njax+ViZ5/GMbOzI8D65hK/DxfPadHz+n4zxArZ8o 8/vxwVkjP0N1aCUJIsOigpPcnFByzcnvZufFaa3R7+fyyKksgnDuiNz+p1DJyC5e6IWI Bv30grKCfguJFQJSHoCRbcbo0YhmDbnQ5EKodzHoIngIjqqfiyWlCsLiVPELqM7B9RL9 THMII4tulXaRZaqoidk07J1X8OJaVE1tCmw7ZFi4EnVJXnpaaomz6OuYXgvxiwtHIfTk yDVQ== 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=ZBAl/HNYuuxGQfLFUXbfQ7Rq5dNJRy0YKnMEv/Z9Bfk=; fh=jRZx2CGeeFZcE3BVWyyQfQMU6DACuExpX/LJhkP3QWU=; b=ajDHzPei2UlmqCcQhkCwoshzpOjcYlJla3FXaYDuqHPUBk3b9tNbwJXW5F8POpRY/I Pv8ozSP6PGS/Quibd9pv/JhtWIxFIbJQuTsRDBl8RSAbI+nj5oDpp+kbbDrQHwnN5eC6 6K/1CYDuXlmiebTqrEx8csRrhFJUpFVdXkXF3SCb9k5yyKiX1O5wcJ9ZrY15S74+kLj+ OOjc5V8EC7oCQCmFma1n7PjQ5Qu0fvgiYcfh+1QTUn50QA/RMXZ4giT24mRAsKGxEJHJ FvNMZ71EZzQxTTqtwtNGjMIBXRJgtsKE16eV91uhcuK4perpGzmacJ8v9JAIbqJjEyAQ yOMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=oUddpJYX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id q18-20020a631f52000000b005c661efffd0si6391851pgm.754.2023.12.05.22.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 22:37:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=oUddpJYX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 2667582CFA70; Tue, 5 Dec 2023 22:37:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376893AbjLFGg7 (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Wed, 6 Dec 2023 01:36:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376845AbjLFGgv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 6 Dec 2023 01:36:51 -0500 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A82510C4 for <linux-kernel@vger.kernel.org>; Tue, 5 Dec 2023 22:36:56 -0800 (PST) Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20231206063654epoutp011a0d1ad97381be60ba2bbf653ab29b3c~eKqkDNd6a2441024410epoutp01j for <linux-kernel@vger.kernel.org>; Wed, 6 Dec 2023 06:36:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20231206063654epoutp011a0d1ad97381be60ba2bbf653ab29b3c~eKqkDNd6a2441024410epoutp01j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1701844614; bh=ZBAl/HNYuuxGQfLFUXbfQ7Rq5dNJRy0YKnMEv/Z9Bfk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oUddpJYX6ixng9xfs5PmwsxVXzSTwG1oiBepfMPbo38jhaSlLbYzQ0m5qV9CN/c+/ pTibMQTAlJDhJPQe96XATuGIKhGHW8QimAnImy9GWNlBOo++R7pSk9g8ssR4EXMe6c ftgNPNZLq6Ts48rdItHNcQ1ke39M1/aC6hc1GRCI= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20231206063654epcas5p19de7ba8aeeca03c4bd9e34590b9f94b7~eKqjuRbzI1242012420epcas5p1E; Wed, 6 Dec 2023 06:36:54 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.182]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4SlSP01pvdz4x9Pt; Wed, 6 Dec 2023 06:36:52 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id B6.1B.10009.48610756; Wed, 6 Dec 2023 15:36:52 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20231206063125epcas5p2c5d07f51ba83198ccb8fbab005bab8f6~eKlxY58sy0993309933epcas5p2N; Wed, 6 Dec 2023 06:31:25 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20231206063125epsmtrp188308a3c077d98679037f971adc42b64~eKlxYEJHn1597215972epsmtrp1v; Wed, 6 Dec 2023 06:31:25 +0000 (GMT) X-AuditID: b6c32a4a-ff1ff70000002719-77-65701684aa20 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id E2.A6.18939.D3510756; Wed, 6 Dec 2023 15:31:25 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20231206063122epsmtip25788e1272f6e3a4361e5745c1c3065a9~eKluZl3r_0453504535epsmtip26; Wed, 6 Dec 2023 06:31:21 +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 v5 06/11] media: s5p-mfc: Add support for UHD encoding. Date: Wed, 6 Dec 2023 12:00:40 +0530 Message-Id: <20231206063045.97234-7-aakarsh.jain@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231206063045.97234-1-aakarsh.jain@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WTe0xbZRjG951z2h5IiocC87PRjTXChAxoZ8EPBXSTwGFbYrdlTp2GVTih hN7sacHLorANZCAFZJswua7sknJdgQ0QWCkojIWLShgSUEingxl2ATELIrG0Zf73ey9P3uf9 LiQu6OIKyVS1ntGp5UoR15O43hcUFHJ6q5YR3+nzRL+3l3GQ9WEvgWYrr3OR6ck9DP1mWiaQ raWNh+q7RzBU1T/CQb9YOzD0Y9kMgYzzcziy2Cc4aO7+UfRzZzkXfdXcxkGloz0Yauif4aHL ljUMXWz7i4eyu/t56HRWLecNP/pO7RJOd1yY4dGmrgWMtpjPcOnpiS4u3VL7BW1sNQN6/WQF j162bKOHVpZ5Ms/30qIUjDyZ0fkz6iRNcqo6JVq0/3Dim4nhEWJJiCQSvSLyV8tVTLQo9oAs JC5V6dhR5J8uVxocKZmcZUVhMVE6jUHP+Cs0rD5axGiTlVqpNpSVq1iDOiVUzehflYjFu8Md jcfTFCudY7j2tvfHN79eJzLBrFce8CAhJYVX2qs4ecCTFFDfATh5agC4giUAr+bPE08D49VF fFMy2mXiugodANZMT7ol2Rhsq6hySEiSS4XA4RvKDYEvlQWgPVe/0YNTAzisLiojNgo+VDy8 MmXCN/oJKgCWtry2keZT0dBWvIa5hm2Hdc1W52APKgaera92eoXUGAmXWxp4rqZYeKuv3M0+ 8P5Aq5uFcKEwx81J0H5xwb2BEjZ1nSVc/Dq0jpc7PeNUEGzq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rEjM3WIGFeAVuJQxP/MEEskJdYveEA2GJOATuJKWsWsIKUCwHV rDzpOIGRbwEjwypG0dSC4tz03OQCQ73ixNzi0rx0veT83E2M4DjRCtrBuGz9X71DjEwcjIcY JTiYlUR4c87npwrxpiRWVqUW5ccXleakFh9ilOZgURLnVc7pTBESSE8sSc1OTS1ILYLJMnFw SjUwSTPv+/4wSEpB2zPW5p2UbcCeBemL5JniDlXPWXJsepZWW93vU8HPNJ72ZcRfENr1w6zt 3rYjem3zahi/9p24c/TksnRbJXOe3Rdblv17Xnz3yMsvq2ffnMfbF+v3WdNkBf+lzI+vzz0L 3HW89OBRNvEkmzXh+ZPZ1T1+HlwVVcnMbCiz0NRwTkx9gjcjU/5UnoD6RsPNc0QsPOvM5367 c2G7qUtPx8Xa+rdJmk/5G+emu/xO8dumPD/WWk7vIJOJ1+RJlW0GkqZqltzrny5T4ZVrkLMI LcpxL3ywVO2VwZygKhHV2ieXHm/g3BZUo+7U9sq688SRjdM5X88x/+n/uc3Ab8OXH/f3TS8K 9i9TYinOSDTUYi4qTgQAeA263AIDAAA= X-CMS-MailID: 20231206063125epcas5p2c5d07f51ba83198ccb8fbab005bab8f6 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: 20231206063125epcas5p2c5d07f51ba83198ccb8fbab005bab8f6 References: <20231206063045.97234-1-aakarsh.jain@samsung.com> <CGME20231206063125epcas5p2c5d07f51ba83198ccb8fbab005bab8f6@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 howler.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 (howler.vger.email [0.0.0.0]); Tue, 05 Dec 2023 22:37:29 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784513458979617392 X-GMAIL-MSGID: 1784513458979617392 |
Series |
Add MFC V12 support
|
|
Commit Message
Aakarsh Jain
Dec. 6, 2023, 6:30 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 6b495a738291..b01b9511e50c 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 */