Commit edec4af4 authored by Thierry Reding's avatar Thierry Reding Committed by Dave Airlie

drm: tegra: Add HDMI support

This commit adds support for the HDMI output on the Tegra20 SoC. Only
one such output is available, but it can be driven by either of the two
display controllers.

A lot of work on this patch has been contributed by NVIDIA's Mark Zhang
<markz@nvidia.com> and many other people at NVIDIA were very helpful in
getting the HDMI support and surrounding infrastructure to work.
Signed-off-by: default avatarThierry Reding <thierry.reding@avionic-design.de>
Tested-by: default avatarStephen Warren <swarren@nvidia.com>
Acked-by: default avatarMark Zhang <markz@nvidia.com>
Reviewed-by: default avatarMark Zhang <markz@nvidia.com>
Tested-by: default avatarMark Zhang <markz@nvidia.com>
Tested-and-acked-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Acked-by: default avatarTerje Bergstrom <tbergstrom@nvidia.com>
Tested-by: default avatarTerje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent d8f4a9ed
......@@ -2,6 +2,6 @@ ccflags-y := -Iinclude/drm
ccflags-$(CONFIG_DRM_TEGRA_DEBUG) += -DDEBUG
tegra-drm-y := drm.o fb.o dc.o host1x.o
tegra-drm-y += output.o rgb.o
tegra-drm-y += output.o rgb.o hdmi.o
obj-$(CONFIG_DRM_TEGRA) += tegra-drm.o
......@@ -130,6 +130,7 @@ struct tegra_output_ops {
enum tegra_output_type {
TEGRA_OUTPUT_RGB,
TEGRA_OUTPUT_HDMI,
};
struct tegra_output {
......@@ -226,6 +227,7 @@ extern int tegra_drm_fb_init(struct drm_device *drm);
extern void tegra_drm_fb_exit(struct drm_device *drm);
extern struct platform_driver tegra_host1x_driver;
extern struct platform_driver tegra_hdmi_driver;
extern struct platform_driver tegra_dc_driver;
extern struct drm_driver tegra_drm_driver;
......
This diff is collapsed.
This diff is collapsed.
......@@ -67,6 +67,7 @@ static int host1x_parse_dt(struct host1x *host1x)
{
static const char * const compat[] = {
"nvidia,tegra20-dc",
"nvidia,tegra20-hdmi",
};
unsigned int i;
int err;
......@@ -294,8 +295,14 @@ static int __init tegra_host1x_init(void)
if (err < 0)
goto unregister_host1x;
err = platform_driver_register(&tegra_hdmi_driver);
if (err < 0)
goto unregister_dc;
return 0;
unregister_dc:
platform_driver_unregister(&tegra_dc_driver);
unregister_host1x:
platform_driver_unregister(&tegra_host1x_driver);
return err;
......@@ -304,6 +311,7 @@ module_init(tegra_host1x_init);
static void __exit tegra_host1x_exit(void)
{
platform_driver_unregister(&tegra_hdmi_driver);
platform_driver_unregister(&tegra_dc_driver);
platform_driver_unregister(&tegra_host1x_driver);
}
......
......@@ -227,6 +227,11 @@ int tegra_output_init(struct drm_device *drm, struct tegra_output *output)
encoder = DRM_MODE_ENCODER_LVDS;
break;
case TEGRA_OUTPUT_HDMI:
connector = DRM_MODE_CONNECTOR_HDMIA;
encoder = DRM_MODE_ENCODER_TMDS;
break;
default:
connector = DRM_MODE_CONNECTOR_Unknown;
encoder = DRM_MODE_ENCODER_NONE;
......
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