[PATCH 8/9] drm/exynos/fimd: use polarization flags provided by drm_display_mode

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

 



The patch replaces fimd private bindings for signal polarization by
polarization flags provided by drm_display_mode.

Signed-off-by: Andrzej Hajda <a.hajda@xxxxxxxxxxx>
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 15d6b37..dbfad4e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -115,7 +115,6 @@ struct fimd_context {
 	unsigned int			default_win;
 	unsigned long			irq_flags;
 	u32				vidcon0;
-	u32				vidcon1;
 	bool				suspended;
 	int				pipe;
 	wait_queue_head_t		wait_vsync_queue;
@@ -232,7 +231,11 @@ static void fimd_commit(struct exynos_drm_manager *mgr)
 		return;
 
 	/* setup polarity values */
-	vidcon1 = ctx->vidcon1;
+	vidcon1 = 0;
+	if (mode->pol_flags & DRM_MODE_FLAG_POL_DE_NEGEDGE)
+		vidcon1 |= VIDCON1_INV_VDEN;
+	if (mode->pol_flags & DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE)
+		vidcon1 |= VIDCON1_INV_VCLK;
 	if (mode->flags & DRM_MODE_FLAG_NVSYNC)
 		vidcon1 |= VIDCON1_INV_VSYNC;
 	if (mode->flags & DRM_MODE_FLAG_NHSYNC)
@@ -875,11 +878,6 @@ static int fimd_probe(struct platform_device *pdev)
 	ctx->dev = dev;
 	ctx->suspended = true;
 
-	if (of_property_read_bool(dev->of_node, "samsung,invert-vden"))
-		ctx->vidcon1 |= VIDCON1_INV_VDEN;
-	if (of_property_read_bool(dev->of_node, "samsung,invert-vclk"))
-		ctx->vidcon1 |= VIDCON1_INV_VCLK;
-
 	ctx->bus_clk = devm_clk_get(dev, "fimd");
 	if (IS_ERR(ctx->bus_clk)) {
 		dev_err(dev, "failed to get bus clock\n");
-- 
1.8.3.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