brintos

brintos / linux-shallow public Read only

0
0
Text · 1.6 KiB · 10814d4 Raw
43 lines · c
1/* SPDX-License-Identifier: MIT */2#ifndef __NOUVEAU_GEM_H__3#define __NOUVEAU_GEM_H__4 5#include "nouveau_drv.h"6#include "nouveau_bo.h"7 8extern const struct drm_gem_object_funcs nouveau_gem_object_funcs;9 10static inline struct nouveau_bo *11nouveau_gem_object(struct drm_gem_object *gem)12{13	return gem ? container_of(gem, struct nouveau_bo, bo.base) : NULL;14}15 16/* nouveau_gem.c */17extern int nouveau_gem_new(struct nouveau_cli *, u64 size, int align,18			   uint32_t domain, uint32_t tile_mode,19			   uint32_t tile_flags, struct nouveau_bo **);20extern void nouveau_gem_object_del(struct drm_gem_object *);21extern int nouveau_gem_object_open(struct drm_gem_object *, struct drm_file *);22extern void nouveau_gem_object_close(struct drm_gem_object *,23				     struct drm_file *);24extern int nouveau_gem_ioctl_new(struct drm_device *, void *,25				 struct drm_file *);26extern int nouveau_gem_ioctl_pushbuf(struct drm_device *, void *,27				     struct drm_file *);28extern int nouveau_gem_ioctl_cpu_prep(struct drm_device *, void *,29				      struct drm_file *);30extern int nouveau_gem_ioctl_cpu_fini(struct drm_device *, void *,31				      struct drm_file *);32extern int nouveau_gem_ioctl_info(struct drm_device *, void *,33				  struct drm_file *);34 35extern int nouveau_gem_prime_pin(struct drm_gem_object *);36extern void nouveau_gem_prime_unpin(struct drm_gem_object *);37extern struct sg_table *nouveau_gem_prime_get_sg_table(struct drm_gem_object *);38extern struct drm_gem_object *nouveau_gem_prime_import_sg_table(39	struct drm_device *, struct dma_buf_attachment *, struct sg_table *);40struct dma_buf *nouveau_gem_prime_export(struct drm_gem_object *gobj,41					 int flags);42#endif43