From patchwork Mon Dec 18 00:35:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10118447 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 109C360390 for ; Mon, 18 Dec 2017 08:38:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2827288C5 for ; Mon, 18 Dec 2017 08:38:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E727428917; Mon, 18 Dec 2017 08:38:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6EBB6288C5 for ; Mon, 18 Dec 2017 08:38:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E7B66E198; Mon, 18 Dec 2017 08:38:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from relmlie3.idc.renesas.com (relmlor4.renesas.com [210.160.252.174]) by gabe.freedesktop.org (Postfix) with ESMTP id E119B6E16B for ; Mon, 18 Dec 2017 00:35:23 +0000 (UTC) Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie3.idc.renesas.com with ESMTP; 18 Dec 2017 09:35:22 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id D52504B87A; Mon, 18 Dec 2017 09:35:22 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.45,419,1508770800"; d="scan'208";a="265387404" Received: from mail-pu1apc01lp0015.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.15]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 18 Dec 2017 09:35:21 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=XvbUS40tG++RLguaVgupePRH6jUGOfTPF01TjRuahro=; b=njw75yyXtB4IyB/Hxmymsgv5CGfABv9HeAf8W/9qAn/fmwvz6y1RkuUa+DWvWlxwfBTIQMWQCgkhipPMAcmrljCZYwW88qVaeIjHcm+X3blB8PdCTlrJRZjuW5ivn5R/Xj/OU2wOyEJCgr71Pr+xzg7SYh/BAOTX0pL+JJG38As= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.138) by KL1PR0601MB1879.apcprd06.prod.outlook.com (2603:1096:802:8::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Mon, 18 Dec 2017 00:35:18 +0000 Message-ID: <87po7criel.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v4 1/2] drm: rcar-du: use 1000 to avoid misunderstanding in rcar_du_dpll_divider() User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Laurent , Geert Uytterhoeven , David Airlie In-Reply-To: <87r2rsrifu.wl%kuninori.morimoto.gx@renesas.com> References: <87r2rsrifu.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Mon, 18 Dec 2017 00:35:18 +0000 X-Originating-IP: [211.11.155.138] X-ClientProxiedBy: TY1PR01CA0174.jpnprd01.prod.outlook.com (2603:1096:402::26) To KL1PR0601MB1879.apcprd06.prod.outlook.com (2603:1096:802:8::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7fb90c43-0bcb-4c79-febd-08d545af3795 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603307); SRVR:KL1PR0601MB1879; X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1879; 3:LVla/8HFB2BV0vEEs+BF8p+zcwHJndzf5GH8eCNES3n7zGlBWmQ+lf3E4S949SrXCNorR7t1rKde7jcmbjfpN5KUBUXd0xtuYgWRwlAcQtP1x+9kFq3TZuuwGldvwe8ddZN35rlKEHgCuPNLhdQ3xpTFFNDzJr4uZJUV/YMzA5wZQRGj2WaSrcuWILz9O7D7Z1B2HI6K1JYw4jn2570mIR+qRRxBGzh4T/B+zFVE2uY3qjK0yhJtHyAvkrf3HEQ8; 25:soBHdWU40GBwcmZMAB2wFfz2pzAP0Y05FwvkEHIBuuXCSb4mS94khpMzfruIqiWvb+2IqeGQvYcJw3vRAI5fLObMmk65kQNqm7KZ9azHevAuapS6RG1GCVhygftIjOmZtDVLrk7EkK9m5iAJA49jtB/LpBPPRhwKgd9tuQbwnGqzU0MvIhGYYOJse54HMO9f1AWDqYqHp2XhkNebF7vQPq9Eu7GRK3F28x4beUmFm5gp2iH4AKbebMfCH9ZTZvADs0WlgFGeoTnia1/ciHh0uE3/RiutbBLzxO2Kmt9LLZoes3ZaS+Nkx+CJGTrYqpxPT/0XsvV7X21mEji1Y5FyC+yyKvdEaZBsmmDyINoyNn8=;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mAng+GXyTRTtnoZaOXr441LxuDM6qg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231023)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123562025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(201708071742011); SRVR:KL1PR0601MB1879; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:KL1PR0601MB1879; X-Forefront-PRVS: 0525BB0ADF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(346002)(366004)(396003)(376002)(39850400004)(189003)(199004)(105586002)(16526018)(58126008)(50466002)(6486002)(386003)(110136005)(54906003)(7736002)(36756003)(52116002)(106356001)(68736007)(305945005)(2950100002)(59450400001)(76176011)(316002)(7696005)(16586007)(66066001)(53936002)(53416004)(25786009)(86362001)(478600001)(3846002)(4326008)(23726003)(97736004)(81156014)(8676002)(83506002)(2906002)(5660300001)(47776003)(69596002)(6116002)(8936002)(81166006)(221023002)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1PR0601MB1879; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; KL1PR0601MB1879; 23:38hGY9Ea3wp2AZr2+DIF+p3zFL7RDr/am69nM87?= =?us-ascii?Q?HN9OhgG1DHC38GH1+jTdYVkArVaVpAupF1J//HWUrEsief5c/ixe9RNDlrkP?= =?us-ascii?Q?P8bWLrNziqM33jBR+rB9Nhx/5TPXdsfy/6vmqcLR+ERliTZ+9fBWYlKCTBMd?= =?us-ascii?Q?8mQ80rLC7KB0sgLPRfhNCeXndQRkNk+Kl7dOQ1Je7umXyUi7mHCJurubQJzF?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oft-Exchange-Diagnostics: 1; KL1PR0601MB1879; 20:5iCVVARzFsOhruBWEtVPLT73TfIFzXvDEfnZALfxnf4a6UMFide+XyQm1AFX6uYYS7v+AbBEIQEXXhHRxslRoTvbqp+wafT8LuR0wxnbu3C22qf6U4cst+Vc9n0quazXHu2IE7M9g6/B0C3i086PlmIZ6PMVRprXfDLPC9Jbp28= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2017 00:35:18.9932 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7fb90c43-0bcb-4c79-febd-08d545af3795 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB1879 X-Mailman-Approved-At: Mon, 18 Dec 2017 08:38:01 +0000 Cc: Linux-Renesas , Linux-Kernel , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto It is difficult to understand its scale if number has many 0s. This patch uses "* 1000" to avoid it in rcar_du_dpll_divider(). Signed-off-by: Kuninori Morimoto --- v3 -> v4 - no change drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index 5685d5a..6820461f 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c @@ -132,7 +132,7 @@ static void rcar_du_dpll_divider(struct rcar_du_crtc *rcrtc, output = input * (n + 1) / (m + 1) / (fdpll + 1); - if (output >= 400000000) + if (output >= 400 * 1000 * 1000) continue; diff = abs((long)output - (long)target);