Message ID | 20221020073902.21039-1-moudy.ho@mediatek.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp119475wrs; Thu, 20 Oct 2022 00:46:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5toMDE7FKgyNoIRvX889AUWP62jSK3oStO9vVfs68QvNdx1RtTiJfzRM6UMvev7nxLAzAR X-Received: by 2002:a17:90b:4b0c:b0:20d:7ffa:4b1b with SMTP id lx12-20020a17090b4b0c00b0020d7ffa4b1bmr49448590pjb.16.1666251971350; Thu, 20 Oct 2022 00:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666251971; cv=none; d=google.com; s=arc-20160816; b=jny41vkDXAKbd7pdXoG5LSVWmRvzVhdUEVTyF4whTEoRZVr5po9WEtV+VRUcXq7KLs /4JKNTluMVDbbmLMD6HnDZ8ZUQTk0/N5DYKwQ0w7VIaKMnr0yaEIc23JJGUtKy4iXQMa m7JS+0p3FS5hVA4e6FIrtBRDQwVMPpT5TSegxoIPQLqCrVOqMJtlyQJwoCxYbswNnWnj y1HUFV/tA3DEW5ftlUvYxXHjxGm+Nw3VlrtiaUXzWcSL/8zcvGBHCAPGej0rY0BDUhPC Pkg+Cxg1ElzUplwTeKwasIHG9JZ6Iuwhx7IlzcxuaKJr0tqK0oboezTj7Cnv65rVTxU5 W2Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=5LknKFIwjNvmZiN0ecwgvggXlIG/dICT6f5QRyOZdg0=; b=IbWC+MjnOuAGvt/VwUSd/6ETJQFgCbSGJIwIcvsI4PWH0G3CwGXAZGRc15HLBwxXqP nRZIe4qQGepM0zrePQJUR/OBYUMjunU4iM8DkQekqjGC0KRAq1wRUofs3IXQ75NFH+RH i9a39xVhQl7ahyZXsdOEyiaWRpXjK94RcEhogqX34Y/fFsCE8ZGcSQGqpB0t4QPuvF2O MoVbwB+U0faop2LsuTN5FfM0C6WYWB2qa06VO8HEg47JOO3PHuShtSVkhB1XOnRssIS/ YAOKUEENaWDbL8Bfr8Jd5gHx1qv9P/qjE50uTZjRjc9yzExwi96jXNqZhWKKS8oOqe0X 8jTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=QFsoRgX2; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 32-20020a631160000000b0044ca7935603si19833324pgr.723.2022.10.20.00.45.57; Thu, 20 Oct 2022 00:46:11 -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=QFsoRgX2; 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 S230475AbiJTHj6 (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Thu, 20 Oct 2022 03:39:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230395AbiJTHjV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Oct 2022 03:39:21 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FF80175368; Thu, 20 Oct 2022 00:39:17 -0700 (PDT) X-UUID: 167280869371449fab29852532e4871f-20221020 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=5LknKFIwjNvmZiN0ecwgvggXlIG/dICT6f5QRyOZdg0=; b=QFsoRgX2W69D4y2+5h31pcggQts5NA5n0NKmXYIV1eTcF516UhbDkI9UGTCvXBe5CkgexRBKoOUIOUAWwvcBWJUpKOcBrxful+9fX9r6SKFSMxBUHlVzHv1p24v78K8POPOqtMaNnheXwS9HzyF0g6kh6HTHYeJUCb9wp37N9GE=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.12,REQID:973aef85-cb0a-44e3-a00f-5b7aa7851fa0,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:70 X-CID-INFO: VERSION:1.1.12,REQID:973aef85-cb0a-44e3-a00f-5b7aa7851fa0,IP:0,URL :0,TC:0,Content:-25,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTI ON:quarantine,TS:70 X-CID-META: VersionHash:62cd327,CLOUDID:fb7c66a4-ebb2-41a8-a87c-97702aaf2e20,B ulkID:22102015391107CV9U3A,BulkQuantity:0,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 167280869371449fab29852532e4871f-20221020 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from <moudy.ho@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1910144267; Thu, 20 Oct 2022 15:39:09 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Thu, 20 Oct 2022 15:39:08 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Thu, 20 Oct 2022 15:39:08 +0800 From: Moudy Ho <moudy.ho@mediatek.com> To: Mauro Carvalho Chehab <mchehab@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, Hans Verkuil <hverkuil-cisco@xs4all.nl> CC: Chun-Kuang Hu <chunkuang.hu@kernel.org>, <linux-media@vger.kernel.org>, <linux-mediatek@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <Project_Global_Chrome_Upstream_Group@mediatek.com>, Moudy Ho <moudy.ho@mediatek.com> Subject: [PATCH v2 0/9] Add support for multiple chips Date: Thu, 20 Oct 2022 15:38:53 +0800 Message-ID: <20221020073902.21039-1-moudy.ho@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 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_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747191826971373014?= X-GMAIL-MSGID: =?utf-8?q?1747191826971373014?= |
Series |
Add support for multiple chips
|
|
Message
Moudy Ho (何宗原)
Oct. 20, 2022, 7:38 a.m. UTC
Changes since v1: - Depend on : [1] https://patchwork.kernel.org/project/linux-mediatek/list/?series=687004 - For hardware-specific structures in the shared memory header(mtk-img-ipi.h), split the relevant functions and structure definitions. - The v4l2-compliance test results list is as follows: v4l2-compliance 1.23.0-4942, 32 bits, 32-bit time_t v4l2-compliance SHA: 4cf258c24026 2022-07-28 15:43:45 Compliance test for mtk-mdp3 device /dev/video0: Driver Info: Driver name : mtk-mdp3 Card type : MediaTek MDP3 Bus info : platform:14001000.mdp3-rdma0 Driver version : 6.0.0 Capabilities : 0x84204000 Video Memory-to-Memory Multiplanar Streaming Extended Pix Format Device Capabilities Device Caps : 0x04204000 Video Memory-to-Memory Multiplanar Streaming Extended Pix Format Required ioctls: test VIDIOC_QUERYCAP: OK test invalid ioctls: OK Allow for multiple opens: test second /dev/video0 open: OK test VIDIOC_QUERYCAP: OK test VIDIOC_G/S_PRIORITY: OK test for unlimited opens: OK Debug ioctls: test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK (Not Supported) Input ioctls: test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 0 Audio Inputs: 0 Tuners: 0 Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0 Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported) Control ioctls: test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK test VIDIOC_QUERYCTRL: OK test VIDIOC_G/S_CTRL: OK test VIDIOC_G/S/TRY_EXT_CTRLS: OK test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 4 Private Controls: 0 Format ioctls: test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK (Not Supported) test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK test VIDIOC_TRY_FMT: OK test VIDIOC_S_FMT: OK test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK test Composing: OK test Scaling: OK Codec ioctls: test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) Buffer ioctls: test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK test VIDIOC_EXPBUF: OK test Requests: OK (Not Supported) test TIME32/64: OK Test input 0: Streaming ioctls: test read/write: OK (Not Supported) test blocking wait: OK Video Capture Multiplanar: Captured 58 buffers test MMAP (no poll): OK Video Capture Multiplanar: Captured 58 buffers test MMAP (select): OK Video Capture Multiplanar: Captured 58 buffers test MMAP (epoll): OK test USERPTR (no poll): OK (Not Supported) test USERPTR (select): OK (Not Supported) test DMABUF: Cannot test, specify --expbuf-device Stream using all formats: (snip) Total for mtk-mdp3 device /dev/video0: 1592, Succeeded: 1592, Failed: 0, Warnings: 0 Hi, To support multiple chips, a chip configuration header file needs to be created and the relevant information split and moved into it. Moudy Ho (9): media: platform: mtk-mdp3: add chip configuration header file media: platform: mtk-mdp3: chip config split about component settings media: platform: mtk-mdp3: chip config split about subcomponents media: platform: mtk-mdp3: chip config split about color format media: platform: mtk-mdp3: chip config split about resolution limitations media: platform: mtk-mdp3: chip config split about pipe info media: platform: mtk-mdp3: decompose hardware-related information in shared memory media: platform: mtk-mdp3: extend mdp_color format for compressed mode media: platform: mtk-mdp3: extend shared memory structure to 4-byte aligned drivers/media/platform/mediatek/mdp3/Makefile | 1 + .../mediatek/mdp3/mt8183/mdp3-comp-mt8183.c | 868 ++++++++++++++++++ .../mediatek/mdp3/mt8183/mdp3-comp-mt8183.h | 149 +++ .../mediatek/mdp3/mt8183/mdp3-plat-mt8183.h | 409 +++++++++ .../platform/mediatek/mdp3/mtk-img-ipi.h | 180 +--- .../platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 280 +----- .../platform/mediatek/mdp3/mtk-mdp3-cmdq.h | 19 +- .../platform/mediatek/mdp3/mtk-mdp3-comp.c | 705 +------------- .../platform/mediatek/mdp3/mtk-mdp3-comp.h | 36 +- .../platform/mediatek/mdp3/mtk-mdp3-core.c | 50 +- .../platform/mediatek/mdp3/mtk-mdp3-core.h | 18 + .../platform/mediatek/mdp3/mtk-mdp3-m2m.c | 10 +- .../platform/mediatek/mdp3/mtk-mdp3-regs.c | 283 +----- .../platform/mediatek/mdp3/mtk-mdp3-regs.h | 202 ++-- .../platform/mediatek/mdp3/mtk-mdp3-vpu.c | 42 +- .../platform/mediatek/mdp3/mtk-mdp3-vpu.h | 11 +- 16 files changed, 1775 insertions(+), 1488 deletions(-) create mode 100644 drivers/media/platform/mediatek/mdp3/mt8183/mdp3-comp-mt8183.c create mode 100644 drivers/media/platform/mediatek/mdp3/mt8183/mdp3-comp-mt8183.h create mode 100644 drivers/media/platform/mediatek/mdp3/mt8183/mdp3-plat-mt8183.h