summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
diff options
context:
space:
mode:
authorJerry Zuo <Jerry.Zuo@amd.com>2017-10-05 15:37:46 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-10-21 16:49:23 -0400
commit886daac91d4c794fa76a0e5cf1101bdb329f3fe3 (patch)
tree749352990cda1d942e7bed57456ae3a0fe102133 /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
parent3411eac1a144ac5ad5a7ab994645724130bb2996 (diff)
downloadtalos-op-linux-886daac91d4c794fa76a0e5cf1101bdb329f3fe3.tar.gz
talos-op-linux-886daac91d4c794fa76a0e5cf1101bdb329f3fe3.zip
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> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c')
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c9
1 files 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 8653453566b8..17fb636648f4 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -3736,14 +3736,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)
OpenPOWER on IntegriCloud