mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Engine context tracking will move to nvkm_cgrp in later commits, so we create SW-only channel groups on HW without support for them. - switches to nvkm_chid for TSG/channel ID allocation Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
25 lines
612 B
C
25 lines
612 B
C
/* SPDX-License-Identifier: MIT */
|
|
#ifndef __NVKM_CHID_H__
|
|
#define __NVKM_CHID_H__
|
|
#include <core/event.h>
|
|
|
|
struct nvkm_chid {
|
|
struct kref kref;
|
|
int nr;
|
|
u32 mask;
|
|
|
|
struct nvkm_event event;
|
|
|
|
void **data;
|
|
|
|
spinlock_t lock;
|
|
unsigned long used[];
|
|
};
|
|
|
|
int nvkm_chid_new(const struct nvkm_event_func *, struct nvkm_subdev *,
|
|
int nr, int first, int count, struct nvkm_chid **pchid);
|
|
struct nvkm_chid *nvkm_chid_ref(struct nvkm_chid *);
|
|
void nvkm_chid_unref(struct nvkm_chid **);
|
|
int nvkm_chid_get(struct nvkm_chid *, void *data);
|
|
void nvkm_chid_put(struct nvkm_chid *, int id, spinlock_t *data_lock);
|
|
#endif
|