xref: /third_party/libdrm/omap/omap_drmif.h (revision d722e3fb)
1d722e3fbSopenharmony_ci/*
2d722e3fbSopenharmony_ci * Copyright (C) 2011 Texas Instruments, Inc
3d722e3fbSopenharmony_ci *
4d722e3fbSopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a
5d722e3fbSopenharmony_ci * copy of this software and associated documentation files (the "Software"),
6d722e3fbSopenharmony_ci * to deal in the Software without restriction, including without limitation
7d722e3fbSopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8d722e3fbSopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the
9d722e3fbSopenharmony_ci * Software is furnished to do so, subject to the following conditions:
10d722e3fbSopenharmony_ci *
11d722e3fbSopenharmony_ci * The above copyright notice and this permission notice (including the next
12d722e3fbSopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the
13d722e3fbSopenharmony_ci * Software.
14d722e3fbSopenharmony_ci *
15d722e3fbSopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16d722e3fbSopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17d722e3fbSopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18d722e3fbSopenharmony_ci * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19d722e3fbSopenharmony_ci * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20d722e3fbSopenharmony_ci * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21d722e3fbSopenharmony_ci * SOFTWARE.
22d722e3fbSopenharmony_ci *
23d722e3fbSopenharmony_ci * Authors:
24d722e3fbSopenharmony_ci *    Rob Clark <rob@ti.com>
25d722e3fbSopenharmony_ci */
26d722e3fbSopenharmony_ci
27d722e3fbSopenharmony_ci#ifndef OMAP_DRMIF_H_
28d722e3fbSopenharmony_ci#define OMAP_DRMIF_H_
29d722e3fbSopenharmony_ci
30d722e3fbSopenharmony_ci#include <xf86drm.h>
31d722e3fbSopenharmony_ci#include <stdint.h>
32d722e3fbSopenharmony_ci#include <omap_drm.h>
33d722e3fbSopenharmony_ci
34d722e3fbSopenharmony_cistruct omap_bo;
35d722e3fbSopenharmony_cistruct omap_device;
36d722e3fbSopenharmony_ci
37d722e3fbSopenharmony_ci/* device related functions:
38d722e3fbSopenharmony_ci */
39d722e3fbSopenharmony_ci
40d722e3fbSopenharmony_cistruct omap_device * omap_device_new(int fd);
41d722e3fbSopenharmony_cistruct omap_device * omap_device_ref(struct omap_device *dev);
42d722e3fbSopenharmony_civoid omap_device_del(struct omap_device *dev);
43d722e3fbSopenharmony_ciint omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value);
44d722e3fbSopenharmony_ciint omap_set_param(struct omap_device *dev, uint64_t param, uint64_t value);
45d722e3fbSopenharmony_ci
46d722e3fbSopenharmony_ci/* buffer-object related functions:
47d722e3fbSopenharmony_ci */
48d722e3fbSopenharmony_ci
49d722e3fbSopenharmony_cistruct omap_bo * omap_bo_new(struct omap_device *dev,
50d722e3fbSopenharmony_ci		uint32_t size, uint32_t flags);
51d722e3fbSopenharmony_cistruct omap_bo * omap_bo_new_tiled(struct omap_device *dev,
52d722e3fbSopenharmony_ci		uint32_t width, uint32_t height, uint32_t flags);
53d722e3fbSopenharmony_cistruct omap_bo * omap_bo_ref(struct omap_bo *bo);
54d722e3fbSopenharmony_cistruct omap_bo * omap_bo_from_name(struct omap_device *dev, uint32_t name);
55d722e3fbSopenharmony_cistruct omap_bo * omap_bo_from_dmabuf(struct omap_device *dev, int fd);
56d722e3fbSopenharmony_civoid omap_bo_del(struct omap_bo *bo);
57d722e3fbSopenharmony_ciint omap_bo_get_name(struct omap_bo *bo, uint32_t *name);
58d722e3fbSopenharmony_ciuint32_t omap_bo_handle(struct omap_bo *bo);
59d722e3fbSopenharmony_ciint omap_bo_dmabuf(struct omap_bo *bo);
60d722e3fbSopenharmony_ciuint32_t omap_bo_size(struct omap_bo *bo);
61d722e3fbSopenharmony_civoid * omap_bo_map(struct omap_bo *bo);
62d722e3fbSopenharmony_ciint omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op);
63d722e3fbSopenharmony_ciint omap_bo_cpu_fini(struct omap_bo *bo, enum omap_gem_op op);
64d722e3fbSopenharmony_ci
65d722e3fbSopenharmony_ci#endif /* OMAP_DRMIF_H_ */
66