aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2454-drm-amd-display-Hook-DCN2-into-amdgpu_dm-and-expose-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2454-drm-amd-display-Hook-DCN2-into-amdgpu_dm-and-expose-.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2454-drm-amd-display-Hook-DCN2-into-amdgpu_dm-and-expose-.patch100
1 files changed, 100 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2454-drm-amd-display-Hook-DCN2-into-amdgpu_dm-and-expose-.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2454-drm-amd-display-Hook-DCN2-into-amdgpu_dm-and-expose-.patch
new file mode 100644
index 00000000..c04f6914
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2454-drm-amd-display-Hook-DCN2-into-amdgpu_dm-and-expose-.patch
@@ -0,0 +1,100 @@
+From 03f01043e98a7a82d28ee59b1cedde9ee73c4d70 Mon Sep 17 00:00:00 2001
+From: Harry Wentland <harry.wentland@amd.com>
+Date: Fri, 22 Feb 2019 16:52:52 -0500
+Subject: [PATCH 2454/2940] drm/amd/display: Hook DCN2 into amdgpu_dm and
+ expose as config (v2)
+
+Enable DCN2 support in DM (Display Manager).
+
+v2: fix spurious raven change (Alex)
+
+Signed-off-by: Harry Wentland <harry.wentland@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/Kconfig | 9 +++++++++
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 ++++++++++++++
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 2 +-
+ 3 files changed, 24 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/display/Kconfig b/drivers/gpu/drm/amd/display/Kconfig
+index ed654a76c76a..a2eba0d6a55f 100644
+--- a/drivers/gpu/drm/amd/display/Kconfig
++++ b/drivers/gpu/drm/amd/display/Kconfig
+@@ -15,6 +15,15 @@ config DRM_AMD_DC_DCN1_0
+ help
+ RV family support for display engine
+
++config DRM_AMD_DC_DCN2_0
++ bool "DCN 2.0 family"
++ default y
++ depends on DRM_AMD_DC && X86
++ depends on DRM_AMD_DC_DCN1_0
++ help
++ Choose this option if you want to have
++ Navi support for display engine
++
+ config DEBUG_KERNEL_DC
+ bool "Enable kgdb break in DC"
+ depends on DRM_AMD_DC
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+index b5ca4e99561e..980d03046d69 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -664,6 +664,7 @@ static int load_dmcu_fw(struct amdgpu_device *adev)
+ case CHIP_VEGA10:
+ case CHIP_VEGA12:
+ case CHIP_VEGA20:
++ case CHIP_NAVI10:
+ return 0;
+ case CHIP_RAVEN:
+ if (ASICREV_IS_PICASSO(adev->external_rev_id))
+@@ -2210,6 +2211,9 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
+ #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
+ case CHIP_RAVEN:
+ case CHIP_PICASSO:
++#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
++ case CHIP_NAVI10:
++#endif
+ if (dcn10_register_irq_handlers(dm->adev)) {
+ DRM_ERROR("DM: Failed to initialize IRQ\n");
+ goto fail;
+@@ -2448,6 +2452,13 @@ static int dm_early_init(void *handle)
+ adev->mode_info.num_hpd = 4;
+ adev->mode_info.num_dig = 4;
+ break;
++#endif
++#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
++ case CHIP_NAVI10:
++ adev->mode_info.num_crtc = 6;
++ adev->mode_info.num_hpd = 6;
++ adev->mode_info.num_dig = 6;
++ break;
+ #endif
+ default:
+ DRM_ERROR("Unsupported ASIC type: 0x%X\n", adev->asic_type);
+@@ -2741,6 +2752,9 @@ fill_plane_buffer_attributes(struct amdgpu_device *adev,
+ if (adev->asic_type == CHIP_VEGA10 ||
+ adev->asic_type == CHIP_VEGA12 ||
+ adev->asic_type == CHIP_VEGA20 ||
++#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
++ adev->asic_type == CHIP_NAVI10 ||
++#endif
+ adev->asic_type == CHIP_RAVEN) {
+ /* Fill GFX9 params */
+ tiling_info->gfx9.num_pipes =
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
+index 7258c992a2bf..75b6a2ac910b 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
+@@ -166,7 +166,7 @@ int amdgpu_dm_set_regamma_lut(struct dm_crtc_state *crtc)
+ */
+ stream->out_transfer_func->type = TF_TYPE_DISTRIBUTED_POINTS;
+ ret = mod_color_calculate_regamma_params(stream->out_transfer_func,
+- gamma, true, adev->asic_type <= CHIP_RAVEN, NULL);
++ gamma, true, adev->asic_type <= CHIP_NAVI10, NULL);
+
+ if (gamma)
+ dc_gamma_release(&gamma);
+--
+2.17.1
+