From b252653ac5f2b12a9a84476f9dde6a844a77a602 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 28 Sep 2017 10:34:27 -0700 Subject: gpu: nvgpu: Move rest of CDE structures to Linux Move rest of CDE structures to common/linux. This includes moving the per-chip firmware file interpretation functions, and removing CDE ops from HAL and adding it to nvgpu_os_linux. JIRA NVGPU-259 Change-Id: I59d8f44bddadecef81ad3c455b363a14034c5e13 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1570403 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/os_linux.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'drivers/gpu/nvgpu/common/linux/os_linux.h') diff --git a/drivers/gpu/nvgpu/common/linux/os_linux.h b/drivers/gpu/nvgpu/common/linux/os_linux.h index c67cbbcc..27433e32 100644 --- a/drivers/gpu/nvgpu/common/linux/os_linux.h +++ b/drivers/gpu/nvgpu/common/linux/os_linux.h @@ -24,6 +24,21 @@ #include "gk20a/gk20a.h" #include "cde.h" +struct nvgpu_os_linux_ops { + struct { + void (*get_program_numbers)(struct gk20a *g, + u32 block_height_log2, + u32 shader_parameter, + int *hprog, int *vprog); + bool (*need_scatter_buffer)(struct gk20a *g); + int (*populate_scatter_buffer)(struct gk20a *g, + struct sg_table *sgt, + size_t surface_size, + void *scatter_buffer_ptr, + size_t scatter_buffer_size); + } cde; +}; + struct nvgpu_os_linux { struct gk20a g; struct device *dev; @@ -99,6 +114,9 @@ struct nvgpu_os_linux { #ifdef CONFIG_TEGRA_19x_GPU struct nvgpu_os_linux_t19x t19x; #endif + + struct nvgpu_os_linux_ops ops; + #ifdef CONFIG_DEBUG_FS struct dentry *debugfs; struct dentry *debugfs_alias; -- cgit v1.2.2