From 1df65fce9afbcfb7f7d9b10b237b76ac1146b762 Mon Sep 17 00:00:00 2001 From: Santosh Reddy Galma Date: Wed, 5 Oct 2016 08:57:05 +0530 Subject: video: tegra: read and use display hw data runtime currently, TEGRA_MAX_DC and DC_N_WINDOWS macros are used to represent number of display heads, windows based on chip config. This change does following to support multiple SOCs on a single binary. - use tegra_dc_hw_data data structure and populate it based on the chip compatible field. - expose API's to read number of display heads, windows for other modules. - use the above data structure fields or API's in place of macros in display drivers and other modules like fb,ext,screen capture. - remove TEGRA_MAX_DC macro usage completely. - make runtime alloc for data structures which were using static alloc previously based on macros at compile time. - code re-organization and cleanup with above change. TDS-1305 TDS-1301 TDS-1408 TDS-1307 Change-Id: Ief70aa7fdac420a7a8375fe91dfae58116d3eb6e Signed-off-by: Santosh Reddy Galma Reviewed-on: http://git-master/r/1231688 Reviewed-by: Ujwal Patel Tested-by: Ujwal Patel Reviewed-by: svccoveritychecker --- include/video/tegra_dc_ext.h | 2 -- include/video/tegra_dc_ext_kernel.h | 8 ++------ 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'include/video') diff --git a/include/video/tegra_dc_ext.h b/include/video/tegra_dc_ext.h index 8e57d77fa..7099ea4b8 100644 --- a/include/video/tegra_dc_ext.h +++ b/include/video/tegra_dc_ext.h @@ -408,8 +408,6 @@ struct tegra_dc_ext_imp_settings { __u64 __user session_id_ptr; /* out - ptr to unsigned 64-bit val */ __u64 reserved[4]; /* reserved - must be 0 */ }; -#undef TEGRA_DC_EXT_N_WINDOWS -#undef TEGRA_DC_EXT_N_HEADS /* * Variable settings is a pointer to tegra_dc_ext_imp_settings. diff --git a/include/video/tegra_dc_ext_kernel.h b/include/video/tegra_dc_ext_kernel.h index 44ab3a232..5d8cebe28 100644 --- a/include/video/tegra_dc_ext_kernel.h +++ b/include/video/tegra_dc_ext_kernel.h @@ -20,12 +20,6 @@ #include #include -#if defined(CONFIG_TEGRA_NVDISPLAY) -#define TEGRA_MAX_DC 3 -#else -#define TEGRA_MAX_DC 2 -#endif - #if defined(CONFIG_ARCH_TEGRA_14x_SOC) #define DC_N_WINDOWS 6 #elif defined(CONFIG_ARCH_TEGRA_12x_SOC) || defined(CONFIG_ARCH_TEGRA_21x_SOC) @@ -190,6 +184,8 @@ struct tegra_dc *tegra_dc_get_dc(unsigned idx); int tegra_dc_bandwidth_negotiate_bw(struct tegra_dc *dc, struct tegra_dc_win *windows[], int n); #endif +int tegra_dc_get_numof_dispheads(void); +int tegra_dc_get_numof_dispwindows(void); /* needed by tegra-throughput */ int tegra_dc_set_flip_callback(void (*callback)(void)); -- cgit v1.2.2