// SPDX-License-Identifier: GPL-2.0-only
/*
- * Copyright (C) 2020-2023 Intel Corporation
+ * Copyright (C) 2020-2026 Intel Corporation
*/
#include <linux/dma-buf.h>
"%6s: bo %8p size %9zu ctx %d vpu_addr %9llx pages %d sgt %d mmu_mapped %d wc %d imported %d\n",
action, bo, ivpu_bo_size(bo), bo->ctx_id, bo->vpu_addr,
(bool)bo->base.pages, (bool)bo->base.sgt, bo->mmu_mapped, bo->base.map_wc,
- (bool)drm_gem_is_imported(&bo->base.base));
+ drm_gem_is_imported(&bo->base.base));
}
static inline int ivpu_bo_lock(struct ivpu_bo *bo)
ivpu_dbg_bo(vdev, bo, "bind");
- if (bo->base.base.import_attach)
+ if (drm_gem_is_imported(&bo->base.base))
sgt = ivpu_bo_map_attachment(vdev, bo);
else
sgt = drm_gem_shmem_get_pages_sgt(&bo->base);
if (size == 0 || !PAGE_ALIGNED(size))
return ERR_PTR(-EINVAL);
- bo = kzalloc(sizeof(*bo), GFP_KERNEL);
+ bo = kzalloc_obj(*bo);
if (!bo)
return ERR_PTR(-ENOMEM);