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 7DAB8C43334 for ; Fri, 17 Jun 2022 21:02:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D3CE510E13D; Fri, 17 Jun 2022 21:02:25 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id BD19010E13D; Fri, 17 Jun 2022 21:02:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655499744; x=1687035744; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=QFcYORIj+MbiJXFKCBmHO+AwoMGx+NNpW51jgXJmX7s=; b=bVr1mVLZIx6jBMuVSntAubCGouP5Gabh1me2rvdIhuATlYuVVKx6qdzI NZIEcZgQd6BHk326a5EDWGeAPcrV8m8tRpDRzMRMWupBcSQTOlQXwEB+g TLDyn0gEiSR81yTn6k57l+kiEJgtukBi2cyMJXnoJl3paqw+vVTj7R4hw VMapu5Pn4TOEoujjYrRgtswBDjMwyiXasb5IyDzj1VHhIXwZnzWpSvVh+ 6y7ve9HAadw0T+43BukT3LgGkyK/bee8H4DsHxNEWpaPYdhuGZSWSf9xG 1yj6Q+7x5aACGj9sDgwAvLzEaNzWezmPNQYgb62Gsl8XG/W9ThJYgGVuO Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="365910621" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="365910621" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2022 14:02:23 -0700 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="619383939" Received: from adixit-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.252.139.88]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2022 14:02:21 -0700 Date: Fri, 17 Jun 2022 13:53:59 -0700 Message-ID: <87h74jvwns.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Vinay Belgaumkar Subject: Re: [PATCH] drm/i915: Add global forcewake status to drpc In-Reply-To: <20220617202534.30609-1-vinay.belgaumkar@intel.com> References: <20220617202534.30609-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 Fri, 17 Jun 2022 13:25:34 -0700, Vinay Belgaumkar wrote: > > We have seen multiple RC6 issues where it is useful to know > which global forcewake bits are set. Add this to the 'drpc' > debugfs output. A couple of optional nits below to look at but otherwise this is: Reviewed-by: Ashutosh Dixit > +static u32 mt_fwake_status(struct intel_uncore *uncore) > +{ > + return intel_uncore_read_fw(uncore, FORCEWAKE_MT); > +} > + > static int vlv_drpc(struct seq_file *m) > { > struct intel_gt *gt = m->private; > struct intel_uncore *uncore = gt->uncore; > - u32 rcctl1, pw_status; > + u32 rcctl1, pw_status, mt_fwake; > > + mt_fwake = mt_fwake_status(uncore); I would get rid of the function and just duplicate the intel_uncore_read_fw(). > pw_status = intel_uncore_read(uncore, VLV_GTLC_PW_STATUS); > rcctl1 = intel_uncore_read(uncore, GEN6_RC_CONTROL); > > seq_printf(m, "RC6 Enabled: %s\n", > str_yes_no(rcctl1 & (GEN7_RC_CTL_TO_MODE | > GEN6_RC_CTL_EI_MODE(1)))); > + seq_printf(m, "Multi-threaded Forcewake: 0x%x\n", mt_fwake); Is "Multi-threaded Forcewake Request" (the Bspec register name) a more descriptive print? Same for gen6_drpc() below. Thanks!