intel SDVO TV-out
Zhang, Xiaolin
xiaolin.zhang at intel.com
Sun Apr 20 19:37:10 PDT 2008
Hi,
For the SDVO TV-out support, I done this work Nov. last year under X and DRM (fb driver to support SDVO TV-out) for Intel poulsbo graphics driver. The attached patch is only for xf86-video-intel-2.2.1. Actually, I don't have the machine to test the patch, but I think you may just need a littlte modification. Hope it works for you.
BRs
Xiaolin
-----Original Message-----
From: xorg-bounces at lists.freedesktop.org [mailto:xorg-bounces at lists.freedesktop.org] On Behalf Of Will .
Sent: 2008年4月13日 23:17
To: Eric Anholt
Cc: xorg at lists.freedesktop.org
Subject: RE: intel SDVO TV-out
> I pushed a partially cleaned up version to
> git://people.freedesktop.org/~anholt/xf86-video-intel on the branch
> sdvo-tv-wil
Here's a few things you might try to get it working...
Add your encoder to the list at the top of i830_sdvo.c with I830_SDVO_CHIP_TVOUT
The xorg.log should confirm it was detected
const static struct i830_sdvo_card i830_sdvo_cards[] =
{
/** 0x02 = 'Chrontel'*/
{0x02,0x3C,I830_SDVO_CHIP_TMDS,"Chrontel CH7307"},
{0x02,0xC2,I830_SDVO_CHIP_TVOUT,"Chrontel CH7021"}
};
-------------------------------------------------------------------------
Change your tvout connector in i830_sdvo_init (bottom of i830_sdvo.c), auto detect may work for you but it doesn't detect my ouput properly (although the hardware is capable).
if(dev_priv->encoder_type==I830_SDVO_CHIP_TVOUT)
{
/* i830_sdvo_reset_device(output);*/
memset(&dev_priv->tv_out,0,sizeof(dev_priv->tv_out));
dev_priv->tv_out.connector = SDVO_OUTPUT_SCART0;
-------------------------------------------------------------------------
You could try modifying the tv out format, the default is 0 atm with a dirty hack to force PAL when it see's a specific clock value i830_sdvo_mode_fixup (i830_sdvo.c)
if(mode->Clock==27000)
dev_priv->tv_out.format[0]=0x10;
-------------------------------------------------------------------------
You may want to add a few more modelines to the list for SDVO_TV as I only put in the ones I needed (i30_sdvo.c)
#define MODEPREFIX(name) NULL, NULL, name, 0,M_T_DRIVER
#define MODESUFFIX 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0
/* PAL 576 (50p) 27.0 720 732 795 864 576 581 586 625
* NTSC 480 (59.94p) 27.0 720 736 800 858 480 484 492 525 */
static DisplayModeRec i830_sdvo_tv_modes[2] = {
{ MODEPREFIX("720x576"), 27000, 720, 732, 795, 864, 0, 576, 581,
586, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 720x576 at 50Hz */
{ MODEPREFIX("720x480"), 32143, 720, 736, 800, 858, 0, 576, 581,
586, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 720x576 at 60Hz */
/* { MODEPREFIX("720x480"), 27000, 720, 736, 800, 858, 0, 480, 484,
492, 525, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX },*/ /* 720x480 at 59.94Hz */
};
static DisplayModePtr
i830_sdvo_get_modes(xf86OutputPtr output)
-------------------------------------------------------------------------
You should probably remove anything to do with overscan from i830_sdvo_mode_fixup (i830_sdvo.c)
I forget exactly what I did to get overscan working but it was a bit of a mess and may well only work with the CH7021A
The overscan is controlled by the following line, I know it causes problems with most modes as the timmings dont divide out correctly and the system won't sync
nVOverscan=(double)dev_priv->tv_out.height/5000.0*(double)nVTotal;
You'd be better off making the code revert purely to the values recieved from i830_sdvo_create_preferred_input_timing, when I did the basic patch this is what I did and it worked with all the modes I tried without any messing.
-------------------------------------------------------------------------
I'm not sure how generic the SDVO TV spec is, i figured out some of the registers by scanning and setting them, so they could do unexpected things on your HW. You may therefore wish to disable the following in i830_sdvo_mode_set (i830_sdvo.c) just to take them out of the mix.
i830_sdvo_set_tv_out_filter_flicker(output,
dev_priv->tv_out.filter_flicker);
i830_sdvo_set_tv_out_filter_chroma(output,
dev_priv->tv_out.filter_chroma);
i830_sdvo_set_tv_out_width(output, dev_priv->tv_out.width);
i830_sdvo_set_tv_out_pos_horiz(output, dev_priv->tv_out.pos_horz);
-------------------------------------------------------------------------
Hope that helps
Will W
_________________________________________________________________
Win 100’s of Virgin Experience days with BigSnapSearch.com
http://www.bigsnapsearch.com
_______________________________________________
xorg mailing list
xorg at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0021-1.-added-the-chrontel-7021a-sdvo-tv-encoder-support.patch
Type: application/octet-stream
Size: 139347 bytes
Desc: 0021-1.-added-the-chrontel-7021a-sdvo-tv-encoder-support.patch
URL: <http://lists.x.org/archives/xorg/attachments/20080421/843be761/attachment.obj>
More information about the xorg
mailing list