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 E1F7CC433F5 for ; Mon, 21 Mar 2022 19:13:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 591B210E477; Mon, 21 Mar 2022 19:13:00 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 71D1710E477 for ; Mon, 21 Mar 2022 19:12: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=1647889979; x=1679425979; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=s4it3A3tQ1olm2mfzgwiC7GrpHUQBZ75wThKoqgpIkk=; b=EovOxHzBvXsD0l5cVqon9fkn7q35CRvAgbXumnhXexnoGZB0IaLca4wJ 0UvksYu3NehnMn7wgc9B2dI4SGsoqiddgZ6jjWnXgRI1LQSQuSaQKItLp epiViwBS6IQkRoC4rkvkrpFznHujocNvuMNEN1gptRh8spNx5b7zZLWIc sQaZThG1Kr+/+mkkviv0WX0BwlYn+GG6HsuXgPFHDcOgYEgGmXl+0l8MO 0N2r28MyJujrE3yUF2fqEzN47xDCO3g0/qDAxfZdHnjA9zKVdNgg8GY2k RsafUWju5p4zNtAnzlwkvfIJzEjl+78w6I172+23rd5stxwzEd96Gf4Em g==; X-IronPort-AV: E=McAfee;i="6200,9189,10293"; a="238236072" X-IronPort-AV: E=Sophos;i="5.90,199,1643702400"; d="scan'208";a="238236072" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2022 12:12:58 -0700 X-IronPort-AV: E=Sophos;i="5.90,199,1643702400"; d="scan'208";a="543349190" Received: from adixit-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.209.65.199]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2022 12:12:58 -0700 Date: Mon, 21 Mar 2022 12:12:58 -0700 Message-ID: <87ils7glvp.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Lucas De Marchi In-Reply-To: <20220321181746.lg2rafbfvilfvfop@ldmartin-desk2> References: <20220321175604.58987-1-ashutosh.dixit@intel.com> <20220321181746.lg2rafbfvilfvfop@ldmartin-desk2> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [Intel-gfx] [PATCH] drm/i915/rps: Centralize computation of freq caps 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: intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Mon, 21 Mar 2022 11:17:46 -0700, Lucas De Marchi wrote: > > On Mon, Mar 21, 2022 at 10:56:04AM -0700, Ashutosh Dixit wrote: > > diff --git a/drivers/gpu/drm/i915/gt/intel_rps_types.h b/drivers/gpu/drm/i915/gt/intel_rps_types.h > > index 3941d8551f52..5990df35b393 100644 > > --- a/drivers/gpu/drm/i915/gt/intel_rps_types.h > > +++ b/drivers/gpu/drm/i915/gt/intel_rps_types.h > > @@ -37,6 +37,13 @@ enum { > > INTEL_RPS_TIMER, > > }; > > > > +/* Freq caps exposed by HW, in units of 16.67 MHz for recent gens */ > > "recent gens" is probably too broad. Since we are exporting this struct > to other parts of the driver and we are already abstracting the > register location and bit position, maybe we should also already > abstract the unit in the same place? i.e. just make it always be > "units of 16.67 MHz", or even just make it a standard Hz unit. > > If this would rather make things more complicated for places that expect > "hw units", then maybe just say in this comment the value is in "HW > units" and intel_gpu_freq() should be used to convert to hz. OK, let me investigate some more, see what's possible and then get back regarding this. Thanks for reviewing.