From patchwork Tue Aug 1 17:02:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Cromie X-Patchwork-Id: 129419 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp2858175vqg; Tue, 1 Aug 2023 11:33:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlFtRj1F87Cxi/UOTE/DYRsFPvjiaerWrxMXTB4AmHIKABbDjz+PAMAi3LqSrd3hgKv4woKn X-Received: by 2002:a17:902:a705:b0:1bc:2bd:8520 with SMTP id w5-20020a170902a70500b001bc02bd8520mr8017279plq.6.1690914820635; Tue, 01 Aug 2023 11:33:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690914820; cv=none; d=google.com; s=arc-20160816; b=Zyo6LaOiWahTxJKdKHaIg4zjDFwrBLSTa494aTZj/8xsdubd0gLgwy1geVU7gjujIw yrMZEDPDPcU4e4yhnBoHcPIsC1vDKKWBAvDzWUxQ48qNBpjpo54TnGKSi4FDyQLtuZZO 2GEFUQ6lzznCGvvLbWsF6LorsLSv1pxd6yfjsdCeNFMii1rAyHTYblTyJ1DLUitVDHBR IBO20clDbf5oOVmgPSRfDTXMliC7QBSIkaXfmf59o9+lpaZZHeLzN8SQQDGZHvJH4Ybv QDXIAXm0VlYZGcrRIhQ1xRmVwNx/w2DWboA3Jrzzq2Rv4N0OclCb/jnKC/GeZrUkZRve 2ptw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wL9Yvt6lFDnfNd4BQOyeUpo+9dRZLSznvXpX/TGbKdQ=; fh=u5vE1TE1dJB7o4IGsVvua16vnF8dhcoUHNlJ2pbkr7c=; b=MEiOVrQRtqU8HZpVWs1iyGKmTS0nCN6jh3h6x+mpf0Hs8ChRKjUBk6K42eA57vZzwD 3wCN9BLwgDJdxpMQWbLOQsSY1LaHpyCA4uK2hK/ryHHBnv7dKr2jX6PibiqR1512Bdp/ NfSTK5XmlL3j58qR2YwtuH3x+UX6AtC2iVdUnBC/f0BKtBsWMWJINERbnhPUTpwTARl+ gTAr96xuv/mBPLYmqmfwTDAcc4gZb5nSN2sm9JCgAqdgROvzOh2MbmuvWik3zUQXUzQ8 lV+LPk/VC8q8IQFL2kOmPTpe+LpJb1Ck968ROzQVC0N1DtqLrExkAJNKwFD3IPU9TFjU n+eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=G+KTZ3yS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q9-20020a17090311c900b001b9e9edea43si8264695plh.552.2023.08.01.11.33.26; Tue, 01 Aug 2023 11:33:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=G+KTZ3yS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233785AbjHARFa (ORCPT + 99 others); Tue, 1 Aug 2023 13:05:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234102AbjHAREk (ORCPT ); Tue, 1 Aug 2023 13:04:40 -0400 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 714982D5B for ; Tue, 1 Aug 2023 10:04:04 -0700 (PDT) Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-77acb04309dso298021439f.2 for ; Tue, 01 Aug 2023 10:04:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690909423; x=1691514223; 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=wL9Yvt6lFDnfNd4BQOyeUpo+9dRZLSznvXpX/TGbKdQ=; b=G+KTZ3ySCfE2EInfZgtZHIyd9GrSwUplSnTdna7YBgnzr73IqfKFv6jPOuqevnIJUx sDJN0t3GCypYgvnOUzNLXifQbfQGNHFG3KxOsZvseVZCMmKkMfQe+YF9wnASwXgubj5a XasY/5mdlXNr9yasq8n3IPY9hIuIs3WT1TqoRSRkdd840yJGF53c5rSCysZrK3Oloxzs XFTaZfLoHQlpR9ArCDuQISkYNJ3GyaYGsYXs9gNXspXqI1H/EDdDVuzYqb8tVIIb0m+f 5tRt//BCklgc/dTLKjEk33NrCmVjVSDb35oooVuwBVmu7UgRbcLscrGW0/zwZPSVkN+k J7+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690909423; x=1691514223; 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=wL9Yvt6lFDnfNd4BQOyeUpo+9dRZLSznvXpX/TGbKdQ=; b=SBoe7oZvrS0x+pTWhhYPg4rJay3L/cIjJOUjCWx/L86STgtAP8Cm/DjZycnn0LYDK9 wgYhFr0ibcnudvtzHpZ31swTqxaBQb/3TpD0F4aaErUFVOYh+CQADPe/Mkf4MwJ7CUeC 63P75y+S5sswxXSfamlYk0xFO0pDDJ4dKdlpG9+yNLUAey3hRNSpipN4VVF/fQU5JOo1 oeMXij5a2H1L0StraQ3DOdtLLLT9lb1l4SQX9kwfZfhf6vzp9ulyIAsF/VphsiEWhLJr 6YlvRz0SOUEbC6iB+qtXqYNGbjFP+HsSQFVIqa5gWRrxy1FJVTMIOJRiPAOb5F+2MFKw 5F5w== X-Gm-Message-State: ABy/qLaw+sONIw4C+DfADH12T6P/TJyBQOZobbaIaI7oi66Kd/t3tZry zo1F9qXnenXgLGoSSouXULY= X-Received: by 2002:a05:6e02:1090:b0:349:3896:d931 with SMTP id r16-20020a056e02109000b003493896d931mr1014708ilj.18.1690909423162; Tue, 01 Aug 2023 10:03:43 -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 o20-20020a02c6b4000000b0042b144abf71sm3768577jan.179.2023.08.01.10.03.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Aug 2023 10:03:42 -0700 (PDT) From: Jim Cromie To: daniel.vetter@ffwll.ch, daniel@ffwll.ch, jbaron@akamai.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: linux@rasmusvillemoes.dk, joe@perches.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, seanpaul@chromium.org, robdclark@gmail.com, Jim Cromie Subject: [PATCH v5 20/22] drm-drivers: DRM_CLASSMAP_USE in 2nd batch of drivers, helpers Date: Tue, 1 Aug 2023 11:02:53 -0600 Message-ID: <20230801170255.163237-22-jim.cromie@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230801170255.163237-1-jim.cromie@gmail.com> References: <20230801170255.163237-1-jim.cromie@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773052699326360639 X-GMAIL-MSGID: 1773052699326360639 Add a DRM_CLASSMAP_USE declaration to 2nd batch of helpers and *_drv.c files. For drivers, add the decl just above the module's PARAMs, since it identifies the "inherited" drm.debug param. Note: with CONFIG_DRM_USE_DYNAMIC_DEBUG=y, a module not also declaring DRM_CLASSMAP_USE will have its class'd prdbgs stuck in the initial (disabled, but for DEBUG) state. The stuck sites are evident in /proc/dynamic_debug/control as: class unknown, _id:N # control's last column rather than a proper "enumeration": class:DRM_UT_CORE This set of updates was found by choosing M for all DRM-config items I found (not allmodconfig), building & modprobing them, and grepping "class unknown," control. There may yet be others. Signed-off-by: Jim Cromie --- drivers/gpu/drm/drm_gem_shmem_helper.c | 2 ++ drivers/gpu/drm/gud/gud_drv.c | 2 ++ drivers/gpu/drm/mgag200/mgag200_drv.c | 2 ++ drivers/gpu/drm/qxl/qxl_drv.c | 2 ++ drivers/gpu/drm/radeon/radeon_drv.c | 2 ++ drivers/gpu/drm/udl/udl_main.c | 2 ++ drivers/gpu/drm/vkms/vkms_drv.c | 2 ++ drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 ++ 8 files changed, 16 insertions(+) diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c index 4ea6507a77e5..5e02df98327b 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -23,6 +23,8 @@ #include #include +DRM_CLASSMAP_USE(drm_debug_classes); + MODULE_IMPORT_NS(DMA_BUF); /** diff --git a/drivers/gpu/drm/gud/gud_drv.c b/drivers/gpu/drm/gud/gud_drv.c index 9d7bf8ee45f1..5b555045fce4 100644 --- a/drivers/gpu/drm/gud/gud_drv.c +++ b/drivers/gpu/drm/gud/gud_drv.c @@ -31,6 +31,8 @@ #include "gud_internal.h" +DRM_CLASSMAP_USE(drm_debug_classes); + /* Only used internally */ static const struct drm_format_info gud_drm_format_r1 = { .format = GUD_DRM_FORMAT_R1, diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c index 976f0ab2006b..a1b2be1c27f6 100644 --- a/drivers/gpu/drm/mgag200/mgag200_drv.c +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c @@ -24,6 +24,8 @@ int mgag200_modeset = -1; MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); module_param_named(modeset, mgag200_modeset, int, 0400); +DRM_CLASSMAP_USE(drm_debug_classes); + int mgag200_init_pci_options(struct pci_dev *pdev, u32 option, u32 option2) { struct device *dev = &pdev->dev; diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index a3b83f89e061..12600f557c23 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -65,6 +65,8 @@ module_param_named(modeset, qxl_modeset, int, 0400); MODULE_PARM_DESC(num_heads, "Number of virtual crtcs to expose (default 4)"); module_param_named(num_heads, qxl_num_crtc, int, 0400); +DRM_CLASSMAP_USE(drm_debug_classes); + static struct drm_driver qxl_driver; static struct pci_driver qxl_pci_driver; diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index e4374814f0ef..4219276ade6a 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -274,6 +274,8 @@ int radeon_cik_support = 1; MODULE_PARM_DESC(cik_support, "CIK support (1 = enabled (default), 0 = disabled)"); module_param_named(cik_support, radeon_cik_support, int, 0444); +DRM_CLASSMAP_USE(drm_debug_classes); + static struct pci_device_id pciidlist[] = { radeon_PCI_IDS }; diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c index 061cb88c08a2..8f9dfe89f64a 100644 --- a/drivers/gpu/drm/udl/udl_main.c +++ b/drivers/gpu/drm/udl/udl_main.c @@ -19,6 +19,8 @@ #define NR_USB_REQUEST_CHANNEL 0x12 +DRM_CLASSMAP_USE(drm_debug_classes); + #define MAX_TRANSFER (PAGE_SIZE*16 - BULK_SIZE) #define WRITES_IN_FLIGHT (20) #define MAX_VENDOR_DESCRIPTOR_SIZE 256 diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c index 6d3a2d57d992..086a9933fcdf 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.c +++ b/drivers/gpu/drm/vkms/vkms_drv.c @@ -39,6 +39,8 @@ static struct vkms_config *default_config; +DRM_CLASSMAP_USE(drm_debug_classes); + static bool enable_cursor = true; module_param_named(enable_cursor, enable_cursor, bool, 0444); MODULE_PARM_DESC(enable_cursor, "Enable/Disable cursor support"); diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index 8b24ecf60e3e..9cb6be422621 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -275,6 +275,8 @@ static int vmw_probe(struct pci_dev *, const struct pci_device_id *); static int vmwgfx_pm_notifier(struct notifier_block *nb, unsigned long val, void *ptr); +DRM_CLASSMAP_USE(drm_debug_classes); + MODULE_PARM_DESC(restrict_iommu, "Try to limit IOMMU usage for TTM pages"); module_param_named(restrict_iommu, vmw_restrict_iommu, int, 0600); MODULE_PARM_DESC(force_coherent, "Force coherent TTM pages");