summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJon Mayo <jmayo@nvidia.com>2011-11-21 13:14:31 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2012-03-23 17:32:04 -0700
commit0ff9b067d9152b501af662f82464e9021bdcf408 (patch)
tree95442d5bea2e7cba725d4537184b7af3c00a29f2 /drivers
parentdc2056e7a6ad7a1579f645b2dccad6ff42dca82b (diff)
video: tegra: dc: use Kconfig to enable nvhdcp
Use TEGRA_NVHDCP to enable/disable support for NVHDCP on HDMI. Change-Id: If65267e7a4c82c5497271c19ac985bfa8881bca1 Signed-off-by: Jon Mayo <jmayo@nvidia.com> Reviewed-on: http://git-master/r/67883 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Rebase-Id: R0b199e66a9ccc7480b9773bf7cc3a045772cda64
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/tegra/Kconfig7
-rw-r--r--drivers/video/tegra/dc/Makefile2
-rw-r--r--drivers/video/tegra/dc/hdmi.c4
-rw-r--r--drivers/video/tegra/dc/nvhdcp.h17
4 files changed, 29 insertions, 1 deletions
diff --git a/drivers/video/tegra/Kconfig b/drivers/video/tegra/Kconfig
index 172965530bcf..a5e1ba09ff6f 100644
--- a/drivers/video/tegra/Kconfig
+++ b/drivers/video/tegra/Kconfig
@@ -115,5 +115,12 @@ config NVMAP_CONVERT_CARVEOUT_TO_IOVMM
Say Y here to force to convert carveout memory requests to
I/O virtual memory requests.
+config TEGRA_NVHDCP
+ bool "Support NVHDCP content protection on HDMI"
+ default n
+ help
+ Say Y here to support NVHDCP upstream and downstream protocols, this
+ requires a correctly fused chip to negotiate keys.
+
endif
diff --git a/drivers/video/tegra/dc/Makefile b/drivers/video/tegra/dc/Makefile
index 90b03892673c..464055f7b239 100644
--- a/drivers/video/tegra/dc/Makefile
+++ b/drivers/video/tegra/dc/Makefile
@@ -1,7 +1,7 @@
obj-y += dc.o
obj-y += rgb.o
obj-y += hdmi.o
-obj-y += nvhdcp.o
+obj-$(CONFIG_TEGRA_NVHDCP) += nvhdcp.o
obj-y += edid.o
obj-y += nvsd.o
obj-y += dsi.o
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c
index efb1759adec6..c4d3257f99e5 100644
--- a/drivers/video/tegra/dc/hdmi.c
+++ b/drivers/video/tegra/dc/hdmi.c
@@ -992,6 +992,7 @@ static int tegra_dc_hdmi_init(struct tegra_dc *dc)
goto err_free_irq;
}
+#ifdef CONFIG_TEGRA_NVHDCP
hdmi->nvhdcp = tegra_nvhdcp_create(hdmi, dc->ndev->id,
dc->out->dcc_bus);
if (IS_ERR_OR_NULL(hdmi->nvhdcp)) {
@@ -999,6 +1000,9 @@ static int tegra_dc_hdmi_init(struct tegra_dc *dc)
err = PTR_ERR(hdmi->nvhdcp);
goto err_edid_destroy;
}
+#else
+ hdmi->nvhdcp = NULL;
+#endif
INIT_DELAYED_WORK(&hdmi->work, tegra_dc_hdmi_detect_worker);
diff --git a/drivers/video/tegra/dc/nvhdcp.h b/drivers/video/tegra/dc/nvhdcp.h
index 32d171c68b6b..90ea0be36d19 100644
--- a/drivers/video/tegra/dc/nvhdcp.h
+++ b/drivers/video/tegra/dc/nvhdcp.h
@@ -19,6 +19,7 @@
#include <video/nvhdcp.h>
struct tegra_nvhdcp;
+#ifdef CONFIG_TEGRA_NVHDCP
void tegra_nvhdcp_set_plug(struct tegra_nvhdcp *nvhdcp, bool hpd);
int tegra_nvhdcp_set_policy(struct tegra_nvhdcp *nvhdcp, int pol);
void tegra_nvhdcp_suspend(struct tegra_nvhdcp *nvhdcp);
@@ -26,4 +27,20 @@ void tegra_nvhdcp_resume(struct tegra_nvhdcp *nvhdcp);
struct tegra_nvhdcp *tegra_nvhdcp_create(struct tegra_dc_hdmi_data *hdmi,
int id, int bus);
void tegra_nvhdcp_destroy(struct tegra_nvhdcp *nvhdcp);
+#else
+inline void tegra_nvhdcp_set_plug(struct tegra_nvhdcp *nvhdcp, bool hpd) { }
+inline int tegra_nvhdcp_set_policy(struct tegra_nvhdcp *nvhdcp, int pol)
+{
+ return 0;
+}
+inline void tegra_nvhdcp_suspend(struct tegra_nvhdcp *nvhdcp) { }
+inline void tegra_nvhdcp_resume(struct tegra_nvhdcp *nvhdcp) { }
+inline struct tegra_nvhdcp *tegra_nvhdcp_create(struct tegra_dc_hdmi_data *hdmi,
+ int id, int bus)
+{
+ return NULL;
+}
+inline void tegra_nvhdcp_destroy(struct tegra_nvhdcp *nvhdcp) { }
+#endif
+
#endif