Home
last modified time | relevance | path

Searched refs:hnd (Results 1 – 25 of 96) sorted by relevance

1234

/hardware/samsung_slsi/exynos5/gralloc/
Dmapper.cpp42 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_map() local
44 void* mappedAddress = mmap(0, hnd->size, PROT_READ|PROT_WRITE, MAP_SHARED, in gralloc_map()
45 hnd->fd, 0); in gralloc_map()
50 ALOGV("%s: base %p %d %d %d %d\n", __func__, mappedAddress, hnd->size, in gralloc_map()
51 hnd->width, hnd->height, hnd->stride); in gralloc_map()
52 hnd->base = mappedAddress; in gralloc_map()
58 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_unmap() local
60 if (!hnd->base) in gralloc_unmap()
63 if (munmap(hnd->base, hnd->size) < 0) { in gralloc_unmap()
65 hnd->base, hnd->size); in gralloc_unmap()
[all …]
Dgralloc.cpp130 unsigned int ion_flags, private_handle_t **hnd, int *stride) in gralloc_alloc_rgb() argument
193 *hnd = new private_handle_t(fd, size, usage, w, h, format, *stride, in gralloc_alloc_rgb()
201 private_handle_t **hnd, int *stride) in gralloc_alloc_framework_yuv() argument
225 *hnd = new private_handle_t(fd, size, usage, w, h, format, *stride, h); in gralloc_alloc_framework_yuv()
231 private_handle_t **hnd, int *stride) in gralloc_alloc_yuv() argument
274 ion_flags, hnd, stride); in gralloc_alloc_yuv()
295 *hnd = new private_handle_t(fd, luma_size, usage, w, h, in gralloc_alloc_yuv()
306 *hnd = new private_handle_t(fd, fd1, fd2, luma_size, usage, w, h, in gralloc_alloc_yuv()
309 *hnd = new private_handle_t(fd, fd1, luma_size, usage, w, h, format, in gralloc_alloc_yuv()
314 if (!err && *hnd) { in gralloc_alloc_yuv()
[all …]
/hardware/qcom/display/msm8974/libgralloc/
Dmapper.cpp60 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_map() local
62 if (!(hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) && in gralloc_map()
63 !(hnd->flags & private_handle_t::PRIV_FLAGS_SECURE_BUFFER)) { in gralloc_map()
64 size_t size = hnd->size; in gralloc_map()
65 IMemAlloc* memalloc = getAllocator(hnd->flags) ; in gralloc_map()
67 hnd->offset, hnd->fd); in gralloc_map()
70 handle, hnd->fd, strerror(errno)); in gralloc_map()
71 hnd->base = 0; in gralloc_map()
75 hnd->base = intptr_t(mappedAddress) + hnd->offset; in gralloc_map()
79 hnd->offset_metadata, hnd->fd_metadata); in gralloc_map()
[all …]
Dgralloc_priv.h211 const private_handle_t* hnd = (const private_handle_t*)h; in validate() local
214 hnd->magic != sMagic) in validate()
222 hnd ? (((hnd->magic >> 24) & 0xFF)? in validate()
223 ((hnd->magic >> 24) & 0xFF) : '-') : '?', in validate()
224 hnd ? (((hnd->magic >> 16) & 0xFF)? in validate()
225 ((hnd->magic >> 16) & 0xFF) : '-') : '?', in validate()
226 hnd ? (((hnd->magic >> 8) & 0xFF)? in validate()
227 ((hnd->magic >> 8) & 0xFF) : '-') : '?', in validate()
228 hnd ? (((hnd->magic >> 0) & 0xFF)? in validate()
229 ((hnd->magic >> 0) & 0xFF) : '-') : '?', in validate()
Dgpu.cpp151 private_handle_t *hnd = new private_handle_t(data.fd, size, flags, in gralloc_alloc_buffer() local
155 hnd->offset = data.offset; in gralloc_alloc_buffer()
156 hnd->base = int(data.base) + data.offset; in gralloc_alloc_buffer()
157 hnd->gpuaddr = 0; in gralloc_alloc_buffer()
159 *pHandle = hnd; in gralloc_alloc_buffer()
219 private_handle_t* hnd = new private_handle_t( in gralloc_alloc_framebuffer_locked() local
234 hnd->base = vaddr; in gralloc_alloc_framebuffer_locked()
235 hnd->offset = vaddr - intptr_t(m->framebuffer->base); in gralloc_alloc_framebuffer_locked()
236 *pHandle = hnd; in gralloc_alloc_framebuffer_locked()
322 int gpu_context_t::free_impl(private_handle_t const* hnd) { in free_impl() argument
[all …]
/hardware/qcom/display/msm8960/libgralloc/
Dmapper.cpp60 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_map() local
62 if (!(hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) && in gralloc_map()
63 !(hnd->flags & private_handle_t::PRIV_FLAGS_SECURE_BUFFER)) { in gralloc_map()
64 size_t size = hnd->size; in gralloc_map()
65 IMemAlloc* memalloc = getAllocator(hnd->flags) ; in gralloc_map()
67 hnd->offset, hnd->fd); in gralloc_map()
70 handle, hnd->fd, strerror(errno)); in gralloc_map()
71 hnd->base = 0; in gralloc_map()
75 hnd->base = intptr_t(mappedAddress) + hnd->offset; in gralloc_map()
79 hnd->offset_metadata, hnd->fd_metadata); in gralloc_map()
[all …]
Dgralloc_priv.h213 const private_handle_t* hnd = (const private_handle_t*)h; in validate() local
216 hnd->magic != sMagic) in validate()
224 hnd ? (((hnd->magic >> 24) & 0xFF)? in validate()
225 ((hnd->magic >> 24) & 0xFF) : '-') : '?', in validate()
226 hnd ? (((hnd->magic >> 16) & 0xFF)? in validate()
227 ((hnd->magic >> 16) & 0xFF) : '-') : '?', in validate()
228 hnd ? (((hnd->magic >> 8) & 0xFF)? in validate()
229 ((hnd->magic >> 8) & 0xFF) : '-') : '?', in validate()
230 hnd ? (((hnd->magic >> 0) & 0xFF)? in validate()
231 ((hnd->magic >> 0) & 0xFF) : '-') : '?', in validate()
Dgpu.cpp145 private_handle_t *hnd = new private_handle_t(data.fd, size, flags, in gralloc_alloc_buffer() local
149 hnd->offset = data.offset; in gralloc_alloc_buffer()
150 hnd->base = int(data.base) + data.offset; in gralloc_alloc_buffer()
151 hnd->gpuaddr = 0; in gralloc_alloc_buffer()
153 *pHandle = hnd; in gralloc_alloc_buffer()
213 private_handle_t* hnd = new private_handle_t( in gralloc_alloc_framebuffer_locked() local
228 hnd->base = vaddr; in gralloc_alloc_framebuffer_locked()
229 hnd->offset = vaddr - intptr_t(m->framebuffer->base); in gralloc_alloc_framebuffer_locked()
230 *pHandle = hnd; in gralloc_alloc_framebuffer_locked()
307 int gpu_context_t::free_impl(private_handle_t const* hnd) { in free_impl() argument
[all …]
Dalloc_controller.cpp366 private_handle_t* hnd = new private_handle_t(data.fd, data.size, in alloc_buffer() local
369 hnd->base = (int) data.base; in alloc_buffer()
370 hnd->offset = data.offset; in alloc_buffer()
371 hnd->gpuaddr = 0; in alloc_buffer()
372 *pHnd = hnd; in alloc_buffer()
376 void free_buffer(private_handle_t *hnd) in free_buffer() argument
380 if (hnd && hnd->fd > 0) { in free_buffer()
381 IMemAlloc* memalloc = sAlloc->getAllocator(hnd->flags); in free_buffer()
382 memalloc->free_buffer((void*)hnd->base, hnd->size, hnd->offset, hnd->fd); in free_buffer()
384 if(hnd) in free_buffer()
[all …]
/hardware/qcom/display/msm8084/libgralloc/
Dmapper.cpp61 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_map() local
63 if (!(hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) && in gralloc_map()
64 !(hnd->flags & private_handle_t::PRIV_FLAGS_SECURE_BUFFER)) { in gralloc_map()
65 size_t size = hnd->size; in gralloc_map()
66 IMemAlloc* memalloc = getAllocator(hnd->flags) ; in gralloc_map()
68 hnd->offset, hnd->fd); in gralloc_map()
71 handle, hnd->fd, strerror(errno)); in gralloc_map()
72 hnd->base = 0; in gralloc_map()
76 hnd->base = intptr_t(mappedAddress) + hnd->offset; in gralloc_map()
80 hnd->offset_metadata, hnd->fd_metadata); in gralloc_map()
[all …]
Dalloc_controller.cpp558 int getYUVPlaneInfo(private_handle_t* hnd, struct android_ycbcr* ycbcr) in getYUVPlaneInfo() argument
566 switch (hnd->format) { in getYUVPlaneInfo()
572 ystride = cstride = hnd->width; in getYUVPlaneInfo()
573 ycbcr->y = (void*)hnd->base; in getYUVPlaneInfo()
574 ycbcr->cb = (void*)(hnd->base + ystride * hnd->height); in getYUVPlaneInfo()
575 ycbcr->cr = (void*)(hnd->base + ystride * hnd->height + 1); in getYUVPlaneInfo()
587 ystride = cstride = hnd->width; in getYUVPlaneInfo()
588 ycbcr->y = (void*)hnd->base; in getYUVPlaneInfo()
589 ycbcr->cr = (void*)(hnd->base + ystride * hnd->height); in getYUVPlaneInfo()
590 ycbcr->cb = (void*)(hnd->base + ystride * hnd->height + 1); in getYUVPlaneInfo()
[all …]
Dgpu.cpp157 private_handle_t *hnd = new private_handle_t(data.fd, size, flags, in gralloc_alloc_buffer() local
161 hnd->offset = data.offset; in gralloc_alloc_buffer()
162 hnd->base = (uintptr_t)(data.base) + data.offset; in gralloc_alloc_buffer()
163 hnd->gpuaddr = 0; in gralloc_alloc_buffer()
164 setMetaData(hnd, UPDATE_COLOR_SPACE, (void*) &colorSpace); in gralloc_alloc_buffer()
166 *pHandle = hnd; in gralloc_alloc_buffer()
226 private_handle_t* hnd = new private_handle_t( in gralloc_alloc_framebuffer_locked() local
241 hnd->base = vaddr; in gralloc_alloc_framebuffer_locked()
242 hnd->offset = vaddr - uintptr_t(m->framebuffer->base); in gralloc_alloc_framebuffer_locked()
243 *pHandle = hnd; in gralloc_alloc_framebuffer_locked()
[all …]
Dgralloc_priv.h255 const private_handle_t* hnd = (const private_handle_t*)h; in validate() local
258 hnd->magic != sMagic) in validate()
267 hnd ? (((hnd->magic >> 24) & 0xFF)? in validate()
268 ((hnd->magic >> 24) & 0xFF) : '-') : '?', in validate()
269 hnd ? (((hnd->magic >> 16) & 0xFF)? in validate()
270 ((hnd->magic >> 16) & 0xFF) : '-') : '?', in validate()
271 hnd ? (((hnd->magic >> 8) & 0xFF)? in validate()
272 ((hnd->magic >> 8) & 0xFF) : '-') : '?', in validate()
273 hnd ? (((hnd->magic >> 0) & 0xFF)? in validate()
274 ((hnd->magic >> 0) & 0xFF) : '-') : '?', in validate()
/hardware/qcom/display/msm8226/libgralloc/
Dmapper.cpp59 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_map() local
61 if (!(hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) && in gralloc_map()
62 !(hnd->flags & private_handle_t::PRIV_FLAGS_SECURE_BUFFER)) { in gralloc_map()
63 size_t size = hnd->size; in gralloc_map()
64 IMemAlloc* memalloc = getAllocator(hnd->flags) ; in gralloc_map()
66 hnd->offset, hnd->fd); in gralloc_map()
69 handle, hnd->fd, strerror(errno)); in gralloc_map()
70 hnd->base = 0; in gralloc_map()
74 hnd->base = intptr_t(mappedAddress) + hnd->offset; in gralloc_map()
80 hnd->offset_metadata, hnd->fd_metadata); in gralloc_map()
[all …]
Dgralloc_priv.h251 const private_handle_t* hnd = (const private_handle_t*)h; in validate() local
254 hnd->magic != sMagic) in validate()
262 hnd ? (((hnd->magic >> 24) & 0xFF)? in validate()
263 ((hnd->magic >> 24) & 0xFF) : '-') : '?', in validate()
264 hnd ? (((hnd->magic >> 16) & 0xFF)? in validate()
265 ((hnd->magic >> 16) & 0xFF) : '-') : '?', in validate()
266 hnd ? (((hnd->magic >> 8) & 0xFF)? in validate()
267 ((hnd->magic >> 8) & 0xFF) : '-') : '?', in validate()
268 hnd ? (((hnd->magic >> 0) & 0xFF)? in validate()
269 ((hnd->magic >> 0) & 0xFF) : '-') : '?', in validate()
Dgpu.cpp152 private_handle_t *hnd = new private_handle_t(data.fd, size, flags, in gralloc_alloc_buffer() local
156 hnd->offset = data.offset; in gralloc_alloc_buffer()
157 hnd->base = int(data.base) + data.offset; in gralloc_alloc_buffer()
158 hnd->gpuaddr = 0; in gralloc_alloc_buffer()
160 *pHandle = hnd; in gralloc_alloc_buffer()
223 private_handle_t* hnd = new private_handle_t( in gralloc_alloc_framebuffer_locked() local
238 hnd->base = vaddr; in gralloc_alloc_framebuffer_locked()
239 hnd->offset = vaddr - intptr_t(m->framebuffer->base); in gralloc_alloc_framebuffer_locked()
240 *pHandle = hnd; in gralloc_alloc_framebuffer_locked()
316 int gpu_context_t::free_impl(private_handle_t const* hnd) { in free_impl() argument
[all …]
/hardware/libhardware/modules/gralloc/
Dmapper.cpp50 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_map() local
51 if (!(hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER)) { in gralloc_map()
52 size_t size = hnd->size; in gralloc_map()
54 PROT_READ|PROT_WRITE, MAP_SHARED, hnd->fd, 0); in gralloc_map()
59 hnd->base = uintptr_t(mappedAddress) + hnd->offset; in gralloc_map()
63 *vaddr = (void*)hnd->base; in gralloc_map()
70 private_handle_t* hnd = (private_handle_t*)handle; in gralloc_unmap() local
71 if (!(hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER)) { in gralloc_unmap()
72 void* base = (void*)hnd->base; in gralloc_unmap()
73 size_t size = hnd->size; in gralloc_unmap()
[all …]
/hardware/qcom/display/msm8960/libgenlock/
Dgenlock.cpp75 private_handle_t *hnd = reinterpret_cast<private_handle_t*> in perform_lock_unlock_operation() local
77 if ((hnd->flags & private_handle_t::PRIV_FLAGS_UNSYNCHRONIZED) == 0) { in perform_lock_unlock_operation()
78 if (hnd->genlockPrivFd < 0) { in perform_lock_unlock_operation()
88 lock.fd = hnd->genlockHandle; in perform_lock_unlock_operation()
91 if (ioctl(hnd->genlockPrivFd, GENLOCK_IOC_DREADLOCK, &lock)) { in perform_lock_unlock_operation()
94 lockType, strerror(errno), hnd->fd); in perform_lock_unlock_operation()
102 if (ioctl(hnd->genlockPrivFd, GENLOCK_IOC_LOCK, &lock)) { in perform_lock_unlock_operation()
104 ,__FUNCTION__, lockType, strerror(errno), hnd->fd); in perform_lock_unlock_operation()
146 private_handle_t *hnd = reinterpret_cast<private_handle_t*>(buffer_handle); in genlock_create_lock() local
147 if ((hnd->flags & private_handle_t::PRIV_FLAGS_UNSYNCHRONIZED) == 0) { in genlock_create_lock()
[all …]
/hardware/qcom/display/msm8960/libhwcomposer/
Dhwc_utils.h216 static inline bool isYuvBuffer(const private_handle_t* hnd) { in isYuvBuffer() argument
217 return (hnd && (hnd->bufferType == BUFFER_TYPE_VIDEO)); in isYuvBuffer()
221 static inline bool isSecureBuffer(const private_handle_t* hnd) { in isSecureBuffer() argument
222 return (hnd && (private_handle_t::PRIV_FLAGS_SECURE_BUFFER & hnd->flags)); in isSecureBuffer()
225 static inline bool isBufferLocked(const private_handle_t* hnd) { in isBufferLocked() argument
226 return (hnd && (private_handle_t::PRIV_FLAGS_HWC_LOCK & hnd->flags)); in isBufferLocked()
230 static inline bool isExtOnly(const private_handle_t* hnd) { in isExtOnly() argument
231 return (hnd && (hnd->flags & private_handle_t::PRIV_FLAGS_EXTERNAL_ONLY)); in isExtOnly()
235 static inline bool isExtBlock(const private_handle_t* hnd) { in isExtBlock() argument
236 return (hnd && (hnd->flags & private_handle_t::PRIV_FLAGS_EXTERNAL_BLOCK)); in isExtBlock()
[all …]
Dhwc_fbupdate.cpp66 private_handle_t *hnd = (private_handle_t *)layer->handle; in configure() local
67 ovutils::Whf info(getWidth(hnd), getHeight(hnd), in configure()
68 ovutils::getMdpFormat(hnd->format), hnd->size); in configure()
127 bool FBUpdateLowRes::draw(hwc_context_t *ctx, private_handle_t *hnd) in draw() argument
135 if (!ov.queueBuffer(hnd->fd, hnd->offset, dest)) { in draw()
170 private_handle_t *hnd = (private_handle_t *)layer->handle; in configure() local
171 ovutils::Whf info(getWidth(hnd), getHeight(hnd), in configure()
172 ovutils::getMdpFormat(hnd->format), hnd->size); in configure()
264 bool FBUpdateHighRes::draw(hwc_context_t *ctx, private_handle_t *hnd) in draw() argument
273 if (!ov.queueBuffer(hnd->fd, hnd->offset, destL)) { in draw()
[all …]
/hardware/qcom/display/msm8974/libhwcomposer/
Dhwc_utils.h263 static inline bool isYuvBuffer(const private_handle_t* hnd) { in isYuvBuffer() argument
264 return (hnd && (hnd->bufferType == BUFFER_TYPE_VIDEO)); in isYuvBuffer()
268 static inline bool isSecureBuffer(const private_handle_t* hnd) { in isSecureBuffer() argument
269 return (hnd && (private_handle_t::PRIV_FLAGS_SECURE_BUFFER & hnd->flags)); in isSecureBuffer()
273 static inline bool isL3SecureBuffer(const private_handle_t* hnd) { in isL3SecureBuffer() argument
274 return (hnd && in isL3SecureBuffer()
275 (private_handle_t::PRIV_FLAGS_L3_SECURE_BUFFER & hnd->flags)); in isL3SecureBuffer()
278 static inline bool isBufferLocked(const private_handle_t* hnd) { in isBufferLocked() argument
279 return (hnd && (private_handle_t::PRIV_FLAGS_HWC_LOCK & hnd->flags)); in isBufferLocked()
283 static inline bool isExtOnly(const private_handle_t* hnd) { in isExtOnly() argument
[all …]
/hardware/qcom/display/msm8226/libhwcomposer/
Dhwc_utils.h236 private_handle_t *hnd);
272 private_handle_t *hnd,
358 static inline bool isYuvBuffer(const private_handle_t* hnd) { in isYuvBuffer() argument
359 return (hnd && (hnd->bufferType == BUFFER_TYPE_VIDEO)); in isYuvBuffer()
363 static inline bool is4kx2kYuvBuffer(const private_handle_t* hnd) { in is4kx2kYuvBuffer() argument
364 return (hnd && (hnd->bufferType == BUFFER_TYPE_VIDEO) && in is4kx2kYuvBuffer()
365 (hnd->width > 2048)); in is4kx2kYuvBuffer()
369 static inline bool isSecureBuffer(const private_handle_t* hnd) { in isSecureBuffer() argument
370 return (hnd && (private_handle_t::PRIV_FLAGS_SECURE_BUFFER & hnd->flags)); in isSecureBuffer()
373 static inline bool isTileRendered(const private_handle_t* hnd) { in isTileRendered() argument
[all …]
/hardware/qcom/display/msm8084/libhwcomposer/
Dhwc_utils.h249 private_handle_t *hnd);
290 private_handle_t *hnd,
385 static inline bool isYuvBuffer(const private_handle_t* hnd) { in isYuvBuffer() argument
386 return (hnd && (hnd->bufferType == BUFFER_TYPE_VIDEO)); in isYuvBuffer()
390 static inline bool is4kx2kYuvBuffer(const private_handle_t* hnd) { in is4kx2kYuvBuffer() argument
391 return (hnd && (hnd->bufferType == BUFFER_TYPE_VIDEO) && in is4kx2kYuvBuffer()
392 (hnd->width > 2048)); in is4kx2kYuvBuffer()
396 static inline bool isSecureBuffer(const private_handle_t* hnd) { in isSecureBuffer() argument
397 return (hnd && (private_handle_t::PRIV_FLAGS_SECURE_BUFFER & hnd->flags)); in isSecureBuffer()
400 static inline bool isTileRendered(const private_handle_t* hnd) { in isTileRendered() argument
[all …]
Dhwc_dump_layers.cpp226 private_handle_t *hnd = (private_handle_t *)layer->handle; in logLayer() local
239 if (hnd) in logLayer()
240 getHalPixelFormatStr(hnd->format, pixFormatStr); in logLayer()
245 (hnd)? getWidth(hnd) : -1, (hnd)? getHeight(hnd) : -1, in logLayer()
303 private_handle_t *hnd = (private_handle_t *)layer->handle; in dumpLayer() local
306 if (NULL == hnd) { in dumpLayer()
312 getHalPixelFormatStr(hnd->format, pixFormatStr); in dumpLayer()
314 if (needDumpPng && hnd->base) { in dumpLayer()
323 switch (hnd->format) { in dumpLayer()
338 tempSkBmp->setConfig(tempSkBmpConfig, getWidth(hnd), getHeight(hnd)); in dumpLayer()
[all …]
/hardware/qcom/display/msm8226/libcopybit/
Dsoftware_converter.cpp38 private_handle_t* hnd = (private_handle_t*)src->handle; in convertYV12toYCrCb420SP() local
40 if(hnd == NULL || yv12_handle == NULL){ in convertYV12toYCrCb420SP()
60 unsigned char* oldChroma = (unsigned char*)(hnd->base + y_size); in convertYV12toYCrCb420SP()
61 memcpy((char *)yv12_handle->base,(char *)hnd->base,y_size); in convertYV12toYCrCb420SP()
181 int convert_yuv_c2d_to_yuv_android(private_handle_t *hnd, in convert_yuv_c2d_to_yuv_android() argument
185 if (!hnd || !rhs) { in convert_yuv_c2d_to_yuv_android()
186 ALOGE("%s: invalid inputs hnd=%p rhs=%p", __FUNCTION__, hnd, rhs); in convert_yuv_c2d_to_yuv_android()
215 ret = copy_source_to_destination(hnd->base, dst_hnd->base, info); in convert_yuv_c2d_to_yuv_android()
227 int convert_yuv_android_to_yuv_c2d(private_handle_t *hnd, in convert_yuv_android_to_yuv_c2d() argument
230 if (!hnd || !rhs) { in convert_yuv_android_to_yuv_c2d()
[all …]

1234