[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191219113151.sytkoi3m7rrxzps2@sirius.home.kraxel.org>
Date: Thu, 19 Dec 2019 12:31:51 +0100
From: Gerd Hoffmann <kraxel@...hat.com>
To: Daniel Vetter <daniel@...ll.ch>
Cc: John Garry <john.garry@...wei.com>,
Ezequiel Garcia <ezequiel@...labora.com>,
"kongxinwei (A)" <kong.kongxinwei@...ilicon.com>,
"Chenfeng (puck)" <puck.chen@...ilicon.com>,
"airlied@...ux.ie" <airlied@...ux.ie>,
Thomas Zimmermann <tzimmermann@...e.de>,
Linuxarm <linuxarm@...wei.com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
dbueso@...e.de
Subject: Re: Warnings in DRM code when removing/unbinding a driver
Hi,
> > Like I said, for most drivers
> > > you can pretty much assume that their unload sequence has been broken
> > > since forever. It's not often tested, and especially the hotunbind
> > > from a device (as opposed to driver unload) stuff wasn't even possible
> > > to get right until just recently.
> >
> > Do you think it's worth trying to fix this for 5.5 and earlier, or just
> > switch to the device-managed interface for 5.6 and forget about 5.5 and
> > earlier?
>
> I suspect it's going to be quite some trickery to fix this properly
> and everywhere, even for just one driver. Lots of drm drivers
> unfortunately use anti-patterns with wrong lifetimes (e.g. you can't
> use devm_kmalloc for anything that hangs of a drm_device, like
> plane/crtc/connector). Except when it's for a real hotunpluggable
> device (usb) we've never bothered backporting these fixes. Too much
> broken stuff unfortunately.
While being at it: How would a driver cleanup properly cleanup gem
objects created by userspace on hotunbind? Specifically a gem object
pinned to vram?
cheers,
Gerd
Powered by blists - more mailing lists