All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mahapatra, Chandrabhanu" <cmahapatra@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH V3 0/3] OMAPDSS: Enable dynamic debug printing
Date: Fri, 28 Sep 2012 12:23:21 +0000	[thread overview]
Message-ID: <CAF0AtAsbBd_P7_=Swtre1MGrE_gW4JikYt3MaJ1kFO1ALzB36w@mail.gmail.com> (raw)
In-Reply-To: <1348832057.2437.24.camel@deskari>

On Fri, Sep 28, 2012 at 5:04 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On Fri, 2012-09-28 at 15:53 +0530, Chandrabhanu Mahapatra wrote:
>> Hi everyone,
>> this patch series aims at cleaning up of DSS of printk()'s enabled with
>> dss_debug and replace them with generic dynamic debug printing.
>>
>> The 1st patch
>>  * moved DEBUG flag definition to Makefile
>> The 2nd patch
>>  * replaces printk() in DSSDBG definition with pr_debug()
>>  * removes DSSDBGF definition and replaces its instances with DSSDBG()
>> The 3rd patch
>>  * cleans up printk()'s in omap_dispc_unregister_isr() and
>>    _dsi_print_reset_status() with pr_debug()
>>  * removes dss_debug variable
>>
>> Changes from V1 to V2:
>>  * added debug messages to DSSDBG calls
>>  * added patch "OMAPDSS: Remove dss_debug variable"
>>
>> Changes from V2 to V3
>>  * added patch "OMAPDSS: Move definition of DEBUG flag to Makefile"
>>
>> All your comments and suggestions are welcome.
>
> There's one thing that's not quite nice about omapdss's debug print
> behavior after this series.
>
> CONFIG_OMAP2_DSS_DEBUG_SUPPORT is marked "default y", and it's also been
> safe to enable earlier as we had the dss_debug variable to prevent the
> debug prints. But after this series, the debug prints are enabled, and
> will spam the kernel log quite heavily.
>
> And that happens with both dynamic debugging enabled and disabled.

Yes, I had noticed that but I thought a better way to disable debug
prints is to disable both dynamic debugging (CONFIG_DYNAMIC_DEBUG) and
CONFIG_OMAP2_DSS_DEBUG_SUPPORT. May be CONFIG_OMAP2_DSS_DEBUG_SUPPORT
should have been false by default.

> How things should work:
>
> For kernels with dynamic debugging disabled: by default the dss debugs
> are not compiled, and the user needs to explicitly enable them in the
> kernel config.
>
> For kernels with dynamic debugging enabled: by default the dss debugs
> are compiled in, but not enabled. A Kconfig option can be set to make
> the debugs enabled by default.
>
> In addition to those, we have the debugfs files. Those should be usable
> regardless of the debug prints.
>
> So I suggest the following:
>
> - Remove CONFIG_OMAP2_DSS_DEBUG_SUPPORT. We can't re-use it, because it
> may be enabled in user's kernel configs.
> - Add new Kconfig option: CONFIG_OMAP2_DSS_DEBUG. This will set DEBUG in
> the makefile. This is off by default.
> - Add new Kconfig option: CONFIG_OMAP2_DSS_DEBUGFS. This will be use to
> decide if debugfs functionality is compiled in or not. This is off by
> default.
>
>  Tomi
>

Well, I had a different perception. If one needs to debug then both
debugfs and debug prints should be enabled. If one needs only debug
prints then CONFIG_DEBUG_FS can be disabled.
But above approach seems to provide more flexibilty.

-- 
Chandrabhanu Mahapatra
Texas Instruments India Pvt. Ltd.

WARNING: multiple messages have this Message-ID (diff)
From: "Mahapatra, Chandrabhanu" <cmahapatra@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH V3 0/3] OMAPDSS: Enable dynamic debug printing
Date: Fri, 28 Sep 2012 17:41:21 +0530	[thread overview]
Message-ID: <CAF0AtAsbBd_P7_=Swtre1MGrE_gW4JikYt3MaJ1kFO1ALzB36w@mail.gmail.com> (raw)
In-Reply-To: <1348832057.2437.24.camel@deskari>

