Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cris-mirror.git] / drivers / gpu / drm / nouveau / nouveau_chan.h
blob14607c16a2bd6a1755c4fb27268efd8eb50c608e
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NOUVEAU_CHAN_H__
3 #define __NOUVEAU_CHAN_H__
4 #include <nvif/object.h>
5 #include <nvif/notify.h>
6 struct nvif_device;
8 struct nouveau_channel {
9 struct nvif_device *device;
10 struct nouveau_drm *drm;
12 int chid;
14 struct nvif_object vram;
15 struct nvif_object gart;
16 struct nvif_object nvsw;
18 struct {
19 struct nouveau_bo *buffer;
20 struct nouveau_vma *vma;
21 struct nvif_object ctxdma;
22 u64 addr;
23 } push;
25 /* TODO: this will be reworked in the near future */
26 bool accel_done;
27 void *fence;
28 struct {
29 int max;
30 int free;
31 int cur;
32 int put;
33 int ib_base;
34 int ib_max;
35 int ib_free;
36 int ib_put;
37 } dma;
38 u32 user_get_hi;
39 u32 user_get;
40 u32 user_put;
42 struct nvif_object user;
44 struct nvif_notify kill;
45 atomic_t killed;
49 int nouveau_channel_new(struct nouveau_drm *, struct nvif_device *,
50 u32 arg0, u32 arg1, struct nouveau_channel **);
51 void nouveau_channel_del(struct nouveau_channel **);
52 int nouveau_channel_idle(struct nouveau_channel *);
54 extern int nouveau_vram_pushbuf;
56 #endif