Announcement

Collapse
No announcement yet.

CRTC Programming Info

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

  • CRTC Programming Info

    Where would one find documentation describing how the set up the CRTC registers using common ModeLine values ?

    The application is non-Linux and uses VESA to set up the graphics mode , but VESA does not support graphics resolutions above 1600x1200.

    Also a question : Is it feasible to intialize the graphics mode using VESA then modify the CRTC registers to set the desired graphics mode?

    Thanks
    Brian

  • #2
    Originally posted by Brian View Post
    Where would one find documentation describing how the set up the CRTC registers using common ModeLine values ? The application is non-Linux and uses VESA to set up the graphics mode , but VESA does not support graphics resolutions above 1600x1200.
    Which GPU ? Docco for more recent GPUs can be found at http://www.x.org/docs/AMD/. We included a couple of typical GPUs from each generation.

    One way would be to just check the source code in the existing X drivers. The radeon driver (xorg/driver/xf86-video-ati) has hard-coded modesetting from r1xx-r4xx, and the radeonhd driver (xorg/driver/xf86-video-radeonhd) has hard-coded modesetting for 5xx through early 7xx.

    Do you really just need to set CRTC registers or do you need to play with the pixel clock PLL as well ? Changing the clock frequencies is more involved, so you might want to use the X driver source as a reference.

    Originally posted by Brian View Post
    Also a question : Is it feasible to intialize the graphics mode using VESA then modify the CRTC registers to set the desired graphics mode?
    Probably not -- AFAIK the X driver (vesa in this case) negotiates display resolution with the X server so even if you reprogrammed the registers the X server would still think the screen resolution was unchanged. Then again, if this is an embedded application and you don't have a display server/manager either then I guess maybe this could work.
    Last edited by bridgman; 09 May 2009, 02:50 PM.
    Test signature

    Comment


    • #3
      Thanks.

      Another question. Does Xorg use VESA (Int 10) to establish a "safe mode" graphics mode first , then modify the timing parameters , or does it attempt to go into graphics mode using the chip CRTC registers without using VESA?

      Thanks again
      Brian


      Originally posted by bridgman View Post
      Which GPU ? Docco for more recent GPUs can be found at http://www.x.org/docs/AMD/. We included a couple of typical GPUs from each generation.

      One way would be to just check the source code in the existing X drivers. The radeon driver (xorg/driver/xf86-video-ati) has hard-coded modesetting from r1xx-r4xx, and the radeonhd driver (xorg/driver/xf86-video-radeonhd) has hard-coded modesetting for 5xx through early 7xx.

      Do you really just need to set CRTC registers or do you need to play with the pixel clock PLL as well ? Changing the clock frequencies is more involved, so you might want to use the X driver source as a reference.



      Probably not -- AFAIK the X driver (vesa in this case) negotiates display resolution with the X server so even if you reprogrammed the registers the X server would still think the screen resolution was unchanged. Then again, if this is an embedded application and you don't have a display server/manager either then I guess maybe this could work.

      Comment


      • #4
        AFAIK the xorg drivers do not rely on VESA to set the mode first, although it's possible they make unintended assumptions about what was done during the initial POST before the OS came up. The drivers can hit the registers directly, or make AtomBIOS calls, or both.

        If you're not familiar with AtomBIOS, most of the code in our VBIOS ROM image is written in an interpreted bytecode rather than x86 assembler. The BIOS image contains four parts; an x86 wrapper for compatibility, a bytecode interpreter, command tables (code) and data tables.

        As part of the open source graphics project we released 'C' source for the interpreter, the same code we use in our drivers, along with header files (atombios.h etc..) which describe how to find your way around the BIOS internals. We introduced AtomBIOS partway through the 4xx family and used it exclusively from 5xx and up.
        Test signature

        Comment


        • #5
          Originally posted by Brian View Post
          Thanks.

          Another question. Does Xorg use VESA (Int 10) to establish a "safe mode" graphics mode first , then modify the timing parameters , or does it attempt to go into graphics mode using the chip CRTC registers without using VESA?

          Thanks again
          Brian
          Most xorg drivers don't use int10 at all, they generally program the mode directly. You generally can't just modify the crtc timing parameters, you have to adjust the display pll and possibly encoder/transmitter related bits as well.

          Comment


          • #6
            Originally posted by agd5f View Post
            Most xorg drivers don't use int10 at all, they generally program the mode directly. You generally can't just modify the crtc timing parameters, you have to adjust the display pll and possibly encoder/transmitter related bits as well.
            Thanks... and a few questions.

            1) What are the basic differences between the two drivers ? :
            Radeaon xf86-video-radeonhd-1.2.5.zip
            ATI xf86-video-ati-6.9.0.tar.gz

            2) Is the ATOMBios driver a stand-alone driver , or does it call the Radeaon functions ?

            Comment


            • #7
              The two drivers are fairly similar in terms of capabilities these days, but differ in internal structure and detailed feature set.

              The radeonhd driver (xf86-video-radeonhd) mostly uses direct register programming for 5xx and 6xx GPUs, while the radeon driver (xf86-video-ati) uses AtomBIOS calls for 4xx-6xx where possible. Both radeon and radeonhd drivers use AtomBIOS calls for 7xx.

              As of today (this could be different tomorrow), I think the main feature differences are that radeon has tvout support while radeonhd has HDMI audio out. There are probably other important differences but those are the only ones I remember right now.

              The acceleration code in the two drivers is fairly similar; differences are primarily in the modesetting area. Since mode-setting is moving from the X driver into the kernel ("KMS"), we expect that the differences between the drivers will gradually become irrelevant over the next year or so.

              With a bit of luck, we'll be able to replace many of the current X drivers with a generic driver using kernel mode-setting for display and Gallium3D for acceleration.

              BTW 6.9.0 is pretty old for the radeon driver; it's currently at 6.12.2 I think.
              Test signature

              Comment


              • #8
                Thanks. That is interesting about the mode-setting moving to the Linux kernel.

                Is that because the mode-setting registers generally remain the same as new graphics controllers are introduced , but the acceleration features may change in the new chips?

                Comment


                • #9
                  Originally posted by Brian View Post
                  Thanks. That is interesting about the mode-setting moving to the Linux kernel.

                  Is that because the mode-setting registers generally remain the same as new graphics controllers are introduced , but the acceleration features may change in the new chips?
                  Main reasons:
                  - allows for hi-res consoles
                  - allows for separate users on each head of a multi-head card
                  - non-X applications can use the hw
                  - better suspend/resume support
                  - allows you to see kernel oops when X is running
                  - run X as non-root user

                  Comment


                  • #10
                    AMD/ATI PLL Documentation

                    The old ATI Mach64 cards had very extensive developer manuals detailing how the various functions and registers worked.

                    Does anyone have a link or documents which describe how the Radeon series PLL's function , other than the driver source code , as the source code does not have any comments describing the "why".

                    Thanks
                    Brian

                    Comment

                    Working...
                    X