2 * Copyright © 2012, 2013 Thierry Reding
3 * Copyright © 2013 Erik Faye-Lund
4 * Copyright © 2014 NVIDIA Corporation
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
25 #ifndef __DRM_TEGRA_H__
26 #define __DRM_TEGRA_H__ 1
34 int drm_tegra_new(struct drm_tegra
**drmp
, int fd
);
35 void drm_tegra_close(struct drm_tegra
*drm
);
37 int drm_tegra_bo_new(struct drm_tegra_bo
**bop
, struct drm_tegra
*drm
,
38 uint32_t flags
, uint32_t size
);
39 int drm_tegra_bo_wrap(struct drm_tegra_bo
**bop
, struct drm_tegra
*drm
,
40 uint32_t handle
, uint32_t flags
, uint32_t size
);
41 struct drm_tegra_bo
*drm_tegra_bo_ref(struct drm_tegra_bo
*bo
);
42 void drm_tegra_bo_unref(struct drm_tegra_bo
*bo
);
43 int drm_tegra_bo_get_handle(struct drm_tegra_bo
*bo
, uint32_t *handle
);
44 int drm_tegra_bo_map(struct drm_tegra_bo
*bo
, void **ptr
);
45 int drm_tegra_bo_unmap(struct drm_tegra_bo
*bo
);
47 int drm_tegra_bo_get_flags(struct drm_tegra_bo
*bo
, uint32_t *flags
);
48 int drm_tegra_bo_set_flags(struct drm_tegra_bo
*bo
, uint32_t flags
);
50 struct drm_tegra_bo_tiling
{
55 int drm_tegra_bo_get_tiling(struct drm_tegra_bo
*bo
,
56 struct drm_tegra_bo_tiling
*tiling
);
57 int drm_tegra_bo_set_tiling(struct drm_tegra_bo
*bo
,
58 const struct drm_tegra_bo_tiling
*tiling
);
60 #endif /* __DRM_TEGRA_H__ */