All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Stephen Warren <swarren@nvidia.com>,
	Devicetree Discuss <devicetree-discuss@lists.ozlabs.org>,
	U-Boot Mailing List <u-boot@lists.denx.de>,
	Jerry Van Baren <vanbaren@cideas.com>,
	Tom Warren <twarren@nvidia.com>
Subject: Re: [PATCH v3 06/18] tegra: fdt: Add LCD definitions for Tegra
Date: Thu, 27 Sep 2012 13:27:05 -0700	[thread overview]
Message-ID: <CAPnjgZ2R=G=xmjdoP74JeAknwH9QGx8+mED7TQ8Kd_zEmcVwtQ@mail.gmail.com> (raw)
In-Reply-To: <50647594.9060404@wwwdotorg.org>

Hi Stephen,

On Thu, Sep 27, 2012 at 8:49 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 09/27/2012 07:58 AM, Simon Glass wrote:
>> Hi Stephen,
>>
>> On Tue, Jul 31, 2012 at 9:12 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> On 07/31/2012 03:27 AM, Simon Glass wrote:
>>>> On Thu, Jul 12, 2012 at 4:25 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>> Add LCD definitions and also a proposed binding for LCD displays.
>>>>>
>>>>> The PWM is as per what will likely be committed to linux-next soon.
>>>>>
>>>>> The displaymode binding comes from a proposal here:
>>>>>
>>>>> http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
>>>>>
>>>>> The panel binding is new, and fills a need to specify the panel
>>>>> timings and other tegra-specific information. Should a binding appear
>>>>> that allows the pwm to handle this automatically, we can revisit
>>>>> this.
>>>>
>>>> Any comments on this binding please? The main addition from Thierry's
>>>> one posted on LMKL is the LCD resolution selection.
>>>
>>> I have some concerns about the way the mode is represented in the
>>> binding; the timing parameters are quite different to how e.g. an EDID
>>> DTD would represent them, which I think will lead to conversion mistakes
>>> when writing the DT.
>>>
>>> I'm trying to get along of Sascha's original email so I can join in on
>>> that discussion.
>>
>> Did you get any resolution here?
>
> I think an updated version of those patches was published.
>
>>>>> diff --git a/doc/device-tree-bindings/video/tegra20-dc.txt b/doc/device-tree-bindings/video/tegra20-dc.txt
>>>
>>>>> +Optional properties (rgb):
>>>>> + - nvidia,frame-buffer: address of frame buffer (if omitted it will be
>>>>> +               calculated)
>>>>> +       - This may be useful to share an address between U-Boot and Linux and
>>>>> +               avoid boot-time corruption / flicker
>>>
>>> Why can't the display driver read this out of the display registers,
>>> instead of requiring the same information to be passed using DT too?
>>
>> The U-Boot display driver needs to set this value in the display
>> registers - at reset I don't think we can rely on any particular
>> value.
>>
>> Do you mean the kernel display driver?
>
> Yes.
>
>> Well it could, but it doesn't.
>
> Well, there is no display driver in the upstream kernel at the moment,
> so it's not possible to make assertions about what it does or not.
>
> Any downstream kernels aren't relevant, since their DT bindings and/or
> behaviour have not been through public review.

OK, but typically the kernel selects its own address for the display.
It might be quite hard for the kernel to use the one defined by
U-Boot.

>
>> Really this is just a way of getting U-Boot and Linux to agree on the
>> address, by having U-Boot know the address that the kernel will happen
>> to use. It isn't very robust, but we have found it useful as a means
>> of avoiding problems in this area.
>
> Right, but again, why can't the display driver simply read the address
> out of the register; why is there a need to duplicate the data?
>
> I guess one possibility is that the register only gives the base address
> and not the size/mode of the allocated surface, but I don't recall if
> this proposed binding did that either?

So here is my explanation:

1. U-Boot would normally put the display right near the top of memory.
Instead, it figures out where the kernel will put it (somehow this
seems to often be at a fixed address) and uses that address.

2. That means that U-Boot will now have the display exactly where the
kernel wants it.

3. When U-Boot boots the kernel, it leaves the display running,
knowing that the kernel will not overwrite the frame buffer with its
own code / data.

4. The effect is that there is a seamless display transition from
U-Boot to the kernel.

Note this is only a hint - it can be omitted i.w.c. it isn't used.

So what do you think? Should we remove this entirely, or is it a useful hack?

Regards,
Simon

WARNING: multiple messages have this Message-ID (diff)
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 06/18] tegra: fdt: Add LCD definitions for Tegra
Date: Thu, 27 Sep 2012 13:27:05 -0700	[thread overview]
Message-ID: <CAPnjgZ2R=G=xmjdoP74JeAknwH9QGx8+mED7TQ8Kd_zEmcVwtQ@mail.gmail.com> (raw)
In-Reply-To: <50647594.9060404@wwwdotorg.org>

Hi Stephen,

On Thu, Sep 27, 2012 at 8:49 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 09/27/2012 07:58 AM, Simon Glass wrote:
>> Hi Stephen,
>>
>> On Tue, Jul 31, 2012 at 9:12 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> On 07/31/2012 03:27 AM, Simon Glass wrote:
>>>> On Thu, Jul 12, 2012 at 4:25 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>> Add LCD definitions and also a proposed binding for LCD displays.
>>>>>
>>>>> The PWM is as per what will likely be committed to linux-next soon.
>>>>>
>>>>> The displaymode binding comes from a proposal here:
>>>>>
>>>>> http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
>>>>>
>>>>> The panel binding is new, and fills a need to specify the panel
>>>>> timings and other tegra-specific information. Should a binding appear
>>>>> that allows the pwm to handle this automatically, we can revisit
>>>>> this.
>>>>
>>>> Any comments on this binding please? The main addition from Thierry's
>>>> one posted on LMKL is the LCD resolution selection.
>>>
>>> I have some concerns about the way the mode is represented in the
>>> binding; the timing parameters are quite different to how e.g. an EDID
>>> DTD would represent them, which I think will lead to conversion mistakes
>>> when writing the DT.
>>>
>>> I'm trying to get along of Sascha's original email so I can join in on
>>> that discussion.
>>
>> Did you get any resolution here?
>
> I think an updated version of those patches was published.
>
>>>>> diff --git a/doc/device-tree-bindings/video/tegra20-dc.txt b/doc/device-tree-bindings/video/tegra20-dc.txt
>>>
>>>>> +Optional properties (rgb):
>>>>> + - nvidia,frame-buffer: address of frame buffer (if omitted it will be
>>>>> +               calculated)
>>>>> +       - This may be useful to share an address between U-Boot and Linux and
>>>>> +               avoid boot-time corruption / flicker
>>>
>>> Why can't the display driver read this out of the display registers,
>>> instead of requiring the same information to be passed using DT too?
>>
>> The U-Boot display driver needs to set this value in the display
>> registers - at reset I don't think we can rely on any particular
>> value.
>>
>> Do you mean the kernel display driver?
>
> Yes.
>
>> Well it could, but it doesn't.
>
> Well, there is no display driver in the upstream kernel at the moment,
> so it's not possible to make assertions about what it does or not.
>
> Any downstream kernels aren't relevant, since their DT bindings and/or
> behaviour have not been through public review.

OK, but typically the kernel selects its own address for the display.
It might be quite hard for the kernel to use the one defined by
U-Boot.

>
>> Really this is just a way of getting U-Boot and Linux to agree on the
>> address, by having U-Boot know the address that the kernel will happen
>> to use. It isn't very robust, but we have found it useful as a means
>> of avoiding problems in this area.
>
> Right, but again, why can't the display driver simply read the address
> out of the register; why is there a need to duplicate the data?
>
> I guess one possibility is that the register only gives the base address
> and not the size/mode of the allocated surface, but I don't recall if
> this proposed binding did that either?

So here is my explanation:

1. U-Boot would normally put the display right near the top of memory.
Instead, it figures out where the kernel will put it (somehow this
seems to often be at a fixed address) and uses that address.

2. That means that U-Boot will now have the display exactly where the
kernel wants it.

3. When U-Boot boots the kernel, it leaves the display running,
knowing that the kernel will not overwrite the frame buffer with its
own code / data.

4. The effect is that there is a seamless display transition from
U-Boot to the kernel.

Note this is only a hint - it can be omitted i.w.c. it isn't used.

So what do you think? Should we remove this entirely, or is it a useful hack?

Regards,
Simon

  reply	other threads:[~2012-09-27 20:27 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 15:25 [U-Boot] [PATCH v3 0/18] tegra: Add display driver and LCD support for Seaboard Simon Glass
2012-07-12 15:25 ` [PATCH v3 02/18] fdt: Add header guard to fdtdec.h Simon Glass
2012-07-12 15:25   ` [U-Boot] " Simon Glass
2012-07-19 13:49   ` Mike Frysinger
2012-07-19 13:49     ` [U-Boot] " Mike Frysinger
2012-09-21 20:08   ` Anatolij Gustschin
2012-07-12 15:25 ` [U-Boot] [PATCH v3 03/18] tegra: Use const for pinmux_config_pingroup/table() Simon Glass
2012-07-19 13:53   ` Mike Frysinger
2012-07-12 15:25 ` [U-Boot] [PATCH v3 04/18] tegra: Add display support to funcmux Simon Glass
2012-07-19 13:54   ` Mike Frysinger
2012-07-12 15:25 ` [U-Boot] [PATCH v3 07/18] tegra: Add support for PWM Simon Glass
2012-07-19 13:55   ` Mike Frysinger
2012-09-27 13:51     ` Simon Glass
2012-07-12 15:25 ` [U-Boot] [PATCH v3 08/18] tegra: Add SOC support for display/lcd Simon Glass
2012-07-19  7:37   ` Thierry Reding
2012-07-19  8:24     ` Adam Jiang
2012-07-19  8:28       ` Thierry Reding
2012-07-19  8:03   ` Adam Jiang
2012-07-19 14:13     ` Mike Frysinger
2012-09-27 17:44     ` Simon Glass
2012-07-12 15:25 ` [U-Boot] [PATCH v3 09/18] tegra: Add LCD driver Simon Glass
2012-07-19  7:41   ` Thierry Reding
2012-09-27 17:28     ` Simon Glass
2012-07-12 15:25 ` [U-Boot] [PATCH v3 10/18] tegra: Add LCD support to Nvidia boards Simon Glass
2012-07-12 15:25 ` [U-Boot] [PATCH v3 11/18] arm: Add control over cachability of memory regions Simon Glass
2012-07-12 18:12   ` Albert ARIBAUD
2012-07-19 14:10     ` Mike Frysinger
2012-09-27 17:54       ` Simon Glass
2012-07-12 15:25 ` [U-Boot] [PATCH v3 12/18] lcd: Add CONFIG_LCD_ALIGNMENT to select frame buffer alignment Simon Glass
2012-07-19 13:59   ` Mike Frysinger
2012-09-27 19:20     ` Simon Glass
2012-07-12 15:25 ` [U-Boot] [PATCH v3 13/18] lcd: Add support for flushing LCD fb from dcache after update Simon Glass
2012-07-19 14:01   ` Mike Frysinger
2012-07-19 16:52   ` Mike Frysinger
2012-08-09  7:43   ` Lukasz Majewski
2012-10-16 18:16     ` Simon Glass
2012-10-17 10:38       ` Lukasz Majewski
2012-10-17 15:34         ` Eric Nelson
2012-10-17 22:07           ` Simon Glass
2012-10-18  0:41             ` Eric Nelson
2012-10-18  0:50               ` Simon Glass
2012-10-18  1:07                 ` Eric Nelson
2012-10-19 23:49                   ` Simon Glass
2012-07-12 15:25 ` [U-Boot] [PATCH v3 14/18] tegra: Align LCD frame buffer to section boundary Simon Glass
2012-07-19 14:01   ` Mike Frysinger
2012-07-12 15:25 ` [U-Boot] [PATCH v3 15/18] tegra: Support control of cache settings for LCD Simon Glass
     [not found] ` <1342106718-3058-1-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-07-12 15:25   ` [PATCH v3 01/18] fdt: Tidy debugging, add to fdtdec_get_int/addr() Simon Glass
2012-07-12 15:25     ` [U-Boot] " Simon Glass
2012-09-21 20:06     ` Anatolij Gustschin
2012-07-12 15:25   ` [PATCH v3 05/18] tegra: fdt: Add pwm binding and node Simon Glass
2012-07-12 15:25     ` [U-Boot] " Simon Glass
2012-07-12 15:25   ` [PATCH v3 06/18] tegra: fdt: Add LCD definitions for Tegra Simon Glass
2012-07-12 15:25     ` [U-Boot] " Simon Glass
     [not found]     ` <1342106718-3058-7-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-07-31  9:27       ` Simon Glass
2012-07-31  9:27         ` [U-Boot] " Simon Glass
     [not found]         ` <CAPnjgZ2SbVVKxUdW1cvLf_9rAWLWeiVr-y6S_sz-Uw5_O_AyQA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-31  9:51           ` Thierry Reding
2012-07-31  9:51             ` [U-Boot] " Thierry Reding
     [not found]             ` <20120731095116.GA16155-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-09-27 19:44               ` Simon Glass
2012-09-27 19:44                 ` [U-Boot] " Simon Glass
2012-07-31 16:12           ` Stephen Warren
2012-07-31 16:12             ` [U-Boot] " Stephen Warren
2012-09-27 13:58             ` Simon Glass
2012-09-27 13:58               ` [U-Boot] " Simon Glass
     [not found]               ` <CAPnjgZ2NAf4PF0_U9hQeJzpdL87ZNq+WpxsbFJQHbh4rY2MoEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-27 15:49                 ` Stephen Warren
2012-09-27 15:49                   ` [U-Boot] " Stephen Warren
2012-09-27 20:27                   ` Simon Glass [this message]
2012-09-27 20:27                     ` Simon Glass
     [not found]                     ` <CAPnjgZ2R=G=xmjdoP74JeAknwH9QGx8+mED7TQ8Kd_zEmcVwtQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-27 23:21                       ` Stephen Warren
2012-09-27 23:21                         ` [U-Boot] " Stephen Warren
2012-09-27 23:37                         ` Simon Glass
2012-09-27 23:37                           ` [U-Boot] " Simon Glass
     [not found]                           ` <CAPnjgZ3JuE_jiSRGW6o3eCbp4cLCf1uenKz4kPCpfqLJ3Mdmjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-28  5:42                             ` Thierry Reding
2012-09-28  5:42                               ` [U-Boot] " Thierry Reding
2012-07-12 15:25   ` [PATCH v3 16/18] tegra: fdt: Add LCD definitions for Seaboard Simon Glass
2012-07-12 15:25     ` [U-Boot] " Simon Glass
2012-07-12 15:25 ` [U-Boot] [PATCH v3 17/18] lcd: Add CONSOLE_SCROLL_LINES option to speed console Simon Glass
2012-07-19 14:04   ` Mike Frysinger
2012-09-27 19:23     ` Simon Glass
2012-07-12 15:25 ` [U-Boot] [PATCH v3 18/18] tegra: Enable display/lcd support on Seaboard Simon Glass
2012-07-19  7:58 ` [U-Boot] [PATCH v3 0/18] tegra: Add display driver and LCD support for Seaboard Thierry Reding
2012-07-31  9:28   ` Simon Glass

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='CAPnjgZ2R=G=xmjdoP74JeAknwH9QGx8+mED7TQ8Kd_zEmcVwtQ@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=swarren@nvidia.com \
    --cc=swarren@wwwdotorg.org \
    --cc=twarren@nvidia.com \
    --cc=u-boot@lists.denx.de \
    --cc=vanbaren@cideas.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.