All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: David.Francis-5C7GfCeVMHo@public.gmane.org
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [bug report] drm/amd/display: Call into DC once per multiplane flip
Date: Tue, 5 Feb 2019 11:47:06 +0300	[thread overview]
Message-ID: <20190205084706.GA1197@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: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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

             reply	other threads:[~2019-02-05  8:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05  8:47 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-02-19  8:11 [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=20190205084706.GA1197@kadam \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=David.Francis-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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.