From b6dc4315a4c7fa817334797cc2a4b9fb3fbfd55f Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Wed, 6 Apr 2016 16:03:44 +0530 Subject: 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 Reviewed-on: http://git-master/r/1121092 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c') 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 @@ #include #include #include +#include #include "gk20a/gk20a.h" #include "gk20a/ctxsw_trace_gk20a.h" @@ -61,7 +62,11 @@ static int vgpu_fecs_trace_init(struct gk20a *g) goto fail; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) + vcst->buf = ioremap_cached(vcst->cookie->ipa, vcst->cookie->size); +#else vcst->buf = ioremap_cache(vcst->cookie->ipa, vcst->cookie->size); +#endif if (!vcst->buf) { dev_info(dev_from_gk20a(g), "ioremap_cache failed\n"); err = -EINVAL; -- cgit v1.2.2