diff options
| author | Santosh Reddy Galma <galmar@nvidia.com> | 2016-10-04 23:27:05 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-01-16 15:14:50 -0500 |
| commit | 1df65fce9afbcfb7f7d9b10b237b76ac1146b762 (patch) | |
| tree | c418b46f86fbc7c34e31fe77a990d75d6ecbcd85 /include/video | |
| parent | c26520230bcca8d8b4ef7b5b002b168764684b68 (diff) | |
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 <galmar@nvidia.com>
Reviewed-on: http://git-master/r/1231688
Reviewed-by: Ujwal Patel <ujwalp@nvidia.com>
Tested-by: Ujwal Patel <ujwalp@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Diffstat (limited to 'include/video')
| -rw-r--r-- | include/video/tegra_dc_ext.h | 2 | ||||
| -rw-r--r-- | include/video/tegra_dc_ext_kernel.h | 8 |
2 files changed, 2 insertions, 8 deletions
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 { | |||
| 408 | __u64 __user session_id_ptr; /* out - ptr to unsigned 64-bit val */ | 408 | __u64 __user session_id_ptr; /* out - ptr to unsigned 64-bit val */ |
| 409 | __u64 reserved[4]; /* reserved - must be 0 */ | 409 | __u64 reserved[4]; /* reserved - must be 0 */ |
| 410 | }; | 410 | }; |
| 411 | #undef TEGRA_DC_EXT_N_WINDOWS | ||
| 412 | #undef TEGRA_DC_EXT_N_HEADS | ||
| 413 | 411 | ||
| 414 | /* | 412 | /* |
| 415 | * Variable settings is a pointer to tegra_dc_ext_imp_settings. | 413 | * 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 @@ | |||
| 20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
| 21 | #include <drm/drm_fixed.h> | 21 | #include <drm/drm_fixed.h> |
| 22 | 22 | ||
| 23 | #if defined(CONFIG_TEGRA_NVDISPLAY) | ||
| 24 | #define TEGRA_MAX_DC 3 | ||
| 25 | #else | ||
| 26 | #define TEGRA_MAX_DC 2 | ||
| 27 | #endif | ||
| 28 | |||
| 29 | #if defined(CONFIG_ARCH_TEGRA_14x_SOC) | 23 | #if defined(CONFIG_ARCH_TEGRA_14x_SOC) |
| 30 | #define DC_N_WINDOWS 6 | 24 | #define DC_N_WINDOWS 6 |
| 31 | #elif defined(CONFIG_ARCH_TEGRA_12x_SOC) || defined(CONFIG_ARCH_TEGRA_21x_SOC) | 25 | #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); | |||
| 190 | int tegra_dc_bandwidth_negotiate_bw(struct tegra_dc *dc, | 184 | int tegra_dc_bandwidth_negotiate_bw(struct tegra_dc *dc, |
| 191 | struct tegra_dc_win *windows[], int n); | 185 | struct tegra_dc_win *windows[], int n); |
| 192 | #endif | 186 | #endif |
| 187 | int tegra_dc_get_numof_dispheads(void); | ||
| 188 | int tegra_dc_get_numof_dispwindows(void); | ||
| 193 | 189 | ||
| 194 | /* needed by tegra-throughput */ | 190 | /* needed by tegra-throughput */ |
| 195 | int tegra_dc_set_flip_callback(void (*callback)(void)); | 191 | int tegra_dc_set_flip_callback(void (*callback)(void)); |
