Staging
v0.8.1
swh:1:snp:a902887e4be9191b7c6c4406aa06b31c1ce2c7cc
Raw File
Tip revision: 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162 authored by Linus Torvalds on 31 May 2020, 23:49:15 UTC
Linux 5.7
Tip revision: 3d77e6a
chan.h
/* SPDX-License-Identifier: MIT */
#ifndef __NVKM_SW_CHAN_H__
#define __NVKM_SW_CHAN_H__
#define nvkm_sw_chan(p) container_of((p), struct nvkm_sw_chan, object)
#include <core/object.h>
#include <core/event.h>

#include "priv.h"

struct nvkm_sw_chan {
	const struct nvkm_sw_chan_func *func;
	struct nvkm_object object;
	struct nvkm_sw *sw;
	struct nvkm_fifo_chan *fifo;
	struct list_head head;

	struct nvkm_event event;
};

struct nvkm_sw_chan_func {
	void *(*dtor)(struct nvkm_sw_chan *);
	bool (*mthd)(struct nvkm_sw_chan *, int subc, u32 mthd, u32 data);
};

int nvkm_sw_chan_ctor(const struct nvkm_sw_chan_func *, struct nvkm_sw *,
		      struct nvkm_fifo_chan *, const struct nvkm_oclass *,
		      struct nvkm_sw_chan *);
bool nvkm_sw_chan_mthd(struct nvkm_sw_chan *, int subc, u32 mthd, u32 data);
#endif
back to top