Re: [PATCH v16 3/8] drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Daniel,

Am Freitag, den 06.05.2016, 15:16 +0200 schrieb Daniel Vetter:
> On Fri, May 06, 2016 at 03:05:49PM +0200, Philipp Zabel wrote:
> > From: CK Hu <ck.hu@xxxxxxxxxxxx>
> > 
> > This patch adds an initial DRM driver for the Mediatek MT8173 DISP
> > subsystem. It currently supports two fixed output streams from the
> > OVL0/OVL1 sources to the DSI0/DPI0 sinks, respectively.
> > 
> > Signed-off-by: CK Hu <ck.hu@xxxxxxxxxxxx>
> > Signed-off-by: YT Shen <yt.shen@xxxxxxxxxxxx>
> > Signed-off-by: Daniel Kurtz <djkurtz@xxxxxxxxxxxx>
> > Signed-off-by: Bibby Hsieh <bibby.hsieh@xxxxxxxxxxxx>
> > Signed-off-by: Mao Huang <littlecvr@xxxxxxxxxxxx>
> > Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
> 
> Spotted two tiny things below.
[...]
> > +static int mtk_drm_bind(struct device *dev)
> > +{
> > +	struct mtk_drm_private *private = dev_get_drvdata(dev);
> > +	struct drm_device *drm;
> > +	int ret;
> > +
> > +	drm = drm_dev_alloc(&mtk_drm_driver, dev);
> > +	if (!drm)
> > +		return -ENOMEM;
> > +
> > +	drm_dev_set_unique(drm, dev_name(dev));
> > +
> > +	ret = drm_dev_register(drm, 0);
> > +	if (ret < 0)
> > +		goto err_free;
> > +
> > +	drm->dev_private = private;
> > +	private->drm = drm;
> > +
> > +	ret = mtk_drm_kms_init(drm);
> > +	if (ret < 0)
> > +		goto err_unregister;
> 
> Wrong way round, drm_dev_register should be last. And you're missing
> drm_connector_register_all here.
> -Daniel

Thanks, that also means the mtk_dsi and mtk_hdmi drivers must not call
drm_connector_(un)register anymore.
What about the connectors registered by external bridge drivers? Should
those check for (dev->driver->load) before calling
drm_connector_unregister?

regards
Philipp

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux