Without that fix, drivers using the fb_videomode_from_videomode
  function will not be able to get certain information because
  some DISPLAY_FLAGS_* have no corresponding FB_SYNC_*.

Cc: Jean-Christophe Plagniol-Villard <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: [email protected]
Cc: Rob Herring <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Ian Campbell <[email protected]>
Cc: [email protected]
Cc: Sascha Hauer <[email protected]>
Cc: [email protected]
Cc: Eric BĂ©nard <[email protected]>
Signed-off-by: Denis Carikli <[email protected]>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
---
ChangeLog v3->v4:
- Fixed the issue with FB_SYNC_PIXDAT_HIGH_ACT value.

ChangeLog v2->v3:
- Added Jean-Christophe PLAGNIOL-VILLARD's ACK.
---
 drivers/video/fbmon.c   |    4 ++++
 include/uapi/linux/fb.h |    2 ++
 2 files changed, 6 insertions(+)

diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
index 6103fa6..29a9ed0 100644
--- a/drivers/video/fbmon.c
+++ b/drivers/video/fbmon.c
@@ -1402,6 +1402,10 @@ int fb_videomode_from_videomode(const struct videomode 
*vm,
                fbmode->sync |= FB_SYNC_HOR_HIGH_ACT;
        if (vm->flags & DISPLAY_FLAGS_VSYNC_HIGH)
                fbmode->sync |= FB_SYNC_VERT_HIGH_ACT;
+       if (vm->flags & DISPLAY_FLAGS_DE_HIGH)
+               fbmode->sync |= FB_SYNC_DE_HIGH_ACT;
+       if (vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
+               fbmode->sync |= FB_SYNC_PIXDAT_HIGH_ACT;
        if (vm->flags & DISPLAY_FLAGS_INTERLACED)
                fbmode->vmode |= FB_VMODE_INTERLACED;
        if (vm->flags & DISPLAY_FLAGS_DOUBLESCAN)
diff --git a/include/uapi/linux/fb.h b/include/uapi/linux/fb.h
index fb795c3..c618cfc 100644
--- a/include/uapi/linux/fb.h
+++ b/include/uapi/linux/fb.h
@@ -215,6 +215,8 @@ struct fb_bitfield {
                                        /* vtotal = 144d/288n/576i => PAL  */
                                        /* vtotal = 121d/242n/484i => NTSC */
 #define FB_SYNC_ON_GREEN       32      /* sync on green */
+#define FB_SYNC_DE_HIGH_ACT    64      /* data enable high active */
+#define FB_SYNC_PIXDAT_HIGH_ACT        128     /* data enable high active */
 
 #define FB_VMODE_NONINTERLACED  0      /* non interlaced */
 #define FB_VMODE_INTERLACED    1       /* interlaced   */
-- 
1.7.9.5

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

Reply via email to