From: Dave Airlie <[email protected]>
This gets the crtc state from the current state, instead of
trying to lookup or create a state.
atomic core started warning about this recently.
Fixes: 0a0e79a2d9ed ("drm/atomic: WARN about invalid drm_foo_get_state() usage")
Signed-off-by: Dave Airlie <[email protected]>
---
drivers/gpu/drm/nouveau/dispnv50/atom.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv50/atom.h
b/drivers/gpu/drm/nouveau/dispnv50/atom.h
index 93f8f4f64578..ada8fb6f1a9a 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/atom.h
+++ b/drivers/gpu/drm/nouveau/dispnv50/atom.h
@@ -151,7 +151,7 @@ struct nv50_head_atom {
static inline struct nv50_head_atom *
nv50_head_atom_get(struct drm_atomic_state *state, struct drm_crtc *crtc)
{
- struct drm_crtc_state *statec = drm_atomic_get_crtc_state(state, crtc);
+ struct drm_crtc_state *statec = drm_atomic_get_new_crtc_state(state,
crtc);
if (IS_ERR(statec))
return (void *)statec;
return nv50_head_atom(statec);
--
2.51.1