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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20C10E7717F for ; Tue, 17 Dec 2024 17:34:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ABDD26B0096; Tue, 17 Dec 2024 12:34:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A6E806B0098; Tue, 17 Dec 2024 12:34:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 936376B0099; Tue, 17 Dec 2024 12:34:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 71B516B0096 for ; Tue, 17 Dec 2024 12:34:56 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 34668808E5 for ; Tue, 17 Dec 2024 17:34:56 +0000 (UTC) X-FDA: 82905150426.30.2B3CCEC Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf07.hostedemail.com (Postfix) with ESMTP id 6283A40019 for ; Tue, 17 Dec 2024 17:34:10 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Ub9DB+1p; spf=pass (imf07.hostedemail.com: domain of nathan@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=nathan@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734456880; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=PJcLS590+b3B+TudzuDxz7Lcuq+ukWZ0kpX+RpwMbJI=; b=GBPlluWKi7riomgoYVzfMXinCBHgHUJlK5/5mJzVM+J+Vh05cxD2nE2nu0yWKMasqYrQaG ixsl1Sm13hNyIgjUTop/zumd+dXrB3ydDyVDIB6YV/2zwVAPTnqTFt6iyhCaJQF9Zmk4Dw DNamFdZoCYsMzuAa/By08nZzsyjoqvo= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Ub9DB+1p; spf=pass (imf07.hostedemail.com: domain of nathan@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=nathan@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734456880; a=rsa-sha256; cv=none; b=aHiti9XnKtcpZxQRRZgiluiG7naBSPBq2f6o0mK1V1ydSqqfgYgtUBc+h6XVmHZQ/mPVeq fj4vtR5q0mK8uWpsiQTDq+UnGA2woY/JeDmEc01heUDdIPvaZcB5bVkCK+JK3M16SXP1Et WlLDUkTWf0AWAAKsJN2+y1gTEVFf3Yc= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 152335C4B29; Tue, 17 Dec 2024 17:34:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D711CC4CED3; Tue, 17 Dec 2024 17:34:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734456892; bh=7YUvOgql5UXPC5K9+DvgQ49j0IrkgPD9X4Yrpc2gabM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ub9DB+1pzmHivS9+iI9k5eKN8CYcSG44BSRtGgGwqlYep+hKXjcG4dVD/Deytic4g CON5PBfo3XixAvxRjCGU554q9giLynE/U6YM6BWXwr8GNV+H9kLT5MaHTS5j6LWAA4 XqxXvgpByRVojkBCRiKTMJWMUf0iJP3ndL5dotAMOMvrt9x4F2foyBti8dExyIfFiN EScR+O5NcxLHKEX5SGNNCrgkEIeAc9/oJWQYiZ7B9maIA/o4l7b+iV95G16pOedWh2 9RbPU3t3yhcnSZ5A5eERl6CrRfkhrv6muY3dl0PtoxJXVd7vK8er0CkZKMkiPelosV nbziCUaKX/ehA== Date: Tue, 17 Dec 2024 10:34:48 -0700 From: Nathan Chancellor To: Vincent Mailhol , Andrew Morton Cc: kernel test robot , llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List Subject: Re: [linux-next:master 2260/2462] drivers/gpu/drm/xe/xe_gt_idle.c:127:33: error: static assertion expression is not an integral constant expression Message-ID: <20241217173448.GA2647780@ax162> References: <202412080849.sPp82jSi-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 6283A40019 X-Stat-Signature: 38oqw1iy3r4zh3rsa1mtnushqxt17gg1 X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1734456850-280608 X-HE-Meta: U2FsdGVkX19n6kj7POiQJGruleBnxr5xXxgXIiKmdY3zLlhSeyy46hpu83YvMDRq0hznVXZDrGSNj8qyE5cdGKH/h8Oce2ZNa7/Ow+bXBml84VsVhpg+DxZOCAryUSF0b2h6G31chfowemFesyRI6z9A7+84v6FBUBEGwVZ7Nn2lqN9sbmk4FV7FuHH37R5yxk0IB6xOMtkBQhkx4eKWMeWV8NEsfrQT9NqfI1pO2HkFDLReDWGvKAIF4ra8h79bzZ4Mo3PgQqI6DvGX88zaVjzbkiNt550iKz2/r5aiNBTE56PqpYQYtZhS931A5c1E9Yv5CgFYWju2//APxuBDKXnFykYwH190DOQTi9GfARktdfmk08zD47grnvOHWuOAgOFaPBZ2dbyrvc+/RTlPP/6JL8jlFzVmU0zcwe2n2gI5GOcj+v0+rnw61nKx7arlG2hXhwMoK86nUiTAXwEVoaLTwesJJfVNDDqtfh4OQwqVXpzZmsj4HvRiYVX45vJJ28/oWRayBjWQyH/N/cy6j9clRQbDf4Hu+VxiAFTlFv5vv1Uk/JOcrr1HC2SMS6vtv6YuimHJF68KkQbIkLZLYLIt0d2G9XcDBD/geEkLs6QizCQ7wuqgrM/Djxsaf2QkMRuTkcPbYqAT+BR0NhgC5nGQRgr5SWmRqu7ggpAwRYpEN2iJO5kxA40nWlayKafclLb0H8R3NRb7A11aYANaaFFhsnNB+eRkK8jWy54ElpIbKxG4bM2fzVT8amx817zhavIZZJzRmdFgMba6MsS1dMsnV/q754I9kXgfii7dBsTF04Vss11gNlAiphkx7kZ4Kvae5btMui05sZOrS/Xhzm6UuBLQP0SI++010cYK3JujZX5vZee+CeF6TYXneySxBv6DtGWCZxya7f2NtKdyNbbvpO/zEP0fKcHkQlVtyg/NWJCrrtAgpWjaJDjIqLZGx1M9v5vOJBw5ZdwNZvu TrYWg/9u pWQpEU4XQpy+7etNSs/AkKsgibmvaNI6b4GzEq8SvJGnRpDsR26wFFYj386lca/nU702/bnsY6w4ZnVDKeuam1fsx5w37gLhMIBWgSvQkRicrIpayg3dnwHmcyDuM6t3jSj31cOXw3H6DYSyj6UJ8MWhZ9G93n3qFaAeoe93VKoU28o9bRaiOYhUuusbKIWMNqyUyxX2vDoMPyVTO1Yd+lrerA6momL5wjmpbFuN5S4WDkS71KMoS0iVDlNnEwziUYBol7wckUogOjQ6o3dHpJ1GfUFwMPOoYjbuaGRv5sceGtRWTLC+3UnHDhjT5pt6/YvRMbynsytmvzHfXwEBxju3g+Ds60hLKoL13XAZCWUiZ/1KL/Taq8830HuaAk37FKBPnkMmRxLVsqwbgp+j5+nfxPqY66R8w3Aj0Ai3Ta4fXHMg= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Andrew, Top posting for visibility. Vincent requested dropping build_bugh-more-user-friendly-error-messages-in-build_bug_on_zero.patch because it breaks the build for older clang versions in certain drivers and I am still seeing those failures in the latest -next. Can you please drop this patch? Cheers, Nathan On Mon, Dec 09, 2024 at 02:01:49PM +0900, Vincent Mailhol wrote: > On Mon. 9 Dec. 2024 at 13:34, kernel test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > > head: ebe1b11614e079c5e366ce9bd3c8f44ca0fbcc1b > > commit: 86c4e589d5c8fbb5092de0052b89402e86706515 [2260/2462] build_bug.h: more user friendly error messages in BUILD_BUG_ON_ZERO() > > config: s390-randconfig-001-20241208 (https://download.01.org/0day-ci/archive/20241208/202412080849.sPp82jSi-lkp@intel.com/config) > > compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a) > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241208/202412080849.sPp82jSi-lkp@intel.com/reproduce) > > > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > > the same patch/commit), kindly add following tags > > | Reported-by: kernel test robot > > | Closes: https://lore.kernel.org/oe-kbuild-all/202412080849.sPp82jSi-lkp@intel.com/ > > > > All errors (new ones prefixed by >>): > > > > >> drivers/gpu/drm/xe/xe_gt_idle.c:127:33: error: static assertion expression is not an integral constant expression > > gtidle->powergate_enable |= (VDN_HCP_POWERGATE_ENABLE(j) | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > > drivers/gpu/drm/xe/regs/xe_gt_regs.h:342:40: note: expanded from macro 'VDN_HCP_POWERGATE_ENABLE' > > #define VDN_HCP_POWERGATE_ENABLE(n) REG_BIT(3 + 2 * (n)) > > ^~~~~~~~~~~~~~~~~~~~ > > drivers/gpu/drm/xe/compat-i915-headers/../../i915/i915_reg_defs.h:22:9: note: expanded from macro 'REG_BIT' > > BUILD_BUG_ON_ZERO(__is_constexpr(__n) && \ > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/build_bug.h:16:35: note: expanded from macro 'BUILD_BUG_ON_ZERO' > > #define BUILD_BUG_ON_ZERO(e, ...) __BUILD_BUG_ON_ZERO(e, ##__VA_ARGS__, #e) > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/build_bug.h:17:37: note: expanded from macro '__BUILD_BUG_ON_ZERO' > > #define __BUILD_BUG_ON_ZERO(e, msg) __BUILD_BUG_ON_ZERO_MSG(e, msg " is true") > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/compiler.h:245:77: note: expanded from macro '__BUILD_BUG_ON_ZERO_MSG' > > #define __BUILD_BUG_ON_ZERO_MSG(e, msg) ((int)sizeof(struct {_Static_assert(!(e), msg);})) > > ^~~~ > > drivers/gpu/drm/xe/xe_gt_idle.c:128:12: error: static assertion expression is not an integral constant expression > > VDN_MFXVDENC_POWERGATE_ENABLE(j)); > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > So, here, j is not an integer constant expression. When passed to > REG_BIT(), it will eventually expands to: > > BUILD_BUG_ON_ZERO(__is_constexpr(j) && (j < 0 || j > 31)) > > which is a compile time constant but not an integer constant > expression. It was constant enough for the previous definition of > BUILD_BUG_ON_ZERO() which relied on bitfields, but not enough constant > for _Static_assert(). > > The reason I did not notice that is because I have another series in > my tree which solves this issue, precisely, this patch: > > https://lore.kernel.org/all/20241203-is_constexpr-refactor-v1-8-4e4cbaecc216@wanadoo.fr/ > > @Andrew, maybe you can remove this patch from your tree. I thought it > was standalone, but it is not. I will resend once the above series get > merged. > > > drivers/gpu/drm/xe/regs/xe_gt_regs.h:343:44: note: expanded from macro 'VDN_MFXVDENC_POWERGATE_ENABLE' > > #define VDN_MFXVDENC_POWERGATE_ENABLE(n) REG_BIT(4 + 2 * (n)) > > ^~~~~~~~~~~~~~~~~~~~ > > drivers/gpu/drm/xe/compat-i915-headers/../../i915/i915_reg_defs.h:22:9: note: expanded from macro 'REG_BIT' > > BUILD_BUG_ON_ZERO(__is_constexpr(__n) && \ > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/build_bug.h:16:35: note: expanded from macro 'BUILD_BUG_ON_ZERO' > > #define BUILD_BUG_ON_ZERO(e, ...) __BUILD_BUG_ON_ZERO(e, ##__VA_ARGS__, #e) > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/build_bug.h:17:37: note: expanded from macro '__BUILD_BUG_ON_ZERO' > > #define __BUILD_BUG_ON_ZERO(e, msg) __BUILD_BUG_ON_ZERO_MSG(e, msg " is true") > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/compiler.h:245:77: note: expanded from macro '__BUILD_BUG_ON_ZERO_MSG' > > #define __BUILD_BUG_ON_ZERO_MSG(e, msg) ((int)sizeof(struct {_Static_assert(!(e), msg);})) > > ^~~~ > > 2 errors generated. > > -- > > >> drivers/gpu/drm/xe/xe_reg_whitelist.c:139:22: error: static assertion expression is not an integral constant expression > > range_start = reg & REG_GENMASK(25, range_bit); > > ^~~~~~~~~~~~~~~~~~~~~~~~~~ > > drivers/gpu/drm/xe/compat-i915-headers/../../i915/i915_reg_defs.h:49:9: note: expanded from macro 'REG_GENMASK' > > BUILD_BUG_ON_ZERO(__is_constexpr(__high) && \ > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/build_bug.h:16:35: note: expanded from macro 'BUILD_BUG_ON_ZERO' > > #define BUILD_BUG_ON_ZERO(e, ...) __BUILD_BUG_ON_ZERO(e, ##__VA_ARGS__, #e) > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/build_bug.h:17:37: note: expanded from macro '__BUILD_BUG_ON_ZERO' > > #define __BUILD_BUG_ON_ZERO(e, msg) __BUILD_BUG_ON_ZERO_MSG(e, msg " is true") > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/compiler.h:245:77: note: expanded from macro '__BUILD_BUG_ON_ZERO_MSG' > > #define __BUILD_BUG_ON_ZERO_MSG(e, msg) ((int)sizeof(struct {_Static_assert(!(e), msg);})) > > ^~~~ > > drivers/gpu/drm/xe/xe_reg_whitelist.c:140:28: error: static assertion expression is not an integral constant expression > > range_end = range_start | REG_GENMASK(range_bit, 0); > > ^~~~~~~~~~~~~~~~~~~~~~~~~ > > drivers/gpu/drm/xe/compat-i915-headers/../../i915/i915_reg_defs.h:49:9: note: expanded from macro 'REG_GENMASK' > > BUILD_BUG_ON_ZERO(__is_constexpr(__high) && \ > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/build_bug.h:16:35: note: expanded from macro 'BUILD_BUG_ON_ZERO' > > #define BUILD_BUG_ON_ZERO(e, ...) __BUILD_BUG_ON_ZERO(e, ##__VA_ARGS__, #e) > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/build_bug.h:17:37: note: expanded from macro '__BUILD_BUG_ON_ZERO' > > #define __BUILD_BUG_ON_ZERO(e, msg) __BUILD_BUG_ON_ZERO_MSG(e, msg " is true") > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/compiler.h:245:77: note: expanded from macro '__BUILD_BUG_ON_ZERO_MSG' > > #define __BUILD_BUG_ON_ZERO_MSG(e, msg) ((int)sizeof(struct {_Static_assert(!(e), msg);})) > > ^~~~ > > 2 errors generated. > > -- > > >> drivers/gpu/drm/xe/xe_irq.c:303:22: error: static assertion expression is not an integral constant expression > > if (!(master_ctl & GT_DW_IRQ(bank))) > > ^~~~~~~~~~~~~~~ > > drivers/gpu/drm/xe/regs/xe_irq_regs.h:22:27: note: expanded from macro 'GT_DW_IRQ' > > #define GT_DW_IRQ(x) REG_BIT(x) > > ^~~~~~~~~~ > > drivers/gpu/drm/xe/compat-i915-headers/../../i915/i915_reg_defs.h:22:9: note: expanded from macro 'REG_BIT' > > BUILD_BUG_ON_ZERO(__is_constexpr(__n) && \ > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/build_bug.h:16:35: note: expanded from macro 'BUILD_BUG_ON_ZERO' > > #define BUILD_BUG_ON_ZERO(e, ...) __BUILD_BUG_ON_ZERO(e, ##__VA_ARGS__, #e) > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/build_bug.h:17:37: note: expanded from macro '__BUILD_BUG_ON_ZERO' > > #define __BUILD_BUG_ON_ZERO(e, msg) __BUILD_BUG_ON_ZERO_MSG(e, msg " is true") > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/compiler.h:245:77: note: expanded from macro '__BUILD_BUG_ON_ZERO_MSG' > > #define __BUILD_BUG_ON_ZERO_MSG(e, msg) ((int)sizeof(struct {_Static_assert(!(e), msg);})) > > ^~~~ > > drivers/gpu/drm/xe/xe_irq.c:436:26: error: static assertion expression is not an integral constant expression > > if ((master_tile_ctl & DG1_MSTR_TILE(tile->id)) == 0) > > ^~~~~~~~~~~~~~~~~~~~~~~ > > drivers/gpu/drm/xe/regs/xe_irq_regs.h:16:30: note: expanded from macro 'DG1_MSTR_TILE' > > #define DG1_MSTR_TILE(t) REG_BIT(t) > > ^~~~~~~~~~ > > drivers/gpu/drm/xe/compat-i915-headers/../../i915/i915_reg_defs.h:22:9: note: expanded from macro 'REG_BIT' > > BUILD_BUG_ON_ZERO(__is_constexpr(__n) && \ > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/build_bug.h:16:35: note: expanded from macro 'BUILD_BUG_ON_ZERO' > > #define BUILD_BUG_ON_ZERO(e, ...) __BUILD_BUG_ON_ZERO(e, ##__VA_ARGS__, #e) > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/build_bug.h:17:37: note: expanded from macro '__BUILD_BUG_ON_ZERO' > > #define __BUILD_BUG_ON_ZERO(e, msg) __BUILD_BUG_ON_ZERO_MSG(e, msg " is true") > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/compiler.h:245:77: note: expanded from macro '__BUILD_BUG_ON_ZERO_MSG' > > #define __BUILD_BUG_ON_ZERO_MSG(e, msg) ((int)sizeof(struct {_Static_assert(!(e), msg);})) > > ^~~~ > > 2 errors generated. > > > > > > vim +127 drivers/gpu/drm/xe/xe_gt_idle.c > > > > 1c2097bbde107e drivers/gpu/drm/xe/xe_gt_idle_sysfs.c Riana Tauro 2023-06-23 97 > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 98 void xe_gt_idle_enable_pg(struct xe_gt *gt) > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 99 { > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 100 struct xe_device *xe = gt_to_xe(gt); > > c2bf07dd0bbce1 drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-09-06 101 struct xe_gt_idle *gtidle = >->gtidle; > > 50089a9534e258 drivers/gpu/drm/xe/xe_gt_idle.c Matt Roper 2024-09-10 102 struct xe_mmio *mmio = >->mmio; > > c2bf07dd0bbce1 drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-09-06 103 u32 vcs_mask, vecs_mask; > > a66c19895396e6 drivers/gpu/drm/xe/xe_gt_idle.c Himal Prasad Ghimiray 2024-10-14 104 unsigned int fw_ref; > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 105 int i, j; > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 106 > > ecab82af278733 drivers/gpu/drm/xe/xe_gt_idle.c Michal Wajdeczko 2024-06-19 107 if (IS_SRIOV_VF(xe)) > > ecab82af278733 drivers/gpu/drm/xe/xe_gt_idle.c Michal Wajdeczko 2024-06-19 108 return; > > ecab82af278733 drivers/gpu/drm/xe/xe_gt_idle.c Michal Wajdeczko 2024-06-19 109 > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 110 /* Disable CPG for PVC */ > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 111 if (xe->info.platform == XE_PVC) > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 112 return; > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 113 > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 114 xe_device_assert_mem_access(gt_to_xe(gt)); > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 115 > > c2bf07dd0bbce1 drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-09-06 116 vcs_mask = xe_hw_engine_mask_per_class(gt, XE_ENGINE_CLASS_VIDEO_DECODE); > > c2bf07dd0bbce1 drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-09-06 117 vecs_mask = xe_hw_engine_mask_per_class(gt, XE_ENGINE_CLASS_VIDEO_ENHANCE); > > c2bf07dd0bbce1 drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-09-06 118 > > c2bf07dd0bbce1 drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-09-06 119 if (vcs_mask || vecs_mask) > > c2bf07dd0bbce1 drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-09-06 120 gtidle->powergate_enable = MEDIA_POWERGATE_ENABLE; > > c2bf07dd0bbce1 drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-09-06 121 > > c2bf07dd0bbce1 drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-09-06 122 if (!xe_gt_is_media_type(gt)) > > c2bf07dd0bbce1 drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-09-06 123 gtidle->powergate_enable |= RENDER_POWERGATE_ENABLE; > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 124 > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 125 for (i = XE_HW_ENGINE_VCS0, j = 0; i <= XE_HW_ENGINE_VCS7; ++i, ++j) { > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 126 if ((gt->info.engine_mask & BIT(i))) > > c2bf07dd0bbce1 drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-09-06 @127 gtidle->powergate_enable |= (VDN_HCP_POWERGATE_ENABLE(j) | > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 128 VDN_MFXVDENC_POWERGATE_ENABLE(j)); > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 129 } > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 130 > > a66c19895396e6 drivers/gpu/drm/xe/xe_gt_idle.c Himal Prasad Ghimiray 2024-10-14 131 fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT); > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 132 if (xe->info.skip_guc_pc) { > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 133 /* > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 134 * GuC sets the hysteresis value when GuC PC is enabled > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 135 * else set it to 25 (25 * 1.28us) > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 136 */ > > 50089a9534e258 drivers/gpu/drm/xe/xe_gt_idle.c Matt Roper 2024-09-10 137 xe_mmio_write32(mmio, MEDIA_POWERGATE_IDLE_HYSTERESIS, 25); > > 50089a9534e258 drivers/gpu/drm/xe/xe_gt_idle.c Matt Roper 2024-09-10 138 xe_mmio_write32(mmio, RENDER_POWERGATE_IDLE_HYSTERESIS, 25); > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 139 } > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 140 > > 50089a9534e258 drivers/gpu/drm/xe/xe_gt_idle.c Matt Roper 2024-09-10 141 xe_mmio_write32(mmio, POWERGATE_ENABLE, gtidle->powergate_enable); > > a66c19895396e6 drivers/gpu/drm/xe/xe_gt_idle.c Himal Prasad Ghimiray 2024-10-14 142 xe_force_wake_put(gt_to_fw(gt), fw_ref); > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 143 } > > 38e8c4184ea0ee drivers/gpu/drm/xe/xe_gt_idle.c Riana Tauro 2024-05-24 144 > > > > :::::: The code at line 127 was first introduced by commit > > :::::: c2bf07dd0bbce1f318b73b525e21fbc6d67a3a94 drm/xe/xe_gt_idle: modify powergate enable condition > > > > :::::: TO: Riana Tauro > > :::::: CC: Rodrigo Vivi > > > > -- > > 0-DAY CI Kernel Test Service > > https://github.com/intel/lkp-tests/wiki