Lines Matching refs:hnd
128 private_handle_t const *hnd = reinterpret_cast<private_handle_t const *>( in ImportBuffer() local
130 if (!hnd) in ImportBuffer()
135 if (!(hnd->usage & GRALLOC_USAGE_HW_FB)) in ImportBuffer()
139 int ret = drmPrimeFDToHandle(drm_->fd(), hnd->share_fd, &gem_handle); in ImportBuffer()
141 ALOGE("failed to import prime fd %d ret=%d", hnd->share_fd, ret); in ImportBuffer()
145 int32_t fmt = ConvertHalFormatToDrm(hnd->req_format); in ImportBuffer()
150 modifiers[0] = ConvertGrallocFormatToDrmModifiers(hnd->internal_format, in ImportBuffer()
153 bo->width = hnd->width; in ImportBuffer()
154 bo->height = hnd->height; in ImportBuffer()
155 bo->hal_format = hnd->req_format; in ImportBuffer()
157 bo->usage = hnd->usage; in ImportBuffer()
158 bo->pixel_stride = hnd->stride; in ImportBuffer()
159 bo->pitches[0] = hnd->byte_stride; in ImportBuffer()
166 if (hnd->usage & in ImportBuffer()
169 int adjusted_height = MALI_ALIGN(hnd->height, 2); in ImportBuffer()
170 int y_size = adjusted_height * hnd->byte_stride; in ImportBuffer()
171 int vu_stride = MALI_ALIGN(hnd->byte_stride / 2, align); in ImportBuffer()
202 private_handle_t const *hnd = reinterpret_cast<private_handle_t const *>( in CanImportBuffer() local
204 return hnd && (hnd->usage & GRALLOC_USAGE_HW_FB); in CanImportBuffer()