From patchwork Wed Apr 20 16:45:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 8892971 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DA5179F1C1 for ; Wed, 20 Apr 2016 16:45:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EEE6A20263 for ; Wed, 20 Apr 2016 16:45:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D2FEB20254 for ; Wed, 20 Apr 2016 16:45:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C975B6E21C; Wed, 20 Apr 2016 16:45:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk0-x229.google.com (mail-qk0-x229.google.com [IPv6:2607:f8b0:400d:c09::229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7473E6E21C for ; Wed, 20 Apr 2016 16:45:22 +0000 (UTC) Received: by mail-qk0-x229.google.com with SMTP id n63so16230432qkf.0 for ; Wed, 20 Apr 2016 09:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=469pKM8+R4+GfoI9afrfGrDZb95oRqmC4r/JKFwhf6Y=; b=uy6GrAouUm2uWsDoK6usoabvbYgofV0wpAkuObqAGXDBH0GCDKgmCgDEJVM7ErQoQf VzlIf6JtTBDi2r+XICEnqfIEai6eOTGbhFdbaooz82M2u8lcT7efC6iFmoiesukl1w9s UA/emSPrrhviqqMcDc9jc2jTS+6Vmqe/QVMqoYDVO7RdVRsXQDxVIDDZKoABTg/lN+yo 4X7tVxTDYlVRCGb9YDZP+Od11zUrkzEzk84mkJhOy/aG0Hfk8XxjjIz1hMjkoik10wo+ 0N7FJ4Ci0AmJM10LBranJLk1JL09eWkAmyIyVLI6tAh6iV8TdYXVbRRwnCD+rcqdYf6N dX+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=469pKM8+R4+GfoI9afrfGrDZb95oRqmC4r/JKFwhf6Y=; b=fzPg1nR3uiiGDOAU8nkFjarJFGtl/r74H2nwObOIueSRW4Kpq4A/njD+8xmFkjDPsX lf3U/R+ado7P18tZoe5LSR7YhmA5EkRsiX8sBR7m46yD17y3z8Z+SBw9qhLkDK3jim8P LuoOcweJnAQbXCg8MffI8sAnYByI7K8Mfv+EaKFOoo5+4MfSWgwTNMoHeqAee+Df+fxz mhlwwIzcu91WlYUDqdkmrktHKBJn9HUCQ85hd0n2QUusQDJfXSjXWzwJ4waP6rspkoUg MpbG0/WDLreDgY4c5JSwnLwfnT/YRZFdwiUnB6D1lFKV+KKL26MVKzU0QYRYLO0PYkrO vdxw== X-Gm-Message-State: AOPr4FV8Q/MuDGG3zeatoZ1qrqxbhwxTxWz4KTNWOJn4ZhvVG17VmAiWantLfSOsyXEboQ== X-Received: by 10.55.168.195 with SMTP id r186mr12826993qke.24.1461170721252; Wed, 20 Apr 2016 09:45:21 -0700 (PDT) Received: from localhost.localdomain ([190.2.108.156]) by smtp.gmail.com with ESMTPSA id m7sm24641232qgd.17.2016.04.20.09.45.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Apr 2016 09:45:20 -0700 (PDT) From: Ezequiel Garcia To: dri-devel@lists.freedesktop.org Subject: [PATCH v2] drm: Make drm.debug parameter description more helpful Date: Wed, 20 Apr 2016 13:45:03 -0300 Message-Id: <1461170703-11216-1-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461087638-16959-2-git-send-email-ezequiel@vanguardiasur.com.ar> References: <1461087638-16959-2-git-send-email-ezequiel@vanguardiasur.com.ar> Cc: Ezequiel Garcia X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Let's be user-friendly and print an actually helpful parameter description. This makes modinfo output the debug parameter like this: parm: debug:Enable debug output, where each bit enables a debug category. Bit 0 (0x01) will enable CORE messages (drm core code) Bit 1 (0x02) will enable DRIVER messages (drm controller code) Bit 2 (0x04) will enable KMS messages (modesetting code) Bit 3 (0x08) will enable PRIME messages (prime code) Bit 4 (0x10) will enable ATOMIC messages (atomic code) Bit 5 (0x20) will enable VBL messages (vblank code) (int) Signed-off-by: Ezequiel Garcia Reviewed-by: Jani Nikula --- Changes from v1: * Fixed s/PRMIE/PRIME typo. * Add ATOMIC and VBL debug parameter documentation. * Prefix the continuation lines with two tabs and removed the last new line. * Remove spurious whitespace. drivers/gpu/drm/drm_drv.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 167c8d3d4a31..c4f45ac04ea4 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -37,13 +37,23 @@ #include "drm_legacy.h" #include "drm_internal.h" -unsigned int drm_debug = 0; /* bitmask of DRM_UT_x */ +/* + * drm_debug: Enable debug output. + * Bitmask of DRM_UT_x. See include/drm/drmP.h for details. + */ +unsigned int drm_debug = 0; EXPORT_SYMBOL(drm_debug); MODULE_AUTHOR(CORE_AUTHOR); MODULE_DESCRIPTION(CORE_DESC); MODULE_LICENSE("GPL and additional rights"); -MODULE_PARM_DESC(debug, "Enable debug output"); +MODULE_PARM_DESC(debug, "Enable debug output, where each bit enables a debug category.\n" +"\t\tBit 0 (0x01) will enable CORE messages (drm core code)\n" +"\t\tBit 1 (0x02) will enable DRIVER messages (drm controller code)\n" +"\t\tBit 2 (0x04) will enable KMS messages (modesetting code)\n" +"\t\tBit 3 (0x08) will enable PRIME messages (prime code)\n" +"\t\tBit 4 (0x10) will enable ATOMIC messages (atomic code)\n" +"\t\tBit 5 (0x20) will enable VBL messages (vblank code)"); module_param_named(debug, drm_debug, int, 0600); static DEFINE_SPINLOCK(drm_minor_lock);