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/vgpu/debug_vgpu.c | 25 +++++++++++++++++++++++++ drivers/gpu/nvgpu/vgpu/vgpu.c | 3 ++- drivers/gpu/nvgpu/vgpu/vgpu.h | 6 +++++- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/nvgpu/vgpu/debug_vgpu.c (limited to 'drivers/gpu/nvgpu/vgpu') diff --git a/drivers/gpu/nvgpu/vgpu/debug_vgpu.c b/drivers/gpu/nvgpu/vgpu/debug_vgpu.c new file mode 100644 index 00000000..d48ab944 --- /dev/null +++ b/drivers/gpu/nvgpu/vgpu/debug_vgpu.c @@ -0,0 +1,25 @@ +/* + * 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 "vgpu/vgpu.h" + +static void vgpu_debug_show_dump(struct gk20a *g, struct gk20a_debug_output *o) +{ + /* debug dump not supported */ +} + +void vgpu_init_debug_ops(struct gpu_ops *gops) +{ + gops->debug.show_dump = vgpu_debug_show_dump; +} diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index 25dcd8bb..36d65ee8 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c @@ -1,7 +1,7 @@ /* * Virtualized GPU * - * 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, @@ -247,6 +247,7 @@ static int vgpu_init_hal(struct gk20a *g) vgpu_init_gr_ops(&g->ops); vgpu_init_ltc_ops(&g->ops); vgpu_init_mm_ops(&g->ops); + vgpu_init_debug_ops(&g->ops); break; default: gk20a_err(&g->dev->dev, "no support for %x", ver); diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.h b/drivers/gpu/nvgpu/vgpu/vgpu.h index 972c2107..4677b36c 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.h +++ b/drivers/gpu/nvgpu/vgpu/vgpu.h @@ -1,7 +1,7 @@ /* * Virtualized GPU Interfaces * - * 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, @@ -31,6 +31,7 @@ void vgpu_init_fifo_ops(struct gpu_ops *gops); void vgpu_init_gr_ops(struct gpu_ops *gops); void vgpu_init_ltc_ops(struct gpu_ops *gops); void vgpu_init_mm_ops(struct gpu_ops *gops); +void vgpu_init_debug_ops(struct gpu_ops *gops); int vgpu_init_mm_support(struct gk20a *g); int vgpu_init_gr_support(struct gk20a *g); int vgpu_init_fifo_support(struct gk20a *g); @@ -75,6 +76,9 @@ static inline void vgpu_init_ltc_ops(struct gpu_ops *gops) static inline void vgpu_init_mm_ops(struct gpu_ops *gops) { } +static inline void vgpu_init_debug_ops(struct gpu_ops *gops) +{ +} static inline int vgpu_init_mm_support(struct gk20a *g) { return -ENOSYS; -- cgit v1.2.2