]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/5.0.15/drm-amd-display-fix-cursor-black-issue.patch
Linux 5.0.15
[thirdparty/kernel/stable-queue.git] / releases / 5.0.15 / drm-amd-display-fix-cursor-black-issue.patch
1 From 2d0f06f33938395f6eb92bc74097838998676e46 Mon Sep 17 00:00:00 2001
2 From: tiancyin <tianci.yin@amd.com>
3 Date: Mon, 1 Apr 2019 10:15:31 +0800
4 Subject: drm/amd/display: fix cursor black issue
5
6 [ Upstream commit c1cefe115d1cdc460014483319d440b2f0d07c68 ]
7
8 [Why]
9 the member sdr_white_level of struct dc_cursor_attributes was not
10 initialized, then the random value result that
11 dcn10_set_cursor_sdr_white_level() set error hw_scale value 0x20D9(normal
12 value is 0x3c00), this cause the black cursor issue.
13
14 [how]
15 just initilize the obj of struct dc_cursor_attributes to zero to avoid
16 the random value.
17
18 Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
19 Signed-off-by: Tianci Yin <tianci.yin@amd.com>
20 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
21 Signed-off-by: Sasha Levin <sashal@kernel.org>
22 ---
23 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
24 1 file changed, 1 insertion(+)
25
26 diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
27 index 83c8a0407537b..84ee777869441 100644
28 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
29 +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
30 @@ -4455,6 +4455,7 @@ static void handle_cursor_update(struct drm_plane *plane,
31 amdgpu_crtc->cursor_width = plane->state->crtc_w;
32 amdgpu_crtc->cursor_height = plane->state->crtc_h;
33
34 + memset(&attributes, 0, sizeof(attributes));
35 attributes.address.high_part = upper_32_bits(address);
36 attributes.address.low_part = lower_32_bits(address);
37 attributes.width = plane->state->crtc_w;
38 --
39 2.20.1
40