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 <minghsiu.tsai@xxxxxxxxxxxx> > > Signed-off-by: Yong Wu <yong.wu@xxxxxxxxxxxx> > > Reviewed-by: Evan Green <evgreen@xxxxxxxxxxxx> > > --- > > 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 <linux/of.h> > > #include <linux/of_address.h> > > #include <linux/of_platform.h> > > -#include <soc/mediatek/smi.h> > > > > #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]