From: Sam Ravnborg <sam@ravnborg.org>
To: tang pengchuan <kevin3.tang@gmail.com>
Cc: mark.rutland@arm.com, Baolin Wang <baolin.wang@linaro.org>,
David Airlie <airlied@linux.ie>,
Chunyan Zhang <zhang.lyra@gmail.com>,
"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
ML dri-devel <dri-devel@lists.freedesktop.org>,
robh+dt@kernel.org, Orson Zhai <orsonzhai@gmail.com>
Subject: Re: [PATCH RFC v3 2/6] drm/sprd: add Unisoc's drm kms master
Date: Sat, 22 Feb 2020 22:27:13 +0100 [thread overview]
Message-ID: <20200222212713.GA30872@ravnborg.org> (raw)
In-Reply-To: <CAFPSGXacMKTPrxk_FOrwrvH_XfmO3dYCCa_GoPCe_HUfQFPHtw@mail.gmail.com>
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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Sam Ravnborg <sam@ravnborg.org>
To: tang pengchuan <kevin3.tang@gmail.com>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
robh+dt@kernel.org, mark.rutland@arm.com,
Orson Zhai <orsonzhai@gmail.com>,
ML dri-devel <dri-devel@lists.freedesktop.org>,
"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
Chunyan Zhang <zhang.lyra@gmail.com>,
Baolin Wang <baolin.wang@linaro.org>
Subject: Re: [PATCH RFC v3 2/6] drm/sprd: add Unisoc's drm kms master
Date: Sat, 22 Feb 2020 22:27:13 +0100 [thread overview]
Message-ID: <20200222212713.GA30872@ravnborg.org> (raw)
In-Reply-To: <CAFPSGXacMKTPrxk_FOrwrvH_XfmO3dYCCa_GoPCe_HUfQFPHtw@mail.gmail.com>
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
next prev parent reply other threads:[~2020-02-22 21:27 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-21 7:48 [PATCH RFC v3 0/6] Add Unisoc's drm kms module Kevin Tang
2020-02-21 7:48 ` Kevin Tang
2020-02-21 7:48 ` [PATCH RFC v3 1/6] dt-bindings: display: add Unisoc's drm master bindings Kevin Tang
2020-02-21 7:48 ` Kevin Tang
2020-02-21 21:21 ` Sam Ravnborg
2020-02-21 21:21 ` Sam Ravnborg
2020-02-22 9:10 ` Orson Zhai
2020-02-22 9:10 ` Orson Zhai
2020-02-22 10:49 ` Sam Ravnborg
2020-02-22 10:49 ` Sam Ravnborg
2020-02-22 12:40 ` tang pengchuan
2020-02-21 7:48 ` [PATCH RFC v3 2/6] drm/sprd: add Unisoc's drm kms master Kevin Tang
2020-02-21 7:48 ` Kevin Tang
2020-02-21 21:36 ` Sam Ravnborg
2020-02-21 21:36 ` Sam Ravnborg
2020-02-22 17:06 ` tang pengchuan
2020-02-22 21:27 ` Sam Ravnborg [this message]
2020-02-22 21:27 ` Sam Ravnborg
2020-02-23 4:26 ` tang pengchuan
2020-02-23 4:58 ` tang pengchuan
2020-02-25 7:38 ` Thomas Zimmermann
2020-02-25 7:38 ` Thomas Zimmermann
2020-02-25 9:45 ` tang pengchuan
2020-02-24 16:43 ` Emil Velikov
2020-02-24 16:43 ` Emil Velikov
2020-02-25 3:08 ` tang pengchuan
2020-02-21 7:48 ` [PATCH RFC v3 3/6] dt-bindings: display: add Unisoc's dpu bindings Kevin Tang
2020-02-21 7:48 ` Kevin Tang
2020-02-21 21:39 ` Sam Ravnborg
2020-02-21 21:39 ` Sam Ravnborg
2020-02-23 13:46 ` tang pengchuan
2020-02-21 7:48 ` [PATCH RFC v3 4/6] drm/sprd: add Unisoc's drm display controller driver Kevin Tang
2020-02-21 7:48 ` Kevin Tang
2020-02-23 21:38 ` kbuild test robot
2020-02-24 17:35 ` Emil Velikov
2020-02-24 17:35 ` Emil Velikov
2020-02-25 9:08 ` tang pengchuan
2020-02-21 7:48 ` [PATCH RFC v3 5/6] dt-bindings: display: add Unisoc's mipi dsi&dphy bindings Kevin Tang
2020-02-21 7:48 ` Kevin Tang
2020-02-21 7:48 ` [PATCH RFC v3 6/6] drm/sprd: add Unisoc's drm mipi dsi&dphy driver Kevin Tang
2020-02-21 7:48 ` Kevin Tang
2020-02-24 0:38 ` kbuild test robot
2020-02-21 21:17 ` [PATCH RFC v3 0/6] Add Unisoc's drm kms module Sam Ravnborg
2020-02-21 21:17 ` Sam Ravnborg
2020-02-23 4:01 ` tang pengchuan
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=20200222212713.GA30872@ravnborg.org \
--to=sam@ravnborg.org \
--cc=airlied@linux.ie \
--cc=baolin.wang@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kevin3.tang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=orsonzhai@gmail.com \
--cc=robh+dt@kernel.org \
--cc=zhang.lyra@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.