summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_mode_config.c
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2020-12-10 16:38:27 +0100
committerPhilipp Zabel <p.zabel@pengutronix.de>2021-01-04 12:59:33 +0100
commitf35a2a99100fbed583efaf07919ef071cd75b059 (patch)
tree05104e1c38ed2c4343a4933b5257ce03101b73ea /drivers/gpu/drm/drm_mode_config.c
parentc2d789fb500cbdb19a48a57451bb402f00996e9f (diff)
drm/encoder: make encoder control functions optional
Simple managed encoders do not require the .destroy callback, make the whole funcs structure optional. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_mode_config.c')
-rw-r--r--drivers/gpu/drm/drm_mode_config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
index f1affc1bb679..e56a7f877f48 100644
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -195,7 +195,7 @@ void drm_mode_config_reset(struct drm_device *dev)
crtc->funcs->reset(crtc);
drm_for_each_encoder(encoder, dev)
- if (encoder->funcs->reset)
+ if (encoder->funcs && encoder->funcs->reset)
encoder->funcs->reset(encoder);
drm_connector_list_iter_begin(dev, &conn_iter);