From a9785995d5f22aaeb659285f8aeb64d8b56982e0 Mon Sep 17 00:00:00 2001 From: Arto Merilainen Date: Wed, 19 Mar 2014 09:38:25 +0200 Subject: 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 Reviewed-on: http://git-master/r/383722 Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/hal.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 drivers/gpu/nvgpu/gk20a/hal.c (limited to 'drivers/gpu/nvgpu/gk20a/hal.c') diff --git a/drivers/gpu/nvgpu/gk20a/hal.c b/drivers/gpu/nvgpu/gk20a/hal.c new file mode 100644 index 00000000..dea740c2 --- /dev/null +++ b/drivers/gpu/nvgpu/gk20a/hal.c @@ -0,0 +1,33 @@ +/* + * NVIDIA GPU 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 "gk20a.h" +#include "hal_gk20a.h" + +int gpu_init_hal(struct gk20a *g) +{ + u32 ver = g->gpu_characteristics.arch + g->gpu_characteristics.impl; + switch (ver) { + case GK20A_GPUID_GK20A: + gk20a_dbg_info("gk20a detected"); + gk20a_init_hal(&g->ops); + break; + default: + gk20a_err(&g->dev->dev, "no support for %x", ver); + return -ENODEV; + } + + return 0; +} -- cgit v1.2.2