Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp540393pxb; Thu, 30 Sep 2021 11:21:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQhnAkn/48Xd70SpTkb970E0mNN7SfBJRWQbR5wnskBz9HWr6ni8gUV4OjrBelQCtUXCHu X-Received: by 2002:a05:6a00:c8c:b0:447:bddb:c83 with SMTP id a12-20020a056a000c8c00b00447bddb0c83mr6999496pfv.1.1633026112749; Thu, 30 Sep 2021 11:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633026112; cv=none; d=google.com; s=arc-20160816; b=UyM2X1+28imAj/qTbKOF7ztUEi52PUQUIvhhljfk8SQUyo9WcZCPcAsANR0Po0S2DO h7/tanqWcdRlkBYFg/+bBNmFdMRCxwgTw+l+BCp5qHZ7oFIRcLjkZDbFCO6Aen8eDcB3 +H9E6aTDVLY9a5yNkvtSk+fef+1WQGiGmfV5zzg9QKxZxxCHyzhssJQ17ligcbhPvjVV +X1EhH4V5id2esHpVsQTrVFI+y3USnuQXw/iraetukjZK3Vas970fchM5ez2NqTAijXb i8WH+Mtex4JzPfcV/H5behUf6YC++AyE7gODqc3g0ddvcvwJstkISMUqjvQSq8uhh8BU ey6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=xr7P+ptu4oUhWAnU/UCA7rfoh033l8jtRz+aiZWtqqY=; b=KoCYcVd2iGhmXPbReinqbTu7pqWhWbZ6lWNg+v9wMEmgi92QsGnoOl/DG6Xlg1jBit eJx252EbD6ah4BOdovhkkLnSuBkEyaQkyQ0UGVsEgEmSZ4bkjTbnwrfpVDq6mkRAEhPi FcDWbNzcihRwLsfdsoWA8YLZLcWmeLku5NPIr+4zHFWxOdoHskQof47+c8MHeFgUYfHn 9ui2WsOYDJ1PAGxYKLHOQPqjDSq0So/MY6RBYQpStc8WYBHmtb7XcIgkBdt+b/fWLz5S lvC73r6Wg46+zP3LfcPm//1KiBB08Vh79zVYVlkdj3gevAKzkK8XbUXlJasLy4HrU5lV D1vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sC49Wc0f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si4432004pgq.444.2021.09.30.11.21.38; Thu, 30 Sep 2021 11:21:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sC49Wc0f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351499AbhI3NjH (ORCPT + 99 others); Thu, 30 Sep 2021 09:39:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:45630 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351402AbhI3NjB (ORCPT ); Thu, 30 Sep 2021 09:39:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9E694619E9 for ; Thu, 30 Sep 2021 13:37:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633009038; bh=QYlLL3GDBPrVtkL8isJVyF2sdgxesbQ3gmGxtfmFI40=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=sC49Wc0f3dRgeawqjDFy5eptV2aXdrCeTrYnmRJhsMpWUXhT1sTlwULeZb/6SxErp j1Ue71E0jVQEJGAOPo9ZVXcz//r9Rwd092n5YCkgtJ0lDf1+a7lZa8qJgOa2zAuCTR o92JMs6I588PloSXUlMtVzkcn9KK20yAxHo2pw2c51LOyKdQQ5DzSYmXewp0g5cGzC fmNcESn5APGOxInOrKQTzQMYuiM0Uo4dhDniARrkWK6DIbHaTJ3G+dkcCboijaBC4/ kyCKDpFMPd7rsK6Jn4Mwi8Sp3mBmAXqZzmpxuwdB2C3eEq480o/qDA523e02m3y5Wp Ik1eWtkTdvqDw== Received: by mail-ed1-f47.google.com with SMTP id v10so22491641edj.10 for ; Thu, 30 Sep 2021 06:37:18 -0700 (PDT) X-Gm-Message-State: AOAM533M0w9h/Kg3xdrGRj1gcW0+DboZ7VhJhXrZ8kzXwbvTZhrIiUyF 0/RXNw+IdPgZL19nTLbVPK5acozUFJckBJHErw== X-Received: by 2002:a17:906:3181:: with SMTP id 1mr7127794ejy.388.1633009013939; Thu, 30 Sep 2021 06:36:53 -0700 (PDT) MIME-Version: 1.0 References: <20210929094425.745-1-granquet@baylibre.com> <20210929094425.745-5-granquet@baylibre.com> In-Reply-To: <20210929094425.745-5-granquet@baylibre.com> From: Chun-Kuang Hu Date: Thu, 30 Sep 2021 21:36:42 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 4/4] drm/mediatek: add mt8195 hdmi TX support To: Guillaume Ranquet Cc: Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , linux-kernel , DRI Development , "moderated list:ARM/Mediatek SoC support" , Linux ARM Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Guillaume: This is a big patch, and I'm not familiar with this driver, so the review process would be long. So I tell you about how I review this patch, and if you could process according to my way, the process would be more short. 1. Find the common part of all hdmi driver. Even though mt8195 hdmi has many difference with other mediatek soc hdmi driver, I would like to find the common part and have just one copy of the common part. I expect there would three file finally: mtk_hdmi.c (the common part) mtk_hdmi_mt8173.c (each soc special part) mtk_hdmi_mt8195.c (each soc special part) But this would be difficult in this stage, so you could temporarily have these three file: mtk_hdmi_common.c (the common part) mtk_hdmi.c (each soc special part) mtk_hdmi_mt8195.c (each soc special part) When review is almost done, then change the file name as I wish. 2. The first patch has only basic function, separate advance function to another patch. When comparing mt8195 hdmi driver with other hdmi driver, if mt8195 hdmi driver has some function that other hdmi does not have, I would think that function is advance function and should be separate to another patch. If you follow this way, I think the review process would be short. Because this patch is big, I would just review partial part each time. Regards, Chun-Kuang. Guillaume Ranquet =E6=96=BC 2021=E5=B9=B49=E6=9C=88= 29=E6=97=A5 =E9=80=B1=E4=B8=89 =E4=B8=8B=E5=8D=885:47=E5=AF=AB=E9=81=93=EF= =BC=9A > > Add basic hdmi TX support for the mediatek mt8195 SoCs > > Signed-off-by: Guillaume Ranquet > --- > drivers/gpu/drm/mediatek/Kconfig | 10 + > drivers/gpu/drm/mediatek/Makefile | 4 +- > drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c | 2293 +++++++++++++++++ > drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.h | 128 + > .../gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.c | 530 ++++ > .../gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.h | 20 + > .../gpu/drm/mediatek/mtk_mt8195_hdmi_regs.h | 329 +++ > 7 files changed, 3313 insertions(+), 1 deletion(-) > create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c > create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.h > create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.c > create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.h > create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_regs.h > > diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/= Kconfig > index 2976d21e9a34a..517d065f0511b 100644 > --- a/drivers/gpu/drm/mediatek/Kconfig > +++ b/drivers/gpu/drm/mediatek/Kconfig > @@ -28,3 +28,13 @@ config DRM_MEDIATEK_HDMI > select PHY_MTK_HDMI > help > DRM/KMS HDMI driver for Mediatek SoCs > + > +config DRM_MEDIATEK_HDMI_MT8195_SUSPEND_LOW_POWER > + tristate "DRM HDMI SUSPEND LOW POWER Support for Mediatek mt8195 = SoCs" > + depends on DRM_MEDIATEK_HDMI > + help > + DRM/KMS HDMI SUSPEND_LOW_POWER for Mediatek SoCs. > + Choose this option if you want to disable/enable > + clock and power domain when platform enter suspend, > + and this config depends on DRM_MEDIATEK_HDMI. > + > diff --git a/drivers/gpu/drm/mediatek/Makefile b/drivers/gpu/drm/mediatek= /Makefile > index 29098d7c8307c..736f0816083d0 100644 > --- a/drivers/gpu/drm/mediatek/Makefile > +++ b/drivers/gpu/drm/mediatek/Makefile > @@ -18,6 +18,8 @@ obj-$(CONFIG_DRM_MEDIATEK) +=3D mediatek-drm.o > > mediatek-drm-hdmi-objs :=3D mtk_cec.o \ > mtk_hdmi.o \ > - mtk_hdmi_ddc.o > + mtk_hdmi_ddc.o \ > + mtk_mt8195_hdmi.o \ > + mtk_mt8195_hdmi_ddc.o \ > > obj-$(CONFIG_DRM_MEDIATEK_HDMI) +=3D mediatek-drm-hdmi.o > diff --git a/drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c b/drivers/gpu/drm= /mediatek/mtk_mt8195_hdmi.c > new file mode 100644 > index 0000000000000..46c7c8af524ac > --- /dev/null >