diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i2c/tda998x_drv.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index a46248f0c9c3..012d36d9a75b 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <sound/asoundef.h> | 22 | #include <sound/asoundef.h> |
23 | 23 | ||
24 | #include <drm/drmP.h> | 24 | #include <drm/drmP.h> |
25 | #include <drm/drm_atomic_helper.h> | ||
25 | #include <drm/drm_crtc_helper.h> | 26 | #include <drm/drm_crtc_helper.h> |
26 | #include <drm/drm_edid.h> | 27 | #include <drm/drm_edid.h> |
27 | #include <drm/drm_of.h> | 28 | #include <drm/drm_of.h> |
@@ -866,7 +867,10 @@ tda998x_encoder_mode_fixup(struct drm_encoder *encoder, | |||
866 | static int tda998x_connector_mode_valid(struct drm_connector *connector, | 867 | static int tda998x_connector_mode_valid(struct drm_connector *connector, |
867 | struct drm_display_mode *mode) | 868 | struct drm_display_mode *mode) |
868 | { | 869 | { |
869 | if (mode->clock > 150000) | 870 | /* TDA19988 dotclock can go up to 165MHz */ |
871 | struct tda998x_priv *priv = conn_to_tda998x_priv(connector); | ||
872 | |||
873 | if (mode->clock > ((priv->rev == TDA19988) ? 165000 : 150000)) | ||
870 | return MODE_CLOCK_HIGH; | 874 | return MODE_CLOCK_HIGH; |
871 | if (mode->htotal >= BIT(13)) | 875 | if (mode->htotal >= BIT(13)) |
872 | return MODE_BAD_HVALUE; | 876 | return MODE_BAD_HVALUE; |
@@ -1379,10 +1383,13 @@ static void tda998x_connector_destroy(struct drm_connector *connector) | |||
1379 | } | 1383 | } |
1380 | 1384 | ||
1381 | static const struct drm_connector_funcs tda998x_connector_funcs = { | 1385 | static const struct drm_connector_funcs tda998x_connector_funcs = { |
1382 | .dpms = drm_helper_connector_dpms, | 1386 | .dpms = drm_atomic_helper_connector_dpms, |
1387 | .reset = drm_atomic_helper_connector_reset, | ||
1383 | .fill_modes = drm_helper_probe_single_connector_modes, | 1388 | .fill_modes = drm_helper_probe_single_connector_modes, |
1384 | .detect = tda998x_connector_detect, | 1389 | .detect = tda998x_connector_detect, |
1385 | .destroy = tda998x_connector_destroy, | 1390 | .destroy = tda998x_connector_destroy, |
1391 | .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, | ||
1392 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, | ||
1386 | }; | 1393 | }; |
1387 | 1394 | ||
1388 | static int tda998x_bind(struct device *dev, struct device *master, void *data) | 1395 | static int tda998x_bind(struct device *dev, struct device *master, void *data) |
@@ -1458,6 +1465,7 @@ static void tda998x_unbind(struct device *dev, struct device *master, | |||
1458 | { | 1465 | { |
1459 | struct tda998x_priv *priv = dev_get_drvdata(dev); | 1466 | struct tda998x_priv *priv = dev_get_drvdata(dev); |
1460 | 1467 | ||
1468 | drm_connector_unregister(&priv->connector); | ||
1461 | drm_connector_cleanup(&priv->connector); | 1469 | drm_connector_cleanup(&priv->connector); |
1462 | drm_encoder_cleanup(&priv->encoder); | 1470 | drm_encoder_cleanup(&priv->encoder); |
1463 | tda998x_destroy(priv); | 1471 | tda998x_destroy(priv); |