Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3417986imw; Thu, 7 Jul 2022 01:09:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1teQeCpyba0z8meNp+HOk90jLCL5ePuyYm5tKgcRG4Gt6p5NEtasi6a223bVEuwS53Lnz16 X-Received: by 2002:aa7:de88:0:b0:435:9a54:168a with SMTP id j8-20020aa7de88000000b004359a54168amr58734662edv.73.1657181373186; Thu, 07 Jul 2022 01:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657181373; cv=none; d=google.com; s=arc-20160816; b=utuHOPBcEWyGLUx0XfCGLJzWEX+E6UCTJOPp8LnYuPZjGwS850rIDXFG+lypYTWLgt aIP2HwxX4VXc6xoIlK7v1t1bEuTjyh+es7mOnlJdNsGHaq+hv7Y4vy0kZmGr3Cizp//L wCV6KWxfnZUKrSARV8SBAuGaYoQ28J9IfOQ/pWUNh6U+WhLikUkJStiBvrL5jeAQI+5n WPi4fWJ7PS8S2N7N6hnBYO2Xqz27hLgK3s5L/ZZrAtNgaAmW6CI37xYuavl+W4axU6eX +El4dKrSjNQhxkdhfpJZ7O37h/hkurHmBmnWuxLWnZcsIRuUdZcLVP2Q3b1f8cD5jEGE zKEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from; bh=PPkdP3XLLxM0gatCFB2uYLkqVErTI+y6bnC1BvYayK0=; b=z87KdGD+ccnhY/RwdLZHjUxEDIXRI9NMB0UKL642CjgEumB9SUcYns5Pp/L5gKI4l+ pHhP4xpHdQ+D0gttYdYz3RhOd06AF5rVF9J0wor53kkpvisxzDKKidJCB3iBmS93L43M KVY1TrZza1nkjt745NQBNOgThahG6zmJc2/dLuT2EV+FsuEJ7pw+yn7VWpGxHsgtundk PCXoaMFh9xdNPz5YYDVZFZnKNkZYRiacTtGsLZTpj24cpXUmVqBDbeqEz3FYfhVqeIW5 sYidNCh7yBoO/x7ckvulUBrIXVOXIoYakvyUuxi9Z3Th8OaxZUbyVPfqmfSTh00tQPiU uj9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc31-20020a1709071c1f00b0072aaf9477ddsi11044927ejc.1003.2022.07.07.01.09.08; Thu, 07 Jul 2022 01:09:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235188AbiGGIGg (ORCPT + 99 others); Thu, 7 Jul 2022 04:06:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235175AbiGGIGa (ORCPT ); Thu, 7 Jul 2022 04:06:30 -0400 Received: from ironport.ite.com.tw (60-251-196-230.hinet-ip.hinet.net [60.251.196.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1B3233E1D for ; Thu, 7 Jul 2022 01:06:29 -0700 (PDT) Received: from unknown (HELO mse.ite.com.tw) ([192.168.35.30]) by ironport.ite.com.tw with ESMTP; 07 Jul 2022 16:06:29 +0800 Received: from CSBMAIL1.internal.ite.com.tw (CSBMAIL1.internal.ite.com.tw [192.168.65.58]) by mse.ite.com.tw with ESMTP id 26786NhS042559; Thu, 7 Jul 2022 16:06:23 +0800 (GMT-8) (envelope-from allen.chen@ite.com.tw) Received: from VirtualBox.internal.ite.com.tw (192.168.70.46) by CSBMAIL1.internal.ite.com.tw (192.168.65.58) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.14; Thu, 7 Jul 2022 16:06:23 +0800 From: allen CC: Allen Chen , Pin-yen Lin , Jau-Chih Tseng , Kenneth Hung , Hermes Wu , Pin-Yen Lin , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , "open list:DRM DRIVERS" , open list Subject: [PATCH 3/3] drm/bridge: it6505: Modified video clock calculation and video debug message Date: Thu, 7 Jul 2022 16:05:59 +0800 Message-ID: <20220707080600.49041-4-allen.chen@ite.com.tw> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220707080600.49041-1-allen.chen@ite.com.tw> References: <20220707080600.49041-1-allen.chen@ite.com.tw> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.70.46] X-ClientProxiedBy: CSBMAIL1.internal.ite.com.tw (192.168.65.58) To CSBMAIL1.internal.ite.com.tw (192.168.65.58) X-TM-SNTS-SMTP: E3FDFD5508ED8861E199F559B82EF4936875AD59EA9190E4A1C2472A584984512002:8 X-MAIL: mse.ite.com.tw 26786NhS042559 X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,RDNS_DYNAMIC, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: allen chen Speed up video clock calculation and remove redundant video debug message. Signed-off-by: Pin-Yen Lin Signed-off-by: Allen Chen --- drivers/gpu/drm/bridge/ite-it6505.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c index cfd2c3275dc5..11a34ddb60a1 100644 --- a/drivers/gpu/drm/bridge/ite-it6505.c +++ b/drivers/gpu/drm/bridge/ite-it6505.c @@ -703,7 +703,7 @@ static void it6505_calc_video_info(struct it6505 *it6505) DRM_DEV_DEBUG_DRIVER(dev, "hactive_start:%d, vactive_start:%d", hdes, vdes); - for (i = 0; i < 10; i++) { + for (i = 0; i < 3; i++) { it6505_set_bits(it6505, REG_DATA_CTRL0, ENABLE_PCLK_COUNTER, ENABLE_PCLK_COUNTER); usleep_range(10000, 15000); @@ -720,7 +720,7 @@ static void it6505_calc_video_info(struct it6505 *it6505) return; } - sum /= 10; + sum /= 3; pclk = 13500 * 2048 / sum; it6505->video_info.clock = pclk; it6505->video_info.hdisplay = hdew; @@ -2344,8 +2344,6 @@ static void it6505_irq_hpd(struct it6505 *it6505) if (!it6505_get_video_status(it6505)) it6505_video_reset(it6505); - - it6505_calc_video_info(it6505); } else { memset(it6505->dpcd, 0, sizeof(it6505->dpcd)); -- 2.25.1