[bug report] drm/amd/display: Call into DC once per multiplane flip
Dan Carpenter
dan.carpenter at oracle.com
Tue Feb 19 08:11:12 UTC 2019
Hello David Francis,
This is a semi-automatic email about new static checker warnings.
The patch 8a48b44cd00f: "drm/amd/display: Call into DC once per
multiplane flip" from Dec 11, 2018, leads to the following Smatch
complaint:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4845 amdgpu_dm_commit_planes()
error: we previously assumed 'acrtc_state->stream' could be null (see line 4833)
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
4832
4833 if (acrtc_state->stream) {
^^^^^^^^^^^^^^^^^^^
Check for NULL
4834
4835 if (acrtc_state->freesync_timing_changed)
4836 flip->stream_update.adjust =
4837 &acrtc_state->stream->adjust;
4838
4839 if (acrtc_state->freesync_vrr_info_changed)
4840 flip->stream_update.vrr_infopacket =
4841 &acrtc_state->stream->vrr_infopacket;
4842 }
4843
4844 mutex_lock(&dm->dc_lock);
4845 dc_commit_updates_for_stream(dm->dc,
4846 flip->surface_updates,
4847 flip_count,
4848 acrtc_state->stream,
^^^^^^^^^^^^^^^^^^^
Unchecked dereference. Also the indenting is weird.
4849 &flip->stream_update,
4850 dc_state);
4851 mutex_unlock(&dm->dc_lock);
4852 }
4853
4854 if (planes_count) {
regards,
dan carpenter
More information about the amd-gfx
mailing list