Home
last modified time | relevance | path

Searched refs:private_handle_t (Results 1 – 25 of 46) sorted by relevance

12

/device/linaro/hikey/gralloc960/
Dmali_gralloc_private_interface.cpp40 if (private_handle_t::validate(handle) < 0 || internal_format == NULL) in mali_gralloc_private_get_buff_int_fmt()
45 const private_handle_t *hnd = static_cast<const private_handle_t *>(handle); in mali_gralloc_private_get_buff_int_fmt()
55 if (private_handle_t::validate(handle) < 0 || fd == NULL) in mali_gralloc_private_get_buff_fd()
60 const private_handle_t *hnd = static_cast<const private_handle_t *>(handle); in mali_gralloc_private_get_buff_fd()
71 if (private_handle_t::validate(handle) < 0 || internalWidth == NULL || internalHeight == NULL) in mali_gralloc_private_get_buff_int_dims()
76 const private_handle_t *hnd = static_cast<const private_handle_t *>(handle); in mali_gralloc_private_get_buff_int_dims()
87 if (private_handle_t::validate(handle) < 0 || offset == NULL) in mali_gralloc_private_get_buff_offset()
92 const private_handle_t *hnd = static_cast<const private_handle_t *>(handle); in mali_gralloc_private_get_buff_offset()
103 if (private_handle_t::validate(handle) < 0 || bytestride == NULL) in mali_gralloc_private_get_buff_bytestride()
108 const private_handle_t *hnd = static_cast<const private_handle_t *>(handle); in mali_gralloc_private_get_buff_bytestride()
[all …]
Dmali_gralloc_bufferdescriptor.cpp119 if (private_handle_t::validate(buffer) < 0) in mali_gralloc_get_backing_store_internal()
125 private_handle_t *hnd = (private_handle_t *)buffer; in mali_gralloc_get_backing_store_internal()
133 if (private_handle_t::validate(buffer) < 0) in mali_gralloc_get_consumer_usage_internal()
139 private_handle_t *hnd = (private_handle_t *)buffer; in mali_gralloc_get_consumer_usage_internal()
146 if (private_handle_t::validate(buffer) < 0) in mali_gralloc_get_dimensions_internal()
152 private_handle_t *hnd = (private_handle_t *)buffer; in mali_gralloc_get_dimensions_internal()
160 if (private_handle_t::validate(buffer) < 0) in mali_gralloc_get_format_internal()
166 private_handle_t *hnd = (private_handle_t *)buffer; in mali_gralloc_get_format_internal()
173 if (private_handle_t::validate(buffer) < 0) in mali_gralloc_get_producer_usage_internal()
179 private_handle_t *hnd = (private_handle_t *)buffer; in mali_gralloc_get_producer_usage_internal()
[all …]
Dmali_gralloc_reference.cpp41 if (private_handle_t::validate(handle) < 0) in mali_gralloc_reference_retain()
47 private_handle_t *hnd = (private_handle_t *)handle; in mali_gralloc_reference_retain()
64 if (hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) in mali_gralloc_reference_retain()
68 else if (hnd->flags & (private_handle_t::PRIV_FLAGS_USES_ION)) in mali_gralloc_reference_retain()
85 if (private_handle_t::validate(handle) < 0) in mali_gralloc_reference_release()
91 private_handle_t *hnd = (private_handle_t *)handle; in mali_gralloc_reference_release()
108 if (hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) in mali_gralloc_reference_release()
128 if (hnd->flags & (private_handle_t::PRIV_FLAGS_USES_ION)) in mali_gralloc_reference_release()
Dmali_gralloc_buffer.h51 #define NUM_INTS_IN_PRIVATE_HANDLE ((sizeof(struct private_handle_t) - sizeof(native_handle)) / siz…
56 struct private_handle_t;
67 struct private_handle_t : public native_handle struct
70 struct private_handle_t
165private_handle_t(int _flags, int _size, void *_base, uint64_t _consumer_usage, uint64_t _producer_… in private_handle_t() argument
194private_handle_t(int _flags, int _size, int _min_pgsz, uint64_t _consumer_usage, uint64_t _produce… in private_handle_t() function
230 ~private_handle_t() in ~private_handle_t() argument
242 const private_handle_t *hnd = (const private_handle_t *)h; in validate() argument
253 static private_handle_t *dynamicCast(const native_handle *in) in dynamicCast() argument
257 return (private_handle_t *)in; in dynamicCast()
Dmali_gralloc_bufferaccess.cpp45 if (private_handle_t::validate(buffer) < 0) in mali_gralloc_lock()
51 private_handle_t *hnd = (private_handle_t *)buffer; in mali_gralloc_lock()
59 if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION) in mali_gralloc_lock()
81 if (private_handle_t::validate(buffer) < 0) in mali_gralloc_lock_ycbcr()
92 private_handle_t *hnd = (private_handle_t *)buffer; in mali_gralloc_lock_ycbcr()
94 if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION) in mali_gralloc_lock_ycbcr()
170 if (private_handle_t::validate(buffer) < 0) in mali_gralloc_unlock()
176 private_handle_t *hnd = (private_handle_t *)buffer; in mali_gralloc_unlock()
178 if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION && hnd->writeOwner) in mali_gralloc_unlock()
191 if (private_handle_t::validate(buffer) < 0) in mali_gralloc_get_num_flex_planes()
[all …]
Dmali_gralloc_ion.h27 void mali_gralloc_ion_free(private_handle_t const *hnd);
28 void mali_gralloc_ion_sync(const mali_gralloc_module *m, private_handle_t *hnd);
29 int mali_gralloc_ion_map(private_handle_t *hnd);
30 void mali_gralloc_ion_unmap(private_handle_t *hnd);
Dmali_gralloc_ion.cpp303 *priv_heap_flag = private_handle_t::PRIV_FLAGS_USES_ION_DMA_HEAP; in set_ion_flags()
498 private_handle_t *hnd = new private_handle_t( in mali_gralloc_ion_allocate()
499 private_handle_t::PRIV_FLAGS_USES_ION | priv_heap_flag, bufDescriptor->size, min_pgsz, in mali_gralloc_ion_allocate()
561 private_handle_t *hnd = new private_handle_t( in mali_gralloc_ion_allocate()
562 private_handle_t::PRIV_FLAGS_USES_ION | priv_heap_flag, bufDescriptor->size, min_pgsz, in mali_gralloc_ion_allocate()
581 private_handle_t *hnd = (private_handle_t *)(pHandle[i]); in mali_gralloc_ion_allocate()
612 void mali_gralloc_ion_free(private_handle_t const *hnd) in mali_gralloc_ion_free()
614 if (hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) in mali_gralloc_ion_free()
618 else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION) in mali_gralloc_ion_free()
642 mali_gralloc_ion_free((private_handle_t *)(pHandle[i])); in mali_gralloc_ion_free_internal()
[all …]
Dgralloc_buffer_priv.h49 int gralloc_buffer_attr_allocate(struct private_handle_t *hnd);
57 int gralloc_buffer_attr_free(struct private_handle_t *hnd);
65 static inline int gralloc_buffer_attr_map(struct private_handle_t *hnd, int readwrite) in gralloc_buffer_attr_map()
105 static inline int gralloc_buffer_attr_unmap(struct private_handle_t *hnd) in gralloc_buffer_attr_unmap()
132 static inline int gralloc_buffer_attr_write(struct private_handle_t *hnd, buf_attr attr, int *val) in gralloc_buffer_attr_write()
173 static inline int gralloc_buffer_attr_read(struct private_handle_t *hnd, buf_attr attr, int *val) in gralloc_buffer_attr_read()
Dmali_gralloc_debug.cpp36 static std::vector<private_handle_t *> dump_buffers;
39 void mali_gralloc_dump_buffer_add(private_handle_t *handle) in mali_gralloc_dump_buffer_add()
52 void mali_gralloc_dump_buffer_erase(private_handle_t *handle) in mali_gralloc_dump_buffer_erase()
84 private_handle_t *hnd; in mali_gralloc_dump_buffers()
Dmali_gralloc_debug.h33 void mali_gralloc_dump_buffer_add(private_handle_t *handle);
34 void mali_gralloc_dump_buffer_erase(private_handle_t *handle);
Dframebuffer_device.cpp85 if (private_handle_t::validate(buffer) < 0) in fb_post()
90 private_handle_t const *hnd = reinterpret_cast<private_handle_t const *>(buffer); in fb_post()
99 if (hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) in fb_post()
373 module->framebuffer = new private_handle_t(private_handle_t::PRIV_FLAGS_FRAMEBUFFER, fbSize, vaddr, in init_frame_buffer_locked()
402 static int fb_alloc_framebuffer_dmabuf(private_module_t *m, private_handle_t *hnd) in fb_alloc_framebuffer_dmabuf()
500 private_handle_t *hnd = new private_handle_t( in fb_alloc_framebuffer_locked()
501private_handle_t::PRIV_FLAGS_FRAMEBUFFER, framebufferSize, (void *)framebufferVaddr, consumer_usag… in fb_alloc_framebuffer_locked()
Dmali_gralloc_public_interface.cpp203 private_handle_t *hnd = (private_handle_t *)*outBuffers; in mali_gralloc_allocate()
247 if (private_handle_t::validate(buffer) < 0) in mali_gralloc_retain()
279 if (private_handle_t::validate(buffer) < 0) in mali_gralloc1_get_num_flex_planes()
300 if (private_handle_t::validate(buffer) < 0) in mali_gralloc1_lock_async()
328 if (private_handle_t::validate(buffer) < 0) in mali_gralloc1_lock_flex_async()
352 if (private_handle_t::validate(buffer) < 0) in mali_gralloc1_unlock_async()
/device/generic/goldfish/gralloc/
Dmapper.cpp41 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_map()
42 if (!(hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER)) { in gralloc_map()
61 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_unmap()
62 if (!(hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER)) { in gralloc_unmap()
79 if (private_handle_t::validate(handle) < 0) in gralloc_register_buffer()
117 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_register_buffer()
129 if (private_handle_t::validate(handle) < 0) in gralloc_unregister_buffer()
132 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_unregister_buffer()
140 private_handle_t* hnd) in mapBuffer()
147 private_handle_t* hnd) in terminateBuffer()
[all …]
Dgralloc_priv.h35 struct private_handle_t;
40 private_handle_t* framebuffer;
59 struct private_handle_t : public native_handle { struct
61 struct private_handle_t {
83 return (((sizeof(private_handle_t) - sizeof(native_handle_t))/sizeof(int)) - sNumFds); in sNumInts() argument
88 private_handle_t(int fd, int size, int flags) : in private_handle_t() argument
96 ~private_handle_t() { in ~private_handle_t() argument
101 const private_handle_t* hnd = (const private_handle_t*)h; in validate() argument
Dgralloc.cpp141 private_handle_t* hnd = new private_handle_t(dup(m->framebuffer->fd), size, in gralloc_alloc_framebuffer_locked()
142 private_handle_t::PRIV_FLAGS_FRAMEBUFFER); in gralloc_alloc_framebuffer_locked()
186 private_handle_t* hnd = new private_handle_t(fd, size, 0); in gralloc_alloc_buffer()
259 if (private_handle_t::validate(handle) < 0) in gralloc_free()
262 private_handle_t const* hnd = reinterpret_cast<private_handle_t const*>(handle); in gralloc_free()
263 if (hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) { in gralloc_free()
273 terminateBuffer(module, const_cast<private_handle_t*>(hnd)); in gralloc_free()
Dgr.h33 struct private_handle_t;
40 int terminateBuffer(gralloc_module_t const* module, private_handle_t* hnd);
41 int mapBuffer(gralloc_module_t const* module, private_handle_t* hnd);
/device/google/cuttlefish_common/guest/hals/gralloc/legacy/
Dmapper.cpp44 if (private_handle_t::validate(handle) < 0) { in gralloc_register_buffer()
48 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_register_buffer()
58 if (private_handle_t::validate(handle) < 0) { in gralloc_unregister_buffer()
61 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_unregister_buffer()
69 if (private_handle_t::validate(handle) < 0) { in gralloc_lock()
75 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_lock()
91 if (private_handle_t::validate(handle) < 0) { in gralloc_unlock()
94 private_handle_t* hnd = (private_handle_t*) handle; in gralloc_unlock()
110 if (private_handle_t::validate(handle) < 0) { in gralloc_lock_ycbcr()
113 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_lock_ycbcr()
Dregion_registry.h17 struct private_handle_t;
24 const char* op, const private_handle_t* hnd);
30 int unreference_region(const char* op, const private_handle_t* hnd);
Dgralloc_vsoc_priv.h51 struct private_handle_t;
65 struct private_handle_t : public native_handle { struct
81 return (((sizeof(private_handle_t) - sizeof(native_handle_t))/sizeof(int)) - sNumFds); in sNumInts() argument
86 private_handle_t(int fd, int size, int format, int x_res, int y_res, argument
103 ~private_handle_t() { in ~private_handle_t() argument
108 const private_handle_t* hnd = (const private_handle_t*)h; in validate() argument
Dgralloc.cpp84 private_handle_t* hnd = in gralloc_alloc_buffer()
85 new private_handle_t(fd, size, format, w, h, stride_in_pixels, 0); in gralloc_alloc_buffer()
117 if (private_handle_t::validate(handle) < 0) { in gralloc_free()
121 private_handle_t const* hnd = reinterpret_cast<private_handle_t const*>( in gralloc_free()
Dregion_registry.cpp61 const private_handle_t* hnd, char output[ASHMEM_NAME_LEN]) { in get_buffer_name()
98 const private_handle_t* hnd, char region_name[ASHMEM_NAME_LEN]) { in lock_region_for_handle()
184 void* reference_region(const char* op, const private_handle_t* hnd) { in reference_region()
218 int unreference_region(const char* op, const private_handle_t* hnd) { in unreference_region()
/device/linaro/hikey/gralloc/
Dgralloc_module.cpp66 if (private_handle_t::validate(handle) < 0) in gralloc_register_buffer()
73 private_handle_t *hnd = (private_handle_t *)handle; in gralloc_register_buffer()
99 if (hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) in gralloc_register_buffer()
104 else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_UMP) in gralloc_register_buffer()
116 hnd->lockState &= ~(private_handle_t::LOCK_STATE_UNREGISTERED); in gralloc_register_buffer()
137 else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION) in gralloc_register_buffer()
183 hnd->lockState &= ~(private_handle_t::LOCK_STATE_UNREGISTERED); in gralloc_register_buffer()
201 static void unmap_buffer(private_handle_t *hnd) in unmap_buffer()
203 if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_UMP) in unmap_buffer()
213 else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION) in unmap_buffer()
[all …]
Dgralloc_priv.h102 struct private_handle_t;
108 private_handle_t *framebuffer;
136 struct private_handle_t : public native_handle struct
139 struct private_handle_t
217private_handle_t(int flags, int usage, int size, void *base, int lock_state, ump_secure_id secure_… in private_handle_t() argument
247 numInts = (sizeof(private_handle_t) - sizeof(native_handle)) / sizeof(int) - sNumFds; in private_handle_t()
252 private_handle_t(int flags, int usage, int size, void *base, int lock_state): in private_handle_t() function
279 numInts = (sizeof(private_handle_t) - sizeof(native_handle)) / sizeof(int) - sNumFds; in private_handle_t()
284private_handle_t(int flags, int usage, int size, void *base, int lock_state, int fb_file, int fb_o… in private_handle_t() argument
316 numInts = (sizeof(private_handle_t) - sizeof(native_handle)) / sizeof(int) - sNumFds; in private_handle_t()
[all …]
Dalloc_device.cpp101 static int fb_get_framebuffer_dmabuf(private_module_t *m, private_handle_t *hnd) in fb_get_framebuffer_dmabuf()
216 lock_state = private_handle_t::LOCK_STATE_MAPPED; in gralloc_alloc_buffer()
218private_handle_t *hnd = new private_handle_t(private_handle_t::PRIV_FLAGS_USES_ION, usage, size, c… in gralloc_alloc_buffer()
291private_handle_t *hnd = new private_handle_t(private_handle_t::PRIV_FLAGS_USES_UMP, usage, size, c… in gralloc_alloc_buffer()
292 private_handle_t::LOCK_STATE_MAPPED, ump_id, ump_mem_handle); in gralloc_alloc_buffer()
384private_handle_t *hnd = new private_handle_t(private_handle_t::PRIV_FLAGS_FRAMEBUFFER, usage, size… in gralloc_alloc_framebuffer_locked()
577 private_handle_t *hnd = (private_handle_t *)*pHandle; in alloc_device_alloc()
611 if (private_handle_t::validate(handle) < 0) in alloc_device_free()
616 private_handle_t const *hnd = reinterpret_cast<private_handle_t const *>(handle); in alloc_device_free()
618 if (hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) in alloc_device_free()
[all …]
/device/linaro/hikey/gralloc960/legacy/
Dalloc_device.cpp81 private_handle_t *hnd = (private_handle_t *)*pHandle; in alloc_device_alloc()
134 if (private_handle_t::validate(handle) < 0) in alloc_device_free()
139 private_handle_t const *hnd = reinterpret_cast<private_handle_t const *>(handle); in alloc_device_free()
142 if (hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) in alloc_device_free()

12