]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/cma-helper: Release non-coherent memory with dma_free_noncoherent()
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 8 Jul 2021 17:51:46 +0000 (19:51 +0200)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:53 +0000 (09:48 +0100)
commit9e9df95c3873a23dd8ebae97cd3758402b6fa9a8
tree1a88c3357e87dd055e3a081ce822d2219517a33a
parent6c2a2398e73c180c8b01916bb0fff2efcd52e08e
drm/cma-helper: Release non-coherent memory with dma_free_noncoherent()

BugLink: https://bugs.launchpad.net/bugs/1952579
commit 995f54ea962e03ec08b8bc6a4fe11a32b420edd3 upstream.

The GEM CMA helpers allocate non-coherent (i.e., cached) backing storage
with dma_alloc_noncoherent(), but release it with dma_free_wc(). Fix this
with a call to dma_free_noncoherent(). Writecombining storage is still
released with dma_free_wc().

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: cf8ccbc72d61 ("drm: Add support for GEM buffers backed by non-coherent memory")
Acked-by: Paul Cercueil <paul@crapouillou.net>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v5.14+
Link: https://patchwork.freedesktop.org/patch/msgid/20210708175146.10618-1-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/gpu/drm/drm_gem_cma_helper.c