diff options
| author | Richard Zhao <rizhao@nvidia.com> | 2018-01-25 14:17:10 -0500 |
|---|---|---|
| committer | Kyle Guo <kyleg@nvidia.com> | 2018-08-16 16:16:17 -0400 |
| commit | a44c4d2b8b8682dd9c54cbe063658c910d915406 (patch) | |
| tree | 85a351966268598864e91653d524cef833e82a68 /include/linux | |
| parent | fac488e5270510366133cbc2e8bfe1ffb9dcb40b (diff) | |
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>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/tegra_gr_comm.h | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/include/linux/tegra_gr_comm.h b/include/linux/tegra_gr_comm.h index 4c53ed686..f1de97f4f 100644 --- a/include/linux/tegra_gr_comm.h +++ b/include/linux/tegra_gr_comm.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Tegra Graphics Virtualization Communication Framework | 2 | * Tegra Graphics Virtualization Communication Framework |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. | 4 | * Copyright (c) 2013-2018, NVIDIA Corporation. All rights reserved. |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
| @@ -21,55 +21,50 @@ | |||
| 21 | 21 | ||
| 22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
| 23 | 23 | ||
| 24 | enum { | ||
| 25 | TEGRA_GR_COMM_CTX_CLIENT = 0, | ||
| 26 | TEGRA_GR_COMM_CTX_SERVER | ||
| 27 | }; | ||
| 28 | |||
| 29 | #define TEGRA_GR_COMM_ID_SELF (0xFF) | 24 | #define TEGRA_GR_COMM_ID_SELF (0xFF) |
| 30 | 25 | ||
| 31 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION | 26 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION |
| 32 | int tegra_gr_comm_init(struct platform_device *pdev, u32 virt_ctx, u32 elems, | 27 | int tegra_gr_comm_init(struct platform_device *pdev, u32 elems, |
| 33 | const size_t *queue_sizes, u32 queue_start, u32 num_queues); | 28 | const size_t *queue_sizes, u32 queue_start, u32 num_queues); |
| 34 | void tegra_gr_comm_deinit(u32 virt_ctx, u32 queue_start, u32 num_queues); | 29 | void tegra_gr_comm_deinit(u32 queue_start, u32 num_queues); |
| 35 | int tegra_gr_comm_send(u32 virt_ctx, u32 peer, u32 index, void *data, | 30 | int tegra_gr_comm_send(u32 peer, u32 index, void *data, |
| 36 | size_t size); | 31 | size_t size); |
| 37 | int tegra_gr_comm_recv(u32 virt_ctx, u32 index, void **handle, void **data, | 32 | int tegra_gr_comm_recv(u32 index, void **handle, void **data, |
| 38 | size_t *size, u32 *sender); | 33 | size_t *size, u32 *sender); |
| 39 | int tegra_gr_comm_sendrecv(u32 virt_ctx, u32 peer, u32 index, void **handle, | 34 | int tegra_gr_comm_sendrecv(u32 peer, u32 index, void **handle, |
| 40 | void **data, size_t *size); | 35 | void **data, size_t *size); |
| 41 | void tegra_gr_comm_release(void *handle); | 36 | void tegra_gr_comm_release(void *handle); |
| 42 | u32 tegra_gr_comm_get_server_vmid(void); | 37 | u32 tegra_gr_comm_get_server_vmid(void); |
| 43 | void *tegra_gr_comm_oob_get_ptr(u32 virt_ctx, u32 peer, u32 index, | 38 | void *tegra_gr_comm_oob_get_ptr(u32 peer, u32 index, |
| 44 | void **ptr, size_t *size); | 39 | void **ptr, size_t *size); |
| 45 | void tegra_gr_comm_oob_put_ptr(void *handle); | 40 | void tegra_gr_comm_oob_put_ptr(void *handle); |
| 46 | #else | 41 | #else |
| 47 | static inline int tegra_gr_comm_init(struct platform_device *pdev, | 42 | static inline int tegra_gr_comm_init(struct platform_device *pdev, |
| 48 | u32 virt_ctx, u32 elems, | 43 | u32 elems, |
| 49 | const size_t *queue_sizes, u32 queue_start, | 44 | const size_t *queue_sizes, u32 queue_start, |
| 50 | u32 num_queues) | 45 | u32 num_queues) |
| 51 | { | 46 | { |
| 52 | return -ENOSYS; | 47 | return -ENOSYS; |
| 53 | } | 48 | } |
| 54 | 49 | ||
| 55 | static inline void tegra_gr_comm_deinit(u32 virt_ctx, u32 queue_start, | 50 | static inline void tegra_gr_comm_deinit(u32 queue_start, |
| 56 | u32 num_queues) | 51 | u32 num_queues) |
| 57 | { | 52 | { |
| 58 | } | 53 | } |
| 59 | 54 | ||
| 60 | static inline int tegra_gr_comm_send(u32 virt_ctx, u32 peer, u32 index, | 55 | static inline int tegra_gr_comm_send(u32 peer, u32 index, |
| 61 | void *data, size_t size) | 56 | void *data, size_t size) |
| 62 | { | 57 | { |
| 63 | return -ENOSYS; | 58 | return -ENOSYS; |
| 64 | } | 59 | } |
| 65 | 60 | ||
| 66 | static inline int tegra_gr_comm_recv(u32 virt_ctx, u32 index, void **handle, | 61 | static inline int tegra_gr_comm_recv(u32 index, void **handle, |
| 67 | void **data, size_t *size, u32 *sender) | 62 | void **data, size_t *size, u32 *sender) |
| 68 | { | 63 | { |
| 69 | return -ENOSYS; | 64 | return -ENOSYS; |
| 70 | } | 65 | } |
| 71 | 66 | ||
| 72 | static inline int tegra_gr_comm_sendrecv(u32 virt_ctx, u32 peer, u32 index, | 67 | static inline int tegra_gr_comm_sendrecv(u32 peer, u32 index, |
| 73 | void **handle, void **data, | 68 | void **handle, void **data, |
| 74 | size_t *size) | 69 | size_t *size) |
| 75 | { | 70 | { |
| @@ -83,7 +78,7 @@ static inline u32 tegra_gr_comm_get_server_vmid(void) | |||
| 83 | return 0; | 78 | return 0; |
| 84 | } | 79 | } |
| 85 | 80 | ||
| 86 | static inline void *tegra_gr_comm_oob_get_ptr(u32 virt_ctx, u32 peer, | 81 | static inline void *tegra_gr_comm_oob_get_ptr(u32 peer, |
| 87 | u32 index, void **ptr, size_t *size) | 82 | u32 index, void **ptr, size_t *size) |
| 88 | { | 83 | { |
| 89 | return NULL; | 84 | return NULL; |
