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 4C773C433EF for ; Thu, 12 May 2022 04:28:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B872310E1DC; Thu, 12 May 2022 04:28:39 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 66BF610E1DC for ; Thu, 12 May 2022 04:28: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=1652329718; x=1683865718; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=2+zyH9Rl6si1DczigWCpOaj/iT3XFnbol7t0rXj89Xc=; b=g3HC+yVeAo9rT/46N9BKYZuu14q+lfKWIJ3QfR2/A7nhq3tHdsG+2DDG lPjlMUwji17uCcTiRvhQr0H1OQJrp2IvTM7APsRKpkKa+si0xIKC1vad1 fpI5sGsX5t5xQHyY43VOwbdPT1pX0MpVNoEcHs7u2+yaKkr6EBOY7VclH KRUELjJFKES8HVOCwTAP1t2tf6SV6y40/g5RB/IPOZPX/k1WlicEwiZN2 G7MqEhSwGH1xWT75GwBLGSJ+Z+dDZxDwgEF7WDbplSSsxPMyMFswdyTIz ONoYCbsLX1UkwQGuiN8FEJrbb7AyPhhMRFLcr4Z8omqRzvRHRleDzK2TH A==; X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="257434353" X-IronPort-AV: E=Sophos;i="5.91,218,1647327600"; d="scan'208";a="257434353" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 21:28:18 -0700 X-IronPort-AV: E=Sophos;i="5.91,218,1647327600"; d="scan'208";a="603213780" Received: from adixit-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.252.130.105]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 21:28:18 -0700 Date: Wed, 11 May 2022 21:28:18 -0700 Message-ID: <87a6bn74t9.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Tvrtko Ursulin In-Reply-To: References: <2d170de1b4cbbd670c90d963d2cc229426ead492.1651261886.git.ashutosh.dixit@intel.com> <57e2a444-714d-13bc-133b-0cb3e6cc9fdc@linux.intel.com> <87a6bpkf32.fsf@intel.com> <87ilqc7i7s.wl-ashutosh.dixit@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: Jani Nikula , intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, 11 May 2022 01:18:07 -0700, Tvrtko Ursulin wrote: > On 11/05/2022 06:26, Dixit, Ashutosh wrote: > > 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). Fixed. > >>> > >>> 2) intel_pcode_init also logs a drm_err - do we need two? I suggest > >>> leaving this one only since it has more information. Remove duplicated drm_err and also drm_dbg from intel_pcode_init() in Patch v4 (Series v5). > >>> > >>> 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). > > Yes the implication is to convert the callers when doing such conversion, > we never do broken commits. > > > But yes the i915_pcode_init() above can be separated out to a separate > > patch so I can do that. > > AFAIR that will achieve what is suggested, thanks! Move out i915_pcode_init() to a separate patch "drm/i915/pcode: Init pcode on different gt's" in Patch v4 (Series v5). Thanks. -- Ashutosh