[haiku-commits] haiku: hrev43747 - in src/add-ons: accelerants/radeon_hd kernel/drivers/graphics/radeon_hd

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 17 Feb 2012 21:06:18 +0100 (CET)

hrev43747 adds 3 changesets to branch 'master'
old head: b39e687949632bce4b677ccad724dfef63b88439
new head: e8790580ad07b780b573445579a11ded309369b4

----------------------------------------------------------------------------

3944c32: radeon_hd: Clean up PCIID hex case

437937a: radeon_hd: Add rebranded HD 73xx, add process, add rumored cards

e879058: radeon_hd: LVDS AtomBIOS mode reading
  
  * This isn't done, but all we need to do now is create
    a simulated edid struct for LVDS screens.

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

3 files changed, 40 insertions(+), 12 deletions(-)
src/add-ons/accelerants/radeon_hd/connector.cpp    |   28 ++++++++++++---
src/add-ons/accelerants/radeon_hd/connector.h      |    1 +
.../kernel/drivers/graphics/radeon_hd/driver.cpp   |   23 +++++++++---

############################################################################

Commit:      3944c320dd3ac9cb2a2949ec110c85f016d617d8
URL:         http://cgit.haiku-os.org/haiku/commit/?id=3944c32
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Fri Feb 17 12:52:51 2012 UTC

