public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
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 3/8] OMAP4 : DSS : HDMI: HDMI specific display controller and dss change.
Date: Mon, 28 Feb 2011 08:42:07 +0200	[thread overview]
Message-ID: <1298875327.2096.25.camel@deskari> (raw)
In-Reply-To: <AANLkTi=1xrEzjVA9Z+a2_ZXmhgQTr=08saosGWWdhXaB@mail.gmail.com>

On Mon, 2011-02-28 at 00:21 -0600, K, Mythri P wrote:
> Hi Tomi,
> 
> On Sun, Feb 27, 2011 at 2:53 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> > On Fri, 2011-02-25 at 08:21 -0600, K, Mythri P wrote:
> >> Adding changes to set gamma table bit for TV interface and function to select
> >> between VENC and HDMI.
> >>
> >> Signed-off-by: Mythri P K <mythripk@ti.com>
> >> ---
> >>  drivers/video/omap2/dss/dispc.c |    5 +++++
> >>  drivers/video/omap2/dss/dss.c   |    7 +++++++
> >>  drivers/video/omap2/dss/dss.h   |    2 ++
> >>  3 files changed, 14 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
> >> index 6d9bb17..16f1106 100644
> >> --- a/drivers/video/omap2/dss/dispc.c
> >> +++ b/drivers/video/omap2/dss/dispc.c
> >> @@ -1213,6 +1213,11 @@ void dispc_enable_zorder(enum omap_plane plane, bool enable)
> >>       dispc_write_reg(dispc_reg_att[plane], val);
> >>  }
> >>
> >> +void dispc_enable_gamma_table(bool enable)
> >> +{
> >> +     REG_FLD_MOD(DISPC_CONFIG, enable, 9, 9);
> >> +}
> >> +
> >>  static void _dispc_set_vid_color_conv(enum omap_plane plane, bool enable)
> >>  {
> >>       u32 val;
> >> diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
> >> index 99de4e1..127d42e 100644
> >> --- a/drivers/video/omap2/dss/dss.c
> >> +++ b/drivers/video/omap2/dss/dss.c
> >> @@ -559,6 +559,13 @@ void dss_set_dac_pwrdn_bgz(bool enable)
> >>       REG_FLD_MOD(DSS_CONTROL, enable, 5, 5); /* DAC Power-Down Control */
> >>  }
> >>
> >> +void dss_select_hdmi_venc(bool hdmi)
> >> +{
> >> +     REG_FLD_MOD(DSS_CONTROL, hdmi, 15, 15); /* 0x1 for HDMI, 0x0 VENC */
> >> +     if (hdmi)
> >> +             REG_FLD_MOD(DSS_CONTROL, 0, 9, 8);
> >> +}
> >
> > bool argument for this function is very confusing. Which one is true?
> > Perhaps this could use an enum.
> I have added a comment , 1 is for HDMI and 0 for VENC.

Yes, but I meant the code which calls this function =). Usually boolean
argument is not good if you have to select between x and y. It's
impossible for the reader to know which is which. 

> >
> > I've tried to keep the habit of having the name of the register field in
> > comments to make the code easier to read. For example, /*
> > VENC_HDMI_SWITCH */ for the bit 15.
> I can add this.
> >
> > The bits 8 and 9 are FCK_CLK_SWITCH. Why do you set it here? Looks
> > rather dangerous to change the clock source like that.
> >
> This is to select what would be the clock source to DISPC, HDMI would
> need the DISPC
> to run at the rate of pixel clock (TMDS if deep color is set ) required by HDMI.
> Where as DSI does not have any such constraint( correct me if i am wrong).

Hmm, I don't understand. This selects the DISPC to receive the fck from
PRCM. Why does it matter for HDMI where DISPC gets its clock? Is this
described in the TRM?

> I suppose we can have a patch to select the correct clock source to
> DISPC dynamically
> based on what panels are connected later on ?

Well, something more generic is required, because other parts of the
code could make changes to the fclk source. Here you just set the source
clock register directly and invisibly. You don't even use the function
dss_select_dispc_clk_source(), and so this would mess up the
dss.dispc_clk_source variable.

 Tomi



  reply	other threads:[~2011-02-28  6:42 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 [this message]
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
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=1298875327.2096.25.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