[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190814055827.6hrxj6daovxxnnvw@sirius.home.kraxel.org>
Date: Wed, 14 Aug 2019 07:58:27 +0200
From: Gerd Hoffmann <kraxel@...hat.com>
To: Thierry Reding <thierry.reding@...il.com>
Cc: dri-devel@...ts.freedesktop.org, David Airlie <airlied@...ux.ie>,
"open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS"
<nouveau@...ts.freedesktop.org>,
"open list:DRM DRIVER FOR QXL VIRTUAL GPU"
<virtualization@...ts.linux-foundation.org>,
Huang Rui <ray.huang@....com>,
"David (ChunMing) Zhou" <David1.Zhou@....com>,
Thomas Hellstrom <thellstrom@...are.com>,
"open list:RADEON and AMDGPU DRM DRIVERS"
<amd-gfx@...ts.freedesktop.org>,
Maxime Ripard <maxime.ripard@...tlin.com>,
VMware Graphics <linux-graphics-maintainer@...are.com>,
bskeggs@...hat.com, Dave Airlie <airlied@...hat.com>,
thomas@...pmail.org, tzimmermann@...e.de,
ckoenig.leichtzumerken@...il.com, intel-gfx@...ts.freedesktop.org,
"open list:DRM DRIVER FOR QXL VIRTUAL GPU"
<spice-devel@...ts.freedesktop.org>,
open list <linux-kernel@...r.kernel.org>,
Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>
Subject: Re: [Intel-gfx] [PATCH v6 08/17] drm/ttm: use gem vma_node
> Hi Gerd,
>
> I've been seeing a regression on Nouveau with recent linux-next releases
> and git bisect points at this commit as the first bad one. If I revert
> it (there's a tiny conflict with a patch that was merged subsequently),
> things are back to normal.
>
> I think the reason for this issue is that Nouveau doesn't use GEM
> objects for all buffer objects,
That shouldn't be a problem ...
> and even when it uses GEM objects, the
> code will not initialize the GEM object until after the buffer objects
> and the backing TTM objects have been created.
... but the initialization order is.
ttm_bo_uses_embedded_gem_object() assumes gem gets initialized first.
drm_gem_object_init() init calling drm_vma_node_reset() again is
probably the root cause for the breakage.
> I tried to fix that by making sure drm_gem_object_init() gets called by
> Nouveau before ttm_bo_init(), but the changes are fairly involved and I
> was unable to get the GEM reference counting right. I can look into the
> proper fix some more, but it might be worth reverting this patch for
> now to get Nouveau working again.
Changing the order doesn't look hard. Patch attached (untested, have no
test hardware). But maybe I missed some detail ...
The other patch attached works around the issue with a flag, to avoid
drm_vma_node_reset() being called twice.
cheers,
Gerd
View attachment "0001-try-unbreak-nouveau-1.patch" of type "text/plain" (2332 bytes)
View attachment "0002-try-unbreak-nouveau-2.patch" of type "text/plain" (8981 bytes)
Powered by blists - more mailing lists