drm-misc-next for 5.2: UAPI Changes: -syncobj: Add TIMELINE_WAIT|QUERY|TRANSFER|TIMELINE_SIGNAL ioctls (Chunming) -Clarify that 1.0 can be represented by drm_color_lut (Daniel) Cross-subsystem Changes: -dt-bindings: Add binding for rk3066 hdmi (Johan) -dt-bindings: Add binding for Feiyang FY07024DI26A30-D panel (Jagan) -dt-bindings: Add Rocktech vendor prefix and jh057n00900 panel bindings (Guido) -MAINTAINERS: Add lima and ASPEED entries (Joel & Qiang) Core Changes: -memory: use dma_alloc_coherent when mem encryption is active (Christian) -dma_buf: add support for a dma_fence chain (Christian) -shmem_gem: fix off-by-one bug in new shmem gem helpers (Dan) Driver Changes: -rockchip: Add support for rk3066 hdmi (Johan) -ASPEED: Add driver supporting ASPEED BMC display controller to drm (Joel) -lima: Add driver supporting Arm Mali4xx gpus to drm (Qiang) -vc4/v3d: Various cleanups and improved error handling (Eric) -panel: Add support for Feiyang FY07024DI26A30-D MIPI-DSI panel (Jagan) -panel: Add support for Rocktech jh057n00900 MIPI-DSI panel (Guido) Cc: Johan Jonker <jbx6244@gmail.com> Cc: Christian König <christian.koenig@amd.com> Cc: Chunming Zhou <david1.zhou@amd.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Eric Anholt <eric@anholt.net> Cc: Qiang Yu <yuq825@gmail.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Guido Günther <agx@sigxcpu.org> Cc: Joel Stanley <joel@jms.id.au> [airlied: fixed XA limit build breakage, Rodrigo also submitted the same patch, but I squashed it in the merge.] Signed-off-by: Dave Airlie <airlied@redhat.com>
Showing the changes to include/linux (1 of 114 files). Show all
Unified · Split
| @@ -0,0 +1,81 @@ | |||
| 1 | /* | ||
| 2 | * fence-chain: chain fences together in a timeline | ||
| 3 | * | ||
| 4 | * Copyright (C) 2018 Advanced Micro Devices, Inc. | ||
| 5 | * Authors: | ||
| 6 | * Christian König <christian.koenig@amd.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms of the GNU General Public License version 2 as published by | ||
| 10 | * the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 15 | * more details. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef __LINUX_DMA_FENCE_CHAIN_H | ||
| 19 | #define __LINUX_DMA_FENCE_CHAIN_H | ||
| 20 | |||
| 21 | #include <linux/dma-fence.h> | ||
| 22 | #include <linux/irq_work.h> | ||
| 23 | |||
| 24 | /** | ||
| 25 | * struct dma_fence_chain - fence to represent an node of a fence chain | ||
| 26 | * @base: fence base class | ||
| 27 | * @lock: spinlock for fence handling | ||
| 28 | * @prev: previous fence of the chain | ||
| 29 | * @prev_seqno: original previous seqno before garbage collection | ||
| 30 | * @fence: encapsulated fence | ||
| 31 | * @cb: callback structure for signaling | ||
| 32 | * @work: irq work item for signaling | ||
| 33 | */ | ||
| 34 | struct dma_fence_chain { | ||
| 35 | struct dma_fence base; | ||
| 36 | spinlock_t lock; | ||
| 37 | struct dma_fence __rcu *prev; | ||
| 38 | u64 prev_seqno; | ||
| 39 | struct dma_fence *fence; | ||
| 40 | struct dma_fence_cb cb; | ||
| 41 | struct irq_work work; | ||
| 42 | }; | ||
| 43 | |||
| 44 | extern const struct dma_fence_ops dma_fence_chain_ops; | ||
| 45 | |||
| 46 | /** | ||
| 47 | * to_dma_fence_chain - cast a fence to a dma_fence_chain | ||
| 48 | * @fence: fence to cast to a dma_fence_array | ||
| 49 | * | ||
| 50 | * Returns NULL if the fence is not a dma_fence_chain, | ||
| 51 | * or the dma_fence_chain otherwise. | ||
| 52 | */ | ||
| 53 | static inline struct dma_fence_chain * | ||
| 54 | to_dma_fence_chain(struct dma_fence *fence) | ||
| 55 | { | ||
| 56 | if (!fence || fence->ops != &dma_fence_chain_ops) | ||
| 57 | return NULL; | ||
| 58 | |||
| 59 | return container_of(fence, struct dma_fence_chain, base); | ||
| 60 | } | ||
| 61 | |||
| 62 | /** | ||
| 63 | * dma_fence_chain_for_each - iterate over all fences in chain | ||
| 64 | * @iter: current fence | ||
| 65 | * @head: starting point | ||
| 66 | * | ||
| 67 | * Iterate over all fences in the chain. We keep a reference to the current | ||
| 68 | * fence while inside the loop which must be dropped when breaking out. | ||
| 69 | */ | ||
| 70 | #define dma_fence_chain_for_each(iter, head) \ | ||
| 71 | for (iter = dma_fence_get(head); iter; \ | ||
| 72 | iter = dma_fence_chain_walk(iter)) | ||
| 73 | |||
| 74 | struct dma_fence *dma_fence_chain_walk(struct dma_fence *fence); | ||
| 75 | int dma_fence_chain_find_seqno(struct dma_fence **pfence, uint64_t seqno); | ||
| 76 | void dma_fence_chain_init(struct dma_fence_chain *chain, | ||
| 77 | struct dma_fence *prev, | ||
| 78 | struct dma_fence *fence, | ||
| 79 | uint64_t seqno); | ||
| 80 | |||
| 81 | #endif /* __LINUX_DMA_FENCE_CHAIN_H */ | ||