Linux Audio

Check our new training course

Loading...
Note: File does not exist in v5.9.
 1/* SPDX-License-Identifier: GPL-2.0 OR MIT */
 2/* Copyright 2018-2019 Qiang Yu <yuq825@gmail.com> */
 3
 4#ifndef __LIMA_OBJECT_H__
 5#define __LIMA_OBJECT_H__
 6
 7#include <drm/drm_gem.h>
 8
 9#include "lima_device.h"
10
11struct lima_bo {
12	struct drm_gem_object gem;
13
14	struct page **pages;
15	dma_addr_t *pages_dma_addr;
16	struct sg_table *sgt;
17	void *vaddr;
18
19	struct mutex lock;
20	struct list_head va;
21};
22
23static inline struct lima_bo *
24to_lima_bo(struct drm_gem_object *obj)
25{
26	return container_of(obj, struct lima_bo, gem);
27}
28
29struct lima_bo *lima_bo_create(struct lima_device *dev, u32 size,
30			       u32 flags, struct sg_table *sgt);
31void lima_bo_destroy(struct lima_bo *bo);
32void *lima_bo_vmap(struct lima_bo *bo);
33void lima_bo_vunmap(struct lima_bo *bo);
34
35#endif