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 11C01EB64D9 for ; Tue, 27 Jun 2023 06:56:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 94C1810E089; Tue, 27 Jun 2023 06:56:07 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4D07E10E089; Tue, 27 Jun 2023 06:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687848966; x=1719384966; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=M0aSe0LbKVefeoltOR8TJkRuDQbUUNMr5+xpwUGV/tw=; b=OEnIQPWoGZavwbU0vTg9LLGokW6tA2L7QYKMMdRuowv/lR2AAW6FW6Ud foj6FdzrUMe4W5cAsf2hVf9BU76ZPvGI7MOBEH+ZBB63JmVby2jMpizd+ 2MZG972NDLentPg9hhtI+zR2FQROwLJdc8VbMYC/fPNm41cuYAKJM5O5N wAsCGQTwk61I11JODatkh5LRJx7wb1PxmCTeNuqp1j/GnJygAAwr3p18V VyRWMEU9zAqmYy7fdybMqmUcR2zj0v0YIvODdTBFdQuVWBFJOBgh1/HmU CbErZBWbrPRpbeFliaC04PQNBA+A20IMQKW3HYrd9+md931ussoeWL8ng A==; X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="361535451" X-IronPort-AV: E=Sophos;i="6.01,161,1684825200"; d="scan'208";a="361535451" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2023 23:55:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="666584657" X-IronPort-AV: E=Sophos;i="6.01,161,1684825200"; d="scan'208";a="666584657" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.212.195.155]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2023 23:55:52 -0700 Date: Mon, 26 Jun 2023 23:43:24 -0700 Message-ID: <87jzvp5rsj.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: "Belgaumkar, Vinay" In-Reply-To: <8c1b95aa-29c3-35dd-d0cc-609449a6730c@intel.com> References: <20230627021218.123999-1-vinay.belgaumkar@intel.com> <871qhxd25r.wl-ashutosh.dixit@intel.com> <8c1b95aa-29c3-35dd-d0cc-609449a6730c@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.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/guc: Dump perf_limit_reasons for debug 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, 26 Jun 2023 21:02:14 -0700, Belgaumkar, Vinay wrote: > > > On 6/26/2023 8:17 PM, Dixit, Ashutosh wrote: > > On Mon, 26 Jun 2023 19:12:18 -0700, Vinay Belgaumkar wrote: > >> GuC load takes longer sometimes due to GT frequency not ramping up. > >> Add perf_limit_reasons to the existing warn print to see if frequency > >> is being throttled. > >> > >> Signed-off-by: Vinay Belgaumkar > >> --- > >> drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c | 2 ++ > >> 1 file changed, 2 insertions(+) > >> > >> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c > >> index 364d0d546ec8..73911536a8e7 100644 > >> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c > >> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c > >> @@ -254,6 +254,8 @@ static int guc_wait_ucode(struct intel_guc *guc) > >> guc_warn(guc, "excessive init time: %lldms! [freq = %dMHz, before = %dMHz, status = 0x%08X, count = %d, ret = %d]\n", > >> delta_ms, intel_rps_read_actual_frequency(&uncore->gt->rps), > >> before_freq, status, count, ret); > >> + guc_warn(guc, "perf limit reasons = 0x%08X\n", > >> + intel_uncore_read(uncore, intel_gt_perf_limit_reasons_reg(gt))); > > Maybe just add at the end of the previous guc_warn? > > Its already too long a line. If I try adding on the next line checkpatch > complains about splitting double quotes. In these cases of long quoted lines we generally ignore checkpatch. Because perf limit reasons is part of the "excessive init time" message it should be on the same line within the square brackets. So should not be splitting double quotes. Another idea would be something like this: guc_warn(guc, "excessive init time: %lldms! [freq = %dMHz, before = %dMHz, status = 0x%08X]\n", delta_ms, intel_rps_read_actual_frequency(&uncore->gt->rps), before_freq, status); guc_warn(guc, "excessive init time: [count = %d, ret = %d, perf limit reasons = 0x%08X]\n", count, ret, intel_uncore_read(uncore, intel_gt_perf_limit_reasons_reg(gt))); Thanks. -- Ashutosh