Using a HDTV with the Beagleboard

Hi,
if anyone want to know how to use
your own HDTV on the Beagleboard here
is an tutorial how to do it.
I'am not an linux-expert and i had found out it
with a little bit experimenting with beagle and tv
so it worked for me.
If anyone had a better solution or see a mistake, he
can say it!

So setup a LCD TV with Beagle you must:

1.Read out your EDID from your LCD TV.
2.Convert the xFree timings to framebuffer timings
3. Add the new framebuffer modeline to
/kernelrootfolder/drivers/video/modedb.c
4. compile the kernel and use your resolution

Details:

1. You can readout your EDID with Monitor Asset Manager or Powerstrip
both available on http://www.entechtaiwan.com/util/ (for Windows) or
with xvidtune (Linux)
    I have done it with xvidtune

             Then you get all supported Resolutions with its
modelines.
        One XFree Modeline looks like:
               "1280x720" 74,250 1280 1344 1472 1664 720 723 728 748
                              DCF HR SH1 SH2 HFL VR SV1 SV2
VFL

2. Then you must convert XFree86 timing values info to frame buffer
device timings

            1) Pixelclock:

            pixclock = 1000000 / DCF

           2) horizontal timings:

            left_margin = HFL - SH2
            right_margin = SH1 - HR
            hsync_len = SH2 - SH1

           3) vertical timings:

             upper_margin = VFL - SV2
             lower_margin = SV1 - VR
             vsync_len = SV2 - SV1

3. Then you insert the modeline to the modedb.c which is in the
kernel
directory in /drivers/video/
The whole Block looks like:
{
/* 1280x720 @ 60 Hz, 45 kHz hsync, CEA 681-E Format 4 */
"hd720", 60, 1280, 720, 13468, 220, 110, 20, 5, 40, 5, <--
this
is the modeline which from the script hd720 is the an example for a
"name"
  0, FB_VMODE_NONINTERLACED
  },

You must insert in in the "static const struct fb_videomode modedb[]"
block

This is an example from the Koen Kooi HD patch on:
http://cgit.openembedded.net/cgit.cgi?url=openembedded/commit/&id=687

5. Compile your kernel as always.

6. Here are the bootargs for the nand boot:
    setenv optargs 'init=/init omapdss.def_disp=dvi
omapfb.mode=dvi:hd720-24@60'

I found out that not all EDID-information you get from the LCDs are
correct.
But when a resolution is working with your pc oder notebook it should
work on the beagleboard too!

I know that it not the best method. But it works!!

A better method would be to read the EDID values direct from the
driver
of the kernel and choose the best Resolution. There is a experimental
patch on:
http://groups.google.com/group/beagleboard/browse_thread/thread/5274e

I hope it helps!!

Regards

Michael

Here are my resources:
[1] http://store.smpte.org/product-p/smpte%200296m-2001.htm
[2] http://www.ce.org/Standards/browseByCommittee_2641.asp
[3] http://en.wikipedia.org/wiki/Extended_display_identification_data
[4]
http://groups.google.com/group/beagleboard/browse_thread/thread/5274e
<http://groups.google.com/group/beagleboard/browse_thread/thread/
5274e…>

[5] http://www.entechtaiwan.com/util/moninfo.shtm
[6]
http://cgit.openembedded.net/cgit.cgi?url=openembedded/commit/&id=687
<http://cgit.openembedded.net/cgit.cgi?url=openembedded/commit/
&id=687…>

[7]
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a
<http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-
omap-2.6.git;a…>

[8] http://www.bat.org/~tomba/linux-omap.html
<http://www.bat.org/~tomba/linux-omap.html>

Hi

When I use the bootargs "omapfb.mode=dvi:hd720" (60Hz), as described
in the previous post, the picture is shifted 20% to the left and a
little up. I have tried to read the EDID from the TV and do the
calculations as described, and I get the same timing values as for the
hd720 setting.
I changed the left/right margin values and upper/lower margin, to get
the picture at the center of the screen. And I ended up having to swap
left_margin with right_margin, and upper_margin with lower_margin to
get the picture at the right position. I also read the EDID for 720p
50Hz and did the calculations, and also here I had to swap the timing
numbers to get the picture in the right position.
I have heard from Peter McDermott at NthCode that some of their
testers had the same problem with the "omapfb.mode=dvi:hd720" setting,
but not all testers. I guess it is a matter of if your TV is able to
auto adjust the position of the picture.

Can somebody do the following with their BB connected to a HDTV (or
monitor)?
-Boot linux with the bootargs: omapfb.mode=dvi:hd720 (gives 720p at
60Hz)
-Do a 'cat /sys/devices/platform/omapdss/display0/timings' and you
should get: 74250,1280/220/110/40,720/20/5/5
-Do a 'echo "74250,1280/110/220/40,720/5/20/5" > /sys/devices/platform/
omapdss/display0/timings'
-You can also try 'echo "74250,1280/440/220/40,720/5/20/" > /sys/
devices/platform/omapdss/display0/timings' to get 720p 50Hz

If you had the problem with the picture being shifted left, did it
solve the problem? If you didn't have the problem, did it give you a
shifted picture?

Regards,
Karsten