[bug report] drm/amd/display: Call into DC once per multiplane flip

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:4763 amdgpu_dm_commit_planes()
    warn: variable dereferenced before check 'acrtc_state->stream' (see line 4748)

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
  4747	
  4748				stream_status = dc_stream_get_status(acrtc_state->stream);
                                                                     ^^^^^^^^^^^^^^^^^^^
New unchecked dereference inside function.

  4749				if (!stream_status) {
  4750					DRM_ERROR("No stream status for CRTC: id=%d\n",
  4751							acrtc_attach->crtc_id);
  4752					continue;
  4753				}
  4754	
  4755				surface = stream_status->plane_states[0];
  4756				flip->surface_updates[flip_count].surface = surface;
  4757				if (!flip->surface_updates[flip_count].surface) {
  4758					DRM_ERROR("No surface for CRTC: id=%d\n",
  4759							acrtc_attach->crtc_id);
  4760					continue;
  4761				}
  4762	
  4763				if (acrtc_state->stream)
                                    ^^^^^^^^^^^^^^^^^^^
New check is too late.

  4764					update_freesync_state_on_stream(
  4765						dm,

regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux