]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: Fix ttm move init with multiple GPUs
authorJames Jones <jajones@nvidia.com>
Tue, 17 Dec 2019 00:56:12 +0000 (16:56 -0800)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 15 Jan 2020 00:49:59 +0000 (10:49 +1000)
commit8156872d937e3c85d0ee3da83b23037a54cb5881
tree6d7cb4de425f05754984aa698a7d762c5af9e013
parentab1f45a34e24b0e09f679013e96079e8a39b4ca0
drm/nouveau: Fix ttm move init with multiple GPUs

The pointer used to walk the table of move ops
and pick the right one for the current GPU was
declared static, meaning its state was carried
over between invocations of the function, and also
made the function non-rentrant and thread-unsafe.
Since the table is ordered such that newer GPU
methods are listed first, the result of this was
that initializing newer GPUs after older GPUs
would result in no suitable ttm move acceleration
operations being found, and ttm would fall back
to CPU blits on the older GPUs.

This change declares the walking pointer
separately from the table and makes it non-static
to fix the logic.

Signed-off-by: James Jones <jajones@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_bo.c