From: Dan Carpenter <dan.carpenter@oracle.com>
To: eryk.brol@amd.com
Cc: amd-gfx@lists.freedesktop.org
Subject: [bug report] drm/amd/display: Do full modeset when DSC debugfs is changed
Date: Fri, 4 Dec 2020 18:18:29 +0300 [thread overview]
Message-ID: <X8pTRcVIEnhyFFoX@mwanda> (raw)
Hello Eryk Brol,
This is a semi-automatic email about new static checker warnings.
The patch 115a385c08d8: "drm/amd/display: Do full modeset when DSC
debugfs is changed" from Nov 19, 2020, leads to the following Smatch
complaint:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9335 amdgpu_dm_atomic_check()
warn: variable dereferenced before check 'new_crtc_state' (see line 9318)
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
9317
9318 if (!drm_atomic_crtc_needs_modeset(new_crtc_state) &&
9319 !new_crtc_state->color_mgmt_changed &&
9320 old_crtc_state->vrr_enabled == new_crtc_state->vrr_enabled &&
9321 dm_old_crtc_state->dsc_force_changed == false)
9322 continue;
9323
9324 if (!new_crtc_state->enable)
^^^^^^^^^^^^^^^^^^^^^^
This is already dereferenced
9325 continue;
9326
9327 ret = drm_atomic_add_affected_connectors(state, crtc);
9328 if (ret)
9329 return ret;
9330
9331 ret = drm_atomic_add_affected_planes(state, crtc);
9332 if (ret)
9333 goto fail;
9334
9335 if (dm_old_crtc_state->dsc_force_changed && new_crtc_state)
^^^^^^^^^^^^^^
So hopefully this NULL check can be removed?
9336 new_crtc_state->mode_changed = true;
9337 }
regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next reply other threads:[~2020-12-04 15:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-04 15:18 Dan Carpenter [this message]
2020-12-08 15:54 ` [bug report] drm/amd/display: Do full modeset when DSC debugfs is changed Brol, Eryk
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=X8pTRcVIEnhyFFoX@mwanda \
--to=dan.carpenter@oracle.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=eryk.brol@amd.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox