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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33D3DC433E0 for ; Thu, 11 Jun 2020 10:52:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 117BD2072F for ; Thu, 11 Jun 2020 10:52:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="LpJtM6yd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727115AbgFKKwi (ORCPT ); Thu, 11 Jun 2020 06:52:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727769AbgFKKwY (ORCPT ); Thu, 11 Jun 2020 06:52:24 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72ED5C08C5C3 for ; Thu, 11 Jun 2020 03:52:22 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id p5so5640750wrw.9 for ; Thu, 11 Jun 2020 03:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=RcwomoC+Ma2mWugiGJC6MsfrL5L8dR3rfJt4NSp2F1A=; b=LpJtM6ydrDbbhtItKZv2qWLETVFuKYqehoy0/u7rITHuUcoPswXsgTwlrq1L/Xz5sS cX38+CtF/0s982isrNgOw1gU+VnYdGwhYGN3SvWXcy2GKCejOXvH7DtPdc2FYgLzghXg pwB553g48U+lMNMQmz7Gpr67q6gyVB5f2x/I0qRsaLNrYhE4QqD6W6gdUnbKBMNMKwTM ImxtNRhaUo5A+b+XlGD/ha3fYdNI+Bj2f/s+tBf473k+HvbErQw52mPJM+FHYtuaQbIZ byERlh/+fSQLZJX6jL3mRVhB//6kfiCk1hn1KxCDpg2brcXrAunaX/y1caMhA+q3DanH fgvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=RcwomoC+Ma2mWugiGJC6MsfrL5L8dR3rfJt4NSp2F1A=; b=Y+3THDCWi+vrN1A2/heLS/+PQ2TpSUyYbonQa95a+rCZMBnAAtlUNqbSnfQSUyJiwu m910xeOGo+RmIvDW+F5+B7bKm93tdPmSd3M9v+Q4SdZx15jIaQacxH0K86X5alkyl2Cx 3fnJrjl4ueae9BotOAg1Eu59oqOzryc6sp51sagZZ5aE14Uavedog7gX5/IUW3/o01w6 6Oi8ZpvNqtH/IUWoMuW9zf/KmYAVq7dwWI4rdrikot/a/wxe5yARLCENYxjT2FrQ07vb 8sH6rGbJhNka9QPf5Xb3wL6av7BEtJzFtrPsDMnGIfcmEk/BPUGZzlcr3NuB1MeLzSX/ 1EYQ== X-Gm-Message-State: AOAM5315yQBrHrQva+HFaHln7AtZYj4OfEsGCvNee19OkW5qjbaAB4+u G+ua/xoYW3T6p2QVu+wCOuSRjQ== X-Google-Smtp-Source: ABdhPJxRDOlxqgu72sbIjFJnoqPirslj0v0jSqfMN3rVOPmEkZMzmS6dsNJsp6VRHW5n4kPM4nvvZg== X-Received: by 2002:a5d:6150:: with SMTP id y16mr9531737wrt.219.1591872740691; Thu, 11 Jun 2020 03:52:20 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id z8sm4361959wru.33.2020.06.11.03.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 03:52:19 -0700 (PDT) Date: Thu, 11 Jun 2020 11:52:17 +0100 From: Daniel Thompson To: Joe Perches Cc: Greg Kroah-Hartman , Stanimir Varbanov , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-acpi@vger.kernel.org, netdev@vger.kernel.org, Jason Baron Subject: Re: [PATCH v3 6/7] venus: Make debug infrastructure more flexible Message-ID: <20200611105217.73xwkd2yczqotkyo@holly.lan> References: <20200609104604.1594-1-stanimir.varbanov@linaro.org> <20200609104604.1594-7-stanimir.varbanov@linaro.org> <20200609111414.GC780233@kroah.com> <20200610133717.GB1906670@kroah.com> <31e1aa72b41f9ff19094476033511442bb6ccda0.camel@perches.com> <2fab7f999a6b5e5354b23d06aea31c5018b9ce18.camel@perches.com> <20200611062648.GA2529349@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Wed, Jun 10, 2020 at 11:42:43PM -0700, Joe Perches wrote: > On Thu, 2020-06-11 at 08:26 +0200, Greg Kroah-Hartman wrote: > > On Wed, Jun 10, 2020 at 01:23:56PM -0700, Joe Perches wrote: > > > On Wed, 2020-06-10 at 12:49 -0700, Joe Perches wrote: > > > > On Wed, 2020-06-10 at 15:37 +0200, Greg Kroah-Hartman wrote: > > > > > Please work with the infrastructure we have, we have spent a lot of time > > > > > and effort to make it uniform to make it easier for users and > > > > > developers. > > > > > > > > Not quite. > > > > > > > > This lack of debug grouping by type has been a > > > > _long_ standing issue with drivers. > > > > > > > > > Don't regress and try to make driver-specific ways of doing > > > > > things, that way lies madness... > > > > > > > > It's not driver specific, it allows driver developers to > > > > better isolate various debug states instead of keeping > > > > lists of specific debug messages and enabling them > > > > individually. > > > > > > For instance, look at the homebrew content in > > > drivers/gpu/drm/drm_print.c that does _not_ use > > > dynamic_debug. > > > > > > 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)\n" > > > "\t\tBit 7 (0x80) will enable LEASE messages (leasing code)\n" > > > "\t\tBit 8 (0x100) will enable DP messages (displayport code)"); > > > module_param_named(debug, __drm_debug, int, 0600); > > > > > > void drm_dev_dbg(const struct device *dev, enum drm_debug_category category, > > > const char *format, ...) > > > { > > > struct va_format vaf; > > > va_list args; > > > > > > if (!drm_debug_enabled(category)) > > > return; > > > > Ok, and will this proposal be able to handle stuff like this? > > Yes, that's the entire point. Currently I think there not enough "levels" to map something like drm.debug to the new dyn dbg feature. I don't think it is intrinsic but I couldn't find the bit of the code where the 5-bit level in struct _ddebug is converted from a mask to a bit number and vice-versa. Daniel.