From 7e9b9c0b3ea832d9f372663c81e526a70fb65f92 Mon Sep 17 00:00:00 2001 From: Aingara Paramakuru Date: Thu, 11 Dec 2014 11:06:24 -0500 Subject: gpu: nvgpu: move debug dump to HAL Move the debug dump to HAL and add a stub for vgpu. Bug 1595164 Change-Id: Ifdcdd8a8caca7a41919dad075fee1c87032f53b0 Signed-off-by: Aingara Paramakuru Reviewed-on: http://git-master/r/662722 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gm20b/debug_gm20b.c | 21 +++++++++++++++++++++ drivers/gpu/nvgpu/gm20b/debug_gm20b.h | 24 ++++++++++++++++++++++++ drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 4 +++- 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/nvgpu/gm20b/debug_gm20b.c create mode 100644 drivers/gpu/nvgpu/gm20b/debug_gm20b.h (limited to 'drivers/gpu/nvgpu/gm20b') diff --git a/drivers/gpu/nvgpu/gm20b/debug_gm20b.c b/drivers/gpu/nvgpu/gm20b/debug_gm20b.c new file mode 100644 index 00000000..b266200c --- /dev/null +++ b/drivers/gpu/nvgpu/gm20b/debug_gm20b.c @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2015 NVIDIA Corporation. All rights reserved. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that 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 "gk20a/gk20a.h" +#include "debug_gm20b.h" + +void gm20b_init_debug_ops(struct gpu_ops *gops) +{ + gops->debug.show_dump = gk20a_debug_show_dump; +} diff --git a/drivers/gpu/nvgpu/gm20b/debug_gm20b.h b/drivers/gpu/nvgpu/gm20b/debug_gm20b.h new file mode 100644 index 00000000..c3c5fed6 --- /dev/null +++ b/drivers/gpu/nvgpu/gm20b/debug_gm20b.h @@ -0,0 +1,24 @@ +/* + * GM20B Debug functionality + * + * Copyright (C) 2015 NVIDIA CORPORATION. All rights reserved. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that 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 _DEBUG_GM20B_H_ +#define _DEBUG_GM20B_H_ + +struct gpu_ops; + +void gm20b_init_debug_ops(struct gpu_ops *gops); + +#endif diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index e95f8878..5dc0c212 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c @@ -1,7 +1,7 @@ /* * GM20B Graphics * - * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-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, @@ -30,6 +30,7 @@ #include "mc_gm20b.h" #include #include "regops_gm20b.h" +#include "debug_gm20b.h" #define FUSE_OPT_PRIV_SEC_DIS_0 0x264 #define PRIV_SECURITY_DISABLE 0x01 @@ -128,6 +129,7 @@ int gm20b_init_hal(struct gk20a *g) gm20b_init_pmu_ops(gops); gm20b_init_clk_ops(gops); gm20b_init_regops(gops); + gm20b_init_debug_ops(gops); gops->name = "gm20b"; c->twod_class = FERMI_TWOD_A; -- cgit v1.2.2