diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index b8753a21f..fb0a6aa3b 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -889,7 +889,7 @@ static int gk20a_pm_finalize_poweron(struct device *dev) goto done; } - err = gk20a_init_gpu_characteristics(g); + err = g->ops.chip_init_gpu_characteristics(g); if (err) { gk20a_err(dev, "failed to init gk20a gpu characteristics"); goto done; diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 8a1f82bc7..ee78c6e2e 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -511,6 +511,8 @@ struct gpu_ops { void *scatter_buffer_ptr, size_t scatter_buffer_size); } cde; + + int (*chip_init_gpu_characteristics)(struct gk20a *g); }; struct gk20a { diff --git a/drivers/gpu/nvgpu/gk20a/hal_gk20a.c b/drivers/gpu/nvgpu/gk20a/hal_gk20a.c index 9718aad21..6df8f37ce 100644 --- a/drivers/gpu/nvgpu/gk20a/hal_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/hal_gk20a.c @@ -3,7 +3,7 @@ * * GK20A Tegra HAL interface. * - * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016, 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, @@ -70,6 +70,7 @@ int gk20a_init_hal(struct gk20a *g) gk20a_init_debug_ops(gops); gk20a_init_therm_ops(gops); gops->name = "gk20a"; + gops->chip_init_gpu_characteristics = gk20a_init_gpu_characteristics; c->twod_class = FERMI_TWOD_A; c->threed_class = KEPLER_C; diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index 5fe018331..559fee61e 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c @@ -1,7 +1,7 @@ /* * GM20B Graphics * - * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016, 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, @@ -139,6 +139,7 @@ int gm20b_init_hal(struct gk20a *g) gm20b_init_cde_ops(gops); gm20b_init_therm_ops(gops); gops->name = "gm20b"; + gops->chip_init_gpu_characteristics = gk20a_init_gpu_characteristics; c->twod_class = FERMI_TWOD_A; c->threed_class = MAXWELL_B; diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index 5a953e209..4750d7ee4 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c @@ -327,7 +327,7 @@ int vgpu_pm_finalize_poweron(struct device *dev) goto done; } - err = gk20a_init_gpu_characteristics(g); + err = g->ops.chip_init_gpu_characteristics(g); if (err) { gk20a_err(dev, "failed to init gk20a gpu characteristics"); goto done;