From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0DF9BECAAD8 for ; Fri, 23 Sep 2022 09:19:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B576A10E7D5; Fri, 23 Sep 2022 09:19:04 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0C8A210E7D5; Fri, 23 Sep 2022 09:18:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663924739; x=1695460739; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=qFRpcPQ3Nucr6vmKDoOh9w6fsNE+aROgpsnIbjVMoU4=; b=GTxb1PjtOnL4ueOSHUByeQ90sjl9h6ut/09yIXLO2A/DwbJcECvtJf/X pJlGl64OFZpn8yhfWXeWOG0lEFCbjT/Gs0WBaud6t0Na9YnRNUfpX+4VC hks2zwaV1KKRPIWAI2bT0lKHKI8hWd6YI0VbfIRZ7E1Mzzfv11Jq9F74d cbXKZtXcJXMrWTT4R3DNeJ2giB14Q2v5xQT/+lFQgxebw14Iq2Qj1QvKz H+saiZfsRw5QeH7e0+DOSasyklARa/3xEe2g/L7/Gtar5OpMtubxz8B58 gB43x5NdG2KPmxhkmaOtzN11IT5nTMz/I+5b6iECK7yjNGI0BHaOuF2AV w==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="301998187" X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="301998187" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 02:18:58 -0700 X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="865231225" Received: from armannov-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.61.93]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 02:18:50 -0700 From: Jani Nikula To: Thomas Zimmermann , Maxime Ripard , Jernej Skrabec , Rodrigo Vivi , Ben Skeggs , David Airlie , Maxime Ripard , Joonas Lahtinen , Emma Anholt , Karol Herbst , Samuel Holland , Daniel Vetter , Lyude Paul , Maarten Lankhorst , Tvrtko Ursulin , Chen-Yu Tsai Subject: Re: [PATCH v2 10/33] drm/modes: Add a function to generate analog display modes In-Reply-To: <72a8c3ce-ed03-0a77-fb92-eaa992eb86fe@suse.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20220728-rpi-analog-tv-properties-v2-0-f733a0ed9f90@cerno.tech> <20220728-rpi-analog-tv-properties-v2-10-f733a0ed9f90@cerno.tech> <72a8c3ce-ed03-0a77-fb92-eaa992eb86fe@suse.de> Date: Fri, 23 Sep 2022 12:18:32 +0300 Message-ID: <87h70y4ffb.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dom Cobley , Dave Stevenson , nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-sunxi@lists.linux.dev, Hans de Goede , Noralf =?utf-8?Q?Tr=C3=B8nnes?= , Geert Uytterhoeven , Mateusz Kwiatkowski , Phil Elwell , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, 23 Sep 2022, Thomas Zimmermann wrote: > Am 22.09.22 um 16:25 schrieb Maxime Ripard: >> + drm_dbg_kms(dev, >> + "Generating a %ux%u%c, %u-line mode with a %lu kHz clock\n", >> + hactive, vactive, >> + interlace ? 'i' : 'p', >> + params->num_lines, >> + pixel_clock_hz / 1000); > > Divide by HZ_PER_KHZ here and in other places. > > https://elixir.bootlin.com/linux/latest/source/include/linux/units.h#L23 >From the Department of Bikeshedding: I find "pixel_clock_hz / 1000" has much more clarity than "pixel_clock_hz / HZ_PER_KHZ". I don't consider the SI prefixes magic numbers. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center