2019-06-20 08:13:43 +08:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
2012-07-20 06:17:34 +08:00
|
|
|
#ifndef __NOUVEAU_CHAN_H__
|
|
|
|
#define __NOUVEAU_CHAN_H__
|
2014-08-10 02:10:22 +08:00
|
|
|
#include <nvif/object.h>
|
2016-11-05 11:31:25 +08:00
|
|
|
#include <nvif/notify.h>
|
2020-07-18 16:06:30 +08:00
|
|
|
#include <nvif/push.h>
|
2014-08-10 02:10:22 +08:00
|
|
|
struct nvif_device;
|
2012-07-20 06:17:34 +08:00
|
|
|
|
|
|
|
struct nouveau_channel {
|
2020-07-18 16:06:30 +08:00
|
|
|
struct {
|
|
|
|
struct nvif_push _push;
|
|
|
|
struct nvif_push *push;
|
|
|
|
} chan;
|
|
|
|
|
2014-08-10 02:10:22 +08:00
|
|
|
struct nvif_device *device;
|
2012-07-20 06:17:34 +08:00
|
|
|
struct nouveau_drm *drm;
|
2019-02-19 15:21:48 +08:00
|
|
|
struct nouveau_vmm *vmm;
|
2012-07-20 06:17:34 +08:00
|
|
|
|
2014-08-10 02:10:25 +08:00
|
|
|
int chid;
|
2018-12-11 12:50:02 +08:00
|
|
|
u64 inst;
|
2018-12-11 12:50:02 +08:00
|
|
|
u32 token;
|
2014-08-10 02:10:25 +08:00
|
|
|
|
2014-08-10 02:10:22 +08:00
|
|
|
struct nvif_object vram;
|
|
|
|
struct nvif_object gart;
|
|
|
|
struct nvif_object nvsw;
|
2012-07-20 06:17:34 +08:00
|
|
|
|
|
|
|
struct {
|
|
|
|
struct nouveau_bo *buffer;
|
2017-11-01 01:56:19 +08:00
|
|
|
struct nouveau_vma *vma;
|
2014-08-10 02:10:22 +08:00
|
|
|
struct nvif_object ctxdma;
|
2017-11-01 01:56:19 +08:00
|
|
|
u64 addr;
|
2012-07-20 06:17:34 +08:00
|
|
|
} push;
|
|
|
|
|
|
|
|
/* TODO: this will be reworked in the near future */
|
|
|
|
bool accel_done;
|
|
|
|
void *fence;
|
|
|
|
struct {
|
|
|
|
int max;
|
|
|
|
int free;
|
|
|
|
int cur;
|
|
|
|
int put;
|
|
|
|
int ib_base;
|
|
|
|
int ib_max;
|
|
|
|
int ib_free;
|
|
|
|
int ib_put;
|
|
|
|
} dma;
|
|
|
|
u32 user_get_hi;
|
|
|
|
u32 user_get;
|
|
|
|
u32 user_put;
|
|
|
|
|
2015-08-20 12:54:15 +08:00
|
|
|
struct nvif_object user;
|
2016-11-05 11:31:25 +08:00
|
|
|
|
|
|
|
struct nvif_notify kill;
|
|
|
|
atomic_t killed;
|
2012-07-20 06:17:34 +08:00
|
|
|
};
|
|
|
|
|
2018-05-08 18:39:46 +08:00
|
|
|
int nouveau_channels_init(struct nouveau_drm *);
|
2012-07-20 06:17:34 +08:00
|
|
|
|
2014-08-10 02:10:22 +08:00
|
|
|
int nouveau_channel_new(struct nouveau_drm *, struct nvif_device *,
|
2018-12-11 12:50:02 +08:00
|
|
|
u32 arg0, u32 arg1, bool priv,
|
|
|
|
struct nouveau_channel **);
|
2012-07-20 06:17:34 +08:00
|
|
|
void nouveau_channel_del(struct nouveau_channel **);
|
|
|
|
int nouveau_channel_idle(struct nouveau_channel *);
|
|
|
|
|
2014-08-19 04:43:24 +08:00
|
|
|
extern int nouveau_vram_pushbuf;
|
|
|
|
|
2012-07-20 06:17:34 +08:00
|
|
|
#endif
|