Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
37 lines
1.0 KiB
C
37 lines
1.0 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
#ifndef __NVIF_EVENT_H__
|
|
#define __NVIF_EVENT_H__
|
|
#include <nvif/object.h>
|
|
#include <nvif/if000e.h>
|
|
struct nvif_event;
|
|
|
|
#define NVIF_EVENT_KEEP 0
|
|
#define NVIF_EVENT_DROP 1
|
|
typedef int (*nvif_event_func)(struct nvif_event *, void *repv, u32 repc);
|
|
|
|
struct nvif_event {
|
|
struct nvif_object object;
|
|
nvif_event_func func;
|
|
};
|
|
|
|
static inline bool
|
|
nvif_event_constructed(struct nvif_event *event)
|
|
{
|
|
return nvif_object_constructed(&event->object);
|
|
}
|
|
|
|
int nvif_event_ctor_(struct nvif_object *, const char *, u32, nvif_event_func, bool,
|
|
struct nvif_event_v0 *, u32, bool, struct nvif_event *);
|
|
|
|
static inline int
|
|
nvif_event_ctor(struct nvif_object *parent, const char *name, u32 handle, nvif_event_func func,
|
|
bool wait, struct nvif_event_v0 *args, u32 argc, struct nvif_event *event)
|
|
{
|
|
return nvif_event_ctor_(parent, name, handle, func, wait, args, argc, true, event);
|
|
}
|
|
|
|
void nvif_event_dtor(struct nvif_event *);
|
|
int nvif_event_allow(struct nvif_event *);
|
|
int nvif_event_block(struct nvif_event *);
|
|
#endif
|