From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham 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 E0F39C3A5A5 for ; Thu, 5 Sep 2019 05:56:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BEBA720870 for ; Thu, 5 Sep 2019 05:56:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731293AbfIEF4z (ORCPT ); Thu, 5 Sep 2019 01:56:55 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:14802 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726088AbfIEF4y (ORCPT ); Thu, 5 Sep 2019 01:56:54 -0400 X-UUID: b315badb3ec945b792741a96f66d657f-20190905 X-UUID: b315badb3ec945b792741a96f66d657f-20190905 Received: from mtkcas36.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 273631663; Thu, 05 Sep 2019 13:56:45 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 5 Sep 2019 13:56:38 +0800 Received: from [10.17.3.153] (172.27.4.253) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 5 Sep 2019 13:56:37 +0800 Message-ID: <1567662999.18702.28.camel@mhfsdcap03> Subject: Re: [PATCH v3 06/14] media: mtk-mdp: Get rid of mtk_smi_larb_get/put From: Yong Wu To: houlong wei CC: Matthias Brugger , Joerg Roedel , Rob Herring , Evan Green , Robin Murphy , Tomasz Figa , Will Deacon , , , , , , , , Nicolas Boichat , "Matthias Kaehlcke" , , , , , Date: Thu, 5 Sep 2019 13:56:39 +0800 In-Reply-To: <1567570074.31301.19.camel@mhfsdcap03> References: <1567570074.31301.19.camel@mhfsdcap03> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-SNTS-SMTP: B5594BCA8B000D0387E321BE740558961162944E3E3D0781D08371B12D3EAA0E2000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-09-04 at 12:07 +0800, houlong wei wrote: > Hi, Yong, > > I have inline comment below. Thanks for your review. > > > MediaTek IOMMU has already added the device_link between the consumer > > and smi-larb device. If the mdp device call the pm_runtime_get_sync, > > the smi-larb's pm_runtime_get_sync also be called automatically. > > > > CC: Minghsiu Tsai > > Signed-off-by: Yong Wu > > Reviewed-by: Evan Green > > --- > > drivers/media/platform/mtk-mdp/mtk_mdp_comp.c | 38 --------------------------- > > drivers/media/platform/mtk-mdp/mtk_mdp_comp.h | 2 -- > > drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 1 - > > 3 files changed, 41 deletions(-) > > > > diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c > > index 9afe816..5985a9b 100644 > > --- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c > > +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c > > @@ -9,7 +9,6 @@ > > #include > > #include > > #include > > -#include > > > > #include "mtk_mdp_comp.h" > > > > @@ -58,14 +57,6 @@ void mtk_mdp_comp_clock_on(struct device *dev, struct mtk_mdp_comp *comp) > > { > > int i, err; > > > > - if (comp->larb_dev) { > > - err = mtk_smi_larb_get(comp->larb_dev); > > - if (err) > > - dev_err(dev, > > - "failed to get larb, err %d. type:%d id:%d\n", > > - err, comp->type, comp->id); > > - } > > In previous design,mtk_mdp_comp_clock_on() is called by each MDP > hardware component, and mtk_smi_larb_get() is also called for each MDP > hardware component which accesses DRAM via SMI larb. > > Since mdp device only contains mdp_rdma component, so > pm_runtime_get_sync() will ignore other smi-larb clock. We need consider > how to enable clocks of other smi-larb associated with other mdp > component, e.g. mdp_wdma, mdp_wrot. > Sorry, I'm not so familiar with mdp, thus, for MDP part, the test and reviewing from Minghsiu or you is expected. This patch only delete the smi interface literally. In my understanding, mdp should call pm_runtime_get with the corresponding device, no matter mdp_wdma or mdp_wrot device. Of course I am not sure the mdp flow, If this patch affect its function, please tell me. Also, If mdp driver need change correspondingly, I will put it into this series like [12/14] of this patchset which is from display. [snip] From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yong Wu Subject: Re: [PATCH v3 06/14] media: mtk-mdp: Get rid of mtk_smi_larb_get/put Date: Thu, 5 Sep 2019 13:56:39 +0800 Message-ID: <1567662999.18702.28.camel@mhfsdcap03> References: <1567570074.31301.19.camel@mhfsdcap03> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1567570074.31301.19.camel@mhfsdcap03> Sender: linux-kernel-owner@vger.kernel.org To: houlong wei Cc: Matthias Brugger , Joerg Roedel , Rob Herring , Evan Green , Robin Murphy , Tomasz Figa , Will Deacon , linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, youlin.pei@mediatek.com, Nicolas Boichat , Matthias Kaehlcke , anan.sun@mediatek.com, cui.zhang@mediatek.com, chao.hao@mediatek.com, ming-fan.chen@mediatek.com, minghsiu.tsai@mediatek.com List-Id: devicetree@vger.kernel.org On Wed, 2019-09-04 at 12:07 +0800, houlong wei wrote: > Hi, Yong, > > I have inline comment below. Thanks for your review. > > > MediaTek IOMMU has already added the device_link between the consumer > > and smi-larb device. If the mdp device call the pm_runtime_get_sync, > > the smi-larb's pm_runtime_get_sync also be called automatically. > > > > CC: Minghsiu Tsai > > Signed-off-by: Yong Wu > > Reviewed-by: Evan Green > > --- > > drivers/media/platform/mtk-mdp/mtk_mdp_comp.c | 38 --------------------------- > > drivers/media/platform/mtk-mdp/mtk_mdp_comp.h | 2 -- > > drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 1 - > > 3 files changed, 41 deletions(-) > > > > diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c > > index 9afe816..5985a9b 100644 > > --- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c > > +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c > > @@ -9,7 +9,6 @@ > > #include > > #include > > #include > > -#include > > > > #include "mtk_mdp_comp.h" > > > > @@ -58,14 +57,6 @@ void mtk_mdp_comp_clock_on(struct device *dev, struct mtk_mdp_comp *comp) > > { > > int i, err; > > > > - if (comp->larb_dev) { > > - err = mtk_smi_larb_get(comp->larb_dev); > > - if (err) > > - dev_err(dev, > > - "failed to get larb, err %d. type:%d id:%d\n", > > - err, comp->type, comp->id); > > - } > > In previous design,mtk_mdp_comp_clock_on() is called by each MDP > hardware component, and mtk_smi_larb_get() is also called for each MDP > hardware component which accesses DRAM via SMI larb. > > Since mdp device only contains mdp_rdma component, so > pm_runtime_get_sync() will ignore other smi-larb clock. We need consider > how to enable clocks of other smi-larb associated with other mdp > component, e.g. mdp_wdma, mdp_wrot. > Sorry, I'm not so familiar with mdp, thus, for MDP part, the test and reviewing from Minghsiu or you is expected. This patch only delete the smi interface literally. In my understanding, mdp should call pm_runtime_get with the corresponding device, no matter mdp_wdma or mdp_wrot device. Of course I am not sure the mdp flow, If this patch affect its function, please tell me. Also, If mdp driver need change correspondingly, I will put it into this series like [12/14] of this patchset which is from display. [snip] From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_SANE_2 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 1AD67C3A5A5 for ; Thu, 5 Sep 2019 05:56:59 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (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 DE73E20870 for ; Thu, 5 Sep 2019 05:56:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE73E20870 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id F1AB5C6E; Thu, 5 Sep 2019 05:56:57 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 4638EC37 for ; Thu, 5 Sep 2019 05:56:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mailgw02.mediatek.com (unknown [1.203.163.81]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 74763A9 for ; Thu, 5 Sep 2019 05:56:53 +0000 (UTC) X-UUID: b315badb3ec945b792741a96f66d657f-20190905 X-UUID: b315badb3ec945b792741a96f66d657f-20190905 Received: from mtkcas36.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 273631663; Thu, 05 Sep 2019 13:56:45 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 5 Sep 2019 13:56:38 +0800 Received: from [10.17.3.153] (172.27.4.253) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 5 Sep 2019 13:56:37 +0800 Message-ID: <1567662999.18702.28.camel@mhfsdcap03> Subject: Re: [PATCH v3 06/14] media: mtk-mdp: Get rid of mtk_smi_larb_get/put From: Yong Wu To: houlong wei Date: Thu, 5 Sep 2019 13:56:39 +0800 In-Reply-To: <1567570074.31301.19.camel@mhfsdcap03> References: <1567570074.31301.19.camel@mhfsdcap03> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: B5594BCA8B000D0387E321BE740558961162944E3E3D0781D08371B12D3EAA0E2000:8 X-MTK: N Cc: youlin.pei@mediatek.com, devicetree@vger.kernel.org, Nicolas Boichat , cui.zhang@mediatek.com, srv_heupstream@mediatek.com, chao.hao@mediatek.com, Will Deacon , linux-kernel@vger.kernel.org, Evan Green , Tomasz Figa , iommu@lists.linux-foundation.org, Rob Herring , linux-mediatek@lists.infradead.org, Matthias Brugger , minghsiu.tsai@mediatek.com, ming-fan.chen@mediatek.com, anan.sun@mediatek.com, Robin Murphy , Matthias Kaehlcke , linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: iommu-bounces@lists.linux-foundation.org Errors-To: iommu-bounces@lists.linux-foundation.org On Wed, 2019-09-04 at 12:07 +0800, houlong wei wrote: > Hi, Yong, > > I have inline comment below. Thanks for your review. > > > MediaTek IOMMU has already added the device_link between the consumer > > and smi-larb device. If the mdp device call the pm_runtime_get_sync, > > the smi-larb's pm_runtime_get_sync also be called automatically. > > > > CC: Minghsiu Tsai > > Signed-off-by: Yong Wu > > Reviewed-by: Evan Green > > --- > > drivers/media/platform/mtk-mdp/mtk_mdp_comp.c | 38 --------------------------- > > drivers/media/platform/mtk-mdp/mtk_mdp_comp.h | 2 -- > > drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 1 - > > 3 files changed, 41 deletions(-) > > > > diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c > > index 9afe816..5985a9b 100644 > > --- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c > > +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c > > @@ -9,7 +9,6 @@ > > #include > > #include > > #include > > -#include > > > > #include "mtk_mdp_comp.h" > > > > @@ -58,14 +57,6 @@ void mtk_mdp_comp_clock_on(struct device *dev, struct mtk_mdp_comp *comp) > > { > > int i, err; > > > > - if (comp->larb_dev) { > > - err = mtk_smi_larb_get(comp->larb_dev); > > - if (err) > > - dev_err(dev, > > - "failed to get larb, err %d. type:%d id:%d\n", > > - err, comp->type, comp->id); > > - } > > In previous design,mtk_mdp_comp_clock_on() is called by each MDP > hardware component, and mtk_smi_larb_get() is also called for each MDP > hardware component which accesses DRAM via SMI larb. > > Since mdp device only contains mdp_rdma component, so > pm_runtime_get_sync() will ignore other smi-larb clock. We need consider > how to enable clocks of other smi-larb associated with other mdp > component, e.g. mdp_wdma, mdp_wrot. > Sorry, I'm not so familiar with mdp, thus, for MDP part, the test and reviewing from Minghsiu or you is expected. This patch only delete the smi interface literally. In my understanding, mdp should call pm_runtime_get with the corresponding device, no matter mdp_wdma or mdp_wrot device. Of course I am not sure the mdp flow, If this patch affect its function, please tell me. Also, If mdp driver need change correspondingly, I will put it into this series like [12/14] of this patchset which is from display. [snip] _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_SANE_2 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 BC625C3A5A5 for ; Thu, 5 Sep 2019 05:57:03 +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 8EA0E2173B for ; Thu, 5 Sep 2019 05:57:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="O8u2cek7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8EA0E2173B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8CMaSfZvmhU/omlTkDnwsCucbl//YVbyKbY/sJtEH10=; b=O8u2cek7rF8yf/ VC+RMFCYRjxwZL3KHe81v9/Ta7F1vmpNUJhtJKm8WJrguHHk3c0A+nTlZkc3iC6k4s/F5FO3R78/f KBUchPLB5dQnQF2tKZUjMycNsGkcmZn0OVW4k3zwd9jX+ndl9dAZLtrHLqXvEuw6VurRLKoQdTHx8 5VD5rZqp24bXjwW4jYacchxWrQp19KWxZGuUSvpBoVGn+GWyGLxcvw60uO9WzhVxbWdoQt1dAGx9S il+3SvAqpOWPqmy8Ei1VxQWc5FaiHOxg/uXGLn+QgRl+ymLurWBlbrhDRbUqXpHFMTJddGq8mi/ZO g9hshxnXQ3cC7dxxbF8w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i5klQ-00021s-SA; Thu, 05 Sep 2019 05:57:00 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i5klM-0001zR-97; Thu, 05 Sep 2019 05:56:57 +0000 X-UUID: 021cec5728554d41a55a2e95c52b5397-20190904 X-UUID: 021cec5728554d41a55a2e95c52b5397-20190904 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 634166656; Wed, 04 Sep 2019 21:56:47 -0800 Received: from MTKMBS31DR.mediatek.inc (172.27.6.102) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 4 Sep 2019 22:56:45 -0700 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 5 Sep 2019 13:56:38 +0800 Received: from [10.17.3.153] (172.27.4.253) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 5 Sep 2019 13:56:37 +0800 Message-ID: <1567662999.18702.28.camel@mhfsdcap03> Subject: Re: [PATCH v3 06/14] media: mtk-mdp: Get rid of mtk_smi_larb_get/put From: Yong Wu To: houlong wei Date: Thu, 5 Sep 2019 13:56:39 +0800 In-Reply-To: <1567570074.31301.19.camel@mhfsdcap03> References: <1567570074.31301.19.camel@mhfsdcap03> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: B5594BCA8B000D0387E321BE740558961162944E3E3D0781D08371B12D3EAA0E2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190904_225656_328944_A5F9645D X-CRM114-Status: GOOD ( 16.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: youlin.pei@mediatek.com, devicetree@vger.kernel.org, Nicolas Boichat , cui.zhang@mediatek.com, srv_heupstream@mediatek.com, chao.hao@mediatek.com, Joerg Roedel , Will Deacon , linux-kernel@vger.kernel.org, Evan Green , Tomasz Figa , iommu@lists.linux-foundation.org, Rob Herring , linux-mediatek@lists.infradead.org, Matthias Brugger , minghsiu.tsai@mediatek.com, ming-fan.chen@mediatek.com, anan.sun@mediatek.com, Robin Murphy , Matthias Kaehlcke , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 2019-09-04 at 12:07 +0800, houlong wei wrote: > Hi, Yong, > > I have inline comment below. Thanks for your review. > > > MediaTek IOMMU has already added the device_link between the consumer > > and smi-larb device. If the mdp device call the pm_runtime_get_sync, > > the smi-larb's pm_runtime_get_sync also be called automatically. > > > > CC: Minghsiu Tsai > > Signed-off-by: Yong Wu > > Reviewed-by: Evan Green > > --- > > drivers/media/platform/mtk-mdp/mtk_mdp_comp.c | 38 --------------------------- > > drivers/media/platform/mtk-mdp/mtk_mdp_comp.h | 2 -- > > drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 1 - > > 3 files changed, 41 deletions(-) > > > > diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c > > index 9afe816..5985a9b 100644 > > --- a/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c > > +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_comp.c > > @@ -9,7 +9,6 @@ > > #include > > #include > > #include > > -#include > > > > #include "mtk_mdp_comp.h" > > > > @@ -58,14 +57,6 @@ void mtk_mdp_comp_clock_on(struct device *dev, struct mtk_mdp_comp *comp) > > { > > int i, err; > > > > - if (comp->larb_dev) { > > - err = mtk_smi_larb_get(comp->larb_dev); > > - if (err) > > - dev_err(dev, > > - "failed to get larb, err %d. type:%d id:%d\n", > > - err, comp->type, comp->id); > > - } > > In previous design,mtk_mdp_comp_clock_on() is called by each MDP > hardware component, and mtk_smi_larb_get() is also called for each MDP > hardware component which accesses DRAM via SMI larb. > > Since mdp device only contains mdp_rdma component, so > pm_runtime_get_sync() will ignore other smi-larb clock. We need consider > how to enable clocks of other smi-larb associated with other mdp > component, e.g. mdp_wdma, mdp_wrot. > Sorry, I'm not so familiar with mdp, thus, for MDP part, the test and reviewing from Minghsiu or you is expected. This patch only delete the smi interface literally. In my understanding, mdp should call pm_runtime_get with the corresponding device, no matter mdp_wdma or mdp_wrot device. Of course I am not sure the mdp flow, If this patch affect its function, please tell me. Also, If mdp driver need change correspondingly, I will put it into this series like [12/14] of this patchset which is from display. [snip] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel