linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Archit Taneja <a0393947@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Archit Taneja <archit@ti.com>,
	rob@ti.com, linux-fbdev@vger.kernel.org,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH 05/17] OMAPDSS: Add some new fields to omap_video_timings
Date: Wed, 27 Jun 2012 12:59:07 +0000	[thread overview]
Message-ID: <4FEB00CB.4070502@ti.com> (raw)
In-Reply-To: <1340800933.2649.72.camel@deskari>

On Wednesday 27 June 2012 06:12 PM, Tomi Valkeinen wrote:
> On Wed, 2012-06-27 at 17:56 +0530, Archit Taneja wrote:
>> On Wednesday 27 June 2012 05:18 PM, Tomi Valkeinen wrote:
>>> On Tue, 2012-06-26 at 15:06 +0530, Archit Taneja wrote:
>>>> Some panel timing related fields are contained in omap_panel_config in the form
>>>> of flags. The fields are:
>>>>
>>>> - Hsync logic level
>>>> - Vsync logic level
>>>> - Data driven on rising/falling edge of pixel clock
>>>> - Output enable/Data enable logic level
>>>> - HSYNC/VSYNC driven on rising/falling edge of pixel clock
>>>>
>>>> Out of these parameters, Hsync and Vsync logic levels are a part of the timings
>>>> in the Xorg modeline configuration. So it makes sense to move the to
>>>> omap_video_timings. The rest aren't a part of modeline, but it still makes
>>>> sense to move these since they are related to panel timings.
>>>>
>>>> These fields stored in omap_panel_config in dssdev are configured for LCD
>>>> panels, and the corresponding LCD managers in the DISPC_POL_FREQo registers.
>>>>
>>>> Add the above fields in omap_video_timings. Represent their state via new enums.
>>>> The parameter pclk_edge is configured via omap_dss_signal_level, however it
>>>> actually configures whether data is driven on the rising or falling edge. This
>>>> is a bit unclean, but it prevents us from creating another enum.
>>>
>>> Hmm, why can't omap_dss_signal_edge be used for pclk_edge? I think it'd
>>> fit fine, except OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES would be an illegal
>>> value for it.
>>
>> I think my paragraph is a bit misleading. The issue is more about the
>> default value. For hsync_vsync_edge(which programs ONOFF and RF), the
>> default value is OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES, and is the case for
>> most panels. But for pclk_edge, the value for most panels is
>> OMAPDSS_DRIVE_SIG_ACTIVE_HIGH.
>>
>> So if I use the same enum for both, I'll need to populate either
>> pclk_edge or hsync_vsync_edge for almost every panel. With my approach,
>> I only need to populate these fields for panels having the non-default
>> requirements. The negative thing is that it's a bit misleading to
>> represent pclk_edge with the omap_dss_signal_level enum.
>
> Ah, I see.
>
> I really think using the ACTIVE_LOW/HIGH for pclk_edge is quite ugly =).
>
> Well, one option is to add new entry for the enums, "UNDEFINED" or
> perhaps "DEFAULT", which would have value 0. Then omapdss would know
> that it should use the default value, whatever that is.
>
> Another option is to have all panels define the pclk_edge, so that
> there's no default value needed.

I think I'll go with this.

>
> Also, related thing, I see you're writing enum values directly to the
> registers. If you do that, it'd be good to explicitly set the number
> value of the enums. Otherwise it's quite easy to add a new enum value
> later between the old ones, breaking everything (perhaps not a problem
> here, though).

Yes, that's true. I'll set the numbers anyway, for clarity.

Archit

  reply	other threads:[~2012-06-27 12:59 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26  9:48 [PATCH 00/17] OMAPDSS: Misc DSS clean ups Archit Taneja
2012-06-26  9:48 ` [PATCH 01/17] OMAPDSS: Remove passive matrix LCD support (part 1) Archit Taneja
2012-06-26  9:48 ` [PATCH 02/17] OMAPDSS: Remove passive matrix lcd support (part 2) Archit Taneja
2012-06-26  9:48 ` [PATCH 02/17] OMAPDSS: Remove passive matrix LCD " Archit Taneja
2012-06-26  9:48 ` [PATCH 03/17] OMAPDSS: Remove passive matrix LCD support (part 3) Archit Taneja
2012-06-26  9:48 ` [PATCH 04/17] OMAPDSS: Remove passive matrix LCD support (part 4) Archit Taneja
2012-06-26  9:48 ` [PATCH 05/17] OMAPDSS: Add some new fields to omap_video_timings Archit Taneja
2012-06-27 11:48   ` Tomi Valkeinen
2012-06-27 12:38     ` Archit Taneja
2012-06-27 12:42       ` Tomi Valkeinen
2012-06-27 12:59         ` Archit Taneja [this message]
2012-06-27 13:02           ` Tomi Valkeinen
2012-06-26  9:48 ` [PATCH 06/17] OMAPDSS: DISPLAY: Ignore newly added omap_video_timings fields for display timings sys Archit Taneja
2012-06-26  9:48 ` [PATCH 07/17] OMAPDSS: DISPC: Configure newly added omap_video_timing fields Archit Taneja
2012-06-26  9:48 ` [PATCH 08/17] OMAPDSS: DISPC: Remove dispc_mgr_set_pol_freq() Archit Taneja
2012-06-26  9:48 ` [PATCH 09/17] OMAPFB: Map the newly added omap_video_timings fields with fb sync flags Archit Taneja
2012-06-26  9:48 ` [PATCH 10/17] OMAPDRM: Map the newly added omap_video_timings fields with drm mode flags Archit Taneja
2012-06-26  9:48 ` [PATCH 11/17] OMAPDSS: Remove omap_panel_config enum from omap_dss_device Archit Taneja
2012-06-26  9:48 ` [PATCH 12/17] OMAPDSS: Add interlace parameter to omap_video_timings Archit Taneja
2012-06-26  9:48 ` [PATCH 13/17] OMAPDSS: DISPC/APPLY: Use interlace info in manager timings for dispc_ovl_setup() Archit Taneja
2012-06-26  9:48 ` [PATCH 14/17] OMAPFB: Map interlace field in omap_video_timings with fb vmode flags Archit Taneja
2012-06-26  9:48 ` [PATCH 15/17] OMAPDRM: Map interlace field in omap_video_timings with drm mode flags Archit Taneja
2012-06-26  9:48 ` [PATCH 16/17] OMAPDSS: HDMI: Remove custom hdmi_video_timings struct Archit Taneja
2012-06-26  9:48 ` [PATCH 17/17] OMAPDSS: DSI: Remove redundant fields in omap_dss_dsi_videomode_data Archit Taneja
2012-06-27 12:05   ` Tomi Valkeinen
2012-06-27 12:30     ` Archit Taneja
2012-06-27 12:31       ` Tomi Valkeinen

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=4FEB00CB.4070502@ti.com \
    --to=a0393947@ti.com \
    --cc=archit@ti.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=rob@ti.com \
    --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 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).