dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] drm/amd/display: Call into DC once per multiplane flip
@ 2019-02-19  8:11 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-02-19  8:11 UTC (permalink / raw)
  To: David.Francis; +Cc: dri-devel, amd-gfx

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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-02-19  8:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-19  8:11 [bug report] drm/amd/display: Call into DC once per multiplane flip Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox