Skip to contentSkip to conversation

edid-decode: fix clock step for CVT RBv3

PATCH In review Simon Ser 2 participants 2 messages Oct 5, 2022 – Oct 6, 2022 Media (V4L/DVB)

lore
Share & tools
lore

Simon Ser

author
#0 lore raw

PATCH 1/1 edid-decode: fix clock step for CVT RBv3

According to CVT 2.0 table 3-2, C_CLOCK_STEP = 0.001 for both RBv2 and RBv3.

---
 calc-gtf-cvt.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
calc-gtf-cvt.cpp +1 -1
index dc22ad535135..6330bb7ac814 100644
@@ -152,7 +152,7 @@ timings edid_state::calc_cvt_mode(unsigned h_pixels, unsigned v_lines,
 	double interlace = int_rqd ? 0.5 : 0;
 	double total_active_pixels = h_pixels_rnd + hor_margin * 2;
 	double v_field_rate_rqd = int_rqd ? ip_freq_rqd * 2 : ip_freq_rqd;
-	double clock_step = rb == RB_CVT_V2 ? 0.001 : 0.25;
+	double clock_step = rb >= RB_CVT_V2 ? 0.001 : 0.25;
 	double h_blank = (rb == RB_CVT_V1 || (rb == RB_CVT_V3 && alt)) ? 160 : 80;
 	double rb_v_fporch = rb == RB_CVT_V1 ? 3 : 1;
 	double refresh_multiplier = (rb == RB_CVT_V2 && alt) ? 1000.0 / 1001.0 : 1;
Signature · 1 line
2.38.0
#1 lore raw

Hi Simon,

Quoted 2 lines · Simon Ser

According to CVT 2.0 table 3-2, C_CLOCK_STEP = 0.001 for both RBv2 and RBv3.

Another nice catch!

Thank you,

Hans

Quoted 19 lines
---
 calc-gtf-cvt.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
calc-gtf-cvt.cpp +1 -1
index dc22ad535135..6330bb7ac814 100644
@@ -152,7 +152,7 @@ timings edid_state::calc_cvt_mode(unsigned h_pixels, unsigned v_lines,
 	double interlace = int_rqd ? 0.5 : 0;
 	double total_active_pixels = h_pixels_rnd + hor_margin * 2;
 	double v_field_rate_rqd = int_rqd ? ip_freq_rqd * 2 : ip_freq_rqd;
-	double clock_step = rb == RB_CVT_V2 ? 0.001 : 0.25;
+	double clock_step = rb >= RB_CVT_V2 ? 0.001 : 0.25;
 	double h_blank = (rb == RB_CVT_V1 || (rb == RB_CVT_V3 && alt)) ? 160 : 80;
 	double rb_v_fporch = rb == RB_CVT_V1 ? 3 : 1;
 	double refresh_multiplier = (rb == RB_CVT_V2 && alt) ? 1000.0 / 1001.0 : 1;