diff options
Diffstat (limited to 'common/recipes-kernel/linux/files/0544-drm-amd-dal-fix-pflip-issue-with-mst-displays.patch')
-rw-r--r-- | common/recipes-kernel/linux/files/0544-drm-amd-dal-fix-pflip-issue-with-mst-displays.patch | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0544-drm-amd-dal-fix-pflip-issue-with-mst-displays.patch b/common/recipes-kernel/linux/files/0544-drm-amd-dal-fix-pflip-issue-with-mst-displays.patch new file mode 100644 index 00000000..f95d8e27 --- /dev/null +++ b/common/recipes-kernel/linux/files/0544-drm-amd-dal-fix-pflip-issue-with-mst-displays.patch @@ -0,0 +1,85 @@ +From f69f9d619521f1698cc38e1a3324497fc858c786 Mon Sep 17 00:00:00 2001 +From: Mykola Lysenko <Mykola.Lysenko@amd.com> +Date: Tue, 1 Dec 2015 18:46:42 +0800 +Subject: [PATCH 0544/1110] drm/amd/dal: fix pflip issue with mst displays + +There is no correspondance between link and crtc indexes anymore + +Signed-off-by: Harry Wentland <harry.wentland@amd.com> +Acked-by: Harry Wentland <harry.wentland@amd.com> +--- + drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c | 40 +++++++++++++++++++-------- + 1 file changed, 29 insertions(+), 11 deletions(-) + +diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c +index 37810ff..a414586 100644 +--- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c +@@ -349,7 +349,30 @@ static int dm_soft_reset(void *handle) + return 0; + } + ++static struct amdgpu_crtc *get_crtc_by_target( ++ struct amdgpu_device *adev, ++ const struct dc_target *dc_target) ++{ ++ struct drm_device *dev = adev->ddev; ++ struct drm_crtc *crtc; ++ struct amdgpu_crtc *amdgpu_crtc; + ++ /* ++ * following if is check inherited from both functions where this one is ++ * used now. Need to be checked why it could happen. ++ */ ++ if (dc_target == NULL) ++ return adev->mode_info.crtcs[0]; ++ ++ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { ++ amdgpu_crtc = to_amdgpu_crtc(crtc); ++ ++ if (amdgpu_crtc->target == dc_target) ++ return amdgpu_crtc; ++ } ++ ++ return NULL; ++} + + static void dm_pflip_high_irq(void *interrupt_params) + { +@@ -361,13 +384,8 @@ static void dm_pflip_high_irq(void *interrupt_params) + const struct dc *dc = irq_params->adev->dm.dc; + const struct dc_target *dc_target = + dc_get_target_on_irq_source(dc, irq_params->irq_src); +- uint8_t link_index = 0; +- +- /* TODO: #flip address all tags together*/ +- if (dc_target != NULL) +- link_index = dc_target_get_link_index(dc_target); + +- amdgpu_crtc= adev->mode_info.crtcs[link_index]; ++ amdgpu_crtc = get_crtc_by_target(adev, dc_target); + + /* IRQ could occur when in initial stage */ + if(amdgpu_crtc == NULL) +@@ -408,13 +426,13 @@ static void dm_crtc_high_irq(void *interrupt_params) + const struct dc *dc = irq_params->adev->dm.dc; + const struct dc_target *dc_target = + dc_get_target_on_irq_source(dc, irq_params->irq_src); +- uint8_t link_index = 0; ++ uint8_t crtc_index = 0; ++ struct amdgpu_crtc *acrtc = get_crtc_by_target(adev, dc_target); + +- /* TODO: #flip fix all tags together*/ +- if (dc_target != NULL) +- link_index = dc_target_get_link_index(dc_target); ++ if (acrtc) ++ crtc_index = acrtc->crtc_id; + +- drm_handle_vblank(adev->ddev, link_index); ++ drm_handle_vblank(adev->ddev, crtc_index); + + } + +-- +2.7.4 + |