• Home
  • Raw
  • Download

Lines Matching refs:hnd

60     private_handle_t* hnd = (private_handle_t*)handle;  in gralloc_map_metadata()  local
61 hnd->base_metadata = 0; in gralloc_map_metadata()
62 IMemAlloc* memalloc = getAllocator(hnd->flags) ; in gralloc_map_metadata()
65 if (!(hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER)) { in gralloc_map_metadata()
69 hnd->offset_metadata, hnd->fd_metadata); in gralloc_map_metadata()
72 hnd, hnd->fd_metadata, strerror(errno)); in gralloc_map_metadata()
75 hnd->base_metadata = uint64_t(mappedAddress); in gralloc_map_metadata()
87 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_map() local
90 IMemAlloc* memalloc = getAllocator(hnd->flags) ; in gralloc_map()
92 hnd->base = 0; in gralloc_map()
95 if (!(hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) && in gralloc_map()
96 !(hnd->flags & private_handle_t::PRIV_FLAGS_SECURE_BUFFER)) { in gralloc_map()
97 size = hnd->size; in gralloc_map()
99 hnd->offset, hnd->fd); in gralloc_map()
102 handle, hnd->fd, strerror(errno)); in gralloc_map()
106 hnd->base = uint64_t(mappedAddress); in gralloc_map()
132 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_unmap() local
133 IMemAlloc* memalloc = getAllocator(hnd->flags) ; in gralloc_unmap()
137 if(hnd->base) { in gralloc_unmap()
138 err = memalloc->unmap_buffer((void*)hnd->base, hnd->size, hnd->offset); in gralloc_unmap()
140 ALOGE("Could not unmap memory at address %p, %s", (void*) hnd->base, in gralloc_unmap()
144 hnd->base = 0; in gralloc_unmap()
147 if(hnd->base_metadata) { in gralloc_unmap()
149 err = memalloc->unmap_buffer((void*)hnd->base_metadata, in gralloc_unmap()
150 size, hnd->offset_metadata); in gralloc_unmap()
153 (void*) hnd->base_metadata, strerror(errno)); in gralloc_unmap()
156 hnd->base_metadata = 0; in gralloc_unmap()
199 private_handle_t* hnd) in terminateBuffer() argument
211 return gralloc_unmap(module, hnd); in terminateBuffer()
222 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_map_and_invalidate() local
224 if (hnd->base == 0) { in gralloc_map_and_invalidate()
231 if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION and in gralloc_map_and_invalidate()
232 hnd->flags & private_handle_t::PRIV_FLAGS_CACHED) { in gralloc_map_and_invalidate()
237 (hnd->flags & private_handle_t::PRIV_FLAGS_NON_CPU_WRITER)) in gralloc_map_and_invalidate()
239 IMemAlloc* memalloc = getAllocator(hnd->flags) ; in gralloc_map_and_invalidate()
240 err = memalloc->clean_buffer((void*)hnd->base, in gralloc_map_and_invalidate()
241 hnd->size, hnd->offset, hnd->fd, in gralloc_map_and_invalidate()
246 hnd->flags |= private_handle_t::PRIV_FLAGS_NEEDS_FLUSH; in gralloc_map_and_invalidate()
260 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_lock() local
263 *vaddr = (void*)hnd->base; in gralloc_lock()
273 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_lock_ycbcr() local
276 err = getYUVPlaneInfo(hnd, ycbcr); in gralloc_lock_ycbcr()
288 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_unlock() local
290 IMemAlloc* memalloc = getAllocator(hnd->flags); in gralloc_unlock()
291 if (hnd->flags & private_handle_t::PRIV_FLAGS_NEEDS_FLUSH) { in gralloc_unlock()
292 err = memalloc->clean_buffer((void*)hnd->base, in gralloc_unlock()
293 hnd->size, hnd->offset, hnd->fd, in gralloc_unlock()
295 hnd->flags &= ~private_handle_t::PRIV_FLAGS_NEEDS_FLUSH; in gralloc_unlock()
303 static bool isYUV(private_handle_t* hnd) in isYUV() argument
307 switch (hnd->format) { in isYUV()
386 private_handle_t* hnd = (private_handle_t*)native_handle_create( in gralloc_perform() local
388 if (hnd) { in gralloc_perform()
389 hnd->magic = private_handle_t::sMagic; in gralloc_perform()
390 hnd->fd = fd; in gralloc_perform()
391 hnd->flags = private_handle_t::PRIV_FLAGS_USES_ION; in gralloc_perform()
392 hnd->size = size; in gralloc_perform()
393 hnd->offset = offset; in gralloc_perform()
394 hnd->base = uint64_t(base) + offset; in gralloc_perform()
395 hnd->gpuaddr = 0; in gralloc_perform()
396 hnd->width = width; in gralloc_perform()
397 hnd->height = height; in gralloc_perform()
398 hnd->format = format; in gralloc_perform()
399 *handle = (native_handle_t *)hnd; in gralloc_perform()
419 const private_handle_t* hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
421 if (private_handle_t::validate(hnd)) { in gralloc_perform()
426 AdrenoMemInfo::getInstance().getAlignedWidthAndHeight(hnd, alignedw, alignedh); in gralloc_perform()
434 const private_handle_t* hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
437 if (private_handle_t::validate(hnd)) { in gralloc_perform()
442 AdrenoMemInfo::getInstance().getAlignedWidthAndHeight(hnd, alignedw, alignedh); in gralloc_perform()
467 private_handle_t* hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
469 if (private_handle_t::validate(hnd)) { in gralloc_perform()
472 MetaData_t *metadata = (MetaData_t *)hnd->base_metadata; in gralloc_perform()
481 private_handle_t* hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
483 if (!private_handle_t::validate(hnd)) { in gralloc_perform()
484 res = getYUVPlaneInfo(hnd, ycbcr); in gralloc_perform()
490 private_handle_t* hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
492 if (private_handle_t::validate(hnd)) { in gralloc_perform()
495 MetaData_t *metadata = (MetaData_t *)hnd->base_metadata; in gralloc_perform()
506 private_handle_t* hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
508 if (private_handle_t::validate(hnd)) { in gralloc_perform()
511 *flag = hnd->flags & private_handle_t::PRIV_FLAGS_UBWC_ALIGNED; in gralloc_perform()
512 MetaData_t *metadata = (MetaData_t *)hnd->base_metadata; in gralloc_perform()
521 private_handle_t* hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
523 if (!private_handle_t::validate(hnd)) { in gralloc_perform()
524 res = getRgbDataAddress(hnd, rgb_data); in gralloc_perform()
530 private_handle_t* hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
532 if (!private_handle_t::validate(hnd) && igc) { in gralloc_perform()
533 MetaData_t *metadata = (MetaData_t *)hnd->base_metadata; in gralloc_perform()
547 private_handle_t* hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
549 if (!private_handle_t::validate(hnd)) { in gralloc_perform()
550 setMetaData(hnd, SET_SINGLE_BUFFER_MODE, enable); in gralloc_perform()
563 auto hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
566 hnd->producer_usage = producerUsage; in gralloc_perform()
567 hnd->consumer_usage = consumerUsage; in gralloc_perform()
572 auto hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
575 *outWidth = hnd->original_width; in gralloc_perform()
576 *outHeight = hnd->height; in gralloc_perform()
581 auto hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
583 *outFormat = hnd->original_format; in gralloc_perform()
588 auto hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
590 *outUsage = hnd->producer_usage; in gralloc_perform()
595 auto hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
597 *outUsage = hnd->consumer_usage; in gralloc_perform()
602 auto hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
604 *outBackingStore = hnd->backing_store; in gralloc_perform()
609 auto hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
612 (void) hnd; in gralloc_perform()
619 auto hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
621 *outStride = hnd->width; in gralloc_perform()
626 auto hnd = va_arg(args, private_handle_t*); in gralloc_perform() local
639 if (!isYUV(hnd)) { in gralloc_perform()
644 res = gralloc_lock_ycbcr(module, hnd, in gralloc_perform()