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

  • #31
    Wasn't really looking to scale a desktop down 800x600, more looking to change the pixel shape from square to 16:9?

    The anecdotal stuff I've read makes sense.

    Resolution is 800x600.
    Screen size is 888x500 mm is 16:9.

    Should be able to take that information and produce a vertically squashed image.

    The screen size always says 0mm x 0mm though.
    Anyway to overide this? I've only ever seen it in xorg.conf and they don't exist anymore.

    Regards,

    J1M.

    Comment


    • #32
      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.

      Comment


      • #33
        Found the answer to generating xorg.conf:

        Code:
        user@ubuntu ~# sudo service gdm stop
        user@ubuntu ~# 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:
        user@ubuntu ~# 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:
        user@ubuntu ~# sudo service gdm start
        I'll go try that next time I'm round Scott's

        J1M.

        Comment


        • #34
          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.

          Comment


          • #35
            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):

            or radeon_legacy_tv.c (KMS):

            Comment


            • #36
              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.

              Comment


              • #37
                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.

                Comment


                • #38
                  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.

                  Comment


                  • #39
                    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.

                    Comment


                    • #40
                      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.

                      Comment

                      Working...
                      X