|
@@ -29,6 +29,9 @@
|
|
|
#define get_ctx_from_subdrv(subdrv) container_of(subdrv,\
|
|
|
struct drm_hdmi_context, subdrv);
|
|
|
|
|
|
+/* platform device pointer for common drm hdmi device. */
|
|
|
+static struct platform_device *exynos_drm_hdmi_pdev;
|
|
|
+
|
|
|
/* Common hdmi subdrv needs to access the hdmi and mixer though context.
|
|
|
* These should be initialied by the repective drivers */
|
|
|
static struct exynos_drm_hdmi_context *hdmi_ctx;
|
|
@@ -46,6 +49,25 @@ struct drm_hdmi_context {
|
|
|
bool enabled[MIXER_WIN_NR];
|
|
|
};
|
|
|
|
|
|
+int exynos_platform_device_hdmi_register(void)
|
|
|
+{
|
|
|
+ if (exynos_drm_hdmi_pdev)
|
|
|
+ return -EEXIST;
|
|
|
+
|
|
|
+ exynos_drm_hdmi_pdev = platform_device_register_simple(
|
|
|
+ "exynos-drm-hdmi", -1, NULL, 0);
|
|
|
+ if (IS_ERR_OR_NULL(exynos_drm_hdmi_pdev))
|
|
|
+ return PTR_ERR(exynos_drm_hdmi_pdev);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+void exynos_platform_device_hdmi_unregister(void)
|
|
|
+{
|
|
|
+ if (exynos_drm_hdmi_pdev)
|
|
|
+ platform_device_unregister(exynos_drm_hdmi_pdev);
|
|
|
+}
|
|
|
+
|
|
|
void exynos_hdmi_drv_attach(struct exynos_drm_hdmi_context *ctx)
|
|
|
{
|
|
|
if (ctx)
|