aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-10-12 10:35:10 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-10-12 10:43:30 +0200
commit66d8451280e15245eaf8a73ab20e78fd3498bc65 (patch)
tree01c306aa4ab06fc619645e9e7bb17693673f797a
parent84ddf9155376a6044f729ce6a0e60639c26aed2b (diff)
edid-decode: drop CVT support for Additional Vertical Blank Time
This was dropped again in DisplayID 2.0 E9 and from the CVT 2.0 standard. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--calc-gtf-cvt.cpp13
-rw-r--r--edid-decode.16
-rw-r--r--edid-decode.cpp12
-rw-r--r--edid-decode.h5
-rw-r--r--parse-displayid-block.cpp14
5 files changed, 18 insertions, 32 deletions
diff --git a/calc-gtf-cvt.cpp b/calc-gtf-cvt.cpp
index 9cd6e5e..441735f 100644
--- a/calc-gtf-cvt.cpp
+++ b/calc-gtf-cvt.cpp
@@ -131,8 +131,7 @@ void edid_state::edid_gtf_mode(unsigned refresh, struct timings &t)
// If rb == RB_CVT_V3, then alt means that rb_h_blank is 160 instead of 80.
timings edid_state::calc_cvt_mode(unsigned h_pixels, unsigned v_lines,
double ip_freq_rqd, unsigned rb, bool int_rqd,
- bool margins_rqd, bool alt, unsigned rb_h_blank,
- double add_vert_time)
+ bool margins_rqd, bool alt, unsigned rb_h_blank)
{
timings t = {};
@@ -161,11 +160,6 @@ timings edid_state::calc_cvt_mode(unsigned h_pixels, unsigned v_lines,
double v_blank;
double v_sync_bp;
- if (rb == RB_CVT_V3 && add_vert_time) {
- if (add_vert_time + rb_min_vblank <= 1000000.0 / ip_freq_rqd / 4.0)
- rb_min_vblank += add_vert_time;
- }
-
if (rb == RB_CVT_V3 && rb_h_blank) {
h_blank = rb_h_blank & ~7;
if (h_blank < 80)
@@ -248,14 +242,13 @@ timings edid_state::calc_cvt_mode(unsigned h_pixels, unsigned v_lines,
return t;
}
-void edid_state::edid_cvt_mode(unsigned refresh, struct timings &t, unsigned rb_h_blank,
- double add_vert_time)
+void edid_state::edid_cvt_mode(unsigned refresh, struct timings &t, unsigned rb_h_blank)
{
unsigned hratio = t.hratio;
unsigned vratio = t.vratio;
t = calc_cvt_mode(t.hact, t.vact, refresh, t.rb & ~RB_ALT, t.interlaced,
- false, t.rb & RB_ALT, rb_h_blank, add_vert_time);
+ false, t.rb & RB_ALT, rb_h_blank);
t.hratio = hratio;
t.vratio = vratio;
}
diff --git a/edid-decode.1 b/edid-decode.1
index 5d87647..5a4ddbf 100644
--- a/edid-decode.1
+++ b/edid-decode.1
@@ -113,7 +113,7 @@ DisplayID 1.3: VESA Display Identification Data (DisplayID) Standard, Version 1.
.TP
DisplayID 2.0: VESA DisplayID Standard, Version 2.0
.TP
-DisplayID 2.0: VESA DisplayID v2.0 Errata E8
+DisplayID 2.0: VESA DisplayID v2.0 Errata E9
.TP
DI-EXT: VESA Display Information Extension Block Standard, Release A
.TP
@@ -146,9 +146,11 @@ The following related standards are also used by edid-decode:
.TP
DMT 1.3: VESA and Industry Standards and Guidelines for Computer Display Monitor Timing (DMT), Version 1.0, Rev. 13
.TP
+CVT 2.0: VESA Coordinated Video Timings (CVT) Standard, Version 2.0
+.TP
CVT 1.2: VESA Coordinated Video Timings (CVT) Standard, Version 1.2
.TP
-CVT 1.2: VESA CVT v1.2 Errata E1
+CVT 1.2: VESA CVT v1.2 Errata E2
.TP
GTF 1.1: VESA Generalized Timing Formula Standard, Version: 1.1
.RE
diff --git a/edid-decode.cpp b/edid-decode.cpp
index c2361b3..0295101 100644
--- a/edid-decode.cpp
+++ b/edid-decode.cpp
@@ -142,7 +142,7 @@ static void usage(void)
" --dmt <dmt> Show the timings for the DMT with the given DMT ID.\n"
" --vic <vic> Show the timings for this VIC.\n"
" --hdmi-vic <hdmivic> Show the timings for this HDMI VIC.\n"
- " --cvt w=<width>,h=<height>,fps=<fps>[,rb=<rb>][,interlaced][,overscan][,alt][,hblank=<hblank][,add-vblank=<add-vblank>\n"
+ " --cvt w=<width>,h=<height>,fps=<fps>[,rb=<rb>][,interlaced][,overscan][,alt][,hblank=<hblank]\n"
" Calculate the CVT timings for the given format.\n"
" <fps> is frames per second for progressive timings,\n"
" or fields per second for interlaced timings.\n"
@@ -156,8 +156,6 @@ static void usage(void)
" is 160 instead of 80 pixels.\n"
" If 'hblank' is given and <rb>=3, then the horizontal blanking\n"
" is <hblank> pixels (range of 80-200), overriding 'alt'.\n"
- " If 'add-vblank' is given and <rb>=3, then <add-vblank> usecs are\n"
- " added to the minimum vertical blank time of 460 usecs.\n"
" --gtf w=<width>,h=<height>[,fps=<fps>][,horfreq=<horfreq>][,pixclk=<pixclk>][,interlaced]\n"
" [,overscan][,secondary][,C=<c>][,M=<m>][,K=<k>][,J=<j>]\n"
" Calculate the GTF timings for the given format.\n"
@@ -1510,7 +1508,6 @@ enum cvt_opts {
CVT_RB,
CVT_ALT,
CVT_RB_H_BLANK,
- CVT_RB_ADD_V_BLANK,
};
static int parse_cvt_subopt(char **subopt_str, double *value)
@@ -1527,7 +1524,6 @@ static int parse_cvt_subopt(char **subopt_str, double *value)
"rb",
"alt",
"hblank",
- "add-vblank",
nullptr
};
@@ -1557,7 +1553,6 @@ static void parse_cvt(char *optarg)
double fps = 0;
unsigned rb = RB_NONE;
unsigned rb_h_blank = 0;
- unsigned rb_add_v_blank = 0;
bool interlaced = false;
bool alt = false;
bool overscan = false;
@@ -1593,9 +1588,6 @@ static void parse_cvt(char *optarg)
case CVT_RB_H_BLANK:
rb_h_blank = opt_val;
break;
- case CVT_RB_ADD_V_BLANK:
- rb_add_v_blank = opt_val;
- break;
default:
break;
}
@@ -1609,7 +1601,7 @@ static void parse_cvt(char *optarg)
if (interlaced)
fps /= 2;
timings t = state.calc_cvt_mode(w, h, fps, rb, interlaced, overscan, alt,
- rb_h_blank, rb_add_v_blank);
+ rb_h_blank);
state.print_timings("", &t, "CVT", "", true, false);
}
diff --git a/edid-decode.h b/edid-decode.h
index 548f563..310c7cf 100644
--- a/edid-decode.h
+++ b/edid-decode.h
@@ -318,9 +318,8 @@ struct edid_state {
timings calc_cvt_mode(unsigned h_pixels, unsigned v_lines,
double ip_freq_rqd, unsigned rb, bool int_rqd = false,
bool margins_rqd = false, bool alt = false,
- unsigned rb_h_blank = 0, double add_vert_time = 0);
- void edid_cvt_mode(unsigned refresh, struct timings &t, unsigned rb_h_blank = 0,
- double add_vert_time = 0);
+ unsigned rb_h_blank = 0);
+ void edid_cvt_mode(unsigned refresh, struct timings &t, unsigned rb_h_blank = 0);
void detailed_cvt_descriptor(const char *prefix, const unsigned char *x, bool first);
void print_standard_timing(const char *prefix, unsigned char b1, unsigned char b2,
bool gtf_only = false, bool show_both = false);
diff --git a/parse-displayid-block.cpp b/parse-displayid-block.cpp
index f4b8ca5..ad5099f 100644
--- a/parse-displayid-block.cpp
+++ b/parse-displayid-block.cpp
@@ -1477,24 +1477,24 @@ void edid_state::parse_displayid_type_10_timing(const unsigned char *x,
s += ", YCbCr 4:2:0";
unsigned refresh = 1 + x[5] + (sz == 6 ? 0 : ((x[6] & 3) << 8));
- double add_vert_time = 0;
if (sz > 6 && rb == RB_CVT_V3) {
unsigned delta_hblank = (x[6] >> 2) & 7;
- if (rb_h_blank == 80)
+ if ((x[6] >> 5) & 7)
+ fail("Bits 5-7 of byte 6 must be 0.\n");
+ if (rb != RB_CVT_V3) {
+ if ((x[6] >> 2) & 7)
+ fail("Bits 2-4 of byte 6 must be 0.\n");
+ } else if (rb_h_blank == 80)
rb_h_blank = 80 + 8 * delta_hblank;
else if (delta_hblank <= 5)
rb_h_blank = 160 + 8 * delta_hblank;
else
rb_h_blank = 160 - (delta_hblank - 5) * 8;
-
- unsigned vblank_time_perc = (x[6] >> 5) & 7;
-
- add_vert_time = (vblank_time_perc * 10000.0) / refresh;
}
- edid_cvt_mode(refresh, t, rb_h_blank, add_vert_time);
+ edid_cvt_mode(refresh, t, rb_h_blank);
print_timings(" ", &t, "CVT", s.c_str());
if (is_cta) {

Privacy Policy