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