From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: shirish.s-5C7GfCeVMHo@public.gmane.org
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [bug report] drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)
Date: Thu, 15 Mar 2018 11:28:12 +0300 [thread overview]
Message-ID: <20180315082812.GA17636@mwanda> (raw)
Hello Shirish S,
The patch 36cc549d5986: "drm/amd/display: disable CRTCs with NULL FB
on their primary plane (V2)" from Feb 28, 2018, leads to the
following static checker warning:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4827 dm_atomic_check_plane_state_fb()
error: 'crtc_state' dereferencing possible ERR_PTR()
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
4811 static int dm_atomic_check_plane_state_fb(struct drm_atomic_state *state,
4812 struct drm_crtc *crtc)
4813 {
4814 struct drm_plane *plane;
4815 struct drm_crtc_state *crtc_state;
4816
4817 WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc));
4818
4819 drm_for_each_plane_mask(plane, state->dev, crtc->state->plane_mask) {
4820 struct drm_plane_state *plane_state =
4821 drm_atomic_get_plane_state(state, plane);
4822
4823 if (IS_ERR(plane_state))
4824 return -EDEADLK;
4825
4826 crtc_state = drm_atomic_get_crtc_state(plane_state->state, crtc);
^^^^^^^^^^
4827 if (crtc->primary == plane && crtc_state->active) {
^^^^^^^^^^^^^^^^^^
4828 if (!plane_state->fb)
4829 return -EINVAL;
4830 }
4831 }
4832 return 0;
4833 }
regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
reply other threads:[~2018-03-15 8:28 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=20180315082812.GA17636@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=shirish.s-5C7GfCeVMHo@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.