#include <tbm_log.h>
#include "tbm_bufmgr_tgl.h"
-#define USE_DMAIMPORT
#define TBM_COLOR_FORMAT_COUNT 4
#define VC4_DRM_NAME "vc4"
bo_handle.ptr = (void *)bo_vc4->pBase;
break;
case TBM_DEVICE_3D:
-#ifdef USE_DMAIMPORT
- if (bo_vc4->dmabuf) {
- bo_handle.u32 = (uint32_t)bo_vc4->dmabuf;
- break;
- }
-
- if (!bo_vc4->dmabuf) {
- struct drm_prime_handle arg = {0, };
-
- arg.handle = bo_vc4->gem;
- if (drmIoctl(bo_vc4->fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &arg)) {
- TBM_ERR("Cannot dmabuf=%d\n", bo_vc4->gem);
- return (tbm_bo_handle) NULL;
- }
- bo_vc4->dmabuf = arg.fd;
- }
-
- bo_handle.u32 = (uint32_t)bo_vc4->dmabuf;
-#endif
- break;
case TBM_DEVICE_MM:
if (!bo_vc4->dmabuf) {
struct drm_prime_handle arg = {0, };