On Fri, Sep 28, 2012 at 5:04 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On Fri, 2012-09-28 at 15:53 +0530, Chandrabhanu Mahapatra wrote:
>> Hi everyone,
>> this patch series aims at cleaning up of DSS of printk()'s enabled with
>> dss_debug and replace them with generic dynamic debug printing.
>>
>> The 1st patch
>>  * moved DEBUG flag definition to Makefile
>> The 2nd patch
>>  * replaces printk() in DSSDBG definition with pr_debug()
>>  * removes DSSDBGF definition and replaces its instances with DSSDBG()
>> The 3rd patch
>>  * cleans up printk()'s in omap_dispc_unregister_isr() and
>>    _dsi_print_reset_status() with pr_debug()
>>  * removes dss_debug variable
>>
>> Changes from V1 to V2:
>>  * added debug messages to DSSDBG calls
>>  * added patch "OMAPDSS: Remove dss_debug variable"
>>
>> Changes from V2 to V3
>>  * added patch "OMAPDSS: Move definition of DEBUG flag to Makefile"
>>
>> All your comments and suggestions are welcome.
>
> There's one thing that's not quite nice about omapdss's debug print
> behavior after this series.
>
> CONFIG_OMAP2_DSS_DEBUG_SUPPORT is marked "default y", and it's also been
> safe to enable earlier as we had the dss_debug variable to prevent the
> debug prints. But after this series, the debug prints are enabled, and
> will spam the kernel log quite heavily.
>
> And that happens with both dynamic debugging enabled and disabled.

Yes, I had noticed that but I thought a better way to disable debug
prints is to disable both dynamic debugging (CONFIG_DYNAMIC_DEBUG) and
CONFIG_OMAP2_DSS_DEBUG_SUPPORT. May be CONFIG_OMAP2_DSS_DEBUG_SUPPORT
should have been false by default.

> How things should work:
>
> For kernels with dynamic debugging disabled: by default the dss debugs
> are not compiled, and the user needs to explicitly enable them in the
> kernel config.
>
> For kernels with dynamic debugging enabled: by default the dss debugs
> are compiled in, but not enabled. A Kconfig option can be set to make
> the debugs enabled by default.
>
> In addition to those, we have the debugfs files. Those should be usable
> regardless of the debug prints.
>
> So I suggest the following:
>
> - Remove CONFIG_OMAP2_DSS_DEBUG_SUPPORT. We can't re-use it, because it
> may be enabled in user's kernel configs.
> - Add new Kconfig option: CONFIG_OMAP2_DSS_DEBUG. This will set DEBUG in
> the makefile. This is off by default.
> - Add new Kconfig option: CONFIG_OMAP2_DSS_DEBUGFS. This will be use to
> decide if debugfs functionality is compiled in or not. This is off by
> default.
>
>  Tomi
>

Well, I had a different perception. If one needs to debug then both
debugfs and debug prints should be enabled. If one needs only debug
prints then CONFIG_DEBUG_FS can be disabled.
But above approach seems to provide more flexibilty.

-- 
Chandrabhanu Mahapatra
Texas Instruments India Pvt. Ltd.

  reply	other threads:[~2012-09-28 12:23 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-25  6:03 [PATCH] OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function Chandrabhanu Mahapatra
2012-09-25  6:15 ` Chandrabhanu Mahapatra
2012-09-25  6:24 ` Tomi Valkeinen
2012-09-25  6:24   ` Tomi Valkeinen
2012-09-25  9:30   ` Mahapatra, Chandrabhanu
2012-09-25  9:42     ` Mahapatra, Chandrabhanu
2012-09-25  9:57     ` Tomi Valkeinen
2012-09-25  9:57       ` Tomi Valkeinen
2012-09-26  5:15 ` [PATCH V2 0/2] OMAPDSS: Enable dynamic debug printing Chandrabhanu Mahapatra
2012-09-26  5:27   ` Chandrabhanu Mahapatra
2012-09-26  5:15   ` [PATCH V2 1/2] OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function Chandrabhanu Mahapatra
2012-09-26  5:27     ` Chandrabhanu Mahapatra
2012-09-26  5:16   ` [PATCH V2 2/2] OMAPDSS: Remove dss_debug variable Chandrabhanu Mahapatra
2012-09-26  5:28     ` Chandrabhanu Mahapatra
2012-09-26 14:29   ` [PATCH V2 0/2] OMAPDSS: Enable dynamic debug printing Tomi Valkeinen
2012-09-26 14:29     ` Tomi Valkeinen
2012-09-27 10:50     ` Mahapatra, Chandrabhanu
2012-09-27 10:50       ` Mahapatra, Chandrabhanu
2012-09-27 11:01       ` Tomi Valkeinen
2012-09-27 11:01         ` Tomi Valkeinen
2012-09-28 10:23   ` [PATCH V3 0/3] " Chandrabhanu Mahapatra
2012-09-28 10:35     ` Chandrabhanu Mahapatra
2012-09-28 10:23     ` [PATCH V3 1/3] OMAPDSS: Move definition of DEBUG flag to Makefile Chandrabhanu Mahapatra
2012-09-28 10:35       ` Chandrabhanu Mahapatra
2012-09-28 10:23     ` [PATCH V3 2/3] OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function Chandrabhanu Mahapatra
2012-09-28 10:35       ` Chandrabhanu Mahapatra
2012-09-28 11:22       ` Tomi Valkeinen
2012-09-28 11:22         ` Tomi Valkeinen
2012-09-28 11:30         ` Mahapatra, Chandrabhanu
2012-09-28 11:42           ` Mahapatra, Chandrabhanu
2012-09-28 11:37           ` Tomi Valkeinen
2012-09-28 11:37             ` Tomi Valkeinen
2012-09-28 10:23     ` [PATCH V3 3/3] OMAPDSS: Remove dss_debug variable Chandrabhanu Mahapatra
2012-09-28 10:35       ` Chandrabhanu Mahapatra
2012-09-28 11:34     ` [PATCH V3 0/3] OMAPDSS: Enable dynamic debug printing Tomi Valkeinen
2012-09-28 11:34       ` Tomi Valkeinen
2012-09-28 12:11       ` Mahapatra, Chandrabhanu [this message]
2012-09-28 12:23         ` Mahapatra, Chandrabhanu
2012-09-29 10:49     ` [PATCH V4 0/5] " Chandrabhanu Mahapatra
2012-09-29 10:51       ` Chandrabhanu Mahapatra
2012-09-29 10:49       ` [PATCH V4 1/5] OMAPDSS: Move definition of DEBUG flag to Makefile Chandrabhanu Mahapatra
2012-09-29 10:51         ` Chandrabhanu Mahapatra
2012-09-29 10:49       ` [PATCH V4 2/5] OMAPDSS: Create new debug config options Chandrabhanu Mahapatra
2012-09-29 10:52         ` Chandrabhanu Mahapatra
2012-09-29 15:15         ` Sumit Semwal
2012-09-29 15:27           ` Sumit Semwal
2012-10-01  7:48         ` [PATCH V5 " Chandrabhanu Mahapatra
2012-10-01  7:51           ` Chandrabhanu Mahapatra
2012-09-29 10:49       ` [PATCH V4 3/5] OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function Chandrabhanu Mahapatra
2012-09-29 10:52         ` Chandrabhanu Mahapatra
2012-09-29 10:49       ` [PATCH V4 4/5] OMAPDSS: Replace multi part debug prints with pr_debug Chandrabhanu Mahapatra
2012-09-29 10:52         ` Chandrabhanu Mahapatra
2012-10-05 12:33         ` Tomi Valkeinen
2012-10-05 12:33           ` Tomi Valkeinen
2012-10-10  9:22         ` [PATCH V5 " Chandrabhanu Mahapatra
2012-10-10  9:34           ` Chandrabhanu Mahapatra
2012-09-29 10:49       ` [PATCH V4 5/5] OMAPDSS: Remove dss_debug variable Chandrabhanu Mahapatra
2012-09-29 10:52         ` Chandrabhanu Mahapatra
2012-10-05 12:46       ` [PATCH V4 0/5] OMAPDSS: Enable dynamic debug printing Tomi Valkeinen
2012-10-05 12:46         ` Tomi Valkeinen
2012-10-10 10:26         ` Sumit Semwal
2012-10-10 10:38           ` Sumit Semwal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF0AtAsbBd_P7_=Swtre1MGrE_gW4JikYt3MaJ1kFO1ALzB36w@mail.gmail.com' \
    --to=cmahapatra@ti.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.