Back to index

libdrm  2.4.37
omap_drmif.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2011 Texas Instruments, Inc
00003  *
00004  * Permission is hereby granted, free of charge, to any person obtaining a
00005  * copy of this software and associated documentation files (the "Software"),
00006  * to deal in the Software without restriction, including without limitation
00007  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00008  * and/or sell copies of the Software, and to permit persons to whom the
00009  * Software is furnished to do so, subject to the following conditions:
00010  *
00011  * The above copyright notice and this permission notice (including the next
00012  * paragraph) shall be included in all copies or substantial portions of the
00013  * Software.
00014  *
00015  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00016  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00017  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00018  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00019  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00020  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00021  * SOFTWARE.
00022  *
00023  * Authors:
00024  *    Rob Clark <rob@ti.com>
00025  */
00026 
00027 #ifndef OMAP_DRMIF_H_
00028 #define OMAP_DRMIF_H_
00029 
00030 #include <xf86drm.h>
00031 #include <stdint.h>
00032 #include <omap_drm.h>
00033 
00034 struct omap_bo;
00035 struct omap_device;
00036 
00037 /* device related functions:
00038  */
00039 
00040 struct omap_device * omap_device_new(int fd);
00041 void omap_device_del(struct omap_device *dev);
00042 int omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value);
00043 int omap_set_param(struct omap_device *dev, uint64_t param, uint64_t value);
00044 
00045 /* buffer-object related functions:
00046  */
00047 
00048 struct omap_bo * omap_bo_new(struct omap_device *dev,
00049               uint32_t size, uint32_t flags);
00050 struct omap_bo * omap_bo_new_tiled(struct omap_device *dev,
00051               uint32_t width, uint32_t height, uint32_t flags);
00052 struct omap_bo * omap_bo_from_name(struct omap_device *dev, uint32_t name);
00053 void omap_bo_del(struct omap_bo *bo);
00054 int omap_bo_get_name(struct omap_bo *bo, uint32_t *name);
00055 uint32_t omap_bo_handle(struct omap_bo *bo);
00056 int omap_bo_dmabuf(struct omap_bo *bo);
00057 uint32_t omap_bo_size(struct omap_bo *bo);
00058 void * omap_bo_map(struct omap_bo *bo);
00059 int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op);
00060 int omap_bo_cpu_fini(struct omap_bo *bo, enum omap_gem_op op);
00061 
00062 #endif /* OMAP_DRMIF_H_ */