From eff1aa4d9212f76f24d362bc1f871bf82baa5d98 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 16 Jan 2015 09:15:20 -0800 Subject: gpu: nvgpu: gp10b: Set correct PBDMA signature GPFIFO class was set to Maxwell class number. Also implement the PBDMA signature HAL. Change-Id: Ieaebcda8af96d5779289b311c0c433e8b4349234 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/672921 --- drivers/gpu/nvgpu/gp10b/Makefile | 1 + drivers/gpu/nvgpu/gp10b/fifo_gp10b.c | 32 ++++++++++++++++++++++++++++++++ drivers/gpu/nvgpu/gp10b/fifo_gp10b.h | 18 ++++++++++++++++++ drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 5 +++-- 4 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/nvgpu/gp10b/fifo_gp10b.c create mode 100644 drivers/gpu/nvgpu/gp10b/fifo_gp10b.h (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gp10b/Makefile b/drivers/gpu/nvgpu/gp10b/Makefile index e897ab9c..e14cd0ee 100644 --- a/drivers/gpu/nvgpu/gp10b/Makefile +++ b/drivers/gpu/nvgpu/gp10b/Makefile @@ -17,6 +17,7 @@ obj-$(CONFIG_GK20A) += \ mm_gp10b.o \ fb_gp10b.o \ pmu_gp10b.o \ + fifo_gp10b.o \ hal_gp10b.o obj-$(CONFIG_TEGRA_GK20A) += platform_gp10b_tegra.o diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c new file mode 100644 index 00000000..d67c7ee2 --- /dev/null +++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c @@ -0,0 +1,32 @@ +/* + * GP10B fifo + * + * Copyright (c) 2015, 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, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + +#include + +#include "gk20a/gk20a.h" +#include "gm20b/fifo_gm20b.h" +#include "hw_pbdma_gp10b.h" + +static u32 gp10b_fifo_get_pbdma_signature(struct gk20a *g) +{ + return g->gpu_characteristics.gpfifo_class + | pbdma_signature_sw_zero_f(); +} + +void gp10b_init_fifo(struct gpu_ops *gops) +{ + gm20b_init_fifo(gops); + gops->fifo.get_pbdma_signature = gp10b_fifo_get_pbdma_signature; +} diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.h b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.h new file mode 100644 index 00000000..18e2034f --- /dev/null +++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2014, 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, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + +#ifndef FIFO_GP10B_H +#define FIFO_GP10B_H +struct gpu_ops; +void gp10b_init_fifo(struct gpu_ops *gops); +#endif diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 1a34688a..30b56a5c 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c @@ -31,6 +31,7 @@ #include "gm20b/gr_gm20b.h" #include "gm20b/gm20b_gating_reglist.h" #include "gm20b/fifo_gm20b.h" +#include "gp10b/fifo_gp10b.h" #include "gm20b/pmu_gm20b.h" #include "gm20b/clk_gm20b.h" @@ -93,7 +94,7 @@ int gp10b_init_hal(struct gk20a *g) gp10b_init_gr(gops); gp10b_init_ltc(gops); gp10b_init_fb(gops); - gm20b_init_fifo(gops); + gp10b_init_fifo(gops); gp10b_init_gr_ctx(gops); gp10b_init_mm(gops); gp10b_init_pmu_ops(gops); @@ -104,7 +105,7 @@ int gp10b_init_hal(struct gk20a *g) c->twod_class = FERMI_TWOD_A; c->threed_class = PASCAL_A; c->compute_class = PASCAL_COMPUTE_A; - c->gpfifo_class = MAXWELL_CHANNEL_GPFIFO_A; + c->gpfifo_class = PASCAL_CHANNEL_GPFIFO_A; c->inline_to_memory_class = KEPLER_INLINE_TO_MEMORY_B; c->dma_copy_class = MAXWELL_DMA_COPY_A; -- cgit v1.2.2