mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
gpu: nvgpu: Add HAL for GPU characteristics
Add function pointer for chip specific GPU characteristics init. Bug 1637486 Change-Id: I6ce5eea124d8057393dec6e86e72412cc87e1cfa Signed-off-by: Sami Kiminki <skiminki@nvidia.com> Signed-off-by: Adeel Raza <araza@nvidia.com> Reviewed-on: http://git-master/r/780535 (cherry picked from commit f5c240d6ed19b5b9eedff05767c885ad5812c71e) Reviewed-on: http://git-master/r/1120428 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Terje Bergstrom
parent
d14ab70b59
commit
135d6db448
@@ -889,7 +889,7 @@ static int gk20a_pm_finalize_poweron(struct device *dev)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = gk20a_init_gpu_characteristics(g);
|
err = g->ops.chip_init_gpu_characteristics(g);
|
||||||
if (err) {
|
if (err) {
|
||||||
gk20a_err(dev, "failed to init gk20a gpu characteristics");
|
gk20a_err(dev, "failed to init gk20a gpu characteristics");
|
||||||
goto done;
|
goto done;
|
||||||
|
|||||||
@@ -511,6 +511,8 @@ struct gpu_ops {
|
|||||||
void *scatter_buffer_ptr,
|
void *scatter_buffer_ptr,
|
||||||
size_t scatter_buffer_size);
|
size_t scatter_buffer_size);
|
||||||
} cde;
|
} cde;
|
||||||
|
|
||||||
|
int (*chip_init_gpu_characteristics)(struct gk20a *g);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct gk20a {
|
struct gk20a {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* GK20A Tegra HAL interface.
|
* 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
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* 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_debug_ops(gops);
|
||||||
gk20a_init_therm_ops(gops);
|
gk20a_init_therm_ops(gops);
|
||||||
gops->name = "gk20a";
|
gops->name = "gk20a";
|
||||||
|
gops->chip_init_gpu_characteristics = gk20a_init_gpu_characteristics;
|
||||||
|
|
||||||
c->twod_class = FERMI_TWOD_A;
|
c->twod_class = FERMI_TWOD_A;
|
||||||
c->threed_class = KEPLER_C;
|
c->threed_class = KEPLER_C;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* GM20B Graphics
|
* 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
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* 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_cde_ops(gops);
|
||||||
gm20b_init_therm_ops(gops);
|
gm20b_init_therm_ops(gops);
|
||||||
gops->name = "gm20b";
|
gops->name = "gm20b";
|
||||||
|
gops->chip_init_gpu_characteristics = gk20a_init_gpu_characteristics;
|
||||||
|
|
||||||
c->twod_class = FERMI_TWOD_A;
|
c->twod_class = FERMI_TWOD_A;
|
||||||
c->threed_class = MAXWELL_B;
|
c->threed_class = MAXWELL_B;
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ int vgpu_pm_finalize_poweron(struct device *dev)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = gk20a_init_gpu_characteristics(g);
|
err = g->ops.chip_init_gpu_characteristics(g);
|
||||||
if (err) {
|
if (err) {
|
||||||
gk20a_err(dev, "failed to init gk20a gpu characteristics");
|
gk20a_err(dev, "failed to init gk20a gpu characteristics");
|
||||||
goto done;
|
goto done;
|
||||||
|
|||||||
Reference in New Issue
Block a user