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 59F47C6FA82 for ; Fri, 23 Sep 2022 09:19:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E4D0B10E7D7; Fri, 23 Sep 2022 09:19:06 +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 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 Subject: Re: [Intel-gfx] [PATCH v2 10/33] drm/modes: Add a function to generate analog display modes X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & 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, Noralf =?utf-8?Q?Tr=C3=B8nnes?= , Geert Uytterhoeven , Mateusz Kwiatkowski , Phil Elwell , linux-arm-kernel@lists.infradead.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD57629AB for ; Fri, 23 Sep 2022 09:18:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663924738; x=1695460738; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=qFRpcPQ3Nucr6vmKDoOh9w6fsNE+aROgpsnIbjVMoU4=; b=bUKYsorL1NjFvawWOqHNdEu3qHvdsVv5YZBBoGQBp2ecE9m69qf1x/KJ ueaLIC1f7jpT4ydAcyXhjnyLuiE7Tyk9Dtj6jtD0WRwvSTo6exA4WKNm/ bG7uISSIJY8fKSOEbhSWAFKR9Flr6g2iO0nk++UXKRN1tWXOXKMOjUBAD ir8DYBKPQsUXIK1VzQ4HIA1FxiPd0grwqCQ5w5pCFOQwWhSIIscXpNrEU zWe2HTKrqCVsDIiQx2HtygspPbC0kEitue1p6ZmSlfJm/nt0Loy0gUAq7 7eVl4AroO5WHa3rQaYos0fIoGpeB4xh15kLN4zjezIAJ+70/FCU6cm5P8 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="300537649" X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="300537649" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.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 Cc: Hans de Goede , nouveau@lists.freedesktop.org, Geert Uytterhoeven , Dave Stevenson , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Phil Elwell , intel-gfx@lists.freedesktop.org, Noralf =?utf-8?Q?Tr=C3=B8nnes?= , Dom Cobley , linux-sunxi@lists.linux.dev, Mateusz Kwiatkowski , dri-devel@lists.freedesktop.org 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> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain 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 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 528F5C6FA82 for ; Fri, 23 Sep 2022 09:19:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 65D1A10E7D2; Fri, 23 Sep 2022 09:19:02 +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 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 Subject: Re: [Nouveau] [PATCH v2 10/33] drm/modes: Add a function to generate analog display modes X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dom Cobley , 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: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" 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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 AB1AAECAAD8 for ; Fri, 23 Sep 2022 09:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=awniblQIAnf4jZNAMbsb+EWtrNGeU644R4pmG2wGOJo=; b=gOl9SCEmF3TrHi AC48gj7UZWCoEIh/qUWOMctXEJyEz3lXhztt5nj67ZGaevSCAJfyJL2jZq/kh5cEX6tdh27/Lc0qS YD0f8yUaFUEYcwGLGWRRXfGq0RebYvHGhY02ESNvdKTYA+NnrFU/0/c6pc4Wz+U/YZGyngjhiQEgj bpjq6ML0Ji6xRWJbeCZvEQsh3jGyqa3lvjSqM+975r7vDq11NB5CHUtt87GFy1cyMlK5yEXcocDKK 1sTXSHYn8MwIhQCQLcmrSpRxQSWQVNVXNCvVr2upgYCbmcpFwCdzi86azi90jsG4cBngcutIKDiJ2 6RoXo1ecb6SXP2Vn+jJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1obepy-003FrF-At; Fri, 23 Sep 2022 09:19:10 +0000 Received: from mga09.intel.com ([134.134.136.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1obepp-003FmS-I0 for linux-arm-kernel@lists.infradead.org; Fri, 23 Sep 2022 09:19:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663924741; x=1695460741; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=qFRpcPQ3Nucr6vmKDoOh9w6fsNE+aROgpsnIbjVMoU4=; b=frKsYyz+65vq3ES3foaocQY3cBCuOqJDICe68CtmusvmxwATNsz9nC8L ZH/SxgyfCz+zISdvR5/J4fnHEL3y8AaCdGidEv7pzajqUR6lyTTn77dJm AVQ1++KHo+MVmJvCJtMXtPBjWpGAQTHYf6qqw8Jm3D01q03ulJDykVDSb gwlrf8flB9QT5tfFj2M8iVgDdZl/sh5YSB3iW4P+mxNmrbXc7C2cqr7dm iUEZl7PS0db1MKs73fFQHxuwgJ3Uf38tlN23hE8IiMNV3LShXQFf5qcM1 4ByuBRO5s1YBg/frOb/Oqpn0XL7T1UDA/iU7d8dPXibYB2zw3w4+X34ue A==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="301434594" X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="301434594" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.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 Cc: Hans de Goede , nouveau@lists.freedesktop.org, Geert Uytterhoeven , Dave Stevenson , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Phil Elwell , intel-gfx@lists.freedesktop.org, Noralf =?utf-8?Q?Tr=C3=B8nnes?= , Dom Cobley , linux-sunxi@lists.linux.dev, Mateusz Kwiatkowski , dri-devel@lists.freedesktop.org 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220923_021901_687608_332406B1 X-CRM114-Status: UNSURE ( 7.41 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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