]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: fix dma syncing warning with debugging on.
authorDave Airlie <airlied@redhat.com>
Mon, 1 Feb 2021 00:56:32 +0000 (10:56 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 3 Feb 2021 20:56:06 +0000 (06:56 +1000)
commitf1e42f29b014742f425f566b8bff9bbba05c81d4
treedbaa5d3a89ce16a6feed5f3a5de8dd6fe7990fcc
parentc34d363cb9bb3d3df914b00046864c1326569017
drm/nouveau: fix dma syncing warning with debugging on.

Since I wrote the below patch if you run a debug kernel you can a
dma debug warning like:
nouveau 0000:1f:00.0: DMA-API: device driver tries to sync DMA memory it has not allocated [device address=0x000000016e012000] [size=4096 bytes]

The old nouveau code wasn't consolidate the pages like the ttm code,
but the dma-debug expects the sync code to give it the same base/range
pairs as the allocator.

Fix the nouveau sync code to consolidate pages before calling the
sync code.

Fixes: ed3fa89bbf2c1 ("nouveau: use ttm populate mapping functions. (v2)")
Reported-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/417588/
drivers/gpu/drm/nouveau/nouveau_bo.c