✓ CI.checkpatch: success for drm/xe/dma_buf: stop relying on placement in unmap (rev2)

Patchwork patchwork at emeril.freedesktop.org
Thu Apr 10 18:02:44 UTC 2025


== Series Details ==

Series: drm/xe/dma_buf: stop relying on placement in unmap (rev2)
URL   : https://patchwork.freedesktop.org/series/147218/
State : success

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
13a92ce9fd458ebd6064f23cec8c39c53d02ed26
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 98572c0e541ed70b4de01017a237037620e689c3
Author: Matthew Auld <matthew.auld at intel.com>
Date:   Thu Apr 10 17:27:17 2025 +0100

    drm/xe/dma_buf: stop relying on placement in unmap
    
    The is_vram() is checking the current placement, however if we consider
    exported VRAM with dynamic dma-buf, it looks possible for the xe driver
    to async evict the memory, notifying the importer, however importer does
    not have to call unmap_attachment() immediately, but rather just as
    "soon as possible", like when the dma-resv idles. Following from this we
    would then pipeline the move, attaching the fence to the manager, and
    then update the current placement. But when the unmap_attachment() runs
    at some later point we might see that is_vram() is now false, and take
    the complete wrong path when dma-unmapping the sg, leading to
    explosions.
    
    To fix this check if the sgl was mapping a struct page.
    
    v2:
      - The attachment can be mapped multiple times it seems, so we can't
        really rely on encoding something in the attachment->priv. Instead
        see if the page_link has an encoded struct page. For vram we expect
        this to be NULL.
    
    Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4563
    Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
    Signed-off-by: Matthew Auld <matthew.auld at intel.com>
    Cc: Thomas Hellström <thomas.hellstrom at linux.intel.com>
    Cc: Matthew Brost <matthew.brost at intel.com>
    Cc: <stable at vger.kernel.org> # v6.8+
    Acked-by: Christian König <christian.koenig at amd.com>
+ /mt/dim checkpatch c56353870b17912f7d08fee2736fe7a740421b07 drm-intel
98572c0e541e drm/xe/dma_buf: stop relying on placement in unmap




More information about the Intel-xe mailing list