All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Dillon.Varone@amd.com
Cc: amd-gfx@lists.freedesktop.org
Subject: [bug report] drm/amd/display: Disable MALL SS and messages for PSR supported configs
Date: Mon, 6 Feb 2023 17:20:41 +0300	[thread overview]
Message-ID: <Y+EMucnHeyZgPJY3@kili> (raw)

Hello Dillon Varone,

This is a semi-automatic email about new static checker warnings.

The patch 0bed85e48af1: "drm/amd/display: Disable MALL SS and
messages for PSR supported configs" from Jan 4, 2023, leads to the
following Smatch complaint:

    drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_hwseq.c:257 dcn32_apply_idle_power_optimizations()
    warn: variable dereferenced before check 'dc->current_state' (see line 249)

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_hwseq.c
   248	
   249		for (i = 0; i < dc->current_state->stream_count; i++) {
                                ^^^^^^^^^^^^^^^^^^^
Patch adds unchecked dereference

   250			/* MALL SS messaging is not supported with PSR at this time */
   251			if (dc->current_state->streams[i] != NULL &&
   252					dc->current_state->streams[i]->link->psr_settings.psr_version != DC_PSR_VERSION_UNSUPPORTED)
   253				return false;
   254		}
   255	
   256		if (enable) {
   257			if (dc->current_state) {
                        ^^^^^^^^^^^^^^^^^^^^^^^^
Checked too late.

   258	
   259				/* 1. Check no memory request case for CAB.

regards,
dan carpenter

                 reply	other threads:[~2023-02-06 14:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Y+EMucnHeyZgPJY3@kili \
    --to=error27@gmail.com \
    --cc=Dillon.Varone@amd.com \
    --cc=amd-gfx@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.