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 5E8C3C433EF for ; Thu, 23 Jun 2022 00:53:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0AEED10F492; Thu, 23 Jun 2022 00:53:29 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id E7D2D10F492; Thu, 23 Jun 2022 00:53:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655945607; x=1687481607; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=BzbqXI5JA+TJXoAVYXmTYoUaP98U0GdsXuvIu/Ff/Zs=; b=T/8iZ6YGon2Lkp22RQfsU10dKbgEpEACEWBMBg624BqJ/QBNtin3tjlz U2qLoX5RX4S4nxa0sUZDfUb99R8lX5NPkjS7EhEUOBw9ygcdIHpJYxsyc 7830jFhxhiE+1E90Nnkwa+N0BPVpCEzjwk3YFlllv+4uJY+Ea6XMHdwXb fhk9BaBl1SOYkaSE2cm2brJTB2hmRjytEsIQyrOyOtFOanXtiBH7lb5+m Gnh/itxKRbiHn3iuugv/x2WHgbIeGw6ZHqoUAzRKwoSUkoFchHwgKwyJy Jz+R1QGYCMnT96vY0ovazBEx/7KKG/TJ4Flu3EqN9MaxWqietaN3FMSKv w==; X-IronPort-AV: E=McAfee;i="6400,9594,10386"; a="280635081" X-IronPort-AV: E=Sophos;i="5.92,215,1650956400"; d="scan'208";a="280635081" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 17:53:27 -0700 X-IronPort-AV: E=Sophos;i="5.92,215,1650956400"; d="scan'208";a="655936256" Received: from adixit-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.209.53.110]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 17:53:27 -0700 Date: Wed, 22 Jun 2022 17:53:26 -0700 Message-ID: <87edzgxks9.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Vinay Belgaumkar Subject: Re: [PATCH] drm/i915/guc/slpc: Use non-blocking H2G for waitboost In-Reply-To: <20220623003225.23301-1-vinay.belgaumkar@intel.com> References: <20220623003225.23301-1-vinay.belgaumkar@intel.com> 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/28.1 (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 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: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, 22 Jun 2022 17:32:25 -0700, Vinay Belgaumkar wrote: > > @@ -208,12 +232,14 @@ static int slpc_force_min_freq(struct intel_guc_slpc *slpc, u32 freq) > */ > > with_intel_runtime_pm(&i915->runtime_pm, wakeref) { > - ret = slpc_set_param(slpc, > - SLPC_PARAM_GLOBAL_MIN_GT_UNSLICE_FREQ_MHZ, > - freq); > + /* Non-blocking request will avoid stalls */ > + ret = slpc_set_param_nb(slpc, > + SLPC_PARAM_GLOBAL_MIN_GT_UNSLICE_FREQ_MHZ, > + freq); > if (ret) > - i915_probe_error(i915, "Unable to force min freq to %u: %d", > - freq, ret); > + drm_notice(&i915->drm, > + "Failed to send set_param for min freq(%d): (%d)\n", > + freq, ret); I am still thinking if we should replace drm_notice() by i915_probe_error() since drm_notice() will basically hide any issues of boost/de-boost's getting dropped. Another idea here might be to maintain a counter, say "slpc->failed_boosts" which we increment each time slpc_set_param_nb() fails and dump that counter via intel_guc_slpc_print_info(). Anyway for now this is: Reviewed-by: Ashutosh Dixit 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 50889C43334 for ; Thu, 23 Jun 2022 00:53:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8FEF810F623; Thu, 23 Jun 2022 00:53:29 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id E7D2D10F492; Thu, 23 Jun 2022 00:53:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655945607; x=1687481607; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=BzbqXI5JA+TJXoAVYXmTYoUaP98U0GdsXuvIu/Ff/Zs=; b=T/8iZ6YGon2Lkp22RQfsU10dKbgEpEACEWBMBg624BqJ/QBNtin3tjlz U2qLoX5RX4S4nxa0sUZDfUb99R8lX5NPkjS7EhEUOBw9ygcdIHpJYxsyc 7830jFhxhiE+1E90Nnkwa+N0BPVpCEzjwk3YFlllv+4uJY+Ea6XMHdwXb fhk9BaBl1SOYkaSE2cm2brJTB2hmRjytEsIQyrOyOtFOanXtiBH7lb5+m Gnh/itxKRbiHn3iuugv/x2WHgbIeGw6ZHqoUAzRKwoSUkoFchHwgKwyJy Jz+R1QGYCMnT96vY0ovazBEx/7KKG/TJ4Flu3EqN9MaxWqietaN3FMSKv w==; X-IronPort-AV: E=McAfee;i="6400,9594,10386"; a="280635081" X-IronPort-AV: E=Sophos;i="5.92,215,1650956400"; d="scan'208";a="280635081" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 17:53:27 -0700 X-IronPort-AV: E=Sophos;i="5.92,215,1650956400"; d="scan'208";a="655936256" Received: from adixit-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.209.53.110]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 17:53:27 -0700 Date: Wed, 22 Jun 2022 17:53:26 -0700 Message-ID: <87edzgxks9.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Vinay Belgaumkar In-Reply-To: <20220623003225.23301-1-vinay.belgaumkar@intel.com> References: <20220623003225.23301-1-vinay.belgaumkar@intel.com> 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/28.1 (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/guc/slpc: Use non-blocking H2G for waitboost 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 Wed, 22 Jun 2022 17:32:25 -0700, Vinay Belgaumkar wrote: > > @@ -208,12 +232,14 @@ static int slpc_force_min_freq(struct intel_guc_slpc *slpc, u32 freq) > */ > > with_intel_runtime_pm(&i915->runtime_pm, wakeref) { > - ret = slpc_set_param(slpc, > - SLPC_PARAM_GLOBAL_MIN_GT_UNSLICE_FREQ_MHZ, > - freq); > + /* Non-blocking request will avoid stalls */ > + ret = slpc_set_param_nb(slpc, > + SLPC_PARAM_GLOBAL_MIN_GT_UNSLICE_FREQ_MHZ, > + freq); > if (ret) > - i915_probe_error(i915, "Unable to force min freq to %u: %d", > - freq, ret); > + drm_notice(&i915->drm, > + "Failed to send set_param for min freq(%d): (%d)\n", > + freq, ret); I am still thinking if we should replace drm_notice() by i915_probe_error() since drm_notice() will basically hide any issues of boost/de-boost's getting dropped. Another idea here might be to maintain a counter, say "slpc->failed_boosts" which we increment each time slpc_set_param_nb() fails and dump that counter via intel_guc_slpc_print_info(). Anyway for now this is: Reviewed-by: Ashutosh Dixit