From 3c3f947cf4a7d2db72f3bb3e2f7eab4d7d926a30 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Wed, 1 Mar 2017 10:36:53 -0800 Subject: gpu: nvgpu: add fifo ops for *data_fault_id_enum_v generated hw header for top_device_info_data_fault_id_enum_v is different between legacy chips and t19x JIRA GV11B-7 Change-Id: I877e88a5b1b1f3f41bc72b895536f4a01b4fbd4e Signed-off-by: Seema Khowala Reviewed-on: http://git-master/r/1313384 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 1 + drivers/gpu/nvgpu/gp10b/fifo_gp10b.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 272fadbb..c30a8eaf 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -417,6 +417,7 @@ struct gpu_ops { void (*device_info_data_parse)(struct gk20a *g, u32 table_entry, u32 *inst_id, u32 *pri_base, u32 *fault_id); + u32 (*device_info_fault_id)(u32 table_entry); int (*tsg_bind_channel)(struct tsg_gk20a *tsg, struct channel_gk20a *ch); int (*tsg_unbind_channel)(struct channel_gk20a *ch); diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c index d5c5327f..d458d00b 100644 --- a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c @@ -1,7 +1,7 @@ /* * GP10B fifo * - * Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2015-2017, 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, @@ -217,11 +217,13 @@ static void gp10b_device_info_data_parse(struct gk20a *g, u32 table_entry, *pri_base = (top_device_info_data_pri_base_v(table_entry) << top_device_info_data_pri_base_align_v()); + gk20a_dbg_info("device info: pri_base: %d", *pri_base); } if (fault_id && (top_device_info_data_fault_id_v(table_entry) == top_device_info_data_fault_id_valid_v())) { *fault_id = - top_device_info_data_fault_id_enum_v(table_entry); + g->ops.fifo.device_info_fault_id(table_entry); + gk20a_dbg_info("device info: fault_id: %d", *fault_id); } } else gk20a_err(g->dev, "unknown device_info_data %d", @@ -237,4 +239,5 @@ void gp10b_init_fifo(struct gpu_ops *gops) gops->fifo.engine_enum_from_type = gp10b_fifo_engine_enum_from_type; gops->fifo.device_info_data_parse = gp10b_device_info_data_parse; gops->fifo.eng_runlist_base_size = fifo_eng_runlist_base__size_1_v; + gops->fifo.device_info_fault_id = top_device_info_data_fault_id_enum_v; } -- cgit v1.2.2