diff options
author | Thierry Reding <[email protected]> | 2015-11-16 18:19:53 +0100 |
---|---|---|
committer | Daniel Vetter <[email protected]> | 2016-01-13 13:30:53 +0100 |
commit | eb47fe8033d6c2013ce47ec44f39fa0092aa8551 (patch) | |
tree | ed1c06cf3f002c6f2ba3dbe9ad853c38e6f598e2 /drivers/gpu/drm/i2c/tda998x_drv.c | |
parent | 3d7b75fdae9c81dd71c7573dbc285af90e0924fa (diff) |
drm: Do not set connector->encoder in drivers
An encoder is associated with a connector by the DRM core as a result of
setting up a configuration. Drivers using the atomic or legacy helpers
should never set up this link, even if it is a static one.
While at it, try to catch this kind of error in the future by adding a
WARN_ON() in drm_mode_connector_attach_encoder(). Note that this doesn't
cover all the cases, since drivers could set this up after attaching.
Drivers that use the atomic helpers will get a warning later on, though,
so hopefully the two combined cover enough to help people avoid this in
the future.
Cc: Russell King <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Liviu Dudau <[email protected]>
Cc: Mark yao <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/i2c/tda998x_drv.c')
-rw-r--r-- | drivers/gpu/drm/i2c/tda998x_drv.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index a46248f0c9c3..7885859b6386 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -1439,7 +1439,6 @@ static int tda998x_bind(struct device *dev, struct device *master, void *data) if (ret) goto err_sysfs; - priv->connector.encoder = &priv->encoder; drm_mode_connector_attach_encoder(&priv->connector, &priv->encoder); return 0; |