Commit 91161995 authored by Dave Airlie's avatar Dave Airlie

Merge branch 'drm-tda998x-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next

These changes from Liviu add support for atomic mode setting, add the
TMDS clock limitation according to the device, and ensure that we
correctly clean up in the unbind function.

* 'drm-tda998x-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  drm/i2c: tda998x: Add support for atomic modesetting
  drm/i2c: tda998x: increase the supported dotclock frequency to 165MHz for TDA19988
  drm/i2c: tda998x: unregister the connector in the unbind function
parents f884a507 9736e988
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <sound/asoundef.h> #include <sound/asoundef.h>
#include <drm/drmP.h> #include <drm/drmP.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc_helper.h> #include <drm/drm_crtc_helper.h>
#include <drm/drm_edid.h> #include <drm/drm_edid.h>
#include <drm/drm_of.h> #include <drm/drm_of.h>
...@@ -866,7 +867,10 @@ tda998x_encoder_mode_fixup(struct drm_encoder *encoder, ...@@ -866,7 +867,10 @@ tda998x_encoder_mode_fixup(struct drm_encoder *encoder,
static int tda998x_connector_mode_valid(struct drm_connector *connector, static int tda998x_connector_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode) struct drm_display_mode *mode)
{ {
if (mode->clock > 150000) /* TDA19988 dotclock can go up to 165MHz */
struct tda998x_priv *priv = conn_to_tda998x_priv(connector);
if (mode->clock > ((priv->rev == TDA19988) ? 165000 : 150000))
return MODE_CLOCK_HIGH; return MODE_CLOCK_HIGH;
if (mode->htotal >= BIT(13)) if (mode->htotal >= BIT(13))
return MODE_BAD_HVALUE; return MODE_BAD_HVALUE;
...@@ -1379,10 +1383,13 @@ static void tda998x_connector_destroy(struct drm_connector *connector) ...@@ -1379,10 +1383,13 @@ static void tda998x_connector_destroy(struct drm_connector *connector)
} }
static const struct drm_connector_funcs tda998x_connector_funcs = { static const struct drm_connector_funcs tda998x_connector_funcs = {
.dpms = drm_helper_connector_dpms, .dpms = drm_atomic_helper_connector_dpms,
.reset = drm_atomic_helper_connector_reset,
.fill_modes = drm_helper_probe_single_connector_modes, .fill_modes = drm_helper_probe_single_connector_modes,
.detect = tda998x_connector_detect, .detect = tda998x_connector_detect,
.destroy = tda998x_connector_destroy, .destroy = tda998x_connector_destroy,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
}; };
static int tda998x_bind(struct device *dev, struct device *master, void *data) 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,6 +1465,7 @@ static void tda998x_unbind(struct device *dev, struct device *master,
{ {
struct tda998x_priv *priv = dev_get_drvdata(dev); struct tda998x_priv *priv = dev_get_drvdata(dev);
drm_connector_unregister(&priv->connector);
drm_connector_cleanup(&priv->connector); drm_connector_cleanup(&priv->connector);
drm_encoder_cleanup(&priv->encoder); drm_encoder_cleanup(&priv->encoder);
tda998x_destroy(priv); tda998x_destroy(priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment