Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3190995rwi; Tue, 11 Oct 2022 20:48:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7DiFZHuUYJ+wkCvjuzNZZNRaqc4YBrDke4vpkM8qYSfRlT9qi81hLgQLPCM1PRXtx9qFhl X-Received: by 2002:a17:903:32d0:b0:17f:9224:6e1f with SMTP id i16-20020a17090332d000b0017f92246e1fmr27756050plr.126.1665546533203; Tue, 11 Oct 2022 20:48:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665546533; cv=none; d=google.com; s=arc-20160816; b=TkpmtUZOwv7WgWu+t4sFBsUQhGLYxNZfqWCsjpis4OQ/cIME6IObNDie13IoESr9wU 6JCwF2bhtv6eJq0Bk99xQeQMmd6mnSReaFFg+tl8X4d4s3PESOSM2iTbgbCQUZtty5g6 uf/K5Q0Ot18OlkKdVbs8ojtkGpNWZqlJYxZ/0QT8W4qUeod/4Sk6aI+xu1umh615HuEa RdBnljdYlYvbj1X6IllxENXjrDQts8KFw3kSpxER7U05e0fL7XgzZaecfbZ2lgC1vXpD seDU1qZdEA5pIlCt3eFY2sDvbTshVzbkE4VpVys1wX9cT9kYoU7VtQeGFB0iePCt8NJw UfNg== 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:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=a0vdFYoSfapPhn0wOLLbypVWbERl2E7gGu0xV0Veo/8=; b=eb0QBBI+gBGzBgkAgzkEwozJCbRVPVAbl5NkTncFSHlSU5y1JCxjI2lYGJzAnxjvTd 3Etz9IWQMXEx3ZZNyzpgxEYBmTf8VE7hzCu+n2ZFilTsKe7EF6RWA9AbVqOJHACerOM+ pKJvJKNsQFqEATw8CFSm7VaQ8R4QJBczurXuBv7jz0NhcpvLHFcSNhPTgM3maR4vCImF 7oJjcJDTXeaKPnlVlTt6yADofmbqGznOnFGhIrO2kwNeGEAy3t95TuBiK5kI9sHU0f2g 0bUV14gvb8ZYggXrcXnhVV4UlbudRuRciRAH4RuAl8BFX7SOzmQGzFfOh7bUGWNLQDv5 92Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=NtXF0NeD; 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=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k2-20020a170902694200b0018486fabaf9si482352plt.346.2022.10.11.20.48.41; Tue, 11 Oct 2022 20:48: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=@samsung.com header.s=mail20170921 header.b=NtXF0NeD; 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=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229526AbiJLDrc (ORCPT + 99 others); Tue, 11 Oct 2022 23:47:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbiJLDr3 (ORCPT ); Tue, 11 Oct 2022 23:47:29 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B1F2796BA for ; Tue, 11 Oct 2022 20:47:28 -0700 (PDT) Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20221012034726epoutp024f11c660113937f8d0d4978c6988b493~dNas9rMtZ1949919499epoutp02f for ; Wed, 12 Oct 2022 03:47:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20221012034726epoutp024f11c660113937f8d0d4978c6988b493~dNas9rMtZ1949919499epoutp02f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1665546446; bh=a0vdFYoSfapPhn0wOLLbypVWbERl2E7gGu0xV0Veo/8=; h=From:To:Cc:Subject:Date:References:From; b=NtXF0NeDIFcUUGxl2G2FqEdVx8K+7+fSVU8pkdaCXR9ENvgUrDGDWXEswtiPs13Pk F7RE6SMs0n0CjDneedA6SWt3Jhi3uyATmmHeHgEgXL4WfHiswrcsNVh9AbqVA54bWy jJseyBeTutaceZ1BX2KunGGMUg6u59H30Lru4Ybs= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20221012034725epcas5p1e9ecd07b3fe2d1222a12f907f30e1c26~dNasBYKhP0055500555epcas5p1M; Wed, 12 Oct 2022 03:47:25 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.181]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4MnJWG3v6Zz4x9Q0; Wed, 12 Oct 2022 03:47:22 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id E0.62.56352.AC836436; Wed, 12 Oct 2022 12:47:22 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20221011125138epcas5p21b0a93e3bde26c3377e3fa7f34d86933~dBMkFxV8S3211732117epcas5p2D; Tue, 11 Oct 2022 12:51:38 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20221011125138epsmtrp1db6a44e521f61c05f6e70a5c3716ff8e~dBMkEjaCP2654526545epsmtrp1-; Tue, 11 Oct 2022 12:51:38 +0000 (GMT) X-AuditID: b6c32a4b-5f7fe7000001dc20-d6-634638ca48d7 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id F5.0D.14392.AD665436; Tue, 11 Oct 2022 21:51:38 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20221011125135epsmtip1dd029d2e4ca18021177e1357e793ef95~dBMg8WcKV2675426754epsmtip1I; Tue, 11 Oct 2022 12:51:35 +0000 (GMT) From: aakarsh jain 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, ezequiel@vanguardiasur.com.ar, jernej.skrabec@gmail.com, benjamin.gaignard@collabora.com, stanimir.varbanov@linaro.org, dillon.minfei@gmail.com, david.plowman@raspberrypi.com, mark.rutland@arm.com, robh+dt@kernel.org, krzk+dt@kernel.org, andi@etezian.org, alim.akhtar@samsung.com, aswani.reddy@samsung.com, pankaj.dubey@samsung.com, linux-fsd@tesla.com, smitha.t@samsung.com, aakarsh.jain@samsung.com Subject: [Patch v3 00/15] Add MFC v12 support. Date: Tue, 11 Oct 2022 17:55:01 +0530 Message-Id: <20221011122516.32135-1-aakarsh.jain@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA0WTe0zTVxTHub9f+2s11v14jUsVVxoVwYCUlxcFJZOYX5ApBAduhLGm/CgN pe3aAsMsKjCYIoM90IyHMCmdCQ+LQEvBAh10ISFuEUZAU7sxOoU69hI1BghbS2H773PO+Z77 PTn3XjbuNU1w2RKZmlbKhFI+sZ1hG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r1nZmB56dKrwicWNzlIe65Ozmrcwn/8kvri+mbm Nzyzbyma6dmU1KlbMP2r8vg5/doOR5lNM/Xk2kV8Dj9wzdX4ZD9t464crdDJ7pln89edLv/X 0GbvJf9mFod32uRlrjOTrq4qDEooEzgsoMRSnJFoqMVcVJwIADrzEMIUAwAA X-CMS-MailID: 20221011125138epcas5p21b0a93e3bde26c3377e3fa7f34d86933 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: 20221011125138epcas5p21b0a93e3bde26c3377e3fa7f34d86933 References: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 This patch series adds MFC v12 support. MFC v12 is used in Tesla FSD SoC. This adds support for following: * Add support for VP9 encoder * Add support for YV12 and I420 format (3-plane) * Add support for Rate Control, UHD and DMABUF for encoder * Add support for DPB buffers allocation based on MFC requirement * Update Documentation for control id definitions Changes since v2: - Addressed review comments by Rob Herring. - Addressed review comments by Krzysztof Kozlowski. - Addressed review comments by Andi Shyti. Smitha T Murthy (15): dt-bindings: media: s5p-mfc: Add new DT schema for MFC dt-bindings: media: s5p-mfc: Add mfcv12 variant media: s5p-mfc: Rename IS_MFCV10 macro media: s5p-mfc: Add initial support for MFCv12 Documention: v4l: Documentation for VP9 CIDs. media: v4l2: Add v4l2 control IDs for VP9 encoder. media: s5p-mfc: Add support for VP9 encoder. media: s5p-mfc: Add YV12 and I420 multiplanar format support media: s5p-mfc: Add support for rate controls in MFCv12 media: s5p-mfc: Add support for UHD encoding. media: s5p-mfc: Add support for DMABUF for encoder media: s5p-mfc: Set context for valid case before calling try_run media: s5p-mfc: Load firmware for each run in MFCv12. media: s5p-mfc: DPB Count Independent of VIDIOC_REQBUF arm64: dts: fsd: Add MFC related DT enteries .../devicetree/bindings/media/s5p-mfc.txt | 75 --------- .../bindings/media/samsung,s5p-mfc.yaml | 164 ++++++++++++++++++ .../media/v4l/ext-ctrls-codec.rst | 167 +++++++ arch/arm64/boot/dts/tesla/fsd.dtsi | 21 + .../platform/samsung/s5p-mfc/regs-mfc-v12.h | 60 +++ .../platform/samsung/s5p-mfc/regs-mfc-v7.h | 1 + .../platform/samsung/s5p-mfc/regs-mfc-v8.h | 3 + .../media/platform/samsung/s5p-mfc/s5p_mfc.c | 36 +- .../platform/samsung/s5p-mfc/s5p_mfc_cmd_v6.c | 3 + .../platform/samsung/s5p-mfc/s5p_mfc_common.h | 56 ++- .../platform/samsung/s5p-mfc/s5p_mfc_ctrl.c | 9 +- .../platform/samsung/s5p-mfc/s5p_mfc_dec.c | 51 ++- .../platform/samsung/s5p-mfc/s5p_mfc_enc.c | 410 +++++++++++++++-- .../platform/samsung/s5p-mfc/s5p_mfc_opr.h | 16 +- .../platform/samsung/s5p-mfc/s5p_mfc_opr_v5.c | 12 +- .../platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c | 435 ++++++++++++++++-- .../platform/samsung/s5p-mfc/s5p_mfc_opr_v6.h | 7 +- drivers/media/v4l2-core/v4l2-ctrls-defs.c | 44 ++ include/uapi/linux/v4l2-controls.h | 33 ++ 19 files changed, 1349 insertions(+), 203 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/samsung,s5p-mfc.yaml create mode 100644 drivers/media/platform/samsung/s5p-mfc/regs-mfc-v12.h -- 2.17.1