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 2D5A9E77173 for ; Mon, 9 Dec 2024 05:02:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B4AD66B03C4; Mon, 9 Dec 2024 00:02:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AD4106B03C5; Mon, 9 Dec 2024 00:02:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 94D806B03C6; Mon, 9 Dec 2024 00:02:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 6967A6B03C4 for ; Mon, 9 Dec 2024 00:02:06 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 357EE1C51ED for ; Mon, 9 Dec 2024 05:02:06 +0000 (UTC) X-FDA: 82874223264.12.3C53223 Received: from out.smtpout.orange.fr (out-13.smtpout.orange.fr [193.252.22.13]) by imf14.hostedemail.com (Postfix) with ESMTP id 588B0100011 for ; Mon, 9 Dec 2024 05:01:41 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=wanadoo.fr header.s=t20230301 header.b="AG/piecQ"; spf=pass (imf14.hostedemail.com: domain of mailhol.vincent@wanadoo.fr designates 193.252.22.13 as permitted sender) smtp.mailfrom=mailhol.vincent@wanadoo.fr; dmarc=pass (policy=quarantine) header.from=wanadoo.fr ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733720514; 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=aTPZ4VgwMmi9zdd4AJFg0+p683kZxOGTPo1uSRWjsdE=; b=bOfq0ttwH25Cen4OipVdNaz+gL3XACIfdlREf0HhIDBO48VCgZjSFLPGwU19/qA15+IMQi 99GXqD+YGF0aQoligCUZ3bjbbR3dIrWQ4eqIKAtjbAd3HC264P+XhftvOyODOdYFBEfN3q jb+vdA8/AFzNS1efe5Dnu9uukXv8+Xg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733720514; a=rsa-sha256; cv=none; b=3GQC+5kGX8gs0TijnR58sEgxgtIt4CeglgHd9M3v+1rsaPIzdpGOnpvWvQOo6vpjnnW2/4 6JYJjpNaw6xsqqv0PzG1Hr9LUZegkXfOpL66UlWUSVZJ0ehwvsbM979sy0LrstxMzulih4 Hhyi4woT3WtK25fOw6LYQSnI7RpY1tM= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=wanadoo.fr header.s=t20230301 header.b="AG/piecQ"; spf=pass (imf14.hostedemail.com: domain of mailhol.vincent@wanadoo.fr designates 193.252.22.13 as permitted sender) smtp.mailfrom=mailhol.vincent@wanadoo.fr; dmarc=pass (policy=quarantine) header.from=wanadoo.fr Received: from mail-ej1-f53.google.com ([209.85.218.53]) by smtp.orange.fr with ESMTPSA id KVuDt7WW83iIjKVuDtAjmQ; Mon, 09 Dec 2024 06:02:01 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1733720521; bh=aTPZ4VgwMmi9zdd4AJFg0+p683kZxOGTPo1uSRWjsdE=; h=MIME-Version:From:Date:Message-ID:Subject:To; b=AG/piecQICydpkKGpeL7a9De26CYSFRJsBOvHhMR3PLw18Cfs9n/N0dUjIM1qzGsn s29KBupVGF9J994IJ/2aVmIHxDI7jfRGAqLJW3iK4xImkE2XdfiynA6re0K1Y6TTS8 +zCM5Zn7ZFmzgl34z5ozonmWqI0a4cnSauOFjyORzgiJulmkkPbjnHcuZJoYkQd8DT kVTNAI9+OFCdT+D0VqCm5cabIw2W2irr5Y9WiCX0is59dv0D1GhaP+qsuNIQp1c/q+ mnW36VEnusrqu41BPvjOupTzTNjks2P11V9gosyK59j3KUtIB0/MRJRrmbq7d/w4X0 T3mIDHp8WlWCQ== X-ME-Helo: mail-ej1-f53.google.com X-ME-Auth: bWFpbGhvbC52aW5jZW50QHdhbmFkb28uZnI= X-ME-Date: Mon, 09 Dec 2024 06:02:01 +0100 X-ME-IP: 209.85.218.53 Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-aa629402b53so513032066b.3 for ; Sun, 08 Dec 2024 21:02:01 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVeSmhH/3nkAPI9vmVGUC7S9RLaw3VenQxUrEXX1ueefTVDN0mZeerMZthH4bJ73gxLniF4cQXfSQ==@kvack.org X-Gm-Message-State: AOJu0Ywaz1mcEnjLiE8OvmgEWVnyZhmazQHjgxeS69isIgXPcDjIQ08u 4L8PJ4cG6RZiV76GVpdTBqtxF/kC2BCLTMRnWBE6XDhkHNe/qrP3IcA0VYcNAPJhVm/8bHw97dm GRDsSGAmcDKWC1mlTwo6MArxzEMk= X-Google-Smtp-Source: AGHT+IH8qWjE5mOCgZtZokFASR1DguXPsly80DqcUFna93Mz82ezefPpe/7ecZqbAXTYAjWztqhoc75aiEy+jGI1Lw0= X-Received: by 2002:a17:906:2181:b0:aa6:88ae:22a with SMTP id a640c23a62f3a-aa688ae0317mr166937866b.37.1733720520699; Sun, 08 Dec 2024 21:02:00 -0800 (PST) MIME-Version: 1.0 References: <202412080849.sPp82jSi-lkp@intel.com> In-Reply-To: <202412080849.sPp82jSi-lkp@intel.com> From: Vincent Mailhol Date: Mon, 9 Dec 2024 14:01:49 +0900 X-Gmail-Original-Message-ID: Message-ID: 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 To: kernel test robot , Andrew Morton Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 588B0100011 X-Stat-Signature: m961q87u7m95bwxqsuonfos3w631ar4o X-Rspam-User: X-HE-Tag: 1733720501-952485 X-HE-Meta: U2FsdGVkX19OZisGG0mX9HrA2YSdPM4C0SZ9+Y9RpEherIMfdeajkh2FuOv0q8uJBPvEMSK1DtG0So9+0Nyl5SCTmr7irGJ13QepP2r7cMBcCfSq2L9KIOTiLINALJfeytR3nPrrqvUQNl4TzFlmohGIWgqSCeipT7Xmyyqb8z2BcVxkPoIngHgCxFkJeA95JEEqZJ1RmIXsLSYBzecCYpB/NhDPlF2GvTKVn9lNLCpQrVJ2Nk10nugDPk1cq/GjTLk3td2gMttworgqg3W4L1Tz+izqV3O8uqSP7iw9jlfQaDYwrectnSep6vE9UGNymFFNOK7DhhzvyJPCGOg8HPL58+i2I792H0XIFfP0zEaesaBuznKgMUVR4YjhiUkzOvelXRsxT/tAHdSw0VIijw/CGShUHFV2Oh0eeCNjq4cmOGANzsjW8IL3y5VSgNKpVeMFOpqDV2DYQw8lho6eTKK2XbE9k3BvgudMAwqFKyqmn6U1+z2GJnc8+6C17F9+yrQ1ispzTp0ydsZij00DpqEGkA25RZOeOgTDQT0VH+UGCgEYYgrh+Ri6p0K2FnGyxD50NcM4agakDVIbyQm1Rrj8Rn9iMkte8xkV2Pgh0xwoBDW+QrLu6w0s0fvNTUg4zyJ5HEBPaXybMXj9dMDQZTAJmTP94CnqNx4omk6+stLKtnSsgP44v0ZFBz/npGRtotXwDodhV3q1wUzNA31xsRcBva+5fST3ORpHVQRC/7nxGkFsOz4emmCtSK0nFFWZ+jpjMzKRMeeJE7aCE1IAfzJzGYNOumDm/Vfw1OSERh7J9zw7LYDCqW3h/gWL4tVy2shRmWOGFVMa6KFL4KhgsbzzIPRwduRhnemg+owvAwLamU8+f1aMuPkmTUhAUvf211AW9BtJybI5qtc2DtagG4XahTZAR9RyIJFoCiXXPY0+s0fV6llLKqFKNU+4WsgEEr0A4xv9hlTHVINFtBi DLGD9q+/ 2k+FrULIGIQ7E8vOwTmyj2carLzO5b5Efbk3Adc5eQWNkjA8bHzleeOHAFQEJMFGcUznS7nCqIHRsyDng95UJHG3sMLTOnZ/IX8nIrQSbCQEnC4T4d7LYiYxq2ASyd1jSKxpSoxjcRTvVol7e2Tg36MeF15NwFUdMsWfDHyL/3eA1WVQyBLP/A8nt6KzVDNCCLkjBi6cg6rkFfpmn2Psy/0QeyqxBIfxNjB6nzpMG+NK4OYk52f2jh7ep0QwTI5QnIfFtF4BcGLHbSLhx9eN36I7huySkZz8tByAKvyPYluizRsLHAq7FovHNolZcVMRKq4FY7e0DfcAqRld9DjbQqjsfx3DqSoh/EH8hQmUwKZzbkSQyGlXySfl68Bhjciqcf4G9AK/R79LVpZotF4Ozx1vO8GLqi9tJIVwCBAhH/+mb24QBqItM68XbrJx5Erl4nm4H X-Bogosity: Ham, tests=bogofilter, spamicity=0.003610, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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