Commit ed9656fb authored by Ernst Sjöstrand's avatar Ernst Sjöstrand Committed by Alex Deucher

drm/amd/amdgpu: Check stream in amdgpu_dm_commit_planes

Reported by smatch:
amdgpu_dm.c:5637 amdgpu_dm_commit_planes() error: we previously assumed 'acrtc_state->stream' could be null
This seems to be checked for null pretty consistently elsewhere.
Signed-off-by: default avatarErnst Sjöstrand <ernstp@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 70c5350a
...@@ -5671,7 +5671,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, ...@@ -5671,7 +5671,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
} }
/* Update the planes if changed or disable if we don't have any. */ /* Update the planes if changed or disable if we don't have any. */
if (planes_count || acrtc_state->active_planes == 0) { if ((planes_count || acrtc_state->active_planes == 0) &&
acrtc_state->stream) {
if (new_pcrtc_state->mode_changed) { if (new_pcrtc_state->mode_changed) {
bundle->stream_update.src = acrtc_state->stream->src; bundle->stream_update.src = acrtc_state->stream->src;
bundle->stream_update.dst = acrtc_state->stream->dst; bundle->stream_update.dst = acrtc_state->stream->dst;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment