[PATCH] drm: fix oops in drm_atomic_set_crtc_for_connector
Simon Ser
contact at emersion.fr
Sun Nov 15 15:39:07 UTC 2020
crtc can be NULL. connector, extracted from conn_state, can't.
Fixes: e3aae683e861 ("drm: convert drm_atomic_uapi.c to new debug helpers")
Signed-off-by: Simon Ser <contact at emersion.fr>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Sam Ravnborg <sam at ravnborg.org>
---
drivers/gpu/drm/drm_atomic_uapi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 9df7f2a170e3..268bb69c2e2f 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -334,12 +334,12 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
drm_connector_get(conn_state->connector);
conn_state->crtc = crtc;
- drm_dbg_atomic(crtc->dev,
+ drm_dbg_atomic(connector->dev,
"Link [CONNECTOR:%d:%s] state %p to [CRTC:%d:%s]\n",
connector->base.id, connector->name,
conn_state, crtc->base.id, crtc->name);
} else {
- drm_dbg_atomic(crtc->dev,
+ drm_dbg_atomic(connector->dev,
"Link [CONNECTOR:%d:%s] state %p to [NOCRTC]\n",
connector->base.id, connector->name,
conn_state);
--
2.29.2
More information about the dri-devel
mailing list