* [bug report] drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2)
@ 2018-03-15 8:28 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2018-03-15 8:28 UTC (permalink / raw)
To: shirish.s-5C7GfCeVMHo; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-15 8:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-15 8:28 [bug report] drm/amd/display: disable CRTCs with NULL FB on their primary plane (V2) Dan Carpenter
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.