[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200222212713.GA30872@ravnborg.org>
Date: Sat, 22 Feb 2020 22:27:13 +0100
From: Sam Ravnborg <sam@...nborg.org>
To: tang pengchuan <kevin3.tang@...il.com>
Cc: David Airlie <airlied@...ux.ie>, Daniel Vetter <daniel@...ll.ch>,
robh+dt@...nel.org, mark.rutland@....com,
Orson Zhai <orsonzhai@...il.com>,
ML dri-devel <dri-devel@...ts.freedesktop.org>,
"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>,
Chunyan Zhang <zhang.lyra@...il.com>,
Baolin Wang <baolin.wang@...aro.org>
Subject: Re: [PATCH RFC v3 2/6] drm/sprd: add Unisoc's drm kms master
Hi Kevin/tang.
Thanks for the quick and detailed feedback.
Your questions are addressed below.
Sam
> > > +static int sprd_drm_bind(struct device *dev)
> > > +{
> > > + struct drm_device *drm;
> > > + struct sprd_drm *sprd;
> > > + int err;
> > > +
> > > + drm = drm_dev_alloc(&sprd_drm_drv, dev);
> > > + if (IS_ERR(drm))
> > > + return PTR_ERR(drm);
> > You should embed drm_device in struct sprd_drm.
> > See example code in drm/drm_drv.c
> >
> > This is what modern drm drivers do.
> >
> > I *think* you can drop the component framework if you do this.
> >
> I have read it(drm/drm_drv.c) carefully, if drop the component framework,
> the whole our drm driver maybe need to redesign, so i still want to keep
> current design.
OK, fine.
> > > + sprd_drm_mode_config_init(drm);
> > > +
> > > + /* bind and init sub drivers */
> > > + err = component_bind_all(drm->dev, drm);
> > > + if (err) {
> > > + DRM_ERROR("failed to bind all component.\n");
> > > + goto err_dc_cleanup;
> > > + }
> > When you have a drm_device - which you do here.
> > Then please use drm_err() and friends for error messages.
> > Please verify all uses of DRM_XXX
> >
> modern drm drivers need drm_xxx to replace DRM_XXX?
Yes, use of DRM_XXX is deprecated - when you have a drm_device.
> >
> > > + /* with irq_enabled = true, we can use the vblank feature. */
> > > + drm->irq_enabled = true;
> > I cannot see any irq being installed. This looks wrong.
> >
> Our display controller isr is been register on crtc driver(sprd_dpu.c), not
> here.
I think you just need to move this to next patch and then it is fine.
Sam
Powered by blists - more mailing lists