public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] sunxi: video: Add extra modes and allow selecting the mode via hdmi_mode env
Date: Tue, 25 Nov 2014 11:13:10 +0100	[thread overview]
Message-ID: <54745636.4030407@redhat.com> (raw)
In-Reply-To: <1416905580.16888.8.camel@hellion.org.uk>

Hi,

On 11/25/2014 09:53 AM, Ian Campbell wrote:
> On Sun, 2014-11-23 at 17:12 +0100, Hans de Goede wrote:
>> Add the following extra modes:
>>
>> 1280x720 at 50
>> 1920x1080 at 60
>> 1920x1200 at 60
>>
>> And allow selecting them by setting (and then saving and rebooting) a
>> hdmi_mode env variable to the name of the mode.
>
> Is there any u-boot side standard for the naming/format of such a
> variable? (adding Anatolij for input too).
>
> I see a bunch of platforms apparently using video= (just from a grep on
> includes/configs for video=), likewise videomode= which is also
> described in README but doesn't look to cover the sort of things wanted
> here.

Ok, so I've been thinking a bit about this, I plan to also support
lcd support one of these days, I was thinking using lcd_mode= for that,
but probably having one mechanism is better.

So here is what I've been thinking, we add support for a video=
environment variable, which is build up like this:

video=[auto:][<output>:]<modename>

So one could do:

video=auto:dvi:1280x720 at 50

Which would mean: auto-detect, if that fails then configure
dvi out on 1280x720 at 50

This also works well with code I'm currently working on, our current hdmi
support is actually dvi out, as we're not sending a hdmi avi info frame.

For some displays this is a problem, as they only work with proper hdmi data,
so currently I'm working on making the sunxi display code (optionally) send
proper hdmi data. Note we cannot always do this, as dvi monitors cannot deal
with it. So people would be able to do:

video=hdmi:1920x1080 at 60

To force hdmi output format, or:

video=dvi:1920x1080 at 60

To force dvi output.

And for lcd people could use:

video=lcd:800x480 at 50

Or:

video=auto:lcd:800x480 at 50

Which would first try hdmi (see if a cable is attached) + edid,
and if that does not work light up the lcd instead.

The exact behavior of auto would be board specific, but the basic
video= parsing could live in generic code...

> Is there note some centralise db of struct db_videomode we can use?
> Seems like not, oh well.

And use a shared mode database, and actually fill a fb_videomode struct
for us.

Does that sound like a plan ?

Anatolij, what do you think about this ?

Regards,

Hans

      reply	other threads:[~2014-11-25 10:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-23 16:12 [U-Boot] [PATCH] sunxi: video: Add extra modes and allow selecting the mode via hdmi_mode env Hans de Goede
2014-11-25  8:53 ` Ian Campbell
2014-11-25 10:13   ` Hans de Goede [this message]

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=54745636.4030407@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=u-boot@lists.denx.de \
    /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