Hi, Yongqiang: Yongqiang Niu <yongqiang.niu@xxxxxxxxxxxx> 於 2020年8月8日 週六 上午10:56寫道: > > the reason why split out display connection function: > 1. there will more and more Mediatek Soc upstream, and the display path > connection function mtk_mmsys_ddp_mout_en, mtk_mmsys_ddp_sel_in and > mtk_mmsys_ddp_sout_sel will complicated more and more > 2. many of the connection are only used in some SoC, and useless for > other SoC and not readable, > 3. if we add a new SoC connection, we need check is this affect other > Soc > > the reason why not apply the previous series method: > this version is more readable and clear > if go on use v6, except mt2701/mt8173/mt2712, we need add two more > private data array for mt6779 and mt6797, and the connect function > will add more if/else usecase > > move current display connection function into mt2701-mmsys.c > keep mt2701/mt8173/mt2712/mt6779/mt6797 with original version > connection function > the corresponded SoC upstream member will coding these and test it > on the SoC if it is need. > For this patch, I prefer [1]'s implementation. In [1], for each SoC, the only difference is an array for routing register setting. In this patch, the difference are three function which is more complicated than [1]. If you like, you could pick [1] to upstream. [1] https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2345186 Regards, Chun-Kuang. > Signed-off-by: Yongqiang Niu <yongqiang.niu@xxxxxxxxxxxx> > --- > drivers/soc/mediatek/Makefile | 1 + > drivers/soc/mediatek/mmsys/Makefile | 2 + > drivers/soc/mediatek/mmsys/mt2701-mmsys.c | 250 +++++++++++++++++++++++++++ > drivers/soc/mediatek/mtk-mmsys.c | 271 +++++------------------------- > include/linux/soc/mediatek/mtk-mmsys.h | 15 ++ > 5 files changed, 314 insertions(+), 225 deletions(-) > create mode 100644 drivers/soc/mediatek/mmsys/Makefile > create mode 100644 drivers/soc/mediatek/mmsys/mt2701-mmsys.c >