radeon_hd: Clean up PCIID hex case

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/drivers/graphics/radeon_hd/driver.cpp 
b/src/add-ons/kernel/drivers/graphics/radeon_hd/driver.cpp
index 55be117..519dba3 100644
--- a/src/add-ons/kernel/drivers/graphics/radeon_hd/driver.cpp
+++ b/src/add-ons/kernel/drivers/graphics/radeon_hd/driver.cpp
@@ -248,8 +248,8 @@ const struct supported_device {
        {0x6709, 5, 0, RADEON_CAYMAN, CHIP_STD, "Radeon HD CAYMAN"},
        {0x6718, 5, 0, RADEON_CAYMAN, CHIP_STD, "Radeon HD 6970"},
        {0x6719, 5, 0, RADEON_CAYMAN, CHIP_STD, "Radeon HD 6950"},
-       {0x671C, 5, 0, RADEON_CAYMAN, CHIP_STD, "Radeon HD CAYMAN"},
-       {0x671F, 5, 0, RADEON_CAYMAN, CHIP_STD, "Radeon HD 6900"},
+       {0x671c, 5, 0, RADEON_CAYMAN, CHIP_STD, "Radeon HD CAYMAN"},
+       {0x671f, 5, 0, RADEON_CAYMAN, CHIP_STD, "Radeon HD 6900"},
        //  Antilles
        {0x671d, 5, 0, RADEON_ANTILLES, CHIP_STD, "Radeon HD 6990"},
 
@@ -258,11 +258,11 @@ const struct supported_device {
        // Codename: Southern Islands
        //  Lombok
        //  Cape Verde
-       {0x683F, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD 7750"},
-       {0x683D, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD 7770"},
+       {0x683f, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD 7750"},
+       {0x683d, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD 7770"},
        //  Pitcairn
        //  Tahiti
-       {0x679A, 6, 0, RADEON_TAHITI, CHIP_STD, "Radeon HD 7950"},
+       {0x679a, 6, 0, RADEON_TAHITI, CHIP_STD, "Radeon HD 7950"},
        {0x6798, 6, 0, RADEON_TAHITI, CHIP_STD, "Radeon HD 7970"}
        //  New Zealand
 };

############################################################################

Commit:      437937ab64cbc81a46418d6969a76a09e5d0372b
URL:         http://cgit.haiku-os.org/haiku/commit/?id=437937a
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Fri Feb 17 13:22:29 2012 UTC

radeon_hd: Add rebranded HD 73xx, add process, add rumored cards

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/drivers/graphics/radeon_hd/driver.cpp 
b/src/add-ons/kernel/drivers/graphics/radeon_hd/driver.cpp
index 519dba3..62bfff3 100644
--- a/src/add-ons/kernel/drivers/graphics/radeon_hd/driver.cpp
+++ b/src/add-ons/kernel/drivers/graphics/radeon_hd/driver.cpp
@@ -80,6 +80,7 @@ const struct supported_device {
        // Marketing Names: Radeon HD 24xx - HD 42xx
        // Introduced: 2006
        // Codename: Pele
+       // Process: 55 nm
        {0x94c7, 2, 0, RADEON_RV610, CHIP_STD, "Radeon HD 2350"},
        {0x94c1, 2, 0, RADEON_RV610, CHIP_IGP, "Radeon HD 2400"},
        {0x94c3, 2, 0, RADEON_RV610, CHIP_STD, "Radeon HD 2400"},
@@ -131,6 +132,7 @@ const struct supported_device {
        // Marketing Names: Radeon HD 4330 - HD 4890, HD 51xx, HD 5xxV
        // Introduced: 2008
        // Codename: Wekiva
+       // Process: 55 nm
        //      Radeon 4330             - RV710
        {0x954f, 3, 2, RADEON_RV710, CHIP_IGP, "Radeon HD 4300"},
        {0x9552, 3, 2, RADEON_RV710, CHIP_IGP, "Radeon HD 4300"},
@@ -157,6 +159,7 @@ const struct supported_device {
        // Marketing Names: Radeon HD 54xx ~ HD 63xx
        // Introduced: 2009
        // Codename: Evergreen
+       // Process: 40 nm
        //  Cedar
        {0x68e1, 4, 0, RADEON_CEDAR, CHIP_STD, "Radeon HD 5430"},
        {0x68f9, 4, 0, RADEON_CEDAR, CHIP_STD, "Radeon HD 5450"},
@@ -204,6 +207,7 @@ const struct supported_device {
        // Radeon HD 64xx - HD 69xx
        // Introduced: 2010
        // Codename: Nothern Islands
+       // Process: 40 nm
        //  Caicos
        {0x6760, 5, 0, RADEON_CAICOS, CHIP_MOBILE, "Radeon HD 6470M"},
        {0x6761, 5, 0, RADEON_CAICOS, CHIP_MOBILE, "Radeon HD 6430M"},
@@ -217,6 +221,8 @@ const struct supported_device {
        {0x6770, 5, 0, RADEON_CAICOS, CHIP_STD, "Radeon HD 6400"},
        {0x6778, 5, 0, RADEON_CAICOS, CHIP_STD, "Radeon HD CAICOS"},
        {0x6779, 5, 0, RADEON_CAICOS, CHIP_STD, "Radeon HD 6450"},
+       {0x68fa, 5, 0, RADEON_CAICOS, CHIP_STD, "Radeon HD 7350"},
+       {0x68f9, 5, 0, RADEON_CAICOS, CHIP_STD, "Radeon HD 7350"},
        //  Turks
        {0x6740, 5, 0, RADEON_TURKS, CHIP_MOBILE, "Radeon HD 6770M"},
        {0x6741, 5, 0, RADEON_TURKS, CHIP_MOBILE, "Radeon HD 6650M"},
@@ -230,7 +236,7 @@ const struct supported_device {
        {0x6749, 5, 0, RADEON_TURKS, CHIP_STD, "FirePro v4900"},
        {0x6750, 5, 0, RADEON_TURKS, CHIP_STD, "Radeon HD 6500"},
        {0x6758, 5, 0, RADEON_TURKS, CHIP_STD, "Radeon HD 6670"},
-       {0x6759, 5, 0, RADEON_TURKS, CHIP_STD, "Radeon HD 6570"},
+       {0x6759, 5, 0, RADEON_TURKS, CHIP_STD, "Radeon HD 6570/7570"},
        //  Barts
        {0x673e, 5, 0, RADEON_BARTS, CHIP_STD, "Radeon HD 6790"},
        {0x6739, 5, 0, RADEON_BARTS, CHIP_STD, "Radeon HD 6850"},
@@ -256,12 +262,17 @@ const struct supported_device {
        // Marketing Names: Radeon HD 74xx - HD 79xx
        // Introduced: Late 2011
        // Codename: Southern Islands
+       // Process: 28 nm
        //  Lombok
        //  Cape Verde
        {0x683f, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD 7750"},
        {0x683d, 6, 0, RADEON_CAPEVERDE, CHIP_STD, "Radeon HD 7770"},
        //  Pitcairn
+       //      - 7790
+       //      - 7850
+       //      - 7870
        //  Tahiti
+       //      - 7890
        {0x679a, 6, 0, RADEON_TAHITI, CHIP_STD, "Radeon HD 7950"},
        {0x6798, 6, 0, RADEON_TAHITI, CHIP_STD, "Radeon HD 7970"}
        //  New Zealand

############################################################################

Revision:    hrev43747
Commit:      e8790580ad07b780b573445579a11ded309369b4
URL:         http://cgit.haiku-os.org/haiku/commit/?id=e879058
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Fri Feb 17 14:12:29 2012 UTC

radeon_hd: LVDS AtomBIOS mode reading

* This isn't done, but all we need to do now is create
  a simulated edid struct for LVDS screens.

----------------------------------------------------------------------------

diff --git a/src/add-ons/accelerants/radeon_hd/connector.cpp 
b/src/add-ons/accelerants/radeon_hd/connector.cpp
index 416bd17..1a96239 100644
--- a/src/add-ons/accelerants/radeon_hd/connector.cpp
+++ b/src/add-ons/accelerants/radeon_hd/connector.cpp
@@ -125,9 +125,10 @@ connector_read_edid(uint32 connectorIndex, edid1_info* 
edid)
                return false;
 
        if (gConnector[connectorIndex]->type == VIDEO_CONNECTOR_LVDS) {
-               // we should call connector_read_edid_lvds at some point
                ERROR("%s: LCD panel detected (LVDS), sending VESA EDID!\n",
                        __func__);
+               // TODO: connector_read_edid_lvds doesn't do anything yet
+               connector_read_edid_lvds(connectorIndex, edid);
                memcpy(edid, &gInfo->shared_info->edid_info, sizeof(struct 
edid1_info));
                return true;
        }
@@ -153,7 +154,6 @@ connector_read_edid(uint32 connectorIndex, edid1_info* edid)
 }
 
 
-#if 0
 bool
 connector_read_edid_lvds(uint32 connectorIndex, edid1_info* edid)
 {
@@ -162,11 +162,19 @@ connector_read_edid_lvds(uint32 connectorIndex, 
edid1_info* edid)
        int index = GetIndexIntoMasterTable(DATA, LVDS_Info);
        uint16 offset;
 
-       if (atom_parse_data_header(gAtomContexg, index, NULL,
+       union atomLVDSInfo {
+               struct _ATOM_LVDS_INFO info;
+               struct _ATOM_LVDS_INFO_V12 info_12;
+       };
+
+       if (atom_parse_data_header(gAtomContext, index, NULL,
                &dceMajor, &dceMinor, &offset) == B_OK) {
-               lvdsInfo = (union lvds_info*)(gAtomContext->bios + offset);
+
+               union atomLVDSInfo* lvdsInfo
+                       = (union atomLVDSInfo*)(gAtomContext->bios + offset);
 
                display_timing timing;
+
                // Pixel Clock
                timing.pixel_clock
                        = 
B_LENDIAN_TO_HOST_INT16(lvdsInfo->info.sLCDTiming.usPixClk) * 10;
@@ -216,10 +224,18 @@ connector_read_edid_lvds(uint32 connectorIndex, 
edid1_info* edid)
                        timing.flags |= MODE_FLAG_DBLSCAN;
                #endif
 
-               // TODO: generate a fake EDID with information above
+               // TODO: generate a fake EDID with information above. For now 
just dump
+
+               TRACE("%s: %" B_PRIu32 " %" B_PRIu16 " %" B_PRIu16 " %" 
B_PRIu16 " %" B_PRIu16
+                       " %" B_PRIu16 " %" B_PRIu16 " %" B_PRIu16 " %" B_PRIu16 
"\n",
+                       __func__, timing.pixel_clock, timing.h_display, 
timing.h_sync_start,
+                       timing.h_sync_end, timing.h_total, timing.v_display, 
timing.v_sync_start,
+                       timing.v_sync_end, timing.v_total);
+
+               return true;
        }
+       return false;
 }
-#endif
 
 
 status_t
diff --git a/src/add-ons/accelerants/radeon_hd/connector.h 
b/src/add-ons/accelerants/radeon_hd/connector.h
index c51dc60..f2c7611 100644
--- a/src/add-ons/accelerants/radeon_hd/connector.h
+++ b/src/add-ons/accelerants/radeon_hd/connector.h
@@ -63,6 +63,7 @@ const int kConnectorConvert[] = {
 status_t gpio_probe();
 status_t connector_attach_gpio(uint32 id, uint8 hwPin);
 bool connector_read_edid(uint32 connector, edid1_info* edid);
+bool connector_read_edid_lvds(uint32 connectorIndex, edid1_info* edid);
 status_t connector_probe();
 status_t connector_probe_legacy();
 bool connector_is_dp(uint32 connectorIndex);


Other related posts: