From bc47d822298b9f3b2f93a384a7780a3763fee495 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Thu, 2 Mar 2017 11:00:17 -0800 Subject: gpu: nvgpu: add NVGPU_GPU_FLAGS_SUPPORT_MAP_COMPBITS native gpu driver supports map compbits but vgpu does not. Bug 1778448 Bug 200275051 JIRA VFND-3513 Change-Id: I433a6f8631b495875ba899af9609203ab36187ef Signed-off-by: Richard Zhao Reviewed-on: http://git-master/r/1314065 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.c | 1 + drivers/gpu/nvgpu/vgpu/vgpu.c | 1 + include/uapi/linux/nvgpu.h | 2 ++ 3 files changed, 4 insertions(+) diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 583e77b4..d07918b0 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -2165,6 +2165,7 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_USERSPACE_MANAGED_AS; gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_TSG; + gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_MAP_COMPBITS; if (g->ops.clk_arb.get_arbiter_clk_domains) gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_CLOCK_CONTROLS; diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index d2afc4af..d5eb05ac 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c @@ -317,6 +317,7 @@ static int vgpu_init_gpu_characteristics(struct gk20a *g) /* features vgpu does not support */ g->gpu_characteristics.flags &= ~NVGPU_GPU_FLAGS_SUPPORT_CYCLE_STATS; + g->gpu_characteristics.flags &= ~NVGPU_GPU_FLAGS_SUPPORT_MAP_COMPBITS; return 0; } diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 3f358558..400d430b 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -135,6 +135,8 @@ struct nvgpu_gpu_zbc_query_table_args { #define NVGPU_GPU_FLAGS_SUPPORT_DEVICE_EVENTS (1ULL << 15) /* FECS context switch tracing is available */ #define NVGPU_GPU_FLAGS_SUPPORT_FECS_CTXSW_TRACE (1ULL << 16) +/* NVGPU_AS_IOCTL_MAP_BUFFER_COMPBITS is available */ +#define NVGPU_GPU_FLAGS_SUPPORT_MAP_COMPBITS (1ULL << 17) struct nvgpu_gpu_characteristics { __u32 arch; -- cgit v1.2.2