From patchwork Wed Oct 5 12:12:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 86504 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1og3GU-00DI2N-8x; Wed, 05 Oct 2022 12:12:46 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230017AbiJEMMj (ORCPT + 1 other); Wed, 5 Oct 2022 08:12:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229710AbiJEMMi (ORCPT ); Wed, 5 Oct 2022 08:12:38 -0400 Received: from mail-4022.proton.ch (mail-4022.proton.ch [185.70.40.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3681A41519 for ; Wed, 5 Oct 2022 05:12:35 -0700 (PDT) Date: Wed, 05 Oct 2022 12:12:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail3; t=1664971952; x=1665231152; bh=OYhK2PnD/kzbUIGy8BCP+ZesRla8gBOOWRw65Sm5cm0=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID; b=lXsubILuNxeuRYTM6B/fie0bz9BtrpXk8y7fjzVg5fifU6K1ip/iI3SsPDh+p40DI ucGldc8mZ34F1fPJgb7tsN/EwS0uZ3QMn4bVAiSqTM9O+lxVaQzs1Qh3aFfZhv7fps hgQ4lh8jyYAMYY1LrxMD0VJhVbcLAiUx6eBFZ9MVZ4R/NkqCAPAZAEH6sPrIy/DlZ7 8Jh6YIgvVJTwpCFSaCNibFIDfAE5YyGfzeVADVjiLqgVEd9/do0E3E6FfN9n9tM85G sdPx4KKY6QWkdI6rwjxQOzzQv1rD0q1mBHkXvTHSENSGxiOeZiIHaKTuuRDOD+Stae 75oS84pjtdFqw== To: linux-media@vger.kernel.org From: Simon Ser Subject: [PATCH] edid-decode: fix clock step for CVT RBv3 Message-ID: <20221005121221.14882-1-contact@emersion.fr> Feedback-ID: 1358184:user:proton MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.5 (--) X-LSpam-Report: No, score=-2.5 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no According to CVT 2.0 table 3-2, C_CLOCK_STEP = 0.001 for both RBv2 and RBv3. Signed-off-by: Simon Ser --- calc-gtf-cvt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calc-gtf-cvt.cpp b/calc-gtf-cvt.cpp index dc22ad535135..6330bb7ac814 100644 --- a/calc-gtf-cvt.cpp +++ b/calc-gtf-cvt.cpp @@ -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;