From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Rob Clark <robdclark@gmail.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 3/4] drm/omap: fix DMM driver (un)registration
Date: Wed, 2 Apr 2014 17:18:07 +0300 [thread overview]
Message-ID: <533C1C1F.8010401@ti.com> (raw)
In-Reply-To: <CAF6AEGuRZ0aHeUB49FML3ExXm9FVJzQZ_h2EStxXuKiF0-SMFA@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2004 bytes --]
On 02/04/14 17:14, Rob Clark wrote:
> On Wed, Apr 2, 2014 at 8:37 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>> At the moment the DMM driver is never unregistered, even if it's
>> registered in the omapdrm module's init function. This means we'll get
>> errors when reloading the omapdrm module.
>>
>> Fix this by unregistering the DMM driver properly, and also change the
>> module init to fail if DMM driver cannot be registered, simplifying the
>> unregister path as we don't need to keep the state whether we registered
>> the DMM driver or not.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> ---
>> drivers/gpu/drm/omapdrm/omap_drv.c | 23 +++++++++++++++++++----
>> 1 file changed, 19 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
>> index df3e66416a30..f16a07d1668d 100644
>> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
>> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
>> @@ -727,18 +727,33 @@ static struct platform_driver pdev = {
>>
>> static int __init omap_drm_init(void)
>> {
>> + int r;
>> +
>> DBG("init");
>> - if (platform_driver_register(&omap_dmm_driver)) {
>> - /* we can continue on without DMM.. so not fatal */
>> - dev_err(NULL, "DMM registration failed\n");
>> +
>> + r = platform_driver_register(&omap_dmm_driver);
>
> the one thing I wonder slightly about, this is making omap_dmm_driver
> register fail fatal, whereas it wasn't before..
>
> That said, I don't remember in which case the dmm driver registration
> would fail. I think registering the driver should succeed even (for
> example) on omap3 without dmm/tiler device. But I guess you've
> probably tested on o3 just to make sure? Assuming you have:
Yes. I think the driver registration could fail more or less only if
we're out of memory, or the driver is already register, or some other
similar situation.
Tomi
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2014-04-02 14:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 12:37 [PATCH 1/4] drm/omap: fix output enable/disable sequence Tomi Valkeinen
2014-04-02 12:37 ` [PATCH 2/4] drm/omap: fix uninit order in pdev_remove() Tomi Valkeinen
2014-04-02 14:16 ` Rob Clark
2014-04-02 12:37 ` [PATCH 3/4] drm/omap: fix DMM driver (un)registration Tomi Valkeinen
2014-04-02 14:14 ` Rob Clark
2014-04-02 14:18 ` Tomi Valkeinen [this message]
2014-04-02 12:38 ` [PATCH 4/4] drm/omap: fix race issue when unloading omapdrm Tomi Valkeinen
2014-04-02 14:08 ` Rob Clark
2014-04-02 14:19 ` [PATCH 1/4] drm/omap: fix output enable/disable sequence Rob Clark
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=533C1C1F.8010401@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=robdclark@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.