From patchwork Mon Aug 2 12:12:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eizan Miyamoto X-Patchwork-Id: 12413811 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AA94C4338F for ; Mon, 2 Aug 2021 12:15:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 314F860EFD for ; Mon, 2 Aug 2021 12:15:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 314F860EFD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=hiFAy45ZUx9/Li9oH+Ntfd0WrpIPHzAjsL6s3UlmU2c=; b=YlPyXPIoiB/BnG lHvlLVfaoRCFwzmFS+RFO9N1agppodpv8VZ7vn+4k2cBRsWH4Ew5ckUF6ZWGazghivm/HmdkUSDjY 8EOG7h5RoGuhGIoTRRNJCiUHCDjvaxaaWDP+As2BT9QAYHpCEPh3MrGmHjkSb30tAtyqkkxxZMZwx fJBpxKnrZracNZb0ISKEl49AJ2lMaMfXGX2npV0SFNlZIgCnFTumzVXa+igDybdR08U5Gt6ANmEmG 4msj5UvXM+irU2qankWjvprCB9p9zo043THT5XtYMf9CJuxX5TU0CRBjG0cw+9OIfM6KE5as7fNO5 92DQd9QxkWcLH6FcqidQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAWo7-00G7fk-UE; Mon, 02 Aug 2021 12:12:36 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAWo1-00G7dP-MT for linux-arm-kernel@lists.infradead.org; Mon, 02 Aug 2021 12:12:32 +0000 Received: by mail-pj1-x102c.google.com with SMTP id o44-20020a17090a0a2fb0290176ca3e5a2fso24378903pjo.1 for ; Mon, 02 Aug 2021 05:12:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yhCy+jdg2z+Eckz1yvxcPdL/SuIBQamgSG0Pchby1eE=; b=IHFEat4kyp7BJrcnOYKhWyx2BgxojQqKz+Q69zBBnJ9SF6H/hSn+HkbWOVx8/ye6ir b/2N1/CLAwC6wSGNYMbfA6QLp/HMduvyqpQv0/r+QOCJNRawHSLCsegT5OYBch2dGAZt vFsHXxQKt0chTg+3kP4mAeEs6RBwjb0C5OEag= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yhCy+jdg2z+Eckz1yvxcPdL/SuIBQamgSG0Pchby1eE=; b=GD+NTz0lHVs5P1Yl4OSOT6cFXnH71Cw5+ZIeCxurOf0RNXb9gTbUY5b+UdFOSDhfSA wlxkwA7rmLpgnk+ewS6gb9ULQBi37m5GSO4vvPZ3MdyDZ2j3ZFoL1g/Vr5jN6pfEWhLL FnG++AiVCCfbq8FnZ7iybnJrOF1xD4YvIvl9TC24fsrN488Kdw3x9V85Lj1GDGJjVx/c WEUzTwASEFYxUG7DB2LdxPW3VQv18u9qdsAy7qDesJ3/IXnWEdTfJjTDhYOeGPAX/6aP 76eGYn5e4GW5jmNKzk7z7Xa90wn2kBTA2rA3QCqlBmGK0hgC23519nqJCvnMkrErtwbI xnWw== X-Gm-Message-State: AOAM530FbQmNzJCLAESxqYyYEgPgcxaASLUya0VeC/4+2/HXorXvxMXa kF8FxvFx6PpYykwthFj/FQ7/XQ== X-Google-Smtp-Source: ABdhPJw9D3QYvpfQwiLiGcde+JTyAT/xpxneIagpGhWlhr9nQI9AqvoEdzzBW/YWozCp7VcQCEgNIw== X-Received: by 2002:a17:90a:de18:: with SMTP id m24mr16795133pjv.78.1627906348032; Mon, 02 Aug 2021 05:12:28 -0700 (PDT) Received: from localhost ([2401:fa00:9:14:cd34:e942:c094:baef]) by smtp.gmail.com with UTF8SMTPSA id w134sm11685775pfd.124.2021.08.02.05.12.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Aug 2021 05:12:27 -0700 (PDT) From: Eizan Miyamoto To: linux-kernel@vger.kernel.org Cc: wenst@chromium.org, houlong.wei@mediatek.com, yong.wu@mediatek.com, enric.balletbo@collabora.com, devicetree@vger.kernel.org, chunkuang.hu@kernel.org, Eizan Miyamoto , Andrew-CT Chen , Matthias Brugger , Mauro Carvalho Chehab , Minghsiu Tsai , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v6 0/9] Refactor MTK MDP driver into core/components Date: Mon, 2 Aug 2021 22:12:06 +1000 Message-Id: <20210802121215.703023-1-eizan@chromium.org> X-Mailer: git-send-email 2.32.0.554.ge1b32706d8-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210802_051229_821580_5F7C6C17 X-CRM114-Status: GOOD ( 15.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is an update to https://patchwork.kernel.org/project/linux-mediatek/list/?series=283075 To address some comments and fixes. This series has been verified to work on 5.13. Changes in v6: - Don't propagate errors from clock_on/off as an afterthought. - Split apart modifying mdp driver to be loadable from mmsys from actually loading it from mmsys into two changs to make review easier. - Update devicetree bindings to reflect no longer needing the mediatek,vpu property in the mdp_rdma0 device node. - Some stylistic cleanups. Changes in v5: - rebase and test on 5.13-next @ e2f74b13dbe6 Changes in v4: - rebase and test on 5.13 - don't depend on https://patchwork.kernel.org/project/linux-mediatek/list/?series=464873 Changes in v3: - get mdp master from aliases instead of strcmp against of_node->name Changes in v2: - rebased onto Linux 5.12 - 100 char line length allowance was utilized in a few places - Removal of a redundant dev_err() print at the end of mtk_mdp_comp_init() - Instead of printing errors and ignoring them, I've added a patch to correctly propagate them. - Use of C style comments. - Three additional patches were added to eliminate dependency on the mediatek,vpu property inside the mdp_rdma0 device node. Eizan Miyamoto (9): mtk-mdp: propagate errors from clock_on mtk-mdp: add driver to probe mdp components mtk-mdp: use pm_runtime in MDP component driver media: mtk-mdp: don't pm_run_time_get/put for master comp in clock_on mtk-mdp: make mdp driver to be loadable by platform_device_register*() soc: mediatek: mmsys: instantiate mdp virtual device from mmsys media: mtk-mdp: use mdp-rdma0 alias to point to MDP master dts: mtk-mdp: remove mediatek,vpu property from primary MDP device dt-bindings: mediatek: remove vpu requirement from mtk-mdp .../bindings/media/mediatek-mdp.txt | 3 - arch/arm64/boot/dts/mediatek/mt8173.dtsi | 1 - drivers/media/platform/mtk-mdp/mtk_mdp_comp.c | 268 +++++++++++++++-- drivers/media/platform/mtk-mdp/mtk_mdp_comp.h | 34 +-- drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 282 ++++++++++++------ drivers/media/platform/mtk-mdp/mtk_mdp_core.h | 3 + drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c | 4 +- drivers/soc/mediatek/mtk-mmsys.c | 20 +- 8 files changed, 470 insertions(+), 145 deletions(-) Tested-by: Enric Balletbo i Serra