From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: "K, Mythri P" <mythripk@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 5/8] OMAP4 : DSS2 : HDMI: HDMI driver addition in the DSS drivers interface
Date: Mon, 28 Feb 2011 08:27:03 +0200 [thread overview]
Message-ID: <1298874423.2096.11.camel@deskari> (raw)
In-Reply-To: <AANLkTimiQ2pdvzP0OAnq5YqzkWq_91XLMWSq1K5M_3VH@mail.gmail.com>
On Mon, 2011-02-28 at 00:11 -0600, K, Mythri P wrote:
> Hi Tomi,
>
> On Sun, Feb 27, 2011 at 3:47 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> >> + * HDMI interface DSS driver setting for TI's OMAP4 family of processor.
> >> + * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com/
> >> + * Authors: Yong Zhi
> >
> > Who is Yong Zhi and where's his signed-off-by?
> Yong zhi had written some of the functions in this file , which was in
> a library.He no longer works on the driver though .
Ok. Generally there should be a signed-off-by from everybody who has
written the code. It's like "I have written this code and I have
permission to send it upstream" etc.
His signed-off would be good for this too, but if the code is just based
on his work, and doesn't really resemble it anymore, perhaps you could
then say "Based on code by Yong Zhi", or similar.
> >> +
> >> +static inline int hdmi_wait_for_bit_change(const struct hdmi_reg idx,
> >> + int b2, int b1, u32 val)
> >> +{
> >> + u32 t = 0;
> >> + while (val != FLD_GET(hdmi_read_reg(idx), b2, b1)) {
> >
> > There's REG_GET macro used in other DSS files to read bits from the
> > registers.
> Hmm i see that in dsi.c REG_GET is defined to do the same,
> #define REG_GET(idx, start, end) \
> FLD_GET(dsi_read_reg(idx), start, end)
> So should this be fine of should i define a new REG_GET ?
REG_GET() uses the private dsi_read_reg() function, so it has to be
defined again in each interface file. So for HDMI, define REG_REG
similarly with hdmi_read_reg().
> >> + /* HACK : DDC needs time to stablize */
> >> + mdelay(10);
> >
> > So what is the reason for this? It's a sleep that for unknown reason
> > make the code work? Or is there an idea why this is needed?
> This is the time it needs to stabilize DDC, else most of the time it
> reads a 0 or
> wrong shifted values , so i have prefixed with a HACK.
Ok. I'm fine with the hack for now, but I'm just interested: Is the 10ms
just something that happens to work? This sleep is not discussed in any
documentation? Has this been discussed with HW people?
> >> +static inline void print_omap_video_timings(struct omap_video_timings *timings)
> >
> > Why is this inline?
> Its only a print function , called many times by the driver. Do you
> see any reason not to make it inline?
Well, generally you shouldn't use inline. I think that's the basic rule.
Compiler usually makes better choices than humans. I have used them for
xxx_read_reg() and xxx_write_reg(), although I'm not quite sure if even
that is needed.
And in this case the function is quite long. I'm guessing here, but most
likely the code runs faster if it's _not_ inlined, because not inlining
reduces the size of the code. Also, print functions are on the slower
side anyway, so the overhead of calling this function is probably
negligible compared to the contents of the function.
Tomi
next prev parent reply other threads:[~2011-02-28 6:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 14:21 [PATCH 0/8] OMAP4 : DSS2 : HDMI support Mythri P K
2011-02-25 14:21 ` [PATCH 1/8] OMAP4 : DSS2 : Add display type HDMI to DSS2 Mythri P K
2011-02-25 14:21 ` [PATCH 2/8] OMAP4 : DSS2 : Add display structure in the board file for OMAP4 sdp Mythri P K
2011-02-27 9:13 ` Tomi Valkeinen
2011-02-28 5:32 ` K, Mythri P
2011-02-25 14:21 ` [PATCH 3/8] OMAP4 : DSS : HDMI: HDMI specific display controller and dss change Mythri P K
2011-02-27 9:23 ` Tomi Valkeinen
2011-02-28 6:21 ` K, Mythri P
2011-02-28 6:42 ` Tomi Valkeinen
2011-02-25 14:21 ` [PATCH 4/8] OMAP4 : DSS : HDMI: HDMI driver header file addition Mythri P K
2011-02-27 9:28 ` Tomi Valkeinen
2011-02-28 5:40 ` K, Mythri P
2011-02-25 14:21 ` [PATCH 5/8] OMAP4 : DSS2 : HDMI: HDMI driver addition in the DSS drivers interface Mythri P K
2011-02-27 10:17 ` Tomi Valkeinen
2011-02-28 6:11 ` K, Mythri P
2011-02-28 6:27 ` Tomi Valkeinen [this message]
2011-02-28 6:30 ` K, Mythri P
2011-02-28 6:51 ` Tomi Valkeinen
2011-02-25 14:21 ` [PATCH 6/8] OMAP4 : DSS2 : HDMI: HDMI panel driver addition in the DSS Mythri P K
2011-02-27 9:43 ` Tomi Valkeinen
2011-02-28 6:14 ` K, Mythri P
2011-02-25 14:21 ` [PATCH 7/8] OMAP4 : DSS : HDMI: Call to HDMI module init to register driver Mythri P K
2011-02-25 14:21 ` [PATCH 8/8] OMAP4 : DSS2 : Add display structure in the board file for OMAP4 pandaboard Mythri P K
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=1298874423.2096.11.camel@deskari \
--to=tomi.valkeinen@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=mythripk@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox