Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp455339lqo; Thu, 16 May 2024 10:50:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVe5LdKv+53nzXtWLoNsK+saZorlUa4gbja+laNwug9NcDkdYyD/O27EtO2Y4EDpXMoB6NXvvn7tkUt36aGKADXJnxLJEwsxQ/hLgPLXw== X-Google-Smtp-Source: AGHT+IGkpqY3rXkK4tmA3SeLufTd14tXaXfbgxlGq0UAGZVosgTvHjAFkOIWr4EsQ8y7tFerX3VL X-Received: by 2002:a50:b404:0:b0:574:f8d1:af2a with SMTP id 4fb4d7f45d1cf-574f8d1b13bmr3854424a12.38.1715881808050; Thu, 16 May 2024 10:50:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715881808; cv=pass; d=google.com; s=arc-20160816; b=ZJU3/2hbsgmRhd55pdJ8HJKtjJT0nyfuQEqtGANgnGgXAQbAlbDdVNkq4UCjjvq6Ve VuV0ntGHp8X6HEondHeOrGYtEApH+jTOfR53emz1JqydQp3HnZM6wRuhy7UXlmMNF6bL 9peXAWdKAXdKTpWEpddt7NbHLdoieEerKBsnSQeBvhz4vyMr3OtSeaO2MDxe5oI/kcJN rCErE5AomhWe4FlFOhsHqNjMpMff5hl+DCp0cWfM6dBBwanSyE7nUM0B+BTrQ5xgejDp IIGnmy8vFB1LkOE7Xo4WOLRivY9c/hm6RLldKrhohR2mCc9Iosfsdfc9skpNjIKLIh2B c/8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=SZaxVfUByIKje02NDRyo2utcDiv4Cpn+Dvf4S+u3Lag=; fh=x7ZBdBuLyoBZev02UNMK76rnr4hMM4pswTClQpOu768=; b=knGF2Lb4a9UWajCIpNx3OYBx9rMts3CAtdaO2cT+3d1BBhlDxUtlPcb8PjTmu+PsoC xIoemFRPnnzmbP9v64Tmqpvk3fufl4wjFHULNg5nq52XL0irnBhwzt8+fk6/yW4+PGan e/OXN8ycrRsys5r/VNYbN4fLUebcoWSI7ApXOKHndYr9IMEZZRAgEaSDnXn7RppuDXat f7xiGeS6dp/+IcGr5mey6GqUSajjXEmMCxSW+P+2q7znolC25zvy1HMtbBw2VTnMxBUR 6MG0GzARVdXxaZ3w8Q+lgOfVJIJARoC9sdsIHWnEWuia4ZUcgy6E/W9isKpWU5viH5gY 1DIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WCo9qeYb; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-181410-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181410-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733beac560si9121766a12.80.2024.05.16.10.50.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 10:50:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181410-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WCo9qeYb; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-181410-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181410-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9A5D31F22C63 for ; Thu, 16 May 2024 17:50:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B8EBE15CD61; Thu, 16 May 2024 17:45:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WCo9qeYb" Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 068D315B984 for ; Thu, 16 May 2024 17:45:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715881514; cv=none; b=nARgMjNRflz85K3tQQhLbirmp4sCcZWnNjl2L1RMsX+VHTLxub2M6RDM3wNt+D/PtemvohiKXDj+65NZDChF7/+qkM/Pq53bE03iGuwhpu+4KY/0EMIzLrND+Xzzt7GYjfHIUvLfV1aAemQEAMghal89x++q11JKWwd1CVaXAlE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715881514; c=relaxed/simple; bh=tj1Mp5UhAkYzKU/KHXaAEzHkSgdCDNeOpeIZ26q5o+o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iWLQHHLGLOOFvAn+DwAa/H3GxFjvRzjUyfhPfddhlozB+A2WMBtWcuazrKZZpqtZPH9U5WoAWV0eGN8uyCXsK+EZoWU6zIGT8CJWpx2xY4LKJ3qlJRf+gcRfEbDD+49BGAHf5dFC/0utNlYpcP1uYtl9xRm7DURp3npCa8l3Ews= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WCo9qeYb; arc=none smtp.client-ip=209.85.166.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-io1-f42.google.com with SMTP id ca18e2360f4ac-7e18adf7268so67634239f.0 for ; Thu, 16 May 2024 10:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715881512; x=1716486312; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SZaxVfUByIKje02NDRyo2utcDiv4Cpn+Dvf4S+u3Lag=; b=WCo9qeYbSUq7ADsNlZKl1WcFVVduEIuRJi7Jb6FIHN6Nc1Pt2LKHvjeMr8QGI2XcNQ /OJJsEb4rYUsgD4Es4jVj1F4A1Kpcta7yMsyFOaUTd7zj9+A2pcWNWkyZHQcLqpKW3J9 NVJCQI+spsN+CvazhRbpP+PdyvUC8ZnQ3lC94TCNG5dStpfn2tCSEzyO1KppBGRJgvwc NRj9CmYWcK9sWKW9k0b+CRPa0meIeDL5S2vn3UisqPYyYoWZ3qd20AOW0es8CgtD/EVT REW7XjTPmvq7NjOA40gcH7XHKkFsDvsoBff+sOmZGcbLw5TixCtaLK4lX9a3ieyntWHH vjRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715881512; x=1716486312; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SZaxVfUByIKje02NDRyo2utcDiv4Cpn+Dvf4S+u3Lag=; b=r3K39jQEBQ5OhrrjBmxPgTwHptCDe3JXstOLWCv1f+tIXHyNUz7fCZpFGCCoWtlqby GvRPqU1axJN3oPrZzz/SqdY/SeKmMBs3uGsed16Oys45kxg/JbYH7LRTMQukuCrK947V Ljnk8BNUTByZ/+oH/xYq8rDMyFWDZ7YdmqDGSXtczlW3tNgwpIJaiB3Hwxu6u1ujvwnk jNPd68sVwWsStnuNEjON1oYUASEjVRudNEWQlhaye2wSp3LgwWW9bSdGHW90qjVAW/hc 3algoBrnpfa+t4f961Y/4nAFl30GJXCi6wfEMQNQBfurGMPX8M6MxFPpZA3FQav7urlU y2Dg== X-Forwarded-Encrypted: i=1; AJvYcCWUAg95mvbSWKF0Y+VPBUI8y+17VRYx0oJKXSWLoEiwkvoXXG6XF7n1jWgEW0tB+7f9KAi1Oq7QuE5SDmdR7lxruo2wxhSrPlMWeDzF X-Gm-Message-State: AOJu0Yz5lh09UdvmMTzibnK9c1wh4EfW2N8UKN4ntc4JGi+MM0TjXqpS 8LwhyXGIQiaiLBiUp/3iGFENL4MgEwoTKbMkccDl4mGqYD5iyp/f X-Received: by 2002:a5d:8c8f:0:b0:7e1:b4b2:d708 with SMTP id ca18e2360f4ac-7e1b51aad7bmr2182833439f.4.1715881512238; Thu, 16 May 2024 10:45:12 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id 8926c6da1cb9f-4893715057csm4273595173.80.2024.05.16.10.45.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 10:45:11 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: ukaszb@chromium.org, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, seanpaul@chromium.org, robdclark@gmail.com, groeck@google.com, yanivt@google.com, bleung@google.com, Jim Cromie Subject: [PATCH v8-RESEND 28/33] drm+drivers: adapt to use DYNDBG_CLASSMAP_{DEFINE,USE} Date: Thu, 16 May 2024 11:43:52 -0600 Message-ID: <20240516174357.26755-29-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240516174357.26755-1-jim.cromie@gmail.com> References: <20240516174357.26755-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Follow dynamic_debug API change from DECLARE_DYNDBG_CLASSMAP to DYNDBG_CLASSMAP_{DEFINE,USE}. Prior to this, we used DECLARE_DYNDBG_CLASSMAP, which was preserved to decouple DRM conversion. I'm unsure of the full functionality in-between, a round of lkp-testing will help. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.") Signed-off-by: Jim Cromie --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 +----------- drivers/gpu/drm/display/drm_dp_helper.c | 12 +----------- drivers/gpu/drm/drm_crtc_helper.c | 12 +----------- drivers/gpu/drm/drm_print.c | 25 +++++++++++++------------ drivers/gpu/drm/i915/i915_params.c | 12 +----------- drivers/gpu/drm/nouveau/nouveau_drm.c | 12 +----------- include/drm/drm_print.h | 8 ++++++++ 7 files changed, 26 insertions(+), 67 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index e4277298cf1a..b287f0cfd8fa 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -217,17 +217,7 @@ int amdgpu_damage_clips = -1; /* auto */ static void amdgpu_drv_delayed_reset_work_handler(struct work_struct *work); -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); struct amdgpu_mgpu_info mgpu_info = { .mutex = __MUTEX_INITIALIZER(mgpu_info.mutex), diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c index f5d4be897866..d3a7df09846f 100644 --- a/drivers/gpu/drm/display/drm_dp_helper.c +++ b/drivers/gpu/drm/display/drm_dp_helper.c @@ -41,17 +41,7 @@ #include "drm_dp_helper_internal.h" -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); struct dp_aux_backlight { struct backlight_device *base; diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 2dafc39a27cb..e9d229a393f4 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -50,17 +50,7 @@ #include "drm_crtc_helper_internal.h" -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); /** * DOC: overview diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c index 699b7dbffd7b..4a5f2317229b 100644 --- a/drivers/gpu/drm/drm_print.c +++ b/drivers/gpu/drm/drm_print.c @@ -55,18 +55,19 @@ MODULE_PARM_DESC(debug, "Enable debug output, where each bit enables a debug cat #if !defined(CONFIG_DRM_USE_DYNAMIC_DEBUG) module_param_named(debug, __drm_debug, ulong, 0600); #else -/* classnames must match vals of enum drm_debug_category */ -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +/* classnames must match value-symbols of enum drm_debug_category */ +DRM_CLASSMAP_DEFINE(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, + DRM_UT_CORE, + "DRM_UT_CORE", + "DRM_UT_DRIVER", + "DRM_UT_KMS", + "DRM_UT_PRIME", + "DRM_UT_ATOMIC", + "DRM_UT_VBL", + "DRM_UT_STATE", + "DRM_UT_LEASE", + "DRM_UT_DP", + "DRM_UT_DRMRES"); static struct ddebug_class_param drm_debug_bitmap = { .bits = &__drm_debug, diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c index de43048543e8..dccf12d05105 100644 --- a/drivers/gpu/drm/i915/i915_params.c +++ b/drivers/gpu/drm/i915/i915_params.c @@ -29,17 +29,7 @@ #include "i915_params.h" #include "i915_drv.h" -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); #define i915_param_named(name, T, perm, desc) \ module_param_named(name, i915_modparams.name, T, perm); \ diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index a947e1d5f309..27995c0c9b31 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -72,17 +72,7 @@ #include "nouveau_uvmm.h" #include "nouveau_sched.h" -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, - "DRM_UT_CORE", - "DRM_UT_DRIVER", - "DRM_UT_KMS", - "DRM_UT_PRIME", - "DRM_UT_ATOMIC", - "DRM_UT_VBL", - "DRM_UT_STATE", - "DRM_UT_LEASE", - "DRM_UT_DP", - "DRM_UT_DRMRES"); +DRM_CLASSMAP_USE(drm_debug_classes); MODULE_PARM_DESC(config, "option string to pass to driver core"); static char *nouveau_config; diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h index 9cc473e5d353..905fc25bf65a 100644 --- a/include/drm/drm_print.h +++ b/include/drm/drm_print.h @@ -140,6 +140,14 @@ enum drm_debug_category { DRM_UT_DRMRES }; +#ifdef CONFIG_DRM_USE_DYNAMIC_DEBUG +#define DRM_CLASSMAP_DEFINE(...) DYNDBG_CLASSMAP_DEFINE(__VA_ARGS__) +#define DRM_CLASSMAP_USE(name) DYNDBG_CLASSMAP_USE(name) +#else +#define DRM_CLASSMAP_DEFINE(...) +#define DRM_CLASSMAP_USE(name) +#endif + static inline bool drm_debug_enabled_raw(enum drm_debug_category category) { return unlikely(__drm_debug & BIT(category)); -- 2.45.0