xref: /kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/include/nvif/parent.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/include/nvif/
18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: MIT */
28c2ecf20Sopenharmony_ci#ifndef __NVIF_PARENT_H__
38c2ecf20Sopenharmony_ci#define __NVIF_PARENT_H__
48c2ecf20Sopenharmony_ci#include <nvif/os.h>
58c2ecf20Sopenharmony_cistruct nvif_object;
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cistruct nvif_parent {
88c2ecf20Sopenharmony_ci	const struct nvif_parent_func {
98c2ecf20Sopenharmony_ci		void (*debugf)(struct nvif_object *, const char *fmt, ...) __printf(2, 3);
108c2ecf20Sopenharmony_ci		void (*errorf)(struct nvif_object *, const char *fmt, ...) __printf(2, 3);
118c2ecf20Sopenharmony_ci	} *func;
128c2ecf20Sopenharmony_ci};
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_cistatic inline void
158c2ecf20Sopenharmony_cinvif_parent_dtor(struct nvif_parent *parent)
168c2ecf20Sopenharmony_ci{
178c2ecf20Sopenharmony_ci	parent->func = NULL;
188c2ecf20Sopenharmony_ci}
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_cistatic inline void
218c2ecf20Sopenharmony_cinvif_parent_ctor(const struct nvif_parent_func *func, struct nvif_parent *parent)
228c2ecf20Sopenharmony_ci{
238c2ecf20Sopenharmony_ci	parent->func = func;
248c2ecf20Sopenharmony_ci}
258c2ecf20Sopenharmony_ci#endif
26

Indexes created Thu Nov 07 10:32:03 CST 2024