From 5e486b518292b1178eae49d58a1bc0894788a281 Mon Sep 17 00:00:00 2001 From: David Nieto Date: Tue, 23 Aug 2016 10:47:10 -0700 Subject: gpu: nvgpu: fix cbc base calculation for dGPU JIRA DNVGPU-9 Change-Id: I22667acfadfcabf79af841ca5389e41d2ac34860 Signed-off-by: David Nieto Reviewed-on: http://git-master/r/1206478 (cherry picked from commit 098b932f7633a903c915b1257beb9304735b4113) Reviewed-on: http://git-master/r/1210288 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp106/hal_gp106.c | 4 ++-- drivers/gpu/nvgpu/gp106/ltc_gp106.c | 25 +++++++++++++++++++++++++ drivers/gpu/nvgpu/gp106/ltc_gp106.h | 19 +++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/nvgpu/gp106/ltc_gp106.c create mode 100644 drivers/gpu/nvgpu/gp106/ltc_gp106.h (limited to 'drivers/gpu/nvgpu/gp106') diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 5414eb4a..a52fab7b 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c @@ -22,7 +22,7 @@ #include "gp10b/gr_gp10b.h" #include "gp10b/mc_gp10b.h" -#include "gp10b/ltc_gp10b.h" +#include "gp106/ltc_gp106.h" #include "gp10b/mm_gp10b.h" #include "gp10b/ce_gp10b.h" #include "gp10b/fb_gp10b.h" @@ -147,7 +147,7 @@ int gp106_init_hal(struct gk20a *g) gp10b_init_mc(gops); gp106_init_gr(gops); - gp10b_init_ltc(gops); + gp106_init_ltc(gops); gp10b_init_fb(gops); gp106_init_fifo(gops); gp10b_init_ce(gops); diff --git a/drivers/gpu/nvgpu/gp106/ltc_gp106.c b/drivers/gpu/nvgpu/gp106/ltc_gp106.c new file mode 100644 index 00000000..8f630a41 --- /dev/null +++ b/drivers/gpu/nvgpu/gp106/ltc_gp106.c @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2016, 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 "gp10b/ltc_gp10b.h" + +void gp106_init_ltc(struct gpu_ops *gops) +{ + gp10b_init_ltc(gops); + + /* dGPU does not need the LTC hack */ + gops->ltc.cbc_fix_config = NULL; +} diff --git a/drivers/gpu/nvgpu/gp106/ltc_gp106.h b/drivers/gpu/nvgpu/gp106/ltc_gp106.h new file mode 100644 index 00000000..4720d7a1 --- /dev/null +++ b/drivers/gpu/nvgpu/gp106/ltc_gp106.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2016, 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 LTC_GP106_H +#define LTC_GP106_H +struct gpu_ops; + +void gp106_init_ltc(struct gpu_ops *gops); +#endif -- cgit v1.2.2