| 1 | /* |
| 2 | * Copyright (c) 2011 Intel Corporation |
| 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | * copy of this software and associated documentation files (the "Software"), |
| 6 | * to deal in the Software without restriction, including without limitation |
| 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 | * and/or sell copies of the Software, and to permit persons to whom the |
| 9 | * Software is furnished to do so, subject to the following conditions: |
| 10 | * |
| 11 | * The above copyright notice and this permission notice (including the next |
| 12 | * paragraph) shall be included in all copies or substantial portions of the |
| 13 | * Software. |
| 14 | * |
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 21 | * SOFTWARE. |
| 22 | * |
| 23 | * Authors: |
| 24 | * Chris Wilson <[email protected]> |
| 25 | * |
| 26 | */ |
| 27 | |
| 28 | #ifndef KGEM_H |
| 29 | #define KGEM_Hcxx . . $ `src/sna/kgem.h:29:9`! |
| 30 | |
| 31 | #include <stdint.h> |
| 32 | #include <stdbool.h> |
| 33 | #include <stdarg.h> |
| 34 | |
| 35 | #include <i915_drm.h> |
| 36 | |
| 37 | #include "compiler.h"cxx . . $ `<file>/src/sna/compiler.h`/ |
| 38 | #include "debug.h"cxx . . $ `<file>/src/sna/debug.h`/ |
| 39 | |
| 40 | struct kgem_bocxx . . $ kgem_bo# { |
| 41 | struct kgem_requestcxx . . $ kgem_request# *rqcxx . . $ kgem_bo#rq.; |
| 42 | #define RQcxx . . $ `src/sna/kgem.h:42:9`!(rq) ((struct kgem_request *)((uintptr_t)(rq) & ~3)) |
| 43 | #define RQ_RINGcxx . . $ `src/sna/kgem.h:43:9`!(rq) ((uintptr_t)(rq) & 3) |
| 44 | #define RQ_IS_BLTcxx . . $ `src/sna/kgem.h:44:9`!(rq) (RQ_RING(rq) == KGEM_BLT) |
| 45 | #define RQ_IS_RENDERcxx . . $ `src/sna/kgem.h:45:9`!(rq) (RQ_RING(rq) == KGEM_RENDER) |
| 46 | #define MAKE_REQUESTcxx . . $ `src/sna/kgem.h:46:9`!(rq, ring) ((struct kgem_request *)((uintptr_t)(rq) | (ring))) |
| 47 | |
| 48 | struct drm_i915_gem_exec_object2cxx . . $ drm_i915_gem_exec_object2# *execcxx . . $ kgem_bo#exec.; |
| 49 | |
| 50 | struct kgem_bocxx . . $ kgem_bo# *proxycxx . . $ kgem_bo#proxy.; |
| 51 | |
| 52 | struct listcxx . . $ list# listcxx . . $ kgem_bo#list.; |
| 53 | struct listcxx . . $ list# requestcxx . . $ kgem_bo#request.; |
| 54 | struct listcxx . . $ list# vmacxx . . $ kgem_bo#vma.; |
| 55 | |
| 56 | void *map__cpucxx . . $ kgem_bo#map__cpu.; |
| 57 | void *map__gttcxx . . $ kgem_bo#map__gtt.; |
| 58 | void *map__wccxx . . $ kgem_bo#map__wc.; |
| 59 | #define MAPcxx . . $ `src/sna/kgem.h:59:9`!(ptr) ((void*)((uintptr_t)(ptr) & ~3)) |
| 60 | |
| 61 | struct kgem_bo_bindingcxx . . $ kgem_bo_binding# { |
| 62 | struct kgem_bo_bindingcxx . . $ kgem_bo_binding# *nextcxx . . $ kgem_bo_binding#next.; |
| 63 | uint32_tcxx . . $ uint32_t# formatcxx . . $ kgem_bo_binding#format.; |
| 64 | uint16_tcxx . . $ uint16_t# offsetcxx . . $ kgem_bo_binding#offset.; |
| 65 | } bindingcxx . . $ kgem_bo#binding.; |
| 66 | |
| 67 | uint64_tcxx . . $ uint64_t# presumed_offsetcxx . . $ kgem_bo#presumed_offset.; |
| 68 | uint32_tcxx . . $ uint32_t# unique_idcxx . . $ kgem_bo#unique_id.; |
| 69 | uint32_tcxx . . $ uint32_t# refcntcxx . . $ kgem_bo#refcnt.; |
| 70 | uint32_tcxx . . $ uint32_t# handlecxx . . $ kgem_bo#handle.; |
| 71 | uint32_tcxx . . $ uint32_t# target_handlecxx . . $ kgem_bo#target_handle.; |
| 72 | uint32_tcxx . . $ uint32_t# deltacxx . . $ kgem_bo#delta.; |
| 73 | uint32_tcxx . . $ uint32_t# active_scanoutcxx . . $ kgem_bo#active_scanout.; |
| 74 | unioncxx . . $ kgem_bo#$anonymous_type_0# { |
| 75 | structcxx . . $ kgem_bo#$anonymous_type_0#$anonymous_type_1# { |
| 76 | uint32_tcxx . . $ uint32_t# countcxx . . $ kgem_bo#$anonymous_type_0#$anonymous_type_1#count.:27; |
| 77 | #define PAGE_SIZEcxx . . $ `src/sna/kgem.h:77:9`! 4096 |
| 78 | uint32_tcxx . . $ uint32_t# bucketcxx . . $ kgem_bo#$anonymous_type_0#$anonymous_type_1#bucket.:5; |
| 79 | #define NUM_CACHE_BUCKETScxx . . $ `src/sna/kgem.h:79:9`! 16 |
| 80 | #define MAX_CACHE_SIZEcxx . . $ `src/sna/kgem.h:80:9`! (1 << (NUM_CACHE_BUCKETS+12)) |
| 81 | } pagescxx . . $ kgem_bo#$anonymous_type_0#pages.; |
| 82 | uint32_tcxx . . $ uint32_t# bytescxx . . $ kgem_bo#$anonymous_type_0#bytes.; |
| 83 | } sizecxx . . $ kgem_bo#size.; |
| 84 | uint32_tcxx . . $ uint32_t# pitchcxx . . $ kgem_bo#pitch. : 18; /* max 128k */ |
| 85 | uint32_tcxx . . $ uint32_t# tilingcxx . . $ kgem_bo#tiling. : 2; |
| 86 | uint32_tcxx . . $ uint32_t# reusablecxx . . $ kgem_bo#reusable. : 1; |
| 87 | uint32_tcxx . . $ uint32_t# gpu_dirtycxx . . $ kgem_bo#gpu_dirty. : 1; |
| 88 | uint32_tcxx . . $ uint32_t# gtt_dirtycxx . . $ kgem_bo#gtt_dirty. : 1; |
| 89 | uint32_tcxx . . $ uint32_t# domaincxx . . $ kgem_bo#domain. : 2; |
| 90 | uint32_tcxx . . $ uint32_t# needs_flushcxx . . $ kgem_bo#needs_flush. : 1; |
| 91 | uint32_tcxx . . $ uint32_t# snoopcxx . . $ kgem_bo#snoop. : 1; |
| 92 | uint32_tcxx . . $ uint32_t# iocxx . . $ kgem_bo#io. : 1; |
| 93 | uint32_tcxx . . $ uint32_t# flushcxx . . $ kgem_bo#flush. : 1; |
| 94 | uint32_tcxx . . $ uint32_t# scanoutcxx . . $ kgem_bo#scanout. : 1; |
| 95 | uint32_tcxx . . $ uint32_t# primecxx . . $ kgem_bo#prime. : 1; |
| 96 | uint32_tcxx . . $ uint32_t# purgedcxx . . $ kgem_bo#purged. : 1; |
| 97 | }; |
| 98 | #define DOMAIN_NONEcxx . . $ `src/sna/kgem.h:98:9`! 0 |
| 99 | #define DOMAIN_CPUcxx . . $ `src/sna/kgem.h:99:9`! 1 |
| 100 | #define DOMAIN_GTTcxx . . $ `src/sna/kgem.h:100:9`! 2 |
| 101 | #define DOMAIN_GPUcxx . . $ `src/sna/kgem.h:101:9`! 3 |
| 102 | |
| 103 | struct kgem_requestcxx . . $ kgem_request# { |
| 104 | struct listcxx . . $ list# listcxx . . $ kgem_request#list.; |
| 105 | struct kgem_bocxx . . $ kgem_bo# *bocxx . . $ kgem_request#bo.; |
| 106 | struct listcxx . . $ list# bufferscxx . . $ kgem_request#buffers.; |
| 107 | unsigned ringcxx . . $ kgem_request#ring.; |
| 108 | }; |
| 109 | |
| 110 | enumcxx . . $ $anonymous_type_f00cdb096d4148ce_2# { |
| 111 | MAP_GTTcxx . . $ MAP_GTT. = 0, |
| 112 | MAP_CPUcxx . . $ MAP_CPU., |
| 113 | NUM_MAP_TYPEScxx . . $ NUM_MAP_TYPES., |
| 114 | }; |
| 115 | |
| 116 | typedef void (*memcpy_box_funccxx . . $ memcpy_box_func#)(const void *src, void *dst, int bpp, |
| 117 | int32_tcxx . . $ int32_t# src_stride, int32_tcxx . . $ int32_t# dst_stride, |
| 118 | int16_tcxx . . $ int16_t# src_x, int16_tcxx . . $ int16_t# src_y, |
| 119 | int16_tcxx . . $ int16_t# dst_x, int16_tcxx . . $ int16_t# dst_y, |
| 120 | uint16_tcxx . . $ uint16_t# width, uint16_tcxx . . $ uint16_t# height); |
| 121 | |
| 122 | struct kgemcxx . . $ kgem# { |
| 123 | unsigned wedgedcxx . . $ kgem#wedged.; |
| 124 | int fdcxx . . $ kgem#fd.; |
| 125 | unsigned gencxx . . $ kgem#gen.; |
| 126 | |
| 127 | uint32_tcxx . . $ uint32_t# unique_idcxx . . $ kgem#unique_id.; |
| 128 | |
| 129 | uint16_tcxx . . $ uint16_t# nbatchcxx . . $ kgem#nbatch.; |
| 130 | uint16_tcxx . . $ uint16_t# surfacecxx . . $ kgem#surface.; |
| 131 | uint16_tcxx . . $ uint16_t# nexeccxx . . $ kgem#nexec.; |
| 132 | uint16_tcxx . . $ uint16_t# nreloccxx . . $ kgem#nreloc.; |
| 133 | uint16_tcxx . . $ uint16_t# nreloc__selfcxx . . $ kgem#nreloc__self.; |
| 134 | uint16_tcxx . . $ uint16_t# nfencecxx . . $ kgem#nfence.; |
| 135 | uint16_tcxx . . $ uint16_t# batch_sizecxx . . $ kgem#batch_size.; |
| 136 | |
| 137 | uint32_tcxx . . $ uint32_t# *batchcxx . . $ kgem#batch.; |
| 138 | |
| 139 | enum kgem_modecxx . . $ kgem_mode# { |
| 140 | /* order matches I915_EXEC_RING ordering */ |
| 141 | KGEM_NONEcxx . . $ KGEM_NONE. = 0, |
| 142 | KGEM_RENDERcxx . . $ KGEM_RENDER., |
| 143 | KGEM_BSDcxx . . $ KGEM_BSD., |
| 144 | KGEM_BLTcxx . . $ KGEM_BLT., |
| 145 | } modecxx . . $ kgem#mode., ringcxx . . $ kgem#ring.; |
| 146 | |
| 147 | struct listcxx . . $ list# flushingcxx . . $ kgem#flushing.; |
| 148 | struct listcxx . . $ list# largecxx . . $ kgem#large.; |
| 149 | struct listcxx . . $ list# large_inactivecxx . . $ kgem#large_inactive.; |
| 150 | struct listcxx . . $ list# activecxx . . $ kgem#active.[NUM_CACHE_BUCKETScxx . . $ `src/sna/kgem.h:79:9`!][3]; |
| 151 | struct listcxx . . $ list# inactivecxx . . $ kgem#inactive.[NUM_CACHE_BUCKETScxx . . $ `src/sna/kgem.h:79:9`!]; |
| 152 | struct listcxx . . $ list# pinned_batchescxx . . $ kgem#pinned_batches.[2]; |
| 153 | struct listcxx . . $ list# snoopcxx . . $ kgem#snoop.; |
| 154 | struct listcxx . . $ list# scanoutcxx . . $ kgem#scanout.; |
| 155 | struct listcxx . . $ list# batch_bufferscxx . . $ kgem#batch_buffers., active_bufferscxx . . $ kgem#active_buffers.; |
| 156 | |
| 157 | struct listcxx . . $ list# requestscxx . . $ kgem#requests.[2]; |
| 158 | struct kgem_requestcxx . . $ kgem_request# *fencecxx . . $ kgem#fence.[2]; |
| 159 | struct kgem_requestcxx . . $ kgem_request# *next_requestcxx . . $ kgem#next_request.; |
| 160 | struct kgem_requestcxx . . $ kgem_request# static_requestcxx . . $ kgem#static_request.; |
| 161 | |
| 162 | structcxx . . $ kgem#$anonymous_type_3# { |
| 163 | struct listcxx . . $ list# inactivecxx . . $ kgem#$anonymous_type_3#inactive.[NUM_CACHE_BUCKETScxx . . $ `src/sna/kgem.h:79:9`!]; |
| 164 | int16_tcxx . . $ int16_t# countcxx . . $ kgem#$anonymous_type_3#count.; |
| 165 | } vmacxx . . $ kgem#vma.[NUM_MAP_TYPEScxx . . $ NUM_MAP_TYPES.]; |
| 166 | |
| 167 | uint32_tcxx . . $ uint32_t# bcs_statecxx . . $ kgem#bcs_state.; |
| 168 | |
| 169 | uint32_tcxx . . $ uint32_t# batch_flagscxx . . $ kgem#batch_flags.; |
| 170 | uint32_tcxx . . $ uint32_t# batch_flags_basecxx . . $ kgem#batch_flags_base.; |
| 171 | #define I915_EXEC_SECUREcxx . . $ `src/sna/kgem.h:171:9`! (1<<9) |
| 172 | #define LOCAL_EXEC_OBJECT_WRITEcxx . . $ `src/sna/kgem.h:172:9`! (1<<2) |
| 173 | |
| 174 | uint32_tcxx . . $ uint32_t# flushcxx . . $ kgem#flush.:1; |
| 175 | uint32_tcxx . . $ uint32_t# need_expirecxx . . $ kgem#need_expire.:1; |
| 176 | uint32_tcxx . . $ uint32_t# need_purgecxx . . $ kgem#need_purge.:1; |
| 177 | uint32_tcxx . . $ uint32_t# need_retirecxx . . $ kgem#need_retire.:1; |
| 178 | uint32_tcxx . . $ uint32_t# need_throttlecxx . . $ kgem#need_throttle.:1; |
| 179 | uint32_tcxx . . $ uint32_t# needs_semaphorecxx . . $ kgem#needs_semaphore.:1; |
| 180 | uint32_tcxx . . $ uint32_t# needs_reservationcxx . . $ kgem#needs_reservation.:1; |
| 181 | uint32_tcxx . . $ uint32_t# scanout_busycxx . . $ kgem#scanout_busy.:1; |
| 182 | uint32_tcxx . . $ uint32_t# busycxx . . $ kgem#busy.:1; |
| 183 | |
| 184 | uint32_tcxx . . $ uint32_t# has_create2cxx . . $ kgem#has_create2. :1; |
| 185 | uint32_tcxx . . $ uint32_t# has_userptrcxx . . $ kgem#has_userptr. :1; |
| 186 | uint32_tcxx . . $ uint32_t# has_bltcxx . . $ kgem#has_blt. :1; |
| 187 | uint32_tcxx . . $ uint32_t# has_relaxed_fencingcxx . . $ kgem#has_relaxed_fencing. :1; |
| 188 | uint32_tcxx . . $ uint32_t# has_relaxed_deltacxx . . $ kgem#has_relaxed_delta. :1; |
| 189 | uint32_tcxx . . $ uint32_t# has_semaphorescxx . . $ kgem#has_semaphores. :1; |
| 190 | uint32_tcxx . . $ uint32_t# has_secure_batchescxx . . $ kgem#has_secure_batches. :1; |
| 191 | uint32_tcxx . . $ uint32_t# has_pinned_batchescxx . . $ kgem#has_pinned_batches. :1; |
| 192 | uint32_tcxx . . $ uint32_t# has_cachingcxx . . $ kgem#has_caching. :1; |
| 193 | uint32_tcxx . . $ uint32_t# has_coherent_mmap_gttcxx . . $ kgem#has_coherent_mmap_gtt. :1; |
| 194 | uint32_tcxx . . $ uint32_t# has_full_ppgttcxx . . $ kgem#has_full_ppgtt. :1; |
| 195 | uint32_tcxx . . $ uint32_t# has_llccxx . . $ kgem#has_llc. :1; |
| 196 | uint32_tcxx . . $ uint32_t# has_wtcxx . . $ kgem#has_wt. :1; |
| 197 | uint32_tcxx . . $ uint32_t# has_no_reloccxx . . $ kgem#has_no_reloc. :1; |
| 198 | uint32_tcxx . . $ uint32_t# has_handle_lutcxx . . $ kgem#has_handle_lut. :1; |
| 199 | uint32_tcxx . . $ uint32_t# has_wc_mmapcxx . . $ kgem#has_wc_mmap. :1; |
| 200 | uint32_tcxx . . $ uint32_t# has_dirtyfbcxx . . $ kgem#has_dirtyfb. :1; |
| 201 | |
| 202 | uint32_tcxx . . $ uint32_t# can_fencecxx . . $ kgem#can_fence. :1; |
| 203 | uint32_tcxx . . $ uint32_t# can_blt_cpucxx . . $ kgem#can_blt_cpu. :1; |
| 204 | uint32_tcxx . . $ uint32_t# can_blt_ycxx . . $ kgem#can_blt_y. :1; |
| 205 | uint32_tcxx . . $ uint32_t# can_render_ycxx . . $ kgem#can_render_y. :1; |
| 206 | uint32_tcxx . . $ uint32_t# can_scanout_ycxx . . $ kgem#can_scanout_y. :1; |
| 207 | |
| 208 | uint32_tcxx . . $ uint32_t# needs_dirtyfbcxx . . $ kgem#needs_dirtyfb. :1; |
| 209 | |
| 210 | uint16_tcxx . . $ uint16_t# fence_maxcxx . . $ kgem#fence_max.; |
| 211 | uint16_tcxx . . $ uint16_t# half_cpu_cache_pagescxx . . $ kgem#half_cpu_cache_pages.; |
| 212 | uint32_tcxx . . $ uint32_t# aperture_totalcxx . . $ kgem#aperture_total., aperture_highcxx . . $ kgem#aperture_high., aperture_lowcxx . . $ kgem#aperture_low., aperture_mappablecxx . . $ kgem#aperture_mappable., aperture_fenceablecxx . . $ kgem#aperture_fenceable.; |
| 213 | uint32_tcxx . . $ uint32_t# aperturecxx . . $ kgem#aperture., aperture_fencedcxx . . $ kgem#aperture_fenced., aperture_max_fencecxx . . $ kgem#aperture_max_fence.; |
| 214 | uint32_tcxx . . $ uint32_t# max_upload_tile_sizecxx . . $ kgem#max_upload_tile_size., max_copy_tile_sizecxx . . $ kgem#max_copy_tile_size.; |
| 215 | uint32_tcxx . . $ uint32_t# max_gpu_sizecxx . . $ kgem#max_gpu_size., max_cpu_sizecxx . . $ kgem#max_cpu_size.; |
| 216 | uint32_tcxx . . $ uint32_t# large_object_sizecxx . . $ kgem#large_object_size., max_object_sizecxx . . $ kgem#max_object_size.; |
| 217 | uint32_tcxx . . $ uint32_t# buffer_sizecxx . . $ kgem#buffer_size.; |
| 218 | |
| 219 | void (*context_switchcxx . . $ kgem#context_switch.)(struct kgemcxx . . $ kgem# *kgem, int new_mode); |
| 220 | void (*retirecxx . . $ kgem#retire.)(struct kgemcxx . . $ kgem# *kgem); |
| 221 | void (*expirecxx . . $ kgem#expire.)(struct kgemcxx . . $ kgem# *kgem); |
| 222 | |
| 223 | memcpy_box_funccxx . . $ memcpy_box_func# memcpy_to_tiled_xcxx . . $ kgem#memcpy_to_tiled_x.; |
| 224 | memcpy_box_funccxx . . $ memcpy_box_func# memcpy_from_tiled_xcxx . . $ kgem#memcpy_from_tiled_x.; |
| 225 | memcpy_box_funccxx . . $ memcpy_box_func# memcpy_between_tiled_xcxx . . $ kgem#memcpy_between_tiled_x.; |
| 226 | |
| 227 | struct kgem_bocxx . . $ kgem_bo# *batch_bocxx . . $ kgem#batch_bo.; |
| 228 | |
| 229 | uint16_tcxx . . $ uint16_t# reloc__selfcxx . . $ kgem#reloc__self.[256]; |
| 230 | struct drm_i915_gem_exec_object2cxx . . $ drm_i915_gem_exec_object2# execcxx . . $ kgem#exec.[384] page_alignedcxx . . $ `src/sna/compiler.h:43:9`!; |
| 231 | struct drm_i915_gem_relocation_entrycxx . . $ drm_i915_gem_relocation_entry# reloccxx . . $ kgem#reloc.[8192] page_alignedcxx . . $ `src/sna/compiler.h:43:9`!; |
| 232 | |
| 233 | #ifdef DEBUG_MEMORY |
| 234 | struct { |
| 235 | int bo_allocs; |
| 236 | size_t bo_bytes; |
| 237 | } debug_memory; |
| 238 | #endif |
| 239 | }; |
| 240 | |
| 241 | #define KGEM_MAX_DEFERRED_VBOcxx . . $ `src/sna/kgem.h:241:9`! 16 |
| 242 | |
| 243 | #define KGEM_BATCH_RESERVEDcxx . . $ `src/sna/kgem.h:243:9`! 8 /* LRI(SWCTRL) + END */ |
| 244 | #define KGEM_RELOC_RESERVEDcxx . . $ `src/sna/kgem.h:244:9`! (KGEM_MAX_DEFERRED_VBOcxx . . $ `src/sna/kgem.h:241:9`!) |
| 245 | #define KGEM_EXEC_RESERVEDcxx . . $ `src/sna/kgem.h:245:9`! (1+KGEM_MAX_DEFERRED_VBOcxx . . $ `src/sna/kgem.h:241:9`!) |
| 246 | |
| 247 | #ifndef ARRAY_SIZEcxx . . $ `<external>/7126665466336981124/dix.h:68:9`! |
| 248 | #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) |
| 249 | #endif |
| 250 | |
| 251 | #define KGEM_BATCH_SIZEcxx . . $ `src/sna/kgem.h:251:9`!(K) ((K)->batch_size-KGEM_BATCH_RESERVED) |
| 252 | #define KGEM_EXEC_SIZEcxx . . $ `src/sna/kgem.h:252:9`!(K) (int)(ARRAY_SIZEcxx . . $ `<external>/7126665466336981124/dix.h:68:9`!((K)->exec)-KGEM_EXEC_RESERVEDcxx . . $ `src/sna/kgem.h:245:9`!) |
| 253 | #define KGEM_RELOC_SIZEcxx . . $ `src/sna/kgem.h:253:9`!(K) (int)(ARRAY_SIZEcxx . . $ `<external>/7126665466336981124/dix.h:68:9`!((K)->reloc)-KGEM_RELOC_RESERVEDcxx . . $ `src/sna/kgem.h:244:9`!) |
| 254 | |
| 255 | void kgem_initcxx . . $ kgem_init(14f3a38b525c46fd).(struct kgemcxx . . $ kgem# *kgem, int fd, struct pci_devicecxx . . $ pci_device# *dev, unsigned gen); |
| 256 | void kgem_resetcxx . . $ kgem_reset(e5d72a432f7578a3).(struct kgemcxx . . $ kgem# *kgem); |
| 257 | |
| 258 | struct kgem_bocxx . . $ kgem_bo# *kgem_create_mapcxx . . $ kgem_create_map(2d4333ffaf2e1356).(struct kgemcxx . . $ kgem# *kgem, |
| 259 | void *ptr, uint32_tcxx . . $ uint32_t# size, |
| 260 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! read_only); |
| 261 | |
| 262 | struct kgem_bocxx . . $ kgem_bo# *kgem_create_for_namecxx . . $ kgem_create_for_name(f0726f9a29112b18).(struct kgemcxx . . $ kgem# *kgem, uint32_tcxx . . $ uint32_t# name); |
| 263 | struct kgem_bocxx . . $ kgem_bo# *kgem_create_for_primecxx . . $ kgem_create_for_prime(b75dbb0fcba8b1f4).(struct kgemcxx . . $ kgem# *kgem, int name, uint32_tcxx . . $ uint32_t# size); |
| 264 | int kgem_bo_export_to_primecxx . . $ kgem_bo_export_to_prime(db9f92d0785665a9).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 265 | |
| 266 | struct kgem_bocxx . . $ kgem_bo# *kgem_create_linearcxx . . $ kgem_create_linear(b75dbb0fcba8b1f4).(struct kgemcxx . . $ kgem# *kgem, int size, unsigned flags); |
| 267 | struct kgem_bocxx . . $ kgem_bo# *kgem_create_proxycxx . . $ kgem_create_proxy(41e5848fc177fde2).(struct kgemcxx . . $ kgem# *kgem, |
| 268 | struct kgem_bocxx . . $ kgem_bo# *target, |
| 269 | int offset, int length); |
| 270 | |
| 271 | struct kgem_bocxx . . $ kgem_bo# *kgem_upload_source_imagecxx . . $ kgem_upload_source_image(ac31792db96e0dc4).(struct kgemcxx . . $ kgem# *kgem, |
| 272 | const void *data, |
| 273 | const BoxReccxx . . $ BoxRec# *box, |
| 274 | int stride, int bpp); |
| 275 | void kgem_proxy_bo_attachcxx . . $ kgem_proxy_bo_attach(80c76a2b571dbcb6).(struct kgem_bocxx . . $ kgem_bo# *bo, struct kgem_bocxx . . $ kgem_bo# **ptr); |
| 276 | |
| 277 | int kgem_choose_tilingcxx . . $ kgem_choose_tiling(5050f5a79de61cfe).(struct kgemcxx . . $ kgem# *kgem, |
| 278 | int tiling, int width, int height, int bpp); |
| 279 | unsigned kgem_can_create_2dcxx . . $ kgem_can_create_2d(a501e9e0615bf0e7).(struct kgemcxx . . $ kgem# *kgem, int width, int height, int depth); |
| 280 | #define KGEM_CAN_CREATE_GPUcxx . . $ `src/sna/kgem.h:280:9`! 0x1 |
| 281 | #define KGEM_CAN_CREATE_CPUcxx . . $ `src/sna/kgem.h:281:9`! 0x2 |
| 282 | #define KGEM_CAN_CREATE_LARGEcxx . . $ `src/sna/kgem.h:282:9`! 0x4 |
| 283 | #define KGEM_CAN_CREATE_GTTcxx . . $ `src/sna/kgem.h:283:9`! 0x8 |
| 284 | #define KGEM_CAN_CREATE_TILEDcxx . . $ `src/sna/kgem.h:284:9`! 0x10 |
| 285 | |
| 286 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_check_surface_sizecxx . . $ kgem_check_surface_size(a9b3387dfad15909).(struct kgemcxx . . $ kgem# *kgem, |
| 287 | uint32_tcxx . . $ uint32_t# width, |
| 288 | uint32_tcxx . . $ uint32_t# height, |
| 289 | uint32_tcxx . . $ uint32_t# bpp, |
| 290 | uint32_tcxx . . $ uint32_t# tiling, |
| 291 | uint32_tcxx . . $ uint32_t# pitch, |
| 292 | uint32_tcxx . . $ uint32_t# size); |
| 293 | |
| 294 | struct kgem_bocxx . . $ kgem_bo# * |
| 295 | kgem_replace_bocxx . . $ kgem_replace_bo(4d0d4bb26bcd6925).(struct kgemcxx . . $ kgem# *kgem, |
| 296 | struct kgem_bocxx . . $ kgem_bo# *src, |
| 297 | uint32_tcxx . . $ uint32_t# width, |
| 298 | uint32_tcxx . . $ uint32_t# height, |
| 299 | uint32_tcxx . . $ uint32_t# pitch, |
| 300 | uint32_tcxx . . $ uint32_t# bpp); |
| 301 | enumcxx . . $ $anonymous_type_f00cdb096d4148ce_4# { |
| 302 | CREATE_EXACTcxx . . $ CREATE_EXACT. = 0x1, |
| 303 | CREATE_INACTIVEcxx . . $ CREATE_INACTIVE. = 0x2, |
| 304 | CREATE_CPU_MAPcxx . . $ CREATE_CPU_MAP. = 0x4, |
| 305 | CREATE_GTT_MAPcxx . . $ CREATE_GTT_MAP. = 0x8, |
| 306 | CREATE_SCANOUTcxx . . $ CREATE_SCANOUT. = 0x10, |
| 307 | CREATE_PRIMEcxx . . $ CREATE_PRIME. = 0x20, |
| 308 | CREATE_TEMPORARYcxx . . $ CREATE_TEMPORARY. = 0x40, |
| 309 | CREATE_CACHEDcxx . . $ CREATE_CACHED. = 0x80, |
| 310 | CREATE_UNCACHEDcxx . . $ CREATE_UNCACHED. = 0x100, |
| 311 | CREATE_NO_RETIREcxx . . $ CREATE_NO_RETIRE. = 0x200, |
| 312 | CREATE_NO_THROTTLEcxx . . $ CREATE_NO_THROTTLE. = 0x400, |
| 313 | }; |
| 314 | struct kgem_bocxx . . $ kgem_bo# *kgem_create_2dcxx . . $ kgem_create_2d(6358bcea2a5cdff9).(struct kgemcxx . . $ kgem# *kgem, |
| 315 | int width, |
| 316 | int height, |
| 317 | int bpp, |
| 318 | int tiling, |
| 319 | uint32_tcxx . . $ uint32_t# flags); |
| 320 | struct kgem_bocxx . . $ kgem_bo# *kgem_create_cpu_2dcxx . . $ kgem_create_cpu_2d(e9759b2cf7b356ee).(struct kgemcxx . . $ kgem# *kgem, |
| 321 | int width, |
| 322 | int height, |
| 323 | int bpp, |
| 324 | uint32_tcxx . . $ uint32_t# flags); |
| 325 | |
| 326 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_bo_convert_to_gpucxx . . $ kgem_bo_convert_to_gpu(4d061aefc304576).(struct kgemcxx . . $ kgem# *kgem, |
| 327 | struct kgem_bocxx . . $ kgem_bo# *bo, |
| 328 | unsigned flags); |
| 329 | |
| 330 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_bo_is_fencedcxx . . $ kgem_bo_is_fenced(90568d4e3589d458).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 331 | uint32_tcxx . . $ uint32_t# kgem_bo_get_bindingcxx . . $ kgem_bo_get_binding(bb121881ba118dcd).(struct kgem_bocxx . . $ kgem_bo# *bo, uint32_tcxx . . $ uint32_t# format); |
| 332 | void kgem_bo_set_bindingcxx . . $ kgem_bo_set_binding(549b9a4c3ec2fd13).(struct kgem_bocxx . . $ kgem_bo# *bo, uint32_tcxx . . $ uint32_t# format, uint16_tcxx . . $ uint16_t# offset); |
| 333 | |
| 334 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_retirecxx . . $ kgem_retire(91313320991f982b).(struct kgemcxx . . $ kgem# *kgem); |
| 335 | void kgem_retire__bufferscxx . . $ kgem_retire__buffers(e5d72a432f7578a3).(struct kgemcxx . . $ kgem# *kgem); |
| 336 | |
| 337 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_bo_discard_cachecxx . . $ kgem_bo_discard_cache(1d0362733a70b9f3).(struct kgem_bocxx . . $ kgem_bo# *bo, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! force) |
| 338 | { |
| 339 | if (bo == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`! || bo->proxycxx . . $ kgem_bo#proxy. == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!) |
| 340 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 341 | |
| 342 | if (force) |
| 343 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 344 | |
| 345 | if (bo->proxycxx . . $ kgem_bo#proxy.->rqcxx . . $ kgem_bo#rq.) |
| 346 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 347 | |
| 348 | return bo->snoopcxx . . $ kgem_bo#snoop.; |
| 349 | } |
| 350 | |
| 351 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! __kgem_ring_is_idlecxx . . $ __kgem_ring_is_idle(38514e675f9cb6ee).(struct kgemcxx . . $ kgem# *kgem, int ring); |
| 352 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_ring_is_idlecxx . . $ kgem_ring_is_idle(38514e675f9cb6ee).(struct kgemcxx . . $ kgem# *kgem, int ring) |
| 353 | { |
| 354 | ring = ring == KGEM_BLTcxx . . $ KGEM_BLT.; |
| 355 | |
| 356 | if (kgem->needs_semaphorecxx . . $ kgem#needs_semaphore. && |
| 357 | !list_is_emptycxx . . $ list_is_empty(2fcf6e1e2e030cc7).(&kgem->requestscxx . . $ kgem#requests.[!ring]) && |
| 358 | !__kgem_ring_is_idlecxx . . $ __kgem_ring_is_idle(38514e675f9cb6ee).(kgem, !ring)) |
| 359 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 360 | |
| 361 | if (list_is_emptycxx . . $ list_is_empty(2fcf6e1e2e030cc7).(&kgem->requestscxx . . $ kgem#requests.[ring])) |
| 362 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 363 | |
| 364 | return __kgem_ring_is_idlecxx . . $ __kgem_ring_is_idle(38514e675f9cb6ee).(kgem, ring); |
| 365 | } |
| 366 | |
| 367 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_is_idlecxx . . $ kgem_is_idle(91313320991f982b).(struct kgemcxx . . $ kgem# *kgem) |
| 368 | { |
| 369 | if (!kgem->need_retirecxx . . $ kgem#need_retire.) |
| 370 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 371 | |
| 372 | return kgem_ring_is_idlecxx . . $ kgem_ring_is_idle(38514e675f9cb6ee).(kgem, kgem->ringcxx . . $ kgem#ring.); |
| 373 | } |
| 374 | |
| 375 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! __kgem_ring_emptycxx . . $ __kgem_ring_empty(91313320991f982b).(struct kgemcxx . . $ kgem# *kgem) |
| 376 | { |
| 377 | return list_is_emptycxx . . $ list_is_empty(2fcf6e1e2e030cc7).(&kgem->requestscxx . . $ kgem#requests.[kgem->ringcxx . . $ kgem#ring. == KGEM_BLTcxx . . $ KGEM_BLT.]); |
| 378 | } |
| 379 | |
| 380 | void _kgem_submitcxx . . $ _kgem_submit(e5d72a432f7578a3).(struct kgemcxx . . $ kgem# *kgem); |
| 381 | static inline void kgem_submitcxx . . $ kgem_submit(e5d72a432f7578a3).(struct kgemcxx . . $ kgem# *kgem) |
| 382 | { |
| 383 | if (kgem->nbatchcxx . . $ kgem#nbatch.) |
| 384 | _kgem_submitcxx . . $ _kgem_submit(e5d72a432f7578a3).(kgem); |
| 385 | } |
| 386 | |
| 387 | static inline void kgem_bo_submitcxx . . $ kgem_bo_submit(acb82a203cb9de7a).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo) |
| 388 | { |
| 389 | if (bo->execcxx . . $ kgem_bo#exec. == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!) |
| 390 | return; |
| 391 | |
| 392 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 393 | _kgem_submitcxx . . $ _kgem_submit(e5d72a432f7578a3).(kgem); |
| 394 | } |
| 395 | |
| 396 | void kgem_scanout_flushcxx . . $ kgem_scanout_flush(acb82a203cb9de7a).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 397 | |
| 398 | static inline struct kgem_bocxx . . $ kgem_bo# *kgem_bo_referencecxx . . $ kgem_bo_reference(cb37ad799609c071).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 399 | { |
| 400 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 401 | bo->refcntcxx . . $ kgem_bo#refcnt.++; |
| 402 | return bo; |
| 403 | } |
| 404 | |
| 405 | void _kgem_bo_destroycxx . . $ _kgem_bo_destroy(acb82a203cb9de7a).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 406 | static inline void kgem_bo_destroycxx . . $ kgem_bo_destroy(acb82a203cb9de7a).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo) |
| 407 | { |
| 408 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 409 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt > bo->active_scanout); |
| 410 | if (--bo->refcntcxx . . $ kgem_bo#refcnt. == 0) |
| 411 | _kgem_bo_destroycxx . . $ _kgem_bo_destroy(acb82a203cb9de7a).(kgem, bo); |
| 412 | } |
| 413 | |
| 414 | void kgem_clear_dirtycxx . . $ kgem_clear_dirty(e5d72a432f7578a3).(struct kgemcxx . . $ kgem# *kgem); |
| 415 | |
| 416 | static inline void kgem_set_modecxx . . $ kgem_set_mode(36586f3090ea3cec).(struct kgemcxx . . $ kgem# *kgem, |
| 417 | enum kgem_modecxx . . $ kgem_mode# mode, |
| 418 | struct kgem_bocxx . . $ kgem_bo# *bo) |
| 419 | { |
| 420 | warn_unlesscxx . . $ `src/sna/xassert.h:65:9`!(!kgem->wedged); |
| 421 | |
| 422 | #if DEBUG_FLUSH_BATCHcxx . . $ `src/sna/sna.h:85:9`! |
| 423 | kgem_submit(kgem); |
| 424 | #endif |
| 425 | |
| 426 | if (kgem->nreloccxx . . $ kgem#nreloc. && bo->rqcxx . . $ kgem_bo#rq. == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`! && kgem_ring_is_idlecxx . . $ kgem_ring_is_idle(38514e675f9cb6ee).(kgem, kgem->ringcxx . . $ kgem#ring.)) { |
| 427 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: flushing before new bo\n", __FUNCTION__)); |
| 428 | _kgem_submitcxx . . $ _kgem_submit(e5d72a432f7578a3).(kgem); |
| 429 | } |
| 430 | |
| 431 | if (kgem->modecxx . . $ kgem#mode. == mode) |
| 432 | return; |
| 433 | |
| 434 | kgem->context_switchcxx . . $ kgem#context_switch.(kgem, mode); |
| 435 | kgem->modecxx . . $ kgem#mode. = mode; |
| 436 | } |
| 437 | |
| 438 | static inline void _kgem_set_modecxx . . $ _kgem_set_mode(1ac6243656517f53).(struct kgemcxx . . $ kgem# *kgem, enum kgem_modecxx . . $ kgem_mode# mode) |
| 439 | { |
| 440 | assertcxx . . $ `/usr/include/assert.h:50:10`!(kgem->mode == KGEM_NONE); |
| 441 | assertcxx . . $ `/usr/include/assert.h:50:10`!(kgem->nbatch == 0); |
| 442 | warn_unlesscxx . . $ `src/sna/xassert.h:65:9`!(!kgem->wedged); |
| 443 | kgem->context_switchcxx . . $ kgem#context_switch.(kgem, mode); |
| 444 | kgem->modecxx . . $ kgem#mode. = mode; |
| 445 | } |
| 446 | |
| 447 | static inline int kgem_batch_spacecxx . . $ kgem_batch_space(3145fcce5b72ac3c).(struct kgemcxx . . $ kgem# *kgem) |
| 448 | { |
| 449 | int rem = kgem->surfacecxx . . $ kgem#surface. - kgem->nbatchcxx . . $ kgem#nbatch.; |
| 450 | assertcxx . . $ `/usr/include/assert.h:50:10`!(rem > 0); |
| 451 | return rem - KGEM_BATCH_RESERVEDcxx . . $ `src/sna/kgem.h:243:9`!; |
| 452 | } |
| 453 | |
| 454 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_check_batchcxx . . $ kgem_check_batch(38514e675f9cb6ee).(struct kgemcxx . . $ kgem# *kgem, int num_dwords) |
| 455 | { |
| 456 | assertcxx . . $ `/usr/include/assert.h:50:10`!(num_dwords > 0); |
| 457 | assertcxx . . $ `/usr/include/assert.h:50:10`!(kgem->nbatch < kgem->surface); |
| 458 | assertcxx . . $ `/usr/include/assert.h:50:10`!(kgem->surface <= kgem->batch_size); |
| 459 | return likelycxx . . $ `src/sna/compiler.h:32:9`!(kgem->nbatch + num_dwords + KGEM_BATCH_RESERVEDcxx . . $ `src/sna/kgem.h:243:9`! <= kgem->surface); |
| 460 | } |
| 461 | |
| 462 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_check_reloccxx . . $ kgem_check_reloc(38514e675f9cb6ee).(struct kgemcxx . . $ kgem# *kgem, int n) |
| 463 | { |
| 464 | assertcxx . . $ `/usr/include/assert.h:50:10`!(kgem->nreloc <= KGEM_RELOC_SIZE(kgem)); |
| 465 | return likelycxx . . $ `src/sna/compiler.h:32:9`!(kgem->nreloc + n <= KGEM_RELOC_SIZEcxx . . $ `src/sna/kgem.h:253:9`!(kgem)); |
| 466 | } |
| 467 | |
| 468 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_check_execcxx . . $ kgem_check_exec(38514e675f9cb6ee).(struct kgemcxx . . $ kgem# *kgem, int n) |
| 469 | { |
| 470 | assertcxx . . $ `/usr/include/assert.h:50:10`!(kgem->nexec <= KGEM_EXEC_SIZE(kgem)); |
| 471 | return likelycxx . . $ `src/sna/compiler.h:32:9`!(kgem->nexec + n <= KGEM_EXEC_SIZEcxx . . $ `src/sna/kgem.h:252:9`!(kgem)); |
| 472 | } |
| 473 | |
| 474 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_check_reloc_and_execcxx . . $ kgem_check_reloc_and_exec(38514e675f9cb6ee).(struct kgemcxx . . $ kgem# *kgem, int n) |
| 475 | { |
| 476 | return kgem_check_reloccxx . . $ kgem_check_reloc(38514e675f9cb6ee).(kgem, n) && kgem_check_execcxx . . $ kgem_check_exec(38514e675f9cb6ee).(kgem, n); |
| 477 | } |
| 478 | |
| 479 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_check_batch_with_surfacescxx . . $ kgem_check_batch_with_surfaces(77d1e504ceff8a92).(struct kgemcxx . . $ kgem# *kgem, |
| 480 | int num_dwords, |
| 481 | int num_surfaces) |
| 482 | { |
| 483 | return (int)(kgem->nbatchcxx . . $ kgem#nbatch. + num_dwords + KGEM_BATCH_RESERVEDcxx . . $ `src/sna/kgem.h:243:9`!) <= (int)(kgem->surfacecxx . . $ kgem#surface. - num_surfaces*8) && |
| 484 | kgem_check_reloccxx . . $ kgem_check_reloc(38514e675f9cb6ee).(kgem, num_surfaces) && |
| 485 | kgem_check_execcxx . . $ kgem_check_exec(38514e675f9cb6ee).(kgem, num_surfaces); |
| 486 | } |
| 487 | |
| 488 | static inline uint32_tcxx . . $ uint32_t# *kgem_get_batchcxx . . $ kgem_get_batch(276233467bb3d2fa).(struct kgemcxx . . $ kgem# *kgem) |
| 489 | { |
| 490 | if (kgem->nreloccxx . . $ kgem#nreloc.) { |
| 491 | unsigned mode = kgem->modecxx . . $ kgem#mode.; |
| 492 | _kgem_submitcxx . . $ _kgem_submit(e5d72a432f7578a3).(kgem); |
| 493 | _kgem_set_modecxx . . $ _kgem_set_mode(1ac6243656517f53).(kgem, mode); |
| 494 | } |
| 495 | |
| 496 | return kgem->batchcxx . . $ kgem#batch. + kgem->nbatchcxx . . $ kgem#nbatch.; |
| 497 | } |
| 498 | |
| 499 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_check_bocxx . . $ kgem_check_bo(1942b54ba8e51385).(struct kgemcxx . . $ kgem# *kgem, ...) __attribute__((sentinel(0))); |
| 500 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_check_bo_fencedcxx . . $ kgem_check_bo_fenced(90568d4e3589d458).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 501 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_check_many_bo_fencedcxx . . $ kgem_check_many_bo_fenced(1942b54ba8e51385).(struct kgemcxx . . $ kgem# *kgem, ...) __attribute__((sentinel(0))); |
| 502 | |
| 503 | #define KGEM_RELOC_FENCEDcxx . . $ `src/sna/kgem.h:503:9`! 0x8000 |
| 504 | uint32_tcxx . . $ uint32_t# kgem_add_reloccxx . . $ kgem_add_reloc(63d2e0f6788661b9).(struct kgemcxx . . $ kgem# *kgem, |
| 505 | uint32_tcxx . . $ uint32_t# pos, |
| 506 | struct kgem_bocxx . . $ kgem_bo# *bo, |
| 507 | uint32_tcxx . . $ uint32_t# read_write_domains, |
| 508 | uint32_tcxx . . $ uint32_t# delta); |
| 509 | uint64_tcxx . . $ uint64_t# kgem_add_reloc64cxx . . $ kgem_add_reloc64(a2c949b739e8721c).(struct kgemcxx . . $ kgem# *kgem, |
| 510 | uint32_tcxx . . $ uint32_t# pos, |
| 511 | struct kgem_bocxx . . $ kgem_bo# *bo, |
| 512 | uint32_tcxx . . $ uint32_t# read_write_domains, |
| 513 | uint64_tcxx . . $ uint64_t# delta); |
| 514 | |
| 515 | void *kgem_bo_mapcxx . . $ kgem_bo_map(2cf92fbefefb81de).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 516 | void *kgem_bo_map__asynccxx . . $ kgem_bo_map__async(2cf92fbefefb81de).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 517 | void *kgem_bo_map__gttcxx . . $ kgem_bo_map__gtt(2cf92fbefefb81de).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 518 | void *kgem_bo_map__wccxx . . $ kgem_bo_map__wc(2cf92fbefefb81de).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 519 | void kgem_bo_sync__gttcxx . . $ kgem_bo_sync__gtt(acb82a203cb9de7a).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 520 | void *kgem_bo_map__debugcxx . . $ kgem_bo_map__debug(2cf92fbefefb81de).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 521 | void *kgem_bo_map__cpucxx . . $ kgem_bo_map__cpu(2cf92fbefefb81de).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 522 | void kgem_bo_sync__cpucxx . . $ kgem_bo_sync__cpu(acb82a203cb9de7a).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 523 | void kgem_bo_sync__cpu_fullcxx . . $ kgem_bo_sync__cpu_full(5767070a587e98).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! write); |
| 524 | uint32_tcxx . . $ uint32_t# kgem_bo_flinkcxx . . $ kgem_bo_flink(4c51aa0d49df8021).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 525 | |
| 526 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_bo_writecxx . . $ kgem_bo_write(3c48850bceaed3e1).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo, |
| 527 | const void *data, int length); |
| 528 | |
| 529 | int kgem_bo_fenced_sizecxx . . $ kgem_bo_fenced_size(db9f92d0785665a9).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 530 | void kgem_get_tile_sizecxx . . $ kgem_get_tile_size(6e8a20b97ce1b7f7).(struct kgemcxx . . $ kgem# *kgem, int tiling, int pitch, |
| 531 | int *tile_width, int *tile_height, int *tile_size); |
| 532 | |
| 533 | static inline int __kgem_buffer_sizecxx . . $ __kgem_buffer_size(345c111e15e07519).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 534 | { |
| 535 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->proxy != NULL); |
| 536 | return bo->sizecxx . . $ kgem_bo#size..bytescxx . . $ kgem_bo#$anonymous_type_0#bytes.; |
| 537 | } |
| 538 | |
| 539 | static inline int __kgem_bo_sizecxx . . $ __kgem_bo_size(345c111e15e07519).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 540 | { |
| 541 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->proxy == NULL); |
| 542 | return PAGE_SIZEcxx . . $ `src/sna/kgem.h:77:9`! * bo->sizecxx . . $ kgem_bo#size..pagescxx . . $ kgem_bo#$anonymous_type_0#pages..countcxx . . $ kgem_bo#$anonymous_type_0#$anonymous_type_1#count.; |
| 543 | } |
| 544 | |
| 545 | static inline int __kgem_bo_num_pagescxx . . $ __kgem_bo_num_pages(345c111e15e07519).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 546 | { |
| 547 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->proxy == NULL); |
| 548 | return bo->sizecxx . . $ kgem_bo#size..pagescxx . . $ kgem_bo#$anonymous_type_0#pages..countcxx . . $ kgem_bo#$anonymous_type_0#$anonymous_type_1#count.; |
| 549 | } |
| 550 | |
| 551 | static inline int kgem_bo_sizecxx . . $ kgem_bo_size(345c111e15e07519).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 552 | { |
| 553 | if (bo->proxycxx . . $ kgem_bo#proxy.) |
| 554 | return __kgem_buffer_sizecxx . . $ __kgem_buffer_size(345c111e15e07519).(bo); |
| 555 | else |
| 556 | return __kgem_bo_sizecxx . . $ __kgem_bo_size(345c111e15e07519).(bo); |
| 557 | } |
| 558 | |
| 559 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_bo_blt_pitch_is_okcxx . . $ kgem_bo_blt_pitch_is_ok(90568d4e3589d458).(struct kgemcxx . . $ kgem# *kgem, |
| 560 | struct kgem_bocxx . . $ kgem_bo# *bo) |
| 561 | { |
| 562 | int pitch = bo->pitchcxx . . $ kgem_bo#pitch.; |
| 563 | |
| 564 | if (kgem->gencxx . . $ kgem#gen. >= 0100 && pitch & (1 << 4)) { /* bdw is broken */ |
| 565 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: can not blt to handle=%d, pitch=%d\n", |
| 566 | __FUNCTION__, bo->handle, pitch)); |
| 567 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 568 | } |
| 569 | |
| 570 | if (kgem->gencxx . . $ kgem#gen. >= 040 && bo->tilingcxx . . $ kgem_bo#tiling.) |
| 571 | pitch /= 4; |
| 572 | if (pitch > MAXSHORTcxx . . $ `<external>/18388808314464358495/misc.h:165:9`!) { |
| 573 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: can not blt to handle=%d, adjusted pitch=%d\n", |
| 574 | __FUNCTION__, bo->handle, pitch)); |
| 575 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 576 | } |
| 577 | |
| 578 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 579 | } |
| 580 | |
| 581 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_bo_can_bltcxx . . $ kgem_bo_can_blt(90568d4e3589d458).(struct kgemcxx . . $ kgem# *kgem, |
| 582 | struct kgem_bocxx . . $ kgem_bo# *bo) |
| 583 | { |
| 584 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 585 | |
| 586 | if (bo->tilingcxx . . $ kgem_bo#tiling. == I915_TILING_Ycxx . . $ `<external>/17903803794487424948/i915_drm.h:1659:9`! && !kgem->can_blt_ycxx . . $ kgem#can_blt_y.) { |
| 587 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: can not blt to handle=%d, tiling=Y\n", |
| 588 | __FUNCTION__, bo->handle)); |
| 589 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 590 | } |
| 591 | |
| 592 | if (kgem->gencxx . . $ kgem#gen. >= 0100 && bo->proxycxx . . $ kgem_bo#proxy. && bo->deltacxx . . $ kgem_bo#delta. & 63) { |
| 593 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: can not blt to handle=%d, delta=%d\n", |
| 594 | __FUNCTION__, bo->handle, bo->delta)); |
| 595 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 596 | } |
| 597 | |
| 598 | return kgem_bo_blt_pitch_is_okcxx . . $ kgem_bo_blt_pitch_is_ok(90568d4e3589d458).(kgem, bo); |
| 599 | } |
| 600 | |
| 601 | void __kgem_bcs_set_tilingcxx . . $ __kgem_bcs_set_tiling(b93e8aafdc46f541).(struct kgemcxx . . $ kgem# *kgem, |
| 602 | struct kgem_bocxx . . $ kgem_bo# *src, |
| 603 | struct kgem_bocxx . . $ kgem_bo# *dst); |
| 604 | |
| 605 | inline static void kgem_bcs_set_tilingcxx . . $ kgem_bcs_set_tiling(b93e8aafdc46f541).(struct kgemcxx . . $ kgem# *kgem, |
| 606 | struct kgem_bocxx . . $ kgem_bo# *src, |
| 607 | struct kgem_bocxx . . $ kgem_bo# *dst) |
| 608 | { |
| 609 | assertcxx . . $ `/usr/include/assert.h:50:10`!(kgem->mode == KGEM_BLT); |
| 610 | |
| 611 | if (!kgem->can_blt_ycxx . . $ kgem#can_blt_y.) |
| 612 | return; |
| 613 | |
| 614 | __kgem_bcs_set_tilingcxx . . $ __kgem_bcs_set_tiling(b93e8aafdc46f541).(kgem, src, dst); |
| 615 | } |
| 616 | |
| 617 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_bo_is_snoopcxx . . $ kgem_bo_is_snoop(42b81767c09ba51c).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 618 | { |
| 619 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 620 | while (bo->proxycxx . . $ kgem_bo#proxy.) |
| 621 | bo = bo->proxycxx . . $ kgem_bo#proxy.; |
| 622 | return bo->snoopcxx . . $ kgem_bo#snoop.; |
| 623 | } |
| 624 | |
| 625 | void kgem_bo_undocxx . . $ kgem_bo_undo(acb82a203cb9de7a).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 626 | void kgem_bo_pair_undocxx . . $ kgem_bo_pair_undo(b93e8aafdc46f541).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *a, struct kgem_bocxx . . $ kgem_bo# *b); |
| 627 | |
| 628 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! __kgem_busycxx . . $ __kgem_busy(38514e675f9cb6ee).(struct kgemcxx . . $ kgem# *kgem, int handle); |
| 629 | |
| 630 | static inline void kgem_bo_mark_busycxx . . $ kgem_bo_mark_busy(5f2e446eb8a91dd0).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo, int ring) |
| 631 | { |
| 632 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 633 | bo->needs_flushcxx . . $ kgem_bo#needs_flush. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 634 | if (bo->rqcxx . . $ kgem_bo#rq.) { |
| 635 | bo->rqcxx . . $ kgem_bo#rq. = MAKE_REQUESTcxx . . $ `src/sna/kgem.h:46:9`!(RQcxx . . $ `src/sna/kgem.h:42:9`!(bo->rq), ring); |
| 636 | } else { |
| 637 | bo->rqcxx . . $ kgem_bo#rq. = MAKE_REQUESTcxx . . $ `src/sna/kgem.h:46:9`!(kgem, ring); |
| 638 | list_addcxx . . $ list_add(56c69efadbadf7f).(&bo->requestcxx . . $ kgem_bo#request., &kgem->flushingcxx . . $ kgem#flushing.); |
| 639 | kgem->need_retirecxx . . $ kgem#need_retire. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 640 | } |
| 641 | } |
| 642 | |
| 643 | static inline void __kgem_bo_clear_dirtycxx . . $ __kgem_bo_clear_dirty(f31555f8c4397893).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 644 | { |
| 645 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: handle=%d\n", __FUNCTION__, bo->handle)); |
| 646 | |
| 647 | bo->domaincxx . . $ kgem_bo#domain. = DOMAIN_NONEcxx . . $ `src/sna/kgem.h:98:9`!; |
| 648 | bo->needs_flushcxx . . $ kgem_bo#needs_flush. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 649 | bo->gtt_dirtycxx . . $ kgem_bo#gtt_dirty. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 650 | } |
| 651 | |
| 652 | inline static void __kgem_bo_clear_busycxx . . $ __kgem_bo_clear_busy(f31555f8c4397893).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 653 | { |
| 654 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: handle=%d\n", __FUNCTION__, bo->handle)); |
| 655 | bo->rqcxx . . $ kgem_bo#rq. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 656 | list_delcxx . . $ list_del(aab7549c8b706ca7).(&bo->requestcxx . . $ kgem_bo#request.); |
| 657 | |
| 658 | __kgem_bo_clear_dirtycxx . . $ __kgem_bo_clear_dirty(f31555f8c4397893).(bo); |
| 659 | } |
| 660 | |
| 661 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_bo_is_busycxx . . $ kgem_bo_is_busy(42b81767c09ba51c).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 662 | { |
| 663 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: handle=%d, domain: %d exec? %d, rq? %d\n", __FUNCTION__, |
| 664 | bo->handle, bo->domain, bo->exec != NULL, bo->rq != NULL)); |
| 665 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 666 | return bo->rqcxx . . $ kgem_bo#rq.; |
| 667 | } |
| 668 | |
| 669 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! __kgem_retire_requests_uptocxx . . $ __kgem_retire_requests_upto(90568d4e3589d458).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 670 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! __kgem_bo_is_busycxx . . $ __kgem_bo_is_busy(90568d4e3589d458).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo) |
| 671 | { |
| 672 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: handle=%d, domain: %d exec? %d, rq? %d\n", __FUNCTION__, |
| 673 | bo->handle, bo->domain, bo->exec != NULL, bo->rq != NULL)); |
| 674 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 675 | |
| 676 | if (bo->execcxx . . $ kgem_bo#exec.) |
| 677 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 678 | |
| 679 | if (bo->rqcxx . . $ kgem_bo#rq. == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!) |
| 680 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 681 | |
| 682 | if (__kgem_busycxx . . $ __kgem_busy(38514e675f9cb6ee).(kgem, bo->handlecxx . . $ kgem_bo#handle.)) |
| 683 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 684 | |
| 685 | return __kgem_retire_requests_uptocxx . . $ __kgem_retire_requests_upto(90568d4e3589d458).(kgem, bo); |
| 686 | } |
| 687 | |
| 688 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_bo_is_rendercxx . . $ kgem_bo_is_render(42b81767c09ba51c).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 689 | { |
| 690 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: handle=%d, tiling=%d, rq? %d [%d]\n", __FUNCTION__, |
| 691 | bo->handle, bo->tiling, bo->rq != NULL, (int)RQ_RING(bo->rq))); |
| 692 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 693 | if (bo->tilingcxx . . $ kgem_bo#tiling. >= I915_TILING_Ycxx . . $ `<external>/17903803794487424948/i915_drm.h:1659:9`!) |
| 694 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 695 | |
| 696 | return bo->rqcxx . . $ kgem_bo#rq. && RQ_RINGcxx . . $ `src/sna/kgem.h:43:9`!(bo->rq) != KGEM_BLTcxx . . $ KGEM_BLT.; |
| 697 | } |
| 698 | |
| 699 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_bo_is_bltcxx . . $ kgem_bo_is_blt(42b81767c09ba51c).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 700 | { |
| 701 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: handle=%d, rq? %d\n", __FUNCTION__, |
| 702 | bo->handle, bo->rq != NULL, (int)RQ_RING(bo->rq))); |
| 703 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 704 | return RQ_RINGcxx . . $ `src/sna/kgem.h:43:9`!(bo->rq) == KGEM_BLTcxx . . $ KGEM_BLT.; |
| 705 | } |
| 706 | |
| 707 | static inline void kgem_bo_mark_unreusablecxx . . $ kgem_bo_mark_unreusable(f31555f8c4397893).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 708 | { |
| 709 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 710 | while (bo->proxycxx . . $ kgem_bo#proxy.) { |
| 711 | bo->flushcxx . . $ kgem_bo#flush. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 712 | bo = bo->proxycxx . . $ kgem_bo#proxy.; |
| 713 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 714 | } |
| 715 | bo->flushcxx . . $ kgem_bo#flush. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 716 | bo->reusablecxx . . $ kgem_bo#reusable. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 717 | } |
| 718 | |
| 719 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_bo_is_dirtycxx . . $ kgem_bo_is_dirty(42b81767c09ba51c).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 720 | { |
| 721 | if (bo == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!) |
| 722 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 723 | |
| 724 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 725 | return bo->gpu_dirtycxx . . $ kgem_bo#gpu_dirty.; |
| 726 | } |
| 727 | |
| 728 | static inline void kgem_bo_uncleancxx . . $ kgem_bo_unclean(acb82a203cb9de7a).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo) |
| 729 | { |
| 730 | /* The bo is outside of our control, so presume it is written to */ |
| 731 | bo->needs_flushcxx . . $ kgem_bo#needs_flush. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 732 | if (bo->rqcxx . . $ kgem_bo#rq. == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!) |
| 733 | bo->rqcxx . . $ kgem_bo#rq. = (void *)kgem; |
| 734 | |
| 735 | if (bo->domaincxx . . $ kgem_bo#domain. != DOMAIN_GPUcxx . . $ `src/sna/kgem.h:101:9`!) |
| 736 | bo->domaincxx . . $ kgem_bo#domain. = DOMAIN_NONEcxx . . $ `src/sna/kgem.h:98:9`!; |
| 737 | } |
| 738 | |
| 739 | static inline void __kgem_bo_mark_dirtycxx . . $ __kgem_bo_mark_dirty(f31555f8c4397893).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 740 | { |
| 741 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: handle=%d (proxy? %d)\n", __FUNCTION__, |
| 742 | bo->handle, bo->proxy != NULL)); |
| 743 | |
| 744 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 745 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->exec); |
| 746 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->rq); |
| 747 | |
| 748 | bo->execcxx . . $ kgem_bo#exec.->flagscxx . . $ drm_i915_gem_exec_object2#flags. |= LOCAL_EXEC_OBJECT_WRITEcxx . . $ `src/sna/kgem.h:172:9`!; |
| 749 | bo->needs_flushcxx . . $ kgem_bo#needs_flush. = bo->gpu_dirtycxx . . $ kgem_bo#gpu_dirty. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 750 | list_movecxx . . $ list_move(56c69efadbadf7f).(&bo->requestcxx . . $ kgem_bo#request., &RQcxx . . $ `src/sna/kgem.h:42:9`!(bo->rq)->bufferscxx . . $ kgem_request#buffers.); |
| 751 | } |
| 752 | |
| 753 | static inline void kgem_bo_mark_dirtycxx . . $ kgem_bo_mark_dirty(f31555f8c4397893).(struct kgem_bocxx . . $ kgem_bo# *bo) |
| 754 | { |
| 755 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 756 | do { |
| 757 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->exec); |
| 758 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->rq); |
| 759 | |
| 760 | if (bo->gpu_dirtycxx . . $ kgem_bo#gpu_dirty.) |
| 761 | return; |
| 762 | |
| 763 | __kgem_bo_mark_dirtycxx . . $ __kgem_bo_mark_dirty(f31555f8c4397893).(bo); |
| 764 | } while ((bo = bo->proxycxx . . $ kgem_bo#proxy.)); |
| 765 | } |
| 766 | |
| 767 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_bo_mappedcxx . . $ kgem_bo_mapped(90568d4e3589d458).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo) |
| 768 | { |
| 769 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: handle=%d, map=%p:%p, tiling=%d, domain=%d\n", |
| 770 | __FUNCTION__, bo->handle, bo->map__gtt, bo->map__cpu, bo->tiling, bo->domain)); |
| 771 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->proxy == NULL); |
| 772 | |
| 773 | if (bo->tilingcxx . . $ kgem_bo#tiling. == I915_TILING_NONEcxx . . $ `<external>/17903803794487424948/i915_drm.h:1657:9`! && (bo->domaincxx . . $ kgem_bo#domain. == DOMAIN_CPUcxx . . $ `src/sna/kgem.h:99:9`! || kgem->has_llccxx . . $ kgem#has_llc.)) |
| 774 | return bo->map__cpucxx . . $ kgem_bo#map__cpu. != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 775 | |
| 776 | if (bo->tilingcxx . . $ kgem_bo#tiling. == I915_TILING_NONEcxx . . $ `<external>/17903803794487424948/i915_drm.h:1657:9`! && bo->map__wccxx . . $ kgem_bo#map__wc.) |
| 777 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 778 | |
| 779 | return bo->map__gttcxx . . $ kgem_bo#map__gtt. != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 780 | } |
| 781 | |
| 782 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_bo_can_mapcxx . . $ kgem_bo_can_map(90568d4e3589d458).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo) |
| 783 | { |
| 784 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: handle=%d, map=%p:%p:%p, tiling=%d, domain=%d, offset=%ld\n", |
| 785 | __FUNCTION__, bo->handle, bo->map__gtt, bo->map__wc, bo->map__cpu, bo->tiling, bo->domain, (long)bo->presumed_offset)); |
| 786 | |
| 787 | if (!bo->tilingcxx . . $ kgem_bo#tiling. && (kgem->has_llccxx . . $ kgem#has_llc. || bo->domaincxx . . $ kgem_bo#domain. == DOMAIN_CPUcxx . . $ `src/sna/kgem.h:99:9`!)) |
| 788 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 789 | |
| 790 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->proxy == NULL); |
| 791 | |
| 792 | if (bo->map__gttcxx . . $ kgem_bo#map__gtt. != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!) |
| 793 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 794 | |
| 795 | if (kgem->gencxx . . $ kgem#gen. == 021 && bo->tilingcxx . . $ kgem_bo#tiling. == I915_TILING_Ycxx . . $ `<external>/17903803794487424948/i915_drm.h:1659:9`!) |
| 796 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 797 | |
| 798 | if (!bo->tilingcxx . . $ kgem_bo#tiling. && kgem->has_wc_mmapcxx . . $ kgem#has_wc_mmap.) |
| 799 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 800 | |
| 801 | return __kgem_bo_num_pagescxx . . $ __kgem_bo_num_pages(345c111e15e07519).(bo) <= kgem->aperture_mappablecxx . . $ kgem#aperture_mappable. / 4; |
| 802 | } |
| 803 | |
| 804 | static inline boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_bo_can_map__cpucxx . . $ kgem_bo_can_map__cpu(f94b4bfd75f2c626).(struct kgemcxx . . $ kgem# *kgem, |
| 805 | struct kgem_bocxx . . $ kgem_bo# *bo, |
| 806 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! write) |
| 807 | { |
| 808 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: handle=%d\n", __FUNCTION__, bo->handle)); |
| 809 | assertcxx . . $ `/usr/include/assert.h:50:10`!(bo->refcnt); |
| 810 | |
| 811 | if (bo->purgedcxx . . $ kgem_bo#purged. || (bo->scanoutcxx . . $ kgem_bo#scanout. && write)) { |
| 812 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: no, writing to scanout? %d, or is stolen [inaccessible via CPU]? %d\n", |
| 813 | __FUNCTION__, bo->scanout && write, bo->purged)); |
| 814 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 815 | } |
| 816 | |
| 817 | if (kgem->has_llccxx . . $ kgem#has_llc.) { |
| 818 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: yes, has LLC and target is in LLC\n", __FUNCTION__)); |
| 819 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 820 | } |
| 821 | |
| 822 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: non-LLC - CPU domain? %d, clean? %d\n", |
| 823 | __FUNCTION__, bo->domain == DOMAIN_CPU, !write || bo->exec == NULL)); |
| 824 | if (bo->domaincxx . . $ kgem_bo#domain. != DOMAIN_CPUcxx . . $ `src/sna/kgem.h:99:9`!) |
| 825 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 826 | |
| 827 | return !write || bo->execcxx . . $ kgem_bo#exec. == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:419:9`!; |
| 828 | } |
| 829 | |
| 830 | #define KGEM_BUFFER_WRITEcxx . . $ `src/sna/kgem.h:830:9`! 0x1 |
| 831 | #define KGEM_BUFFER_INPLACEcxx . . $ `src/sna/kgem.h:831:9`! 0x2 |
| 832 | #define KGEM_BUFFER_LASTcxx . . $ `src/sna/kgem.h:832:9`! 0x4 |
| 833 | |
| 834 | #define KGEM_BUFFER_WRITE_INPLACEcxx . . $ `src/sna/kgem.h:834:9`! (KGEM_BUFFER_WRITE | KGEM_BUFFER_INPLACE) |
| 835 | |
| 836 | struct kgem_bocxx . . $ kgem_bo# *kgem_create_buffercxx . . $ kgem_create_buffer(d04e4a54afad65e5).(struct kgemcxx . . $ kgem# *kgem, |
| 837 | uint32_tcxx . . $ uint32_t# size, uint32_tcxx . . $ uint32_t# flags, |
| 838 | void **ret); |
| 839 | struct kgem_bocxx . . $ kgem_bo# *kgem_create_buffer_2dcxx . . $ kgem_create_buffer_2d(2585e91d8a595314).(struct kgemcxx . . $ kgem# *kgem, |
| 840 | int width, int height, int bpp, |
| 841 | uint32_tcxx . . $ uint32_t# flags, |
| 842 | void **ret); |
| 843 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_buffer_is_inplacecxx . . $ kgem_buffer_is_inplace(42b81767c09ba51c).(struct kgem_bocxx . . $ kgem_bo# *bo); |
| 844 | void kgem_buffer_read_synccxx . . $ kgem_buffer_read_sync(acb82a203cb9de7a).(struct kgemcxx . . $ kgem# *kgem, struct kgem_bocxx . . $ kgem_bo# *bo); |
| 845 | |
| 846 | int kgem_is_wedgedcxx . . $ kgem_is_wedged(3145fcce5b72ac3c).(struct kgemcxx . . $ kgem# *kgem); |
| 847 | void kgem_throttlecxx . . $ kgem_throttle(e5d72a432f7578a3).(struct kgemcxx . . $ kgem# *kgem); |
| 848 | #define MAX_INACTIVE_TIMEcxx . . $ `src/sna/kgem.h:848:9`! 10 |
| 849 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_expire_cachecxx . . $ kgem_expire_cache(91313320991f982b).(struct kgemcxx . . $ kgem# *kgem); |
| 850 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! kgem_cleanup_cachecxx . . $ kgem_cleanup_cache(91313320991f982b).(struct kgemcxx . . $ kgem# *kgem); |
| 851 | |
| 852 | void kgem_clean_scanout_cachecxx . . $ kgem_clean_scanout_cache(e5d72a432f7578a3).(struct kgemcxx . . $ kgem# *kgem); |
| 853 | void kgem_clean_large_cachecxx . . $ kgem_clean_large_cache(e5d72a432f7578a3).(struct kgemcxx . . $ kgem# *kgem); |
| 854 | |
| 855 | #if HAS_DEBUG_FULL |
| 856 | void __kgem_batch_debug(struct kgem *kgem, uint32_t nbatch); |
| 857 | #else |
| 858 | static inline void __kgem_batch_debugcxx . . $ __kgem_batch_debug(273f49aec7fbffea).(struct kgemcxx . . $ kgem# *kgem, uint32_tcxx . . $ uint32_t# nbatch) |
| 859 | { |
| 860 | (void)kgem; |
| 861 | (void)nbatch; |
| 862 | } |
| 863 | #endif |
| 864 | |
| 865 | static inline void |
| 866 | memcpy_to_tiled_xcxx . . $ memcpy_to_tiled_x(b50af8ed9b29fbb2).(struct kgemcxx . . $ kgem# *kgem, |
| 867 | const void *src, void *dst, int bpp, |
| 868 | int32_tcxx . . $ int32_t# src_stride, int32_tcxx . . $ int32_t# dst_stride, |
| 869 | int16_tcxx . . $ int16_t# src_x, int16_tcxx . . $ int16_t# src_y, |
| 870 | int16_tcxx . . $ int16_t# dst_x, int16_tcxx . . $ int16_t# dst_y, |
| 871 | uint16_tcxx . . $ uint16_t# width, uint16_tcxx . . $ uint16_t# height) |
| 872 | { |
| 873 | assertcxx . . $ `/usr/include/assert.h:50:10`!(kgem->memcpy_to_tiled_x); |
| 874 | assertcxx . . $ `/usr/include/assert.h:50:10`!(src_x >= 0 && src_y >= 0); |
| 875 | assertcxx . . $ `/usr/include/assert.h:50:10`!(dst_x >= 0 && dst_y >= 0); |
| 876 | assertcxx . . $ `/usr/include/assert.h:50:10`!(8*src_stride >= (src_x+width) * bpp); |
| 877 | assertcxx . . $ `/usr/include/assert.h:50:10`!(8*dst_stride >= (dst_x+width) * bpp); |
| 878 | return kgem->memcpy_to_tiled_xcxx . . $ kgem#memcpy_to_tiled_x.(src, dst, bpp, |
| 879 | src_stride, dst_stride, |
| 880 | src_x, src_y, |
| 881 | dst_x, dst_y, |
| 882 | width, height); |
| 883 | } |
| 884 | |
| 885 | static inline void |
| 886 | memcpy_from_tiled_xcxx . . $ memcpy_from_tiled_x(b50af8ed9b29fbb2).(struct kgemcxx . . $ kgem# *kgem, |
| 887 | const void *src, void *dst, int bpp, |
| 888 | int32_tcxx . . $ int32_t# src_stride, int32_tcxx . . $ int32_t# dst_stride, |
| 889 | int16_tcxx . . $ int16_t# src_x, int16_tcxx . . $ int16_t# src_y, |
| 890 | int16_tcxx . . $ int16_t# dst_x, int16_tcxx . . $ int16_t# dst_y, |
| 891 | uint16_tcxx . . $ uint16_t# width, uint16_tcxx . . $ uint16_t# height) |
| 892 | { |
| 893 | assertcxx . . $ `/usr/include/assert.h:50:10`!(kgem->memcpy_from_tiled_x); |
| 894 | assertcxx . . $ `/usr/include/assert.h:50:10`!(src_x >= 0 && src_y >= 0); |
| 895 | assertcxx . . $ `/usr/include/assert.h:50:10`!(dst_x >= 0 && dst_y >= 0); |
| 896 | assertcxx . . $ `/usr/include/assert.h:50:10`!(8*src_stride >= (src_x+width) * bpp); |
| 897 | assertcxx . . $ `/usr/include/assert.h:50:10`!(8*dst_stride >= (dst_x+width) * bpp); |
| 898 | return kgem->memcpy_from_tiled_xcxx . . $ kgem#memcpy_from_tiled_x.(src, dst, bpp, |
| 899 | src_stride, dst_stride, |
| 900 | src_x, src_y, |
| 901 | dst_x, dst_y, |
| 902 | width, height); |
| 903 | } |
| 904 | |
| 905 | void choose_memcpy_tiled_xcxx . . $ choose_memcpy_tiled_x(6124a5d0ea694727).(struct kgemcxx . . $ kgem# *kgem, int swizzling, unsigned cpu); |
| 906 | |
| 907 | #endif /* KGEM_H */ |