blob: 1c21d8f3858c9542be78c6c9ab22cd534e289181 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
From 5be62339a7442f02b7de212ba9dcfb55c1166119 Mon Sep 17 00:00:00 2001
From: Jerry Zuo <Jerry.Zuo@amd.com>
Date: Thu, 5 Oct 2017 15:37:46 -0400
Subject: [PATCH 2557/4131] drm/amd/display: Fix a logic defect in cursor move
Regression caused by: Ib98354194d7
Need to check crtc->stream before updating cursor attributes
and position.
Signed-off-by: Jerry Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
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 a64321b..a1caae0 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -3943,14 +3943,15 @@ static void handle_cursor_update(struct drm_plane *plane,
attributes.pitch = attributes.width;
- if (!dc_stream_set_cursor_attributes(crtc_state->stream,
- &attributes))
- DRM_ERROR("DC failed to set cursor attributes\n");
+ if (crtc_state->stream) {
+ if (!dc_stream_set_cursor_attributes(crtc_state->stream,
+ &attributes))
+ DRM_ERROR("DC failed to set cursor attributes\n");
- if (crtc_state->stream)
if (!dc_stream_set_cursor_position(crtc_state->stream,
&position))
DRM_ERROR("DC failed to set cursor position\n");
+ }
}
static void prepare_flip_isr(struct amdgpu_crtc *acrtc)
--
2.7.4
|