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 E5450C433EF for ; Tue, 26 Apr 2022 00:28:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C9AA10E1FC; Tue, 26 Apr 2022 00:28:54 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id C006410E1FC for ; Tue, 26 Apr 2022 00:28:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650932932; x=1682468932; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=kgXzdbLVshFyHcIYyEHzhOGpUBsW9/1yr/uUIHPVmrg=; b=hY/IZo4rc1qhi3hnHneJXD63WalHb/rA4wuSnZlBl+I7aYD4K1g7qVcg z8U+fMYmtC/NIaGTGMvy2y0/FKzRNdS5hR+onBmaPbvVXXuJlSoVxkXmI WAypxMwupk1ec99hYaNqxmVsl/nK+Y9K/Phr6oyYyzmFXOumC3gKlPix1 pKA6pjLNFIB49uBqXZ95ApDPQgBQEJ/eeJU6n/cF2Nf2oX93qSjlmpa23 Z72Tx2ddADHrsAGQ5JkZANSIkzhA4f19nnCh5CIl0SPp7V1sjs19XAFcj zev/zsqkQE23iZ/EgZGfGBl4F8AzCcauw7SWTzLFy44PgzklR9HiT+PcX w==; X-IronPort-AV: E=McAfee;i="6400,9594,10328"; a="265206695" X-IronPort-AV: E=Sophos;i="5.90,289,1643702400"; d="scan'208";a="265206695" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2022 17:28:52 -0700 X-IronPort-AV: E=Sophos;i="5.90,289,1643702400"; d="scan'208";a="512882768" Received: from adixit-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.212.195.217]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2022 17:28:51 -0700 Date: Mon, 25 Apr 2022 17:28:50 -0700 Message-ID: <8735i07kn1.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Andi Shyti In-Reply-To: References: 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 2/9] drm/i915/gt: Add media freq factor to per-gt sysfs 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 Sun, 24 Apr 2022 11:43:18 -0700, Andi Shyti wrote: > > Hi Ashutosh, Hi Andi > [...] > > > static int intel_sysfs_rps_init(struct intel_gt *gt, struct kobject *kobj, > > const struct attribute * const *attrs) > > { > > @@ -598,4 +720,12 @@ void intel_gt_sysfs_pm_init(struct intel_gt *gt, struct kobject *kobj) > > drm_warn(>->i915->drm, > > "failed to create gt%u throttle sysfs files (%pe)", > > gt->info.id, ERR_PTR(ret)); > > + > > + if (HAS_MEDIA_RATIO_MODE(gt->i915) && intel_uc_uses_guc_slpc(>->uc)) { > > you could use in this case the ".is_visible()" function as you are > not inheriting it from the upper drm class. ".is_visible()" is only available in an "attribute_group" but here we are not creating an "attribute_group", just creating files in a previously existing sysfs directory (i.e. using using sysfs_create_files() (as done for RPS attributes) rather than sysfs_create_group() (as done for RC6)). There seems to be no reason to create an "attribute_group" (such as what was needed for RC6) so unless you suggest otherwise I'm leaving this as is. > > Anyway, > > Reviewed-by: Andi Shyti Thanks. -- Ashutosh