[RFC 4/4] drm: exynos: add MDNIE and IELCD to FIMD pp list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch adds code to add MDNIE and IELCD onto the
list of FIMD PP.

Signed-off-by: Ajay Kumar <ajaykumar.rs@xxxxxxxxxxx>
Signed-off-by: Shirish S <s.shirish@xxxxxxxxxxx>
Signed-off-by: Rahul Sharma <rahul.sharma@xxxxxxxxxxx>
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c | 17 +++++++++++++++++
 drivers/gpu/drm/exynos/exynos_fimd_pp.h  |  2 ++
 2 files changed, 19 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index a584d8e..d5a32fb 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -160,8 +160,25 @@ static int fimd_mgr_initialize(struct exynos_drm_manager *mgr,
 {
 	struct fimd_context *ctx = mgr->ctx;
 	struct exynos_drm_private *priv;
+	struct exynos_fimd_pp *mdnie_pp = NULL, *ielcd_pp = NULL;
+	int ret;
+
 	priv = drm_dev->dev_private;
 
+	ret = exynos_mdnie_init(ctx->dev, &mdnie_pp);
+	if (!ret && mdnie_pp) {
+		ret = exynos_ielcd_init(ctx->dev, &ielcd_pp);
+		if (!ret && ielcd_pp) {
+			fimd_add_pp_to_list(ctx, mdnie_pp);
+			fimd_add_pp_to_list(ctx, ielcd_pp);
+			ctx->enable_pp = true;
+			ctx->pp_running = false;
+		} else {
+			DRM_INFO("No ielcd node present, "
+					"MDNIE feature will be disabled\n");
+		}
+	}
+
 	mgr->drm_dev = ctx->drm_dev = drm_dev;
 	mgr->pipe = ctx->pipe = priv->pipe++;
 
diff --git a/drivers/gpu/drm/exynos/exynos_fimd_pp.h b/drivers/gpu/drm/exynos/exynos_fimd_pp.h
index 528d3cb..b980742 100644
--- a/drivers/gpu/drm/exynos/exynos_fimd_pp.h
+++ b/drivers/gpu/drm/exynos/exynos_fimd_pp.h
@@ -49,4 +49,6 @@ struct exynos_fimd_pp {
 	void *ctx;
 };
 
+extern int exynos_mdnie_init(struct device *dev, struct exynos_fimd_pp **pp);
+extern int exynos_ielcd_init(struct device *dev, struct exynos_fimd_pp **pp);
 #endif
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux