aboutsummaryrefslogtreecommitdiffstats
path: root/parse-base-block.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2020-02-09 10:39:28 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-02-09 10:39:28 +0100
commitb5a377801b985302b19b7048e609d24bcaf82b9f (patch)
tree9d68a1d7596cba3fab427a752accc18898b8397a /parse-base-block.cpp
parent6b1a640ce9359b62a69cc98e07cb5d3caba3925f (diff)
edid-decode: fix incorrect hbp GTF calculation
The horizontal back porch calculation was wrong, causing incorrect timing values for very small resolutions (296x192, 384x240). Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'parse-base-block.cpp')
-rw-r--r--parse-base-block.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/parse-base-block.cpp b/parse-base-block.cpp
index c3aecdf..6e9d49e 100644
--- a/parse-base-block.cpp
+++ b/parse-base-block.cpp
@@ -517,7 +517,11 @@ void edid_state::edid_gtf_mode(unsigned refresh, struct timings &t)
* [H FRONT PORCH (PIXELS)] = ([H BLANK (PIXELS)]/2)-[H SYNC (PIXELS)]
*/
t.hfp = (h_blank / 2.0) - t.hsync;
- t.hbp = h_blank - t.hfp - t.hsync;
+ /* 19. Find the number of pixels in the horizontal back porch period:
+ *
+ * [H BACK PORCH (PIXELS)] = [H FRONT PORCH (PIXELS)]+[H SYNC (PIXELS)]
+ */
+ t.hbp = t.hfp + t.hsync;
t.pos_pol_hsync = false;
t.pos_pol_vsync = true;
t.interlaced = false;

Privacy Policy