habanalabs: modify export dmabuf API
authorOhad Sharabi <osharabi@habana.ai>
Mon, 14 Nov 2022 10:16:37 +0000 (12:16 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Thu, 26 Jan 2023 08:56:21 +0000 (10:56 +0200)
commitd70885800c4b87505171216796f91be94d9ed2cf
treede3b9315e8be28f0ca75db6a4ec345fb41e75fa5
parent54fde5505c1311d45a96d7ad8fb8809581d38f22
habanalabs: modify export dmabuf API

A previous commit deprecated the option to export from handle, leaving
the code with no support for devices with virtual memory.

This commit modifies the export API in a way that unifies the uAPI to
user address for both cases (i.e. with and without MMU support) and add
the actual support for devices with virtual memory.

Signed-off-by: Ohad Sharabi <osharabi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/memory.c
include/uapi/misc/habanalabs.h