diff options
author | Alex Waterman <alexw@nvidia.com> | 2014-01-27 19:13:28 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:09:31 -0400 |
commit | 141c9a55c5b46f453e045736d5fac40869d15a85 (patch) | |
tree | 15820b162f9e757f17bc61d3fa4d47060ddc4b2b | |
parent | 81daf427112b1cf092248e2c157140aef62c8633 (diff) |
video: tegra: gpu: provide generic ops interface
This patch adds an interface for the gk20a driver to have
generic ops which are implemented by a chip specific HAL
layer. The HAL layer is provided by the gpu_ops struct which
defines function pointers for chip specific oeprations. This
is necessary for supporting multiple chips with the same
code base and minimal per chip hacking.
Also, since much code is common except in the HW headers
that are needed, the LTC common code is compiled by first
including the necessary chip specific header(s) and then
including the ltc common code file.
This allows for easy updating of functions that are only
different between chips as a result of register offset and
field changes whereas the HAL provides the mechanism for
functions that have actual semantic changes.
Change-Id: I96f9a8350d34e7e101beb141d4521fab69dcfbae
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/360627
(cherry picked from commit fe90cad939cf979fc2516a96e5911bd8ab6fc457)
Reviewed-on: http://git-master/r/362228
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 80f4ea69..0228a0c7 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1657,7 +1657,7 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) | |||
1657 | (mc_boot_0_major_revision_v(mc_boot_0_value) << 4) | | 1657 | (mc_boot_0_major_revision_v(mc_boot_0_value) << 4) | |
1658 | mc_boot_0_minor_revision_v(mc_boot_0_value); | 1658 | mc_boot_0_minor_revision_v(mc_boot_0_value); |
1659 | 1659 | ||
1660 | gpu->L2_cache_size = gk20a_determine_L2_size_bytes(g); | 1660 | gpu->L2_cache_size = g->ops.ltc.determine_L2_size_bytes(g); |
1661 | gpu->on_board_video_memory_size = 0; /* integrated GPU */ | 1661 | gpu->on_board_video_memory_size = 0; /* integrated GPU */ |
1662 | 1662 | ||
1663 | gpu->num_gpc = g->gr.gpc_count; | 1663 | gpu->num_gpc = g->gr.gpc_count; |