[PATCH 7/9] drm/modes: add polarization handling to mode conversion

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

 




The patch adds conversion of DISPLAY_FLAGS_DE_* and DISPLAY_FLAGS_PIXDATA_*
flags to pol_flags in drm_display_mode_from_videomode function.

Signed-off-by: Andrzej Hajda <a.hajda@xxxxxxxxxxx>
---
 drivers/gpu/drm/drm_modes.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index b073315..5dbff8d 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -537,6 +537,17 @@ int drm_display_mode_from_videomode(const struct videomode *vm,
 		dmode->flags |= DRM_MODE_FLAG_DBLSCAN;
 	if (vm->flags & DISPLAY_FLAGS_DOUBLECLK)
 		dmode->flags |= DRM_MODE_FLAG_DBLCLK;
+
+	dmode->pol_flags = 0;
+	if (vm->flags & DISPLAY_FLAGS_DE_LOW)
+		dmode->pol_flags |= DRM_MODE_FLAG_POL_DE_NEGEDGE;
+	if (vm->flags & DISPLAY_FLAGS_DE_HIGH)
+		dmode->pol_flags |= DRM_MODE_FLAG_POL_DE_POSEDGE;
+	if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
+		dmode->pol_flags |= DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE;
+	if (vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
+		dmode->pol_flags |= DRM_MODE_FLAG_POL_PIXDATA_POSEDGE;
+
 	drm_mode_set_name(dmode);
 
 	return 0;
-- 
1.8.3.2

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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux