All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: David.Francis@amd.com
Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Subject: [bug report] drm/amd/display: Call into DC once per multiplane flip
Date: Tue, 19 Feb 2019 11:11:12 +0300	[thread overview]
Message-ID: <20190219081112.GA28930@kadam> (raw)

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

             reply	other threads:[~2019-02-19  8:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19  8:11 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-02-05  8:47 [bug report] drm/amd/display: Call into DC once per multiplane flip Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190219081112.GA28930@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=David.Francis@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.