DDC readout working

39 views
Skip to first unread message

koen

unread,
Jun 6, 2008, 12:40:09 PM6/6/08
to Beagle Board
Hi,

I was wondering if EDID readout would work on a 400MHz I2C so did a
little experiment:

root@beagleboard:/usr/sbin# decode-edid
decode-edid: using bus 3 (autodetected)
decode-edid: decode-edid version 1.1
parse-edid: parse-edid version 1.4.1
parse-edid: EDID checksum passed.

# EDID version 1 revision 3
Section "Monitor"
# Block type: 2:0 3:fd
# Block type: 2:0 3:fc
Identifier "AU5131 "
VendorName "IVM"
ModelName "AU5131 "
# Block type: 2:0 3:fd
HorizSync 24-80
VertRefresh 50-85
# Max dot clock (video bandwidth) 160 MHz
# Block type: 2:0 3:fc
# Block type: 2:0 3:ff
# DPMS capabilities: Active off:yes Suspend:yes Standby:yes

Mode "1600x1200" # vfreq 60.000Hz, hfreq 75.000kHz
DotClock 162.000000
HTimings 1600 1664 1856 2160
VTimings 1200 1201 1204 1250
Flags "+HSync" "+VSync"
EndMode
# Block type: 2:0 3:fd
# Block type: 2:0 3:fc
# Block type: 2:0 3:ff
EndSection
root@beagleboard:/usr/sbin#

It works :)

Syed Mohammed, Khasim

unread,
Jun 6, 2008, 1:26:50 PM6/6/08
to beagl...@googlegroups.com
Good one. You can even do this in u-boot using i2c commands:
 
u-boot
=====
 
# ibus 2 0x64
# OMAP3 beagleboard.org # imd 0x50 0 100

Should get some thing similar header:

0000: 00 ff ff ff ff ff ff 00 10 ac 24 40 5a 39 41 41    ..........$@Z9AA
0010: 1f 11 01 03 80 22 1b 78 ee ae a5 a6 54 4c 99 26    .....".x....TL.&
0020: 14 50 54 a5 4b 00 71 4f 81 80 01 01 01 01 01 01    .PT.K.qO........
0030: 01 01 01 01 01 01 30 2a 00 98 51 00 2a 40 30 70    ......0*..Q.*@0p
0040: 13 00 52 0e 11 00 00 1e 00 00 00 ff 00 50 4d 30    ..R..........PM0
0050: 36 31 37 38 32 41 41 39 5a 0a 00 00 00 fc 00 44    61782AA9Z......D
0060: 45 4c 4c 20 31 37 30 38 46 50 0a 20 00 00 00 fd    ELL 1708FP. ....
0070: 00 38 4c 1e 51 0e 00 0a 20 20 20 20 20 20 00 36    .8L.Q...      .6
 
In Kernel:
=======
We should use the FBDEV EDID support to parse this in kernel (using i2c driver) and set the OMAP registers accordingly.
 
The below code can be used to do the same, it is in the queue of tasks don't know when I will get to it... :(
 
Assumig dtd has edid data from i2c transfer, the below macros will give the Hxres and Vyres.
 
#define UPPER_NIBBLE( x ) (((128|64|32|16) & (x)) >> 4)

#define COMBINE_HI_8LO( hi, lo ) ( (((unsigned)hi) << 8) | (unsigned)lo )

#define H_ACTIVE_LO (unsigned)dtd[ 53+2 ]

#define H_ACTIVE_HI UPPER_NIBBLE( (unsigned)dtd[ 53+4 ] )

#define H_ACTIVE COMBINE_HI_8LO( H_ACTIVE_HI, H_ACTIVE_LO )

#define V_ACTIVE_LO (unsigned)dtd[ 53+5 ]

#define V_ACTIVE_HI UPPER_NIBBLE( (unsigned)dtd[ 53+7 ] )

#define V_ACTIVE COMBINE_HI_8LO( V_ACTIVE_HI, V_ACTIVE_LO )

printf( "\tMode \t\"%dx%d\"", H_ACTIVE, V_ACTIVE );

Regards,
Khasim
 

 

 

koen

unread,
Jun 6, 2008, 2:03:41 PM6/6/08
to Beagle Board


On 6 jun, 19:26, "Syed Mohammed, Khasim " <sm.kha...@gmail.com> wrote:
> In Kernel:
> =======
> We should use the FBDEV EDID support to parse this in kernel (using i2c
> driver) and set the OMAP registers accordingly.
>
> The below code can be used to do the same, it is in the queue of tasks don't
> know when I will get to it... :(
>
> Assumig dtd has edid data from i2c transfer, the below macros will give the
> Hxres and Vyres.
>
> #define UPPER_NIBBLE( x ) (((128|64|32|16) & (x)) >> 4)
>
> #define COMBINE_HI_8LO( hi, lo ) ( (((unsigned)hi) << 8) | (unsigned)lo )
>
> #define H_ACTIVE_LO (unsigned)dtd[ 53+2 ]
>
> #define H_ACTIVE_HI UPPER_NIBBLE( (unsigned)dtd[ 53+4 ] )
>
> #define H_ACTIVE COMBINE_HI_8LO( H_ACTIVE_HI, H_ACTIVE_LO )
>
> #define V_ACTIVE_LO (unsigned)dtd[ 53+5 ]
>
> #define V_ACTIVE_HI UPPER_NIBBLE( (unsigned)dtd[ 53+7 ] )
>
> #define V_ACTIVE COMBINE_HI_8LO( V_ACTIVE_HI, V_ACTIVE_LO )
>
> printf( "\tMode \t\"%dx%d\"", H_ACTIVE, V_ACTIVE );

The trouble is with the way it is implemented in the kernel:

drivers/video/omap/lcd_omap3beagle.c

#define LCD_XRES 1600
#define LCD_YRES 1200
#define LCD_PIXCLOCK 65000 /* in kHz */

[..]

struct lcd_panel omap3beagle_panel = {
.name = "omap3beagle",
.config = OMAP_LCDC_PANEL_TFT,

.bpp = 24,
.data_lines = 24,
.x_res = LCD_XRES,
.y_res = LCD_YRES,
.hsw = 3, /* hsync_len (4) - 1 */
.hfp = 3, /* right_margin (4) - 1 */
.hbp = 39, /* left_margin (40) - 1 */
.vsw = 1, /* vsync_len (2) - 1 */
.vfp = 2, /* lower_margin */
.vbp = 7, /* upper_margin (8) - 1 */

.pixel_clock = LCD_PIXCLOCK,

.init = omap3beagle_panel_init,
.cleanup = omap3beagle_panel_cleanup,
.enable = omap3beagle_panel_enable,
.disable = omap3beagle_panel_disable,
.get_caps = omap3beagle_panel_get_caps,
};

We could use the fb_ddc driver:

int beagleboard_probe_i2c_connector(struct fb_info *info, u8
**out_edid)
{
struct beagleboardfb_par *par = info->par;
u8 *edid = NULL;

DPRINTK("beagleboard DVI: Probe DDC\n);

edid = fb_ddc_read(&omap3-i2c.3);

*out_edid = edid;

return (edid) ? 0 : 1;
}

That still doesn't get us far since omapfb only know about LCDs :(

regards,

Koen

Reply all
Reply to author
Forward
0 new messages