From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: "Mahapatra, Chandrabhanu" <cmahapatra@ti.com>
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function
Date: Tue, 25 Sep 2012 09:57:36 +0000 [thread overview]
Message-ID: <1348567056.2342.28.camel@deskari> (raw)
In-Reply-To: <CAF0AtAukV_5FXXc79yuXr50+1XXWNiFKdN5MWLgRy2N6Ux-adg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3425 bytes --]
On Tue, 2012-09-25 at 15:00 +0530, Mahapatra, Chandrabhanu wrote:
> > This debug message is even less meaningful than the overlay number =).
> > Again, I think either keep the DSSDBGF, or print something sensible,
> > like "entering ULPS".
> >
>
> I dont think it would be wise enough to update code for one and keep
> the older version for another when both DSSDBG and DSSDBGF are almost
> one and the same. Its better to add something meaningful to the prints
> as you have mentioned like "writing ovl %d regs" and "DSI entering
> ULPS".
I didn't mean to leave DSSDBGF unchanged. I meant that it should work as
it works now, printing the func name, but using pr_debug.
> >>
> >> WARN_ON(!dsi_bus_is_locked(dsidev));
> >>
> >> @@ -4184,7 +4180,7 @@ int omapdss_dsi_set_clocks(struct omap_dss_device *dssdev,
> >> unsigned long pck;
> >> int r;
> >>
> >> - DSSDBGF("ddr_clk %lu, lp_clk %lu", ddr_clk, lp_clk);
> >> + DSSDBG("ddr_clk %lu, lp_clk %lu", ddr_clk, lp_clk);
> >>
> >> mutex_lock(&dsi->lock);
> >>
> >> diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
> >> index 5e9fd769..3a2caab 100644
> >> --- a/drivers/video/omap2/dss/dss.h
> >> +++ b/drivers/video/omap2/dss/dss.h
> >> @@ -29,38 +29,20 @@
> >>
> >> #ifdef DEBUG
> >> extern bool dss_debug;
> >
> > You still left the dss_debug option here, even if it's not used by the
> > DSSDBG anymore. What's your plan about this?
> >
> > Tomi
> >
>
> dss_debug and DEBUG need to remain here as it is being used by
> functions omap_dispc_irq_handler() and _dsi_print_reset_status() in
It would be good to clean all this in one patch series.
> dispc.c and dsi.c. I am little bit unsure of how to deal with it.
> There could be a single print in omap_dispc_irq_handler() but it is a
> bit tricky in _dsi_print_reset_status().
>
> May be a macro like this one can be used in _dsi_print_reset_status()
>
> #define DSI_FLD_GET(fld, start, end)\
> FLD_GET(dsi_read_reg(dsidev, DSI_##fld), start, end);
>
> pr_debug("PLL (%d) CIO (%d) \n PHY (%x%x%x, %d, %d, %d) \n",
> DSI_FLD_GET(PLL_STATUS, 0, 0),
> DSI_FLD_GET(COMPLEXIO_CFG1, 29, 29),
> DSI_FLD_GET(DSIPHY_CFG5, bo, bo),
> DSI_FLD_GET(DSIPHY_CFG5, b1, b1),
> ..................................................);
> This could be defined at the beginning of the function and later at its end.
Yes, I think something like that could work. I don't see any problem
with having temporary helper macros to help creating the debug message.
> As you had previously mentioned a print like
>
> #define PIS(x) (status & DSI_IRQ_##x) ? (#x " ") : ""
>
> pr_debug("DSI IRQ: 0x%x: %s%s%s",
> status,
> PIS(WAKEUP),
> PIS(RESYNC),
> PIS(PLL_LOCK));
>
> could help in print_irq_status() but I am still unsure how to deal
> with conditional statements in print_irq_status() like
> if (dss_has_feature(FEAT_MGR_LCD3))
> PIS(SYNC_LOST3);
> Should we use approach like
>
> pr_debug("DSI IRQ: 0x%x: %s%s%s%s...",
> status,
> PIS(WAKEUP),
> PIS(RESYNC),
> PIS(PLL_LOCK)
> dss_has_feature(FEAT_MGR_LCD3) ? PIS(SYNC_LOST3) : ""
> ...................................... );
Yes, that looks fine to me.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-09-25 9:57 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-25 6:15 [PATCH] OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function Chandrabhanu Mahapatra
2012-09-25 6:24 ` Tomi Valkeinen
2012-09-25 9:42 ` Mahapatra, Chandrabhanu
2012-09-25 9:57 ` Tomi Valkeinen [this message]
2012-09-26 5:27 ` [PATCH V2 0/2] OMAPDSS: Enable dynamic debug printing Chandrabhanu Mahapatra
2012-09-26 5:27 ` [PATCH V2 1/2] OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function Chandrabhanu Mahapatra
2012-09-26 5:28 ` [PATCH V2 2/2] OMAPDSS: Remove dss_debug variable Chandrabhanu Mahapatra
2012-09-26 14:29 ` [PATCH V2 0/2] OMAPDSS: Enable dynamic debug printing Tomi Valkeinen
2012-09-27 10:50 ` Mahapatra, Chandrabhanu
2012-09-27 11:01 ` Tomi Valkeinen
2012-09-28 10:35 ` [PATCH V3 0/3] " Chandrabhanu Mahapatra
2012-09-28 10:35 ` [PATCH V3 1/3] OMAPDSS: Move definition of DEBUG flag to Makefile Chandrabhanu Mahapatra
2012-09-28 10:35 ` [PATCH V3 2/3] OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function Chandrabhanu Mahapatra
2012-09-28 11:22 ` Tomi Valkeinen
2012-09-28 11:42 ` Mahapatra, Chandrabhanu
2012-09-28 11:37 ` Tomi Valkeinen
2012-09-28 10:35 ` [PATCH V3 3/3] OMAPDSS: Remove dss_debug variable Chandrabhanu Mahapatra
2012-09-28 11:34 ` [PATCH V3 0/3] OMAPDSS: Enable dynamic debug printing Tomi Valkeinen
2012-09-28 12:23 ` Mahapatra, Chandrabhanu
2012-09-29 10:51 ` [PATCH V4 0/5] " Chandrabhanu Mahapatra
2012-09-29 10:51 ` [PATCH V4 1/5] OMAPDSS: Move definition of DEBUG flag to Makefile Chandrabhanu Mahapatra
2012-09-29 10:52 ` [PATCH V4 2/5] OMAPDSS: Create new debug config options Chandrabhanu Mahapatra
2012-09-29 15:27 ` Sumit Semwal
2012-10-01 7:51 ` [PATCH V5 " Chandrabhanu Mahapatra
2012-09-29 10:52 ` [PATCH V4 3/5] OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function Chandrabhanu Mahapatra
2012-09-29 10:52 ` [PATCH V4 4/5] OMAPDSS: Replace multi part debug prints with pr_debug Chandrabhanu Mahapatra
2012-10-05 12:33 ` Tomi Valkeinen
2012-10-10 9:34 ` [PATCH V5 " Chandrabhanu Mahapatra
2012-09-29 10:52 ` [PATCH V4 5/5] OMAPDSS: Remove dss_debug variable Chandrabhanu Mahapatra
2012-10-05 12:46 ` [PATCH V4 0/5] OMAPDSS: Enable dynamic debug printing Tomi Valkeinen
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=1348567056.2342.28.camel@deskari \
--to=tomi.valkeinen@ti.com \
--cc=cmahapatra@ti.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).