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 35B1AC77B73 for ; Mon, 22 May 2023 14:52:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3B00710E34A; Mon, 22 May 2023 14:52:29 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 195C910E349; Mon, 22 May 2023 14:52:27 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7FC92613EA; Mon, 22 May 2023 14:52:26 +0000 (UTC) Received: from rdvivi-mobl4 (unknown [192.55.54.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPSA id 3903BC433EF; Mon, 22 May 2023 14:52:24 +0000 (UTC) Date: Mon, 22 May 2023 10:52:21 -0400 From: Rodrigo Vivi To: Tvrtko Ursulin Message-ID: References: <20230522115928.588793-1-tvrtko.ursulin@linux.intel.com> <20230522115928.588793-2-tvrtko.ursulin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230522115928.588793-2-tvrtko.ursulin@linux.intel.com> Subject: Re: [Intel-gfx] [PATCH 2/4] drm/i915: Record default rps threshold values 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, dri-devel@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Mon, May 22, 2023 at 12:59:26PM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Record the default values as preparation for exposing the sysfs controls. > > Signed-off-by: Tvrtko Ursulin > Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi > --- > drivers/gpu/drm/i915/gt/intel_gt_types.h | 3 +++ > drivers/gpu/drm/i915/gt/intel_rps.c | 2 ++ > 2 files changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/i915/gt/intel_gt_types.h b/drivers/gpu/drm/i915/gt/intel_gt_types.h > index f08c2556aa25..1b22d7a50665 100644 > --- a/drivers/gpu/drm/i915/gt/intel_gt_types.h > +++ b/drivers/gpu/drm/i915/gt/intel_gt_types.h > @@ -83,6 +83,9 @@ enum intel_submission_method { > struct gt_defaults { > u32 min_freq; > u32 max_freq; > + > + u8 rps_up_threshold; > + u8 rps_down_threshold; > }; > > enum intel_gt_type { > diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c > index 791097eb9bfd..333abc8f7ecb 100644 > --- a/drivers/gpu/drm/i915/gt/intel_rps.c > +++ b/drivers/gpu/drm/i915/gt/intel_rps.c > @@ -2016,7 +2016,9 @@ void intel_rps_init(struct intel_rps *rps) > > /* Set default thresholds in % */ > rps->power.up_threshold = 95; > + rps_to_gt(rps)->defaults.rps_up_threshold = rps->power.up_threshold; > rps->power.down_threshold = 85; > + rps_to_gt(rps)->defaults.rps_down_threshold = rps->power.down_threshold; > > /* Finally allow us to boost to max by default */ > rps->boost_freq = rps->max_freq; > -- > 2.39.2 >