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 857E3C2BD09 for ; Sat, 29 Jun 2024 02:07:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2458D10E32C; Sat, 29 Jun 2024 02:07:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="K1KzP42n"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 129D110E32C for ; Sat, 29 Jun 2024 02:07:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719626858; x=1751162858; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=9DE5iUoKDJQ66M5EiPwbnfQjGfm8bvwIrFLpuPWuuuo=; b=K1KzP42nzCEe3yCkjDchvo4QGWvbtTtsfFja+9tyi/9zGbkTCgfCmCg3 3Fz8JC0QQ31Ksp7GwAZ+71dvz42WJwQnKNWv9KQjBtECzioKpFZiX3xcl t6LTO4JX6w2wpbHhpHZD4YNdO7cBQMJ5gfpPQnt9hz/+JZxVkXR+3UKZL h2aSApIiYmt5Wn0Vn+koAg9Zawxcs237gltExKCpJvNhHuHx4kNeWFsVL l6c3mdtmLVf8ZoOQac+UUEMbg1kld6WROzZSsDbJ+GOlUiM45FMZobNdj rn9F3vzGO1aqBT+SjSjB8ac97QS4s3dPP+9OcHr74bpkZH+WQCVTR5vIF A==; X-CSE-ConnectionGUID: lRVct9asQkykJ1yvia5bsA== X-CSE-MsgGUID: YLPTXHAjT/maordklaobvw== X-IronPort-AV: E=McAfee;i="6700,10204,11117"; a="16954764" X-IronPort-AV: E=Sophos;i="6.09,170,1716274800"; d="scan'208";a="16954764" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2024 19:07:37 -0700 X-CSE-ConnectionGUID: K+ottMH2Tge7sxX7j19cpw== X-CSE-MsgGUID: kBA4JXwmTHaPdhn4pB56xA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,170,1716274800"; d="scan'208";a="68116196" Received: from award-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.125.48.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2024 19:07:37 -0700 Date: Fri, 28 Jun 2024 18:58:20 -0700 Message-ID: <87jzi8y0g3.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa Cc: Subject: Re: [PATCH] i915/perf: Remove code to update PWR_CLK_STATE for gen12 In-Reply-To: <20240629005643.3050678-1-umesh.nerlige.ramappa@intel.com> References: <20240629005643.3050678-1-umesh.nerlige.ramappa@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/29.3 (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: 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Fri, 28 Jun 2024 17:56:43 -0700, Umesh Nerlige Ramappa wrote: > > PWR_CLK_STATE only needs to be modified up until gen11. For gen12 this > code is not applicable. Remove code to update context image with > PWR_CLK_STATE for gen12. > > Fixes: 00a7f0d7155c ("drm/i915/tgl: Add perf support on TGL") > Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit > --- > drivers/gpu/drm/i915/i915_perf.c | 33 -------------------------------- > 1 file changed, 33 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c > index 0b1cd4c7a525..025a79fe5920 100644 > --- a/drivers/gpu/drm/i915/i915_perf.c > +++ b/drivers/gpu/drm/i915/i915_perf.c > @@ -2748,26 +2748,6 @@ oa_configure_all_contexts(struct i915_perf_stream *stream, > return 0; > } > > -static int > -gen12_configure_all_contexts(struct i915_perf_stream *stream, > - const struct i915_oa_config *oa_config, > - struct i915_active *active) > -{ > - struct flex regs[] = { > - { > - GEN8_R_PWR_CLK_STATE(RENDER_RING_BASE), > - CTX_R_PWR_CLK_STATE, > - }, > - }; > - > - if (stream->engine->class != RENDER_CLASS) > - return 0; > - > - return oa_configure_all_contexts(stream, > - regs, ARRAY_SIZE(regs), > - active); > -} > - > static int > lrc_configure_all_contexts(struct i915_perf_stream *stream, > const struct i915_oa_config *oa_config, > @@ -2874,7 +2854,6 @@ gen12_enable_metric_set(struct i915_perf_stream *stream, > { > struct drm_i915_private *i915 = stream->perf->i915; > struct intel_uncore *uncore = stream->uncore; > - struct i915_oa_config *oa_config = stream->oa_config; > bool periodic = stream->periodic; > u32 period_exponent = stream->period_exponent; > u32 sqcnt1; > @@ -2918,15 +2897,6 @@ gen12_enable_metric_set(struct i915_perf_stream *stream, > > intel_uncore_rmw(uncore, GEN12_SQCNT1, 0, sqcnt1); > > - /* > - * Update all contexts prior writing the mux configurations as we need > - * to make sure all slices/subslices are ON before writing to NOA > - * registers. > - */ > - ret = gen12_configure_all_contexts(stream, oa_config, active); > - if (ret) > - return ret; > - > /* > * For Gen12, performance counters are context > * saved/restored. Only enable it for the context that > @@ -2980,9 +2950,6 @@ static void gen12_disable_metric_set(struct i915_perf_stream *stream) > _MASKED_BIT_DISABLE(GEN12_DISABLE_DOP_GATING)); > } > > - /* Reset all contexts' slices/subslices configurations. */ > - gen12_configure_all_contexts(stream, NULL, NULL); > - > /* disable the context save/restore or OAR counters */ > if (stream->ctx) > gen12_configure_oar_context(stream, NULL); > -- > 2.38.1 >