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.h214 const private_handle_t* hnd = (const private_handle_t*)h; in validate() local
217 hnd->magic != sMagic) in validate()
225 hnd ? (((hnd->magic >> 24) & 0xFF)? in validate()
226 ((hnd->magic >> 24) & 0xFF) : '-') : '?', in validate()
227 hnd ? (((hnd->magic >> 16) & 0xFF)? in validate()
228 ((hnd->magic >> 16) & 0xFF) : '-') : '?', in validate()
229 hnd ? (((hnd->magic >> 8) & 0xFF)? in validate()
230 ((hnd->magic >> 8) & 0xFF) : '-') : '?', in validate()
231 hnd ? (((hnd->magic >> 0) & 0xFF)? in validate()
232 ((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 …]
/hardware/qcom/display/msm8226/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 unsigned int 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 = uint64_t(mappedAddress) + hnd->offset; in gralloc_map()
80 hnd->offset_metadata, hnd->fd_metadata); in gralloc_map()
[all …]
Dalloc_controller.cpp555 int getYUVPlaneInfo(private_handle_t* hnd, struct android_ycbcr* ycbcr) in getYUVPlaneInfo() argument
563 switch (hnd->format) { in getYUVPlaneInfo()
569 ystride = cstride = hnd->width; in getYUVPlaneInfo()
570 ycbcr->y = (void*)hnd->base; in getYUVPlaneInfo()
571 ycbcr->cb = (void*)(hnd->base + ystride * hnd->height); in getYUVPlaneInfo()
572 ycbcr->cr = (void*)(hnd->base + ystride * hnd->height + 1); in getYUVPlaneInfo()
583 ystride = cstride = hnd->width; in getYUVPlaneInfo()
584 ycbcr->y = (void*)hnd->base; in getYUVPlaneInfo()
585 ycbcr->cr = (void*)(hnd->base + ystride * hnd->height); in getYUVPlaneInfo()
586 ycbcr->cb = (void*)(hnd->base + ystride * hnd->height + 1); in getYUVPlaneInfo()
[all …]
Dgpu.cpp161 private_handle_t *hnd = new private_handle_t(data.fd, size, flags, in gralloc_alloc_buffer() local
165 hnd->offset = data.offset; in gralloc_alloc_buffer()
166 hnd->base = (uint64_t)(data.base) + data.offset; in gralloc_alloc_buffer()
167 hnd->gpuaddr = 0; in gralloc_alloc_buffer()
168 setMetaData(hnd, UPDATE_COLOR_SPACE, (void*) &colorSpace); in gralloc_alloc_buffer()
170 *pHandle = hnd; in gralloc_alloc_buffer()
230 private_handle_t* hnd = new private_handle_t( in gralloc_alloc_framebuffer_locked() local
245 hnd->base = vaddr; in gralloc_alloc_framebuffer_locked()
246 hnd->offset = (unsigned int)(vaddr - m->framebuffer->base); in gralloc_alloc_framebuffer_locked()
247 *pHandle = hnd; in gralloc_alloc_framebuffer_locked()
[all …]
Dgralloc_priv.h258 const private_handle_t* hnd = (const private_handle_t*)h; in validate() local
261 hnd->magic != sMagic) in validate()
270 hnd ? (((hnd->magic >> 24) & 0xFF)? in validate()
271 ((hnd->magic >> 24) & 0xFF) : '-') : '?', in validate()
272 hnd ? (((hnd->magic >> 16) & 0xFF)? in validate()
273 ((hnd->magic >> 16) & 0xFF) : '-') : '?', in validate()
274 hnd ? (((hnd->magic >> 8) & 0xFF)? in validate()
275 ((hnd->magic >> 8) & 0xFF) : '-') : '?', in validate()
276 hnd ? (((hnd->magic >> 0) & 0xFF)? in validate()
277 ((hnd->magic >> 0) & 0xFF) : '-') : '?', in validate()
/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.cpp158 private_handle_t *hnd = new private_handle_t(data.fd, size, flags, in gralloc_alloc_buffer() local
162 hnd->offset = data.offset; in gralloc_alloc_buffer()
163 hnd->base = (uintptr_t)(data.base) + data.offset; in gralloc_alloc_buffer()
164 hnd->gpuaddr = 0; in gralloc_alloc_buffer()
165 setMetaData(hnd, UPDATE_COLOR_SPACE, (void*) &colorSpace); in gralloc_alloc_buffer()
167 *pHandle = hnd; in gralloc_alloc_buffer()
227 private_handle_t* hnd = new private_handle_t( in gralloc_alloc_framebuffer_locked() local
242 hnd->base = vaddr; in gralloc_alloc_framebuffer_locked()
243 hnd->offset = vaddr - uintptr_t(m->framebuffer->base); in gralloc_alloc_framebuffer_locked()
244 *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/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.h259 bool isRotatorSupportedFormat(private_handle_t *hnd);
261 bool isRotationDoable(hwc_context_t *ctx, private_handle_t *hnd);
269 private_handle_t *hnd);
308 private_handle_t *hnd,
406 static inline bool isYuvBuffer(const private_handle_t* hnd) { in isYuvBuffer() argument
407 return (hnd && (hnd->bufferType == BUFFER_TYPE_VIDEO)); in isYuvBuffer()
411 static inline bool is4kx2kYuvBuffer(const private_handle_t* hnd) { in is4kx2kYuvBuffer() argument
412 return (hnd && (hnd->bufferType == BUFFER_TYPE_VIDEO) && in is4kx2kYuvBuffer()
413 (hnd->width > 2048)); in is4kx2kYuvBuffer()
417 static inline bool isSecureBuffer(const private_handle_t* hnd) { in isSecureBuffer() 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/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 …]

1234