OSDN Git Service

i965/sync: Implement fences based on Linux sync_file
authorChad Versace <chadversary@chromium.org>
Fri, 13 Jan 2017 18:46:49 +0000 (10:46 -0800)
committerChad Versace <chadversary@chromium.org>
Fri, 27 Jan 2017 21:10:07 +0000 (13:10 -0800)
commit6403e3765114b4f540ed1f5a714fbf1ff4d1bedc
tree9ee3875368800ad607c79e04153ede86086abf3c
parent0b6dd31d681060db6920ac9b8f1bcf6970d2a45e
i965/sync: Implement fences based on Linux sync_file

This patch implements a new type of struct brw_fence, one that is based
struct sync_file.

This completes support for EGL_ANDROID_native_fence_sync.

* Background

  Linux 4.7 added a new file type, struct sync_file. See

    commit 460bfc41fd52959311ed0328163f785e023857af
    Author:  Gustavo Padovan <gustavo.padovan@collabora.co.uk>
    Date:    Thu Apr 28 10:46:57 2016 -0300
    Subject: dma-buf/sync_file: de-stage sync_file headers

  A sync file is a cross-driver explicit synchronization primitive. In a
  sense, sync_file's relation to synchronization is similar to dma_buf's
  relation to memory: both are primitives that can be imported and
  exported across drivers (at least in theory).

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Tested-by: Rafael Antognolli <rafael.antognolli@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_sync.c