• Dave Airlie's avatar
    drm/i915: implement dma buf begin_cpu_access (v2) · ec6f1bb9
    Dave Airlie authored
    In order for udl vmap to work properly, we need to push the object
    into the CPU domain before we start copying the data to the USB device.
    
    This along with the udl change avoids userspace explicit mapping to
    be used.
    
    v2: add a flag for userspace to query to know if Intel kernel driver can
    deal with the vmap flushing properly. In theory udl would need a flag also,
    but I intend to push the patches very close to each other and other drivers
    should do the right thing from the start.
    
    I've added a test to my intel-gpu-tools prime branch, however testing
    this is a bit messy since the only way to get udl to vmap is to rendering
    something. I've tested this with real code as well to make sure it works.
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    [danvet: resolved conflict, which required reallocating the PARAM
    number to 21.]
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    ec6f1bb9
i915_dma.c 50.2 KB