lkml.org 
[lkml]   [2020]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] drm/bochs: add drm_driver.release callback.
On Tue, Feb 11, 2020 at 03:19:56PM +0100, Daniel Vetter wrote:
> On Tue, Feb 11, 2020 at 02:52:18PM +0100, Gerd Hoffmann wrote:
> > Call bochs_unload via drm_driver.release to make sure we release stuff
> > when it is safe to do so. Use drm_dev_{enter,exit,unplug} to avoid
> > touching hardware after device removal. Tidy up here and there.
> >
> > v4: add changelog.
> > v3: use drm_dev_*().
> > v2: move hardware deinit to pci_remove().
> >
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> Btw I checked around whether there's anything else that obviously needs a
> drm_dev_enter/exit, and I spotted the !bochs->mmio check in
> bochs_hw_load_edid. That one looks like cargo-cult, there's a single
> caller in the init path, so either mmio works at that point or this is
> dead code ... slightly confusing.

FYI: bochs->mmio actually can be NULL when running on very old qemu
versions, the mmio bar was added in qemu release 1.3. All the register
access functions in bochs_hw.c have a fallback going to ioports because
of that. So there is a reason for the check, even though it is highly
unlikely that mmio actually is NULL these days. qemu 1.3 was released
in 2013 ...

cheers,
Gerd

\
 
 \ /
  Last update: 2020-02-12 10:21    [W:0.157 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site