Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:51

0001 /*
0002  * Copyright © 2008 Jérôme Glisse
0003  * All Rights Reserved.
0004  *
0005  * Permission is hereby granted, free of charge, to any person obtaining
0006  * a copy of this software and associated documentation files (the
0007  * "Software"), to deal in the Software without restriction, including
0008  * without limitation the rights to use, copy, modify, merge, publish,
0009  * distribute, sub license, and/or sell copies of the Software, and to
0010  * permit persons to whom the Software is furnished to do so, subject to
0011  * the following conditions:
0012  *
0013  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0014  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0015  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0016  * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS
0017  * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0018  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
0019  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
0020  * USE OR OTHER DEALINGS IN THE SOFTWARE.
0021  *
0022  * The above copyright notice and this permission notice (including the
0023  * next paragraph) shall be included in all copies or substantial portions
0024  * of the Software.
0025  */
0026 /*
0027  * Authors:
0028  *      Jérôme Glisse <glisse@freedesktop.org>
0029  */
0030 #ifndef RADEON_BO_H
0031 #define RADEON_BO_H
0032 
0033 #include <stdio.h>
0034 #include <stdint.h>
0035 
0036 /* bo object */
0037 #define RADEON_BO_FLAGS_MACRO_TILE  1
0038 #define RADEON_BO_FLAGS_MICRO_TILE  2
0039 #define RADEON_BO_FLAGS_MICRO_TILE_SQUARE 0x20
0040 
0041 struct radeon_bo_manager;
0042 struct radeon_cs;
0043 
0044 struct radeon_bo {
0045     void                        *ptr;
0046     uint32_t                    flags;
0047     uint32_t                    handle;
0048     uint32_t                    size;
0049 };
0050 
0051 
0052 void radeon_bo_debug(struct radeon_bo *bo, const char *op);
0053 
0054 struct radeon_bo *radeon_bo_open(struct radeon_bo_manager *bom,
0055                                  uint32_t handle,
0056                                  uint32_t size,
0057                                  uint32_t alignment,
0058                                  uint32_t domains,
0059                                  uint32_t flags);
0060 
0061 void radeon_bo_ref(struct radeon_bo *bo);
0062 struct radeon_bo *radeon_bo_unref(struct radeon_bo *bo);
0063 int radeon_bo_map(struct radeon_bo *bo, int write);
0064 int radeon_bo_unmap(struct radeon_bo *bo);
0065 int radeon_bo_wait(struct radeon_bo *bo);
0066 int radeon_bo_is_busy(struct radeon_bo *bo, uint32_t *domain);
0067 int radeon_bo_set_tiling(struct radeon_bo *bo, uint32_t tiling_flags, uint32_t pitch);
0068 int radeon_bo_get_tiling(struct radeon_bo *bo, uint32_t *tiling_flags, uint32_t *pitch);
0069 int radeon_bo_is_static(struct radeon_bo *bo);
0070 int radeon_bo_is_referenced_by_cs(struct radeon_bo *bo, struct radeon_cs *cs);
0071 uint32_t radeon_bo_get_handle(struct radeon_bo *bo);
0072 uint32_t radeon_bo_get_src_domain(struct radeon_bo *bo);
0073 #endif