# [HOWTO] ATI Radeon 7000 w/ TV out gatos drivers

## DrSpirograph

Here's how I got TV out using the gatos drivers working for my Radeon card:

ATI Technologies Inc Radeon RV100 QY [Radeon 7000/VE]

(connected to an Australian PAL TV)

I've submitted an ebuild for this, but for the impatient, here's how to get it going now.

If the ebuild is in portage by the time you read this, skip to step 4

In theory this should also work for some other cards (possibly even Rage chipsets), checkout http://gatos.sf.net to see if your card may be supported.

If you've got a 8500+ card then you will probably get much better results with the ati-drivers package, and there are already plenty of threads about that elsewhere on the forums.

The gatos TV-out drivers do not seem to have been updated for some time, so this only works with XFree 4.3.0

The drivers are in cvs, so you will need dev-utils/cvs installed.

As far as I know, the TV-out driver only supports 800x600 resolution in 24bit colour.

1) Get the ebuild

If you haven't already, set up a portage overlay to put this ebuild in (edit /etc/make.conf), I'll assume your portage overlay is in /usr/local/portage

and your distfiles are in

/usr/portage/distfiles

Create media-video/ati-gatos-tv-out/files in your portage overlay directory

```
mkdir --parents /usr/local/portage/media-video/ati-gatos-tv-out/files
```

Download ati-gatos-tv-out-4.3.0.ebuild from https://bugs.gentoo.org/show_bug.cgi?id=71452 and put it in

/usr/local/portage/media-video/ati-gatos-tv-out/

Download the other 3 attachments (include path fix, readme, XF86config example) them in /usr/local/portage/media-video/ati-gatos-tv-out/files

Doing

```
ls /usr/local/portage/media-video/ati-gatos-tv-out/files
```

should show

```
README  XF86Config.example  header-path.patch
```

2) Get the CVS snapshot

The TV out source is only available in CVS, so you will need to download it and create a tarball from it.

Download it to a temporary directory

(when cvs prompts for a password, press enter. Anonymous access requires no password)

```
mkdir /tmp/gatos

cd /tmp/gatos

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/gatos login

cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/gatos co -r tv_output ati.2
```

Create a tarball in your distfiles directory

```
tar -jcvf ati.2 /usr/portage/distfiles/ati-gatos-tv-out-4.3.0-20041117.tar.bz2
```

The tarball must be named ati-gatos-tv-out-4.3.0-20041117.tar.bz2 for the ebuild to find it.

3) Create a digest

Create digests for all your files

```
ebuild /usr/local/portage/media-video/ati-gatos-tv-out/ati-gatos-tv-out-4.3.0.ebuild digest
```

4) Merge the drivers

```
ACCEPT_KEYWORDS="~x86" emerge ati-gatos-tv-out
```

5) Configure XFree to use TV out

Edit your XF86Config file

(For a full example of an XF86Config file, see /usr/share/doc/ati-gatos-tv-out-4.3.0/XF86Config.example.gz)

You will probably need to add the following lines to your files section

```
Section "Files"

    ...

    ModulePath  "/usr/X11R6/lib/modules-extra/gatos"

    ModulePath  "/usr/X11R6/lib/modules"

EndSection
```

You will need to create/edit your monitor section for the TV.

TV's usually have pretty low HSync and VSyncs 

```
Section "Monitor"

        Identifier      "Monitor0"

        HorizSync 30-50

        VertRefresh 60

EndSection
```

Create a device section for your card

```
Section "Device"

    Identifier  "ATIcard"

    Driver      "ati"

    VendorName  "ATI"

    Option      "TVOutput"      "PAL"

EndSection
```

If your TV is NTSC, then change this to

```
...

    Option      "TVOutput"      "NTSC"

...
```

For other standards, see /usr/share/doc/ati-gatos-tv-out-4.3.0/README.tvout.gz

Set up a screen with the monitor and ati card

```
Section "Screen"

     Identifier "Screen0"

     Device     "ATIcard"

     Monitor    "Monitor0"

     DefaultDepth    24

     SubSection "Display"

# ATI: The tvout driver currently only supports 800x600 in 24bit mode

            Depth     24

            Modes     "800x600"

     EndSubSection

EndSection
```

Combine them all in a ServerLayout

```
Section "ServerLayout"

        Identifier     "XFree86 Configured"

        Screen      0  "Screen0" 0 0

        InputDevice    "Mouse" "CorePointer"

        InputDevice    "Keyboard1" "CoreKeyboard"

EndSection
```

6) OpenGL

I haven't really tested OpenGL, except that I use MythTV, and it links against it. To get that working I had to do

```
opengl-update xfree
```

Thats it. Your card should now do "cloned" display to TV-out - that is both the CRT and TV-out should show the same image.

One problem I've had with the driver is that it thinks the TV is not connected and stop XFree from starting if the TV is connected when the PC boots.

So if you get a message about no TV connected, or you can't get it working. Try disconnecting the TV and rebooting the machine, the only plugin the TV after the machine has finished booting.

If this fails, you can also try not plugging it in until after X has started as well, but I don't think this makes much difference.

----------

## desktopfan

Ive tried this with the 4.4.0 driver and xorg. However I cant get it to work. All  I really want is to get gmplayer to work with 'xv' video out on my TV. 

 :Sad: 

----------

## genstef

See 

http://sourceforge.net/mailarchive/forum.php?thread_id=5878041&forum_id=5014

if you want to get it working with Xorg.

----------

## DrSpirograph

 *desktopfan wrote:*   

> Ive tried this with the 4.4.0 driver and xorg.

 

Neither of these are supported by this build:

 *Quote:*   

> The gatos TV-out drivers do not seem to have been updated for some time, so this only works with XFree 4.3.0 

 

If you want the latest and greatest, you're going to have to compile the drivers yourself as genstef suggested. (until someone puts this in an ebuild)

But if all you want is mplayer to work with 'xv' on TV, then there should be no reason you can't use xfree 4.3.0 instead of the later releases.

(I'm successfully using mplayer w/ xv on my tv, with xfree 4.3.0)

----------

## mattlant

I tried the newer 6.8.0 media-video/ati-gatos drivers and got tv working and everything else, except for tv out. It seems to ONLY work in PAL. Anyone know any way i can change it to default to NTSC? I have a radeon 7500 AIW

I tried the typical TVOutput NTSC and some other variations with no luck. (Xorg.0.log says that TVOutput option is not used) :/

Matt

----------

