mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
video: tegra: virt: remove virt_ctx from tegra_gr_comm
queue index can already index the queues. It also help make the api more common. Jira EVLR-2364 Change-Id: I5ba8f03bf8ae9cc8d1a51a6d5c48eef969276ed0 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1646195 Reviewed-by: Damian Halas <dhalas@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Aingara Paramakuru <aparamakuru@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Nirav Patel <nipatel@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
e651d2e8dd
commit
5fb49dd72a
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Tegra Graphics Virtualization Communication Framework
|
||||
*
|
||||
* Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (c) 2013-2018, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -21,55 +21,50 @@
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
enum {
|
||||
TEGRA_GR_COMM_CTX_CLIENT = 0,
|
||||
TEGRA_GR_COMM_CTX_SERVER
|
||||
};
|
||||
|
||||
#define TEGRA_GR_COMM_ID_SELF (0xFF)
|
||||
|
||||
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
|
||||
int tegra_gr_comm_init(struct platform_device *pdev, u32 virt_ctx, u32 elems,
|
||||
int tegra_gr_comm_init(struct platform_device *pdev, u32 elems,
|
||||
const size_t *queue_sizes, u32 queue_start, u32 num_queues);
|
||||
void tegra_gr_comm_deinit(u32 virt_ctx, u32 queue_start, u32 num_queues);
|
||||
int tegra_gr_comm_send(u32 virt_ctx, u32 peer, u32 index, void *data,
|
||||
void tegra_gr_comm_deinit(u32 queue_start, u32 num_queues);
|
||||
int tegra_gr_comm_send(u32 peer, u32 index, void *data,
|
||||
size_t size);
|
||||
int tegra_gr_comm_recv(u32 virt_ctx, u32 index, void **handle, void **data,
|
||||
int tegra_gr_comm_recv(u32 index, void **handle, void **data,
|
||||
size_t *size, u32 *sender);
|
||||
int tegra_gr_comm_sendrecv(u32 virt_ctx, u32 peer, u32 index, void **handle,
|
||||
int tegra_gr_comm_sendrecv(u32 peer, u32 index, void **handle,
|
||||
void **data, size_t *size);
|
||||
void tegra_gr_comm_release(void *handle);
|
||||
u32 tegra_gr_comm_get_server_vmid(void);
|
||||
void *tegra_gr_comm_oob_get_ptr(u32 virt_ctx, u32 peer, u32 index,
|
||||
void *tegra_gr_comm_oob_get_ptr(u32 peer, u32 index,
|
||||
void **ptr, size_t *size);
|
||||
void tegra_gr_comm_oob_put_ptr(void *handle);
|
||||
#else
|
||||
static inline int tegra_gr_comm_init(struct platform_device *pdev,
|
||||
u32 virt_ctx, u32 elems,
|
||||
u32 elems,
|
||||
const size_t *queue_sizes, u32 queue_start,
|
||||
u32 num_queues)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline void tegra_gr_comm_deinit(u32 virt_ctx, u32 queue_start,
|
||||
static inline void tegra_gr_comm_deinit(u32 queue_start,
|
||||
u32 num_queues)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int tegra_gr_comm_send(u32 virt_ctx, u32 peer, u32 index,
|
||||
static inline int tegra_gr_comm_send(u32 peer, u32 index,
|
||||
void *data, size_t size)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int tegra_gr_comm_recv(u32 virt_ctx, u32 index, void **handle,
|
||||
static inline int tegra_gr_comm_recv(u32 index, void **handle,
|
||||
void **data, size_t *size, u32 *sender)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int tegra_gr_comm_sendrecv(u32 virt_ctx, u32 peer, u32 index,
|
||||
static inline int tegra_gr_comm_sendrecv(u32 peer, u32 index,
|
||||
void **handle, void **data,
|
||||
size_t *size)
|
||||
{
|
||||
@@ -83,7 +78,7 @@ static inline u32 tegra_gr_comm_get_server_vmid(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void *tegra_gr_comm_oob_get_ptr(u32 virt_ctx, u32 peer,
|
||||
static inline void *tegra_gr_comm_oob_get_ptr(u32 peer,
|
||||
u32 index, void **ptr, size_t *size)
|
||||
{
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user