lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <734e2bfa43db37519c9d90b48150e9696d9987df.camel@mediatek.com>
Date:   Mon, 28 Nov 2022 10:38:27 +0000
From:   Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>
To:     "nfraprado@...labora.com" <nfraprado@...labora.com>
CC:     "llvm@...ts.linux.dev" <llvm@...ts.linux.dev>,
        Yongqiang Niu (牛永强) 
        <yongqiang.niu@...iatek.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        Singo Chang (張興國) 
        <Singo.Chang@...iatek.com>,
        "nathan@...nel.org" <nathan@...nel.org>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        "chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>,
        Jason-JH Lin (林睿祥) 
        <Jason-JH.Lin@...iatek.com>,
        "linux@...ck-us.net" <linux@...ck-us.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "daniel@...ll.ch" <daniel@...ll.ch>,
        "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        Project_Global_Chrome_Upstream_Group 
        <Project_Global_Chrome_Upstream_Group@...iatek.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "wim@...ux-watchdog.org" <wim@...ux-watchdog.org>,
        "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
        "airlied@...ux.ie" <airlied@...ux.ie>,
        "angelogioacchino.delregno@...labora.com" 
        <angelogioacchino.delregno@...labora.com>,
        "ndesaulniers@...gle.com" <ndesaulniers@...gle.com>
Subject: Re: [PATCH v28 6/7] drm/mediatek: add drm ovl_adaptor sub driver for
 MT8195

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@...iatek.com>
> > Reviewed-by: AngeloGioacchino Del Regno <
> > angelogioacchino.delregno@...labora.com>
> > Reviewed-by: CK Hu <ck.hu@...iatek.com>
> > Tested-by: AngeloGioacchino Del Regno <
> > angelogioacchino.delregno@...labora.com>
> > Tested-by: Bo-Chen Chen <rex-bc.chen@...iatek.com>
> > Tested-by: Nícolas F. R. A. Prado <nfraprado@...labora.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

Powered by blists - more mailing lists