mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
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>
This commit is contained in:
committed by
Dan Willemsen
parent
81daf42711
commit
141c9a55c5
@@ -1657,7 +1657,7 @@ int gk20a_init_gpu_characteristics(struct gk20a *g)
|
||||
(mc_boot_0_major_revision_v(mc_boot_0_value) << 4) |
|
||||
mc_boot_0_minor_revision_v(mc_boot_0_value);
|
||||
|
||||
gpu->L2_cache_size = gk20a_determine_L2_size_bytes(g);
|
||||
gpu->L2_cache_size = g->ops.ltc.determine_L2_size_bytes(g);
|
||||
gpu->on_board_video_memory_size = 0; /* integrated GPU */
|
||||
|
||||
gpu->num_gpc = g->gr.gpc_count;
|
||||
|
||||
Reference in New Issue
Block a user