diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-04-06 06:33:44 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-04-15 11:11:14 -0400 |
commit | b6dc4315a4c7fa817334797cc2a4b9fb3fbfd55f (patch) | |
tree | 661626690667ed1d2bb9ef72ec7062added33235 /drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c | |
parent | d369dca4ac742fed024b54d766bb1723916b7d87 (diff) |
gpu: nvgpu: support kernel-3.10 version
Make necessary changes to support nvgpu on kernel-3.10
This includes below changes
- PROBE_PREFER_ASYNCHRONOUS is defined only for K3.10
- Fence handling and struct sync_fence is different between
K3.10 and K3.18
- variable status in struct sync_fence is atomic on K3.18
whereas it is int on K3.10
- if SOC == T132, set soc_name = "tegra13x"
- ioremap_cache() is not defined on K3.10 ARM versions,
hence use ioremap_cached()
Bug 200188753
Change-Id: I18d77eb1404e15054e8510d67c9a61c0f1883e2b
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1121092
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c b/drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c index d19e5712..02e0baad 100644 --- a/drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/tegra-ivc.h> | 15 | #include <linux/tegra-ivc.h> |
16 | #include <linux/tegra_vgpu.h> | 16 | #include <linux/tegra_vgpu.h> |
17 | #include <linux/version.h> | ||
17 | 18 | ||
18 | #include "gk20a/gk20a.h" | 19 | #include "gk20a/gk20a.h" |
19 | #include "gk20a/ctxsw_trace_gk20a.h" | 20 | #include "gk20a/ctxsw_trace_gk20a.h" |
@@ -61,7 +62,11 @@ static int vgpu_fecs_trace_init(struct gk20a *g) | |||
61 | goto fail; | 62 | goto fail; |
62 | } | 63 | } |
63 | 64 | ||
65 | #if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) | ||
66 | vcst->buf = ioremap_cached(vcst->cookie->ipa, vcst->cookie->size); | ||
67 | #else | ||
64 | vcst->buf = ioremap_cache(vcst->cookie->ipa, vcst->cookie->size); | 68 | vcst->buf = ioremap_cache(vcst->cookie->ipa, vcst->cookie->size); |
69 | #endif | ||
65 | if (!vcst->buf) { | 70 | if (!vcst->buf) { |
66 | dev_info(dev_from_gk20a(g), "ioremap_cache failed\n"); | 71 | dev_info(dev_from_gk20a(g), "ioremap_cache failed\n"); |
67 | err = -EINVAL; | 72 | err = -EINVAL; |