linux/drivers/gpu/drm/i915/i915_drm_client.h

/* SPDX-License-Identifier: MIT */
/*
 * Copyright © 2020 Intel Corporation
 */

#ifndef __I915_DRM_CLIENT_H__
#define __I915_DRM_CLIENT_H__

#include <linux/kref.h>
#include <linux/list.h>
#include <linux/spinlock.h>

#include <uapi/drm/i915_drm.h>

#include "i915_file_private.h"
#include "gem/i915_gem_object_types.h"
#include "gt/intel_context_types.h"

#define I915_LAST_UABI_ENGINE_CLASS

struct drm_file;
struct drm_printer;

struct i915_drm_client {};

static inline struct i915_drm_client *
i915_drm_client_get(struct i915_drm_client *client)
{}

void __i915_drm_client_free(struct kref *kref);

static inline void i915_drm_client_put(struct i915_drm_client *client)
{}

struct i915_drm_client *i915_drm_client_alloc(void);

void i915_drm_client_fdinfo(struct drm_printer *p, struct drm_file *file);

#ifdef CONFIG_PROC_FS
void i915_drm_client_add_object(struct i915_drm_client *client,
				struct drm_i915_gem_object *obj);
void i915_drm_client_remove_object(struct drm_i915_gem_object *obj);
void i915_drm_client_add_context_objects(struct i915_drm_client *client,
					 struct intel_context *ce);
#else
static inline void i915_drm_client_add_object(struct i915_drm_client *client,
					      struct drm_i915_gem_object *obj)
{
}

static inline void
i915_drm_client_remove_object(struct drm_i915_gem_object *obj)
{
}

static inline void
i915_drm_client_add_context_objects(struct i915_drm_client *client,
				    struct intel_context *ce)
{
}
#endif

#endif /* !__I915_DRM_CLIENT_H__ */