summaryrefslogtreecommitdiff
path: root/drivers/gpu/nvgpu/gk20a/hal_gk20a.c
diff options
context:
space:
mode:
authorArto Merilainen <amerilainen@nvidia.com>2014-03-19 09:38:25 +0200
committerTerje Bergstrom <tbergstrom@nvidia.com>2014-03-28 04:21:39 -0700
commite51e1033bd22dc5ea6a86f6704142baf89a2f7cb (patch)
tree9b5f65258f5777273f3b62e4f59f8001ed7da543 /drivers/gpu/nvgpu/gk20a/hal_gk20a.c
parent1428ed474d1acb22321e89301c06be1bb9e5fe17 (diff)
gpu: nvgpu: Add NVIDIA GPU Driver
This patch moves the NVIDIA GPU driver to a new location. Bug 1482562 Change-Id: I24293810b9d0f1504fd9be00135e21dad656ccb6 Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Reviewed-on: http://git-master/r/383722 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/hal_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/hal_gk20a.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/hal_gk20a.c b/drivers/gpu/nvgpu/gk20a/hal_gk20a.c
new file mode 100644
index 000000000000..b3e9b0e6ee42
--- /dev/null
+++ b/drivers/gpu/nvgpu/gk20a/hal_gk20a.c
@@ -0,0 +1,50 @@
+/*
+ * drivers/video/tegra/host/gk20a/hal_gk20a.c
+ *
+ * GK20A Tegra HAL interface.
+ *
+ * Copyright (c) 2014, 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 "hal_gk20a.h"
+#include "ltc_gk20a.h"
+#include "fb_gk20a.h"
+#include "gk20a.h"
+#include "gk20a_gating_reglist.h"
+#include "channel_gk20a.h"
+
+struct gpu_ops gk20a_ops = {
+ .clock_gating = {
+ .slcg_gr_load_gating_prod =
+ gr_gk20a_slcg_gr_load_gating_prod,
+ .slcg_perf_load_gating_prod =
+ gr_gk20a_slcg_perf_load_gating_prod,
+ .blcg_gr_load_gating_prod =
+ gr_gk20a_blcg_gr_load_gating_prod,
+ .pg_gr_load_gating_prod =
+ gr_gk20a_pg_gr_load_gating_prod,
+ .slcg_therm_load_gating_prod =
+ gr_gk20a_slcg_therm_load_gating_prod,
+ }
+};
+
+int gk20a_init_hal(struct gpu_ops *gops)
+{
+ *gops = gk20a_ops;
+ gk20a_init_ltc(gops);
+ gk20a_init_gr(gops);
+ gk20a_init_fb(gops);
+ gk20a_init_fifo(gops);
+ gops->name = "gk20a";
+
+ return 0;
+}