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 72B6EC433F5 for ; Wed, 11 May 2022 05:26:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F075A10EE25; Wed, 11 May 2022 05:26:33 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 10D1B10EE25 for ; Wed, 11 May 2022 05:26:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652246792; x=1683782792; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=8lxLnNO4bptPWDazhzq7lZrSgeVBcVN+F5IRIIPfcJQ=; b=Wp6uz1wXbv8hexm+npAwdAqQKR4jW1uGxcN/RM/3f47hiff4S4hpko4j p/6xx022Iq26PbuKjr2x8EGNF16bxqCC0OvR+ibC/qiz+Oi1rHKzXhpvO VXaxwyfXZpZoqmZB0JH5PnTgsM49rGcAfkHed1crcax8zUEGvt1LZbBiU w8xApyMffnlY96u5FA7sei3lemLwRFasFjS/wxlrsWajB0+6M8aOgvShw U/MF1GJMaOpf7A7tupLEZRMpoRZ0Drs0wbtNFiaFaUSWLIbcseXXojfxb ZtXtgYK/h3liVbrVNBZ5rLaoI4hLc2xVypxetuv9gp61FuGN3kfSWzBBk g==; X-IronPort-AV: E=McAfee;i="6400,9594,10343"; a="249488482" X-IronPort-AV: E=Sophos;i="5.91,216,1647327600"; d="scan'208";a="249488482" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 22:26:31 -0700 X-IronPort-AV: E=Sophos;i="5.91,216,1647327600"; d="scan'208";a="711337102" Received: from adixit-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.212.251.37]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 22:26:31 -0700 Date: Tue, 10 May 2022 22:26:31 -0700 Message-ID: <87ilqc7i7s.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Jani Nikula In-Reply-To: <87a6bpkf32.fsf@intel.com> References: <2d170de1b4cbbd670c90d963d2cc229426ead492.1651261886.git.ashutosh.dixit@intel.com> <57e2a444-714d-13bc-133b-0cb3e6cc9fdc@linux.intel.com> <87a6bpkf32.fsf@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/27.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 3/8] drm/i915/pcode: Extend pcode functions for multiple gt's 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 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Tue, 10 May 2022 00:43:29 -0700, Jani Nikula wrote: > On Tue, 10 May 2022, Tvrtko Ursulin wrote: > > On 29/04/2022 20:56, Ashutosh Dixit wrote: > >> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c > >> index 90b0ce5051af..bc49eff38c6a 100644 > >> --- a/drivers/gpu/drm/i915/i915_driver.c > >> +++ b/drivers/gpu/drm/i915/i915_driver.c > >> @@ -520,6 +520,22 @@ static int i915_set_dma_info(struct drm_i915_private *i915) > >> return ret; > >> } > >> > >> +static int i915_pcode_init(struct drm_i915_private *i915) > >> +{ > >> + struct intel_gt *gt; > >> + int id, ret; > >> + > >> + for_each_gt(gt, i915, id) { > >> + ret = intel_pcode_init(gt->uncore); > >> + if (ret) { > >> + drm_err(>->i915->drm, "gt %d: intel_pcode_init failed %d\n", id, ret); > > > > A few nits.. > > > > 1) All other/current logs use "gt%d" (no space). > > > > 2) intel_pcode_init also logs a drm_err - do we need two? I suggest > > leaving this one only since it has more information. > > > > 3) It would have been nicer to have refactoring of intel_pcode_ to work > > on uncore separate from adding for_each_gt. > > Yeah. > > Also the obvious first patch would've been to convert intel_pcode.c > functions from struct drm_i915_private * to intel_uncore *. Will fix up the first 2 points but about this last point, to not break incremental compile all callers of the pcode functions also need to be converted to i915->uncore or gt->uncore (so it's not possible to convert just intel_pcode.c functions without also converting all callers, if that was the intent of this comment, unless I am missing something). But yes the i915_pcode_init() above can be separated out to a separate patch so I can do that. Thanks. -- Ashutosh