diff options
author | Jyri Sarha <jsarha@ti.com> | 2016-10-31 18:34:22 +0300 |
---|---|---|
committer | Jyri Sarha <jsarha@ti.com> | 2016-11-30 15:17:52 +0300 |
commit | ec9eab097a50040c743fe612c4635fd8ea5c5936 (patch) | |
tree | 081fbfcb8c9e5b7eca0335075174daf641e124d3 /drivers/gpu/drm/tilcdc/tilcdc_drv.c | |
parent | dc55ac3b52e69be4868687acabf232af81e0ef8b (diff) | |
download | linux-ec9eab097a50040c743fe612c4635fd8ea5c5936.tar.xz |
drm/tilcdc: Add drm bridge support for attaching drm bridge drivers
Adds drm bride support for attaching drm bridge drivers to tilcdc. The
decision whether a video port leads to an external encoder or bridge
is made simply based on remote device's compatible string. The code
has been tested with BeagleBone-Black with and without BeagleBone
DVI-D Cape Rev A3 using ti-tfp410 driver.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Tested-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpu/drm/tilcdc/tilcdc_drv.c')
-rw-r--r-- | drivers/gpu/drm/tilcdc/tilcdc_drv.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 3d2cea090d6f..7f4d3bc7152f 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -209,7 +209,7 @@ static void tilcdc_fini(struct drm_device *dev) drm_irq_uninstall(dev); drm_mode_config_cleanup(dev); - tilcdc_remove_external_encoders(dev); + tilcdc_remove_external_device(dev); #ifdef CONFIG_CPU_FREQ if (priv->freq_transition.notifier_call) @@ -381,12 +381,17 @@ static int tilcdc_init(struct drm_driver *ddrv, struct device *dev) if (ret < 0) goto init_failed; - ret = tilcdc_add_external_encoders(ddev); + ret = tilcdc_add_component_encoder(ddev); if (ret < 0) goto init_failed; + } else { + ret = tilcdc_attach_external_device(ddev); + if (ret) + goto init_failed; } - if ((priv->num_encoders == 0) || (priv->num_connectors == 0)) { + if (!priv->external_connector && + ((priv->num_encoders == 0) || (priv->num_connectors == 0))) { dev_err(dev, "no encoders/connectors found\n"); ret = -ENXIO; goto init_failed; |