summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-08-15 12:09:07 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-08-15 12:28:04 +0300
commit4780d98bfde87f03754c0e0e2fabe68d02958df9 (patch)
tree2ffcc740e422ffbf30c419e73fbe61eeeaff8907
parentbb64b41891b8ede6f0e002ed72b1068597525f14 (diff)
modedb: fix vrefresh for ilace
-rw-r--r--kms++/src/modedb_cea.cpp3
-rw-r--r--kms++/src/modedb_dmt.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/kms++/src/modedb_cea.cpp b/kms++/src/modedb_cea.cpp
index a105dd8..a99a612 100644
--- a/kms++/src/modedb_cea.cpp
+++ b/kms++/src/modedb_cea.cpp
@@ -42,7 +42,8 @@ namespace kms
.name = nm, .clock = (c), \
.hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), .htotal = (ht), .hskew = (hsk), \
.vdisplay = (vd), .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), .vscan = (vs), \
- .vrefresh = DIV_ROUND(c * 1000, ht * vt), .flags = (f), .type = 0
+ .vrefresh = DIV_ROUND(c * 1000, ht * vt) * (((f) & DRM_MODE_FLAG_INTERLACE) ? 2 : 1), \
+ .flags = (f), .type = 0
/*
* Probably taken from CEA-861 spec.
diff --git a/kms++/src/modedb_dmt.cpp b/kms++/src/modedb_dmt.cpp
index e3f2ad5..c3d5426 100644
--- a/kms++/src/modedb_dmt.cpp
+++ b/kms++/src/modedb_dmt.cpp
@@ -42,8 +42,8 @@ namespace kms
.name = nm, .clock = (c), \
.hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), .htotal = (ht), .hskew = (hsk), \
.vdisplay = (vd), .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), .vscan = (vs), \
- .vrefresh = DIV_ROUND(c * 1000, ht * vt), .flags = (f), .type = 0
-
+ .vrefresh = DIV_ROUND(c * 1000, ht * vt) * (((f) & DRM_MODE_FLAG_INTERLACE) ? 2 : 1), \
+ .flags = (f), .type = 0
/*
* Autogenerated from the DMT spec.