From 57fb527a7e33384341fc18f1f918d5a8225057f5 Mon Sep 17 00:00:00 2001 From: Peter Daifuku Date: Fri, 6 Oct 2017 16:27:14 -0700 Subject: gpu: nvgpu: vgpu: flatten out vgpu hal Instead of calling the native HAL init function then adding multiple layers of modification for VGPU, flatten out the sequence so that all entry points are set statically and visible in a single file. JIRA ESRM-30 Change-Id: Ie424abb48bce5038874851d399baac5e4bb7d27c Signed-off-by: Peter Daifuku Reviewed-on: https://git-master.nvidia.com/r/1574616 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/vgpu/ltc_vgpu.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/ltc_vgpu.c') diff --git a/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c b/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c index db39b309..a6848872 100644 --- a/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c @@ -1,7 +1,7 @@ /* * Virtualized GPU L2 * - * Copyright (c) 2014-2016 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -23,8 +23,9 @@ */ #include "vgpu/vgpu.h" +#include "vgpu/ltc_vgpu.h" -static int vgpu_determine_L2_size_bytes(struct gk20a *g) +int vgpu_determine_L2_size_bytes(struct gk20a *g) { struct vgpu_priv_data *priv = vgpu_get_priv_data(g); @@ -33,7 +34,7 @@ static int vgpu_determine_L2_size_bytes(struct gk20a *g) return priv->constants.l2_size; } -static int vgpu_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) +int vgpu_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) { struct vgpu_priv_data *priv = vgpu_get_priv_data(g); u32 max_comptag_lines = 0; @@ -56,7 +57,7 @@ static int vgpu_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) return 0; } -static void vgpu_ltc_init_fs_state(struct gk20a *g) +void vgpu_ltc_init_fs_state(struct gk20a *g) { struct vgpu_priv_data *priv = vgpu_get_priv_data(g); @@ -64,11 +65,3 @@ static void vgpu_ltc_init_fs_state(struct gk20a *g) g->ltc_count = priv->constants.ltc_count; } - -void vgpu_init_ltc_ops(struct gpu_ops *gops) -{ - gops->ltc.determine_L2_size_bytes = vgpu_determine_L2_size_bytes; - gops->ltc.init_comptags = vgpu_ltc_init_comptags; - gops->ltc.init_fs_state = vgpu_ltc_init_fs_state; - gops->ltc.cbc_ctrl = NULL; -} -- cgit v1.2.2