From: "Ernst Sjöstrand" <ernstp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH 4/6] drm/amd/amdgpu: Check stream in amdgpu_dm_commit_planes
Date: Mon, 24 Jun 2019 17:15:42 +0200 [thread overview]
Message-ID: <20190624151544.13934-4-ernstp@gmail.com> (raw)
In-Reply-To: <20190624151544.13934-1-ernstp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Reported by smatch:
amdgpu_dm.c:5637 amdgpu_dm_commit_planes() error: we previously assumed 'acrtc_state->stream' could be null
This seems to be checked for null pretty consistently elsewhere.
Signed-off-by: Ernst Sjöstrand <ernstp@gmail.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 58d7bbc5ada7..360b31a5c028 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5669,7 +5669,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
}
/* Update the planes if changed or disable if we don't have any. */
- if (planes_count || acrtc_state->active_planes == 0) {
+ if ((planes_count || acrtc_state->active_planes == 0) &&
+ acrtc_state->stream) {
if (new_pcrtc_state->mode_changed) {
bundle->stream_update.src = acrtc_state->stream->src;
bundle->stream_update.dst = acrtc_state->stream->dst;
--
2.20.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-06-24 15:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-24 15:15 [PATCH 1/6] drm/amd/amdgpu: Indent AMD_IS_APU properly Ernst Sjöstrand
[not found] ` <20190624151544.13934-1-ernstp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-06-24 15:15 ` [PATCH 2/6] drm/amd/amdgpu: Fix amdgpu_set_pp_od_clk_voltage error check Ernst Sjöstrand
2019-06-24 15:15 ` [PATCH 3/6] drm/amd/amdgpu: amdgpu_hwmon_show_temp: initialize temp Ernst Sjöstrand
2019-06-24 15:15 ` Ernst Sjöstrand [this message]
[not found] ` <20190624151544.13934-4-ernstp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-06-25 18:45 ` [PATCH 4/6] drm/amd/amdgpu: Check stream in amdgpu_dm_commit_planes Kazlauskas, Nicholas
2019-06-24 15:15 ` [PATCH 5/6] drm/amd/amdgpu: Fix style issues in dcn20_resource.c Ernst Sjöstrand
2019-06-24 15:15 ` [PATCH 6/6] drm/amd/amdgpu: sdma_v4_0_start: initialize r Ernst Sjöstrand
[not found] ` <20190624151544.13934-6-ernstp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-06-24 17:44 ` Alex Deucher
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=20190624151544.13934-4-ernstp@gmail.com \
--to=ernstp-re5jqeeqqe8avxtiumwx3w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox