aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/4326-drm-amd-display-Implement-VEGAM-device-IDs-in-DC.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/4326-drm-amd-display-Implement-VEGAM-device-IDs-in-DC.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/4326-drm-amd-display-Implement-VEGAM-device-IDs-in-DC.patch240
1 files changed, 240 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/4326-drm-amd-display-Implement-VEGAM-device-IDs-in-DC.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/4326-drm-amd-display-Implement-VEGAM-device-IDs-in-DC.patch
new file mode 100644
index 00000000..ecec65c8
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/4326-drm-amd-display-Implement-VEGAM-device-IDs-in-DC.patch
@@ -0,0 +1,240 @@
+From fad0868d548991bf4e56db2a62a69e5975e89926 Mon Sep 17 00:00:00 2001
+From: "Jerry (Fangzhi) Zuo" <Jerry.Zuo@amd.com>
+Date: Wed, 11 Apr 2018 15:39:35 -0500
+Subject: [PATCH 4326/5725] drm/amd/display: Implement VEGAM device IDs in DC
+
+Implement device IDs for VEGAM
+
+Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Harry Wentland <harry.wentland@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Kalyan Alle <kalyan.alle@amd.com>
+---
+ drivers/gpu/drm/amd/display/Kconfig | 7 +++++++
+ drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c | 3 +++
+ drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c | 3 +++
+ drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 9 +++++++++
+ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 7 +++++++
+ drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 6 ++++++
+ drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 3 +++
+ drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 3 +++
+ drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 3 +++
+ drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h | 3 +++
+ drivers/gpu/drm/amd/display/include/dal_asic_id.h | 7 +++++++
+ drivers/gpu/drm/amd/display/include/dal_types.h | 3 +++
+ 12 files changed, 57 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/display/Kconfig b/drivers/gpu/drm/amd/display/Kconfig
+index c3d49f8..e5b309f 100644
+--- a/drivers/gpu/drm/amd/display/Kconfig
++++ b/drivers/gpu/drm/amd/display/Kconfig
+@@ -34,4 +34,11 @@ config DEBUG_KERNEL_DC
+ if you want to hit
+ kdgb_break in assert.
+
+++config DRM_AMD_DC_VEGAM
++ bool "VEGAM support"
++ depends on DRM_AMD_DC
++ help
++ Choose this option if you want to have
++ VEGAM support for display engine
++
+ endmenu
+diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c
+index 2979358..be066c4 100644
+--- a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c
++++ b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c
+@@ -51,6 +51,9 @@ bool dal_bios_parser_init_cmd_tbl_helper(
+ return true;
+
+ case DCE_VERSION_11_2:
++#if defined(CONFIG_DRM_AMD_DC_VEGAM)
++ case DCE_VERSION_11_22:
++#endif
+ *h = dal_cmd_tbl_helper_dce112_get_table();
+ return true;
+
+diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c
+index 9a4d30d..9b9e069 100644
+--- a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c
++++ b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c
+@@ -52,6 +52,9 @@ bool dal_bios_parser_init_cmd_tbl_helper2(
+ return true;
+
+ case DCE_VERSION_11_2:
++#if defined(CONFIG_DRM_AMD_DC_VEGAM)
++ case DCE_VERSION_11_22:
++#endif
+ *h = dal_cmd_tbl_helper_dce112_get_table2();
+ return true;
+ #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
+diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
+index 56f46a0..4ee3c26 100644
+--- a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
++++ b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
+@@ -59,6 +59,10 @@ static enum bw_calcs_version bw_calcs_version_from_asic_id(struct hw_asic_id asi
+ return BW_CALCS_VERSION_POLARIS10;
+ if (ASIC_REV_IS_POLARIS11_M(asic_id.hw_internal_rev))
+ return BW_CALCS_VERSION_POLARIS11;
++#if defined(CONFIG_DRM_AMD_DC_VEGAM)
++ if (ASIC_REV_IS_VEGAM(asic_id.hw_internal_rev))
++ return BW_CALCS_VERSION_VEGAM;
++#endif
+ return BW_CALCS_VERSION_INVALID;
+
+ case FAMILY_AI:
+@@ -2147,6 +2151,11 @@ void bw_calcs_init(struct bw_calcs_dceip *bw_dceip,
+ dceip.mcifwr_all_surfaces_burst_time = bw_int_to_fixed(0); /* todo: this is a bug*/
+ break;
+ case BW_CALCS_VERSION_POLARIS10:
++#if defined(CONFIG_DRM_AMD_DC_VEGAM)
++ /* TODO: Treat VEGAM the same as P10 for now
++ * Need to tune the para for VEGAM if needed */
++ case BW_CALCS_VERSION_VEGAM:
++#endif
+ vbios.memory_type = bw_def_gddr5;
+ vbios.dram_channel_width_in_bits = 32;
+ vbios.number_of_dram_channels = asic_id.vram_width / vbios.dram_channel_width_in_bits;
+diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+index 7f79258..ad41b64 100644
+--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+@@ -79,6 +79,10 @@ enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id)
+ ASIC_REV_IS_POLARIS12_V(asic_id.hw_internal_rev)) {
+ dc_version = DCE_VERSION_11_2;
+ }
++#if defined(CONFIG_DRM_AMD_DC_VEGAM)
++ if (ASIC_REV_IS_VEGAM(asic_id.hw_internal_rev))
++ dc_version = DCE_VERSION_11_22;
++#endif
+ break;
+ case FAMILY_AI:
+ dc_version = DCE_VERSION_12_0;
+@@ -125,6 +129,9 @@ struct resource_pool *dc_create_resource_pool(
+ num_virtual_links, dc, asic_id);
+ break;
+ case DCE_VERSION_11_2:
++#if defined(CONFIG_DRM_AMD_DC_VEGAM)
++ case DCE_VERSION_11_22:
++#endif
+ res_pool = dce112_create_resource_pool(
+ num_virtual_links, dc);
+ break;
+diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
+index 67dad7f..223db98 100644
+--- a/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
++++ b/drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
+@@ -590,6 +590,9 @@ static uint32_t dce110_get_pix_clk_dividers(
+ pll_settings, pix_clk_params);
+ break;
+ case DCE_VERSION_11_2:
++#if defined(CONFIG_DRM_AMD_DC_VEGAM)
++ case DCE_VERSION_11_22:
++#endif
+ case DCE_VERSION_12_0:
+ #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
+ case DCN_VERSION_1_0:
+@@ -979,6 +982,9 @@ static bool dce110_program_pix_clk(
+
+ break;
+ case DCE_VERSION_11_2:
++#if defined(CONFIG_DRM_AMD_DC_VEGAM)
++ case DCE_VERSION_11_22:
++#endif
+ case DCE_VERSION_12_0:
+ #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
+ case DCN_VERSION_1_0:
+diff --git a/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c b/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c
+index 87b580f..61fe484 100644
+--- a/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c
++++ b/drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c
+@@ -75,6 +75,9 @@ bool dal_hw_factory_init(
+ return true;
+ case DCE_VERSION_11_0:
+ case DCE_VERSION_11_2:
++#if defined(CONFIG_DRM_AMD_DC_VEGAM)
++ case DCE_VERSION_11_22:
++#endif
+ dal_hw_factory_dce110_init(factory);
+ return true;
+ case DCE_VERSION_12_0:
+diff --git a/drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c b/drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c
+index 0ae8ace..910ae2b7 100644
+--- a/drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c
++++ b/drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c
+@@ -72,6 +72,9 @@ bool dal_hw_translate_init(
+ case DCE_VERSION_10_0:
+ case DCE_VERSION_11_0:
+ case DCE_VERSION_11_2:
++#if defined(CONFIG_DRM_AMD_DC_VEGAM)
++ case DCE_VERSION_11_22:
++#endif
+ dal_hw_translate_dce110_init(translate);
+ return true;
+ case DCE_VERSION_12_0:
+diff --git a/drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c b/drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c
+index 5cbf662..c3d7c32 100644
+--- a/drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c
++++ b/drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c
+@@ -83,6 +83,9 @@ struct i2caux *dal_i2caux_create(
+ case DCE_VERSION_8_3:
+ return dal_i2caux_dce80_create(ctx);
+ case DCE_VERSION_11_2:
++#if defined(CONFIG_DRM_AMD_DC_VEGAM)
++ case DCE_VERSION_11_22:
++#endif
+ return dal_i2caux_dce112_create(ctx);
+ case DCE_VERSION_11_0:
+ return dal_i2caux_dce110_create(ctx);
+diff --git a/drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h b/drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h
+index 0bd87f2..933ea7a 100644
+--- a/drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h
++++ b/drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h
+@@ -43,6 +43,9 @@ enum bw_calcs_version {
+ BW_CALCS_VERSION_POLARIS10,
+ BW_CALCS_VERSION_POLARIS11,
+ BW_CALCS_VERSION_POLARIS12,
++#if defined(CONFIG_DRM_AMD_DC_VEGAM)
++ BW_CALCS_VERSION_VEGAM,
++#endif
+ BW_CALCS_VERSION_STONEY,
+ BW_CALCS_VERSION_VEGA10
+ };
+diff --git a/drivers/gpu/drm/amd/display/include/dal_asic_id.h b/drivers/gpu/drm/amd/display/include/dal_asic_id.h
+index 9831cb5..3e8e535 100644
+--- a/drivers/gpu/drm/amd/display/include/dal_asic_id.h
++++ b/drivers/gpu/drm/amd/display/include/dal_asic_id.h
+@@ -98,7 +98,14 @@
+ (eChipRev < VI_POLARIS11_M_A0))
+ #define ASIC_REV_IS_POLARIS11_M(eChipRev) ((eChipRev >= VI_POLARIS11_M_A0) && \
+ (eChipRev < VI_POLARIS12_V_A0))
++#if defined(CONFIG_DRM_AMD_DC_VEGAM)
++#define VI_VEGAM_A0 110
++#define ASIC_REV_IS_POLARIS12_V(eChipRev) ((eChipRev >= VI_POLARIS12_V_A0) && \
++ (eChipRev < VI_VEGAM_A0))
++#define ASIC_REV_IS_VEGAM(eChipRev) (eChipRev >= VI_VEGAM_A0)
++#else
+ #define ASIC_REV_IS_POLARIS12_V(eChipRev) (eChipRev >= VI_POLARIS12_V_A0)
++#endif
+
+ /* DCE11 */
+ #define CZ_CARRIZO_A0 0x01
+diff --git a/drivers/gpu/drm/amd/display/include/dal_types.h b/drivers/gpu/drm/amd/display/include/dal_types.h
+index fa54396..5b1f8ce 100644
+--- a/drivers/gpu/drm/amd/display/include/dal_types.h
++++ b/drivers/gpu/drm/amd/display/include/dal_types.h
+@@ -40,6 +40,9 @@ enum dce_version {
+ DCE_VERSION_10_0,
+ DCE_VERSION_11_0,
+ DCE_VERSION_11_2,
++#if defined(CONFIG_DRM_AMD_DC_VEGAM)
++ DCE_VERSION_11_22,
++#endif
+ DCE_VERSION_12_0,
+ DCE_VERSION_MAX,
+ DCN_VERSION_1_0,
+--
+2.7.4
+