From: "Nancy Lin (林欣螢)" <Nancy.Lin@mediatek.com>
To: "nfraprado@collabora.com" <nfraprado@collabora.com>
Cc: "llvm@lists.linux.dev" <llvm@lists.linux.dev>,
"Yongqiang Niu (牛永强)" <yongqiang.niu@mediatek.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"Singo Chang (張興國)" <Singo.Chang@mediatek.com>,
"nathan@kernel.org" <nathan@kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
"Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>,
"linux@roeck-us.net" <linux@roeck-us.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"daniel@ffwll.ch" <daniel@ffwll.ch>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"wim@linux-watchdog.org" <wim@linux-watchdog.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"airlied@linux.ie" <airlied@linux.ie>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>,
"ndesaulniers@google.com" <ndesaulniers@google.com>
Subject: Re: [PATCH v28 6/7] drm/mediatek: add drm ovl_adaptor sub driver for MT8195
Date: Mon, 28 Nov 2022 10:38:27 +0000 [thread overview]
Message-ID: <734e2bfa43db37519c9d90b48150e9696d9987df.camel@mediatek.com> (raw)
In-Reply-To: <20221125222402.u4qiolkqi2nsv7ae@notapiano>
Dear Nicolas,
Thanks for the review.
On Fri, 2022-11-25 at 17:24 -0500, Nícolas F. R. A. Prado wrote:
> On Mon, Nov 07, 2022 at 03:24:12PM +0800, Nancy.Lin wrote:
> > Add drm ovl_adaptor sub driver. Bring up ovl_adaptor sub driver if
> > the component exists in the path.
> >
> > Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com>
> > Reviewed-by: AngeloGioacchino Del Regno <
> > angelogioacchino.delregno@collabora.com>
> > Reviewed-by: CK Hu <ck.hu@mediatek.com>
> > Tested-by: AngeloGioacchino Del Regno <
> > angelogioacchino.delregno@collabora.com>
> > Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
> > Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> > ---
>
> [..]
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > index 30dcb65d8a5a..ce5617ad04cb 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
>
> [..]
> > @@ -897,22 +906,18 @@ int mtk_drm_crtc_create(struct drm_device
> > *drm_dev,
> > crtc_i++;
> >
> > for (i = 0; i < path_len; i++) {
> > - enum mtk_ddp_comp_id comp_id = path[i];
> > + unsigned int comp_id = path[i];
> > struct device_node *node;
> > - struct mtk_ddp_comp *comp;
> >
> > node = priv->comp_node[comp_id];
> > - comp = &priv->ddp_comp[comp_id];
> > -
> > - if (!node) {
> > - dev_info(dev,
> > - "Not creating crtc %d because
> > component %d is disabled or missing\n",
> > - crtc_i, comp_id);
> > - return 0;
> > - }
> >
> > - if (!comp->dev) {
> > - dev_err(dev, "Component %pOF not
> > initialized\n", node);
> > + /* Not all drm components have a DTS device node, such
> > as ovl_adaptor,
> > + * which is the drm bring up sub driver
> > + */
> > + if (!node && comp_id != DDP_COMPONENT_DRM_OVL_ADAPTOR)
> > {
> > + dev_err(dev,
> > + "Not creating crtc %d because component
> > %d is disabled, missing or not initialized\n",
> > + crtc_i, comp_id);
> > return -ENODEV;
>
> Why do you change the behavior here? If !node, the return should be
> 0, because
> there are two separate data streams, for internal and external
> display, and they
> are optional. It should be possible to for example have the nodes for
> external
> display disabled in DT and still have the driver probe and have a
> working
> internal display. But with this change you're breaking that. Also,
> this message
> should stay as dev_info and not mention "not initialized", so
> basically it
> should stay the same as before the change.
>
> Thanks,
> Nícolas
Yes, You are right. This is my mistake. I should not change this
behavior. I will fix it and modify as following for the ovl_adaptor sub
driver component, which don't have dts device node.
@@ -905,7 +914,10 @@ int mtk_drm_crtc_create(struct drm_device
*drm_dev,
node = priv->comp_node[comp_id];
comp = &priv->ddp_comp[comp_id];
- if (!node) {
+ /* Not all drm components have a DTS device node, such
as ovl_adaptor,
+ * which is the drm bring up sub driver
+ */
+ if (!node && comp_id != DDP_COMPONENT_DRM_OVL_ADAPTOR)
{
dev_info(dev,
"Not creating crtc %d because
component %d is disabled or missing\n",
crtc_i, comp_id);
@@ -938,7 +950,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
}
Regards,
Nancy
next prev parent reply other threads:[~2022-11-28 10:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20221107072413.16178-1-nancy.lin@mediatek.com>
[not found] ` <20221107072413.16178-7-nancy.lin@mediatek.com>
2022-11-25 22:24 ` [PATCH v28 6/7] drm/mediatek: add drm ovl_adaptor sub driver for MT8195 Nícolas F. R. A. Prado
2022-11-28 10:38 ` Nancy Lin (林欣螢) [this message]
[not found] ` <20221107072413.16178-2-nancy.lin@mediatek.com>
2023-03-06 15:31 ` [PATCH v28 1/7] dt-bindings: mediatek: add ethdr definition for mt8195 Chun-Kuang Hu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=734e2bfa43db37519c9d90b48150e9696d9987df.camel@mediatek.com \
--to=nancy.lin@mediatek.com \
--cc=Jason-JH.Lin@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=Singo.Chang@mediatek.com \
--cc=airlied@linux.ie \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux@roeck-us.net \
--cc=llvm@lists.linux.dev \
--cc=matthias.bgg@gmail.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nfraprado@collabora.com \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=wim@linux-watchdog.org \
--cc=yongqiang.niu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).