Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp403653ybe; Wed, 4 Sep 2019 22:58:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXal2B94jTrYI/F0E8o+FA6ifxYQJAjvw7gMs0WUx+MHdEk6jXlUoz+PX+AqHp0sJMuaNK X-Received: by 2002:a62:3887:: with SMTP id f129mr1743829pfa.245.1567663090540; Wed, 04 Sep 2019 22:58:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567663090; cv=none; d=google.com; s=arc-20160816; b=FocK61/lGccMOBeigtBlzZYt1YCwsNmmlL7xr+ZTfLewYKE/BWQnp7Z4vXb2/9dAjp iYFVXx5howmky+LatO+ljD5Q0dBwRK8JFf6L3ZtRcG/Ib1ILbjxikDBroTkuIk/q0fz5 LyBoF6N5dIQCycm08qkp8ZWZ6VYcDUmD0VwH/NCLSsquCWFM+7kCMCo/m/xvJK4KvnBg suo8TDW8xRZD2Fm+IJndK2H189g9Da1GrjD8O67T8FuALkrER5D5E/F6CsmEWKmkORCL fAWyLWRE9Q9zOebgGR6IvGHPXfXqdIsAxmAxCJA4gvOoqGcwKLXlgbvNJiK40DpdWaaK ggcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=ZcayC9FM4IEfURFjMJbIL7n1IDsOaU8H00gTHPUh3qU=; b=mm2v78ME2KiRubPh1VKImFlDS2vd+z/SkyV+bG0DxhV2ndnAlo+ecxlllvec7dQUje 1vbB8+KFAaQuy15o2lF/ACsv+ZsSfZKRwiW/6M1VDPIRo5oq5+BdOiOQIAzNWyOY1tsX 9ZYmpWjowDd4tW2YElYaiLFZe6FBl8gBGrAlytEzKlSOCHDkV0UUXqJz5Lz3EWSW0mCh bdm+hQ9LYP9M6GAudPGvvo76BGXMQObvmawFAD1ofVNak3+953+//v52P6jkh+ETSBp0 KQMGfHD1VL6/PENTbAyIomis7txCanu9pHZaO5xFI2QDgoIesDOKDcIfRZU0jcVo2UNO D8CQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13si1042057pls.209.2019.09.04.22.57.54; Wed, 04 Sep 2019 22:58:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731148AbfIEF4z (ORCPT + 99 others); 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]