Announcement

Collapse
No announcement yet.

TV Out with Radeon 9200 and the OS radeon driver, possible?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • TV Out with Radeon 9200 and the OS radeon driver, possible?

    Hi,

    I have a friend who is trying to build a MythTV box.
    He has been given a gimped PC and they have removed the AGP slot, so it's PCI cards only.

    He needs PAL TV out and budget it extremely limited.

    We've seen some Radeon 9200s with S-Video coming out of HK and we need to know whether the driver (open source radeon) supports TV-Out.

    According to this page, in August 2007, it is supported but NTSC only and requires some command line & xorg.conf hacking.

    3 questions:

    1) Can somebody please confirm this is true?
    2) Does anybody know if support for PAL has materialised?
    3) Does anybody know if there is an easier way to set this up (does the multi monitor GUI section of GNOME work with this yet?)

    Thanks,

    J1M.

  • agd5f
    replied
    All the relevant registers are in the source code. The actual register specs for the pre-avivo display hardware were only available under NDA (we never got around to cleaning them up for public release), however, the register specs for the tv stuff were not particularly useful anyway.

    Leave a comment:


  • RoboJ1M
    replied
    And is the documentation for the encoder public or private?
    I read that only the 3D documentation is in the public domain and the rest was reverse engineered from the open R200 driver.

    Leave a comment:


  • agd5f
    replied
    Originally posted by RoboJ1M View Post
    So..

    This is probably too simple but is it a case of writing some new radeon_tv_mode_constants (for these different PLL clocks it caters for), adding them to available_tv_modes and adjusting radeon_legacy_tv_get_std_mode to return it?

    Then just use a modeline that matches the timings hardcoded in the driver?

    Is this why when you try to set the res to 640x480 you end up with the same image repeated in block over the screen? Because the modes are hardcoded in the driver and there is only 800x600?

    J.
    Right, the driver only supports a virtual 800x600 for tv-out on pre-avivo hardware at the moment. Adding new virtual modes is a matter of adding new tv mode constants, but that's the tricky part; the hw is very particular about the timing.

    Leave a comment:


  • RoboJ1M
    replied
    So..

    This is probably too simple but is it a case of writing some new radeon_tv_mode_constants (for these different PLL clocks it caters for), adding them to available_tv_modes and adjusting radeon_legacy_tv_get_std_mode to return it?

    Then just use a modeline that matches the timings hardcoded in the driver?

    Is this why when you try to set the res to 640x480 you end up with the same image repeated in block over the screen? Because the modes are hardcoded in the driver and there is only 800x600?

    J.

    Leave a comment:


  • RoboJ1M
    replied
    Right, so I would have to patch the driver with new values for the TV encoder, scaling 1067x600 or 1024x576 to tv timings.

    The only compiling I've ever done for linux is just building other peoples stuff with build-essensial, ./configure and make.

    Is there a better way of starting that isn't that + gedit or nano?

    I'm used to Microsoft IDEs so I guess I'm a bit spoilt with auto complete and being able to step through code (which I assume is impossible when writing bits for the kernel?)

    I'll start reading the KMS version of that file though.

    Thanks.

    J1M.

    Leave a comment:


  • agd5f
    replied
    Originally posted by RoboJ1M View Post
    Wait,

    Do you mean it's possible to send any resolution to the TV as long as the timing values are right?
    The timing sent to the tv has to be native tv timing or it wouldn't be tv.

    Originally posted by RoboJ1M View Post
    Could I choose a 16:9 res with the same line count:

    1067x600

    And calculate a modeline that would work?
    The tv encoder works by scaling some arbitrary desktop image and timing down to the native tv timing. You'd need to recalculate the values used in the driver which is the hard part.

    Originally posted by RoboJ1M View Post
    Could you point me towards somewhere I could learn more about this?
    The limit of my skill is editing existing working modelines.
    You can't specify arbitrary modelines for tv at the moment. The driver always uses hardcoded values. You'd need to fix the hardcoded values currently used for tv-out in the driver to use the ones you want. Due to the way the tv encoder works on pre-avivo radeon hardware, getting the timing between the crtc and tv encoder to match properly was really complex. For more info, see radeon_tv.c (UMS):
    http://cgit.freedesktop.org/xorg/dri...rc/radeon_tv.c
    or radeon_legacy_tv.c (KMS):
    http://git.kernel.org/?p=linux/kerne...e569f6;hb=HEAD

    Leave a comment:


  • RoboJ1M
    replied
    Originally posted by agd5f View Post
    The pre-avivo tv-out encoder was a PITA to set up properly. That's why it only supports 800x600 at the moment. In theory the scaler can scale any size desktop image down the the native timing sizes, you'd just need to figure out the proper crtc timing values and pll ratios.
    Wait,

    Do you mean it's possible to send any resolution to the TV as long as the timing values are right?

    Could I choose a 16:9 res with the same line count:

    1067x600

    And calculate a modeline that would work?

    Could you point me towards somewhere I could learn more about this?
    The limit of my skill is editing existing working modelines.

    Thanks,

    J1M.

    Leave a comment:


  • RoboJ1M
    replied
    Found the answer to generating xorg.conf:

    Code:
    [email protected] ~# sudo service gdm stop
    [email protected] ~# sudo Xorg -configure
    This has generated the file in ~/xorg.conf.new.

    We need to make the X using it so we have to put this file inside /etc/X11/

    Code:
    [email protected] ~# sudo mv ~/xorg.conf.new /etc/X11/xorg.conf
    After moving this file to the proper location you can start the X again and see what happens:

    Code:
    [email protected] ~# sudo service gdm start
    I'll go try that next time I'm round Scott's

    J1M.

    Leave a comment:


  • RoboJ1M
    replied
    OK,

    The more I read about it the more I want to get "0mm x 0mm" to be set to the actual physical size of the TV.

    Apparently it calculates the DPI of the screen from this and can calculate a non-1:1 pair of DPIs.
    If the DPI is no 96x96, say 80x96 then the pixels are not square but wide!
    Whether this will actually DO what I want it to do is debatable buth the math is sound!

    Sadly the only way I can see to set the DisplaySize is by writing an xorg.conf.

    As the xorg.conf file is redundant because all the values are now inferred automatically, is it possible export all those auto values to an xorg.conf file?

    Regards,

    J1M.

    Leave a comment:

Working...
X