[haiku-commits] haiku: hrev43244 - src/add-ons/accelerants/radeon_hd

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 12 Nov 2011 21:24:28 +0100 (CET)

Revision:    hrev43244
Commit:      e35c1f2d026c5b3874367ecd6ae7b26326ffde03
URL:         http://cgit.haiku-os.org/haiku/commit/?id=e35c1f2
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Sat Nov 12 20:22:57 2011 UTC

Add card post detection for legacy models
* check for older cards, and see if they are posted
  using the older pre-avivo registers

............................................................................

 src/add-ons/accelerants/radeon_hd/bios.cpp |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/src/add-ons/accelerants/radeon_hd/bios.cpp 
b/src/add-ons/accelerants/radeon_hd/bios.cpp
index 2d03c69..e1b6b23 100644
--- a/src/add-ons/accelerants/radeon_hd/bios.cpp
+++ b/src/add-ons/accelerants/radeon_hd/bios.cpp
@@ -91,15 +91,30 @@ radeon_bios_isposted()
                                + EVERGREEN_CRTC5_REGISTER_OFFSET);
                if ((reg & EVERGREEN_CRTC_MASTER_EN) != 0)
                        return true;
-       } else {
+       } else if (info.chipsetID >= RADEON_RS600) {
                // avivio through r700
                reg = Read32(OUT, AVIVO_D1CRTC_CONTROL)
                        | Read32(OUT, AVIVO_D2CRTC_CONTROL);
                if ((reg & AVIVO_CRTC_EN) != 0) {
                        return true;
                }
+       } else {
+               // early cards
+               reg = Read32(OUT, RADEON_CRTC_GEN_CNTL)
+                       | Read32(OUT, RADEON_CRTC2_GEN_CNTL);
+               if ((reg & RADEON_CRTC_EN) != 0)
+                       return true;
        }
 
+       // also check memory size incase crt controlers are disabled
+       if (info.chipsetID >= RADEON_R600)
+               reg = Read32(OUT, R600_CONFIG_MEMSIZE);
+       else
+               reg = Read32(OUT, RADEON_CONFIG_MEMSIZE);
+
+       if (reg)
+               return true;
+
        return false;
 }
 


Other related posts:

  • » [haiku-commits] haiku: hrev43244 - src/add-ons/accelerants/radeon_hd - kallisti5