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

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 19 Dec 2013 08:15:08 +0100 (CET)

hrev46563 adds 3 changesets to branch 'master'
old head: d3a119a2b4e99093ecd480abf86c82e84b27096d
new head: 1665250fa7176841286f57f7589b7a1710885498
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=1665250+%5Ed3a119a

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

233507b: radeon_hd: Missed a % for a B_PRI

92f91bc: radeon_hd: Update DisplayPort aux for DCE6
  
  * DCE6 requires a non-0 value for lpAuxRequest
    (0 is reserved)

1665250: radeon_hd: crtc_memreq only on DCE 3 - 5
  
  * Prevent some atombios missing table errors
    on DCE 6 and later

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

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

2 files changed, 12 insertions(+), 7 deletions(-)
src/add-ons/accelerants/radeon_hd/display.cpp     |  4 ++--
src/add-ons/accelerants/radeon_hd/displayport.cpp | 15 ++++++++++-----

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

Commit:      233507b3cd38364d467a445cf41193b46f57ccf2
URL:         http://cgit.haiku-os.org/haiku/commit/?id=233507b
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Wed Dec 18 22:27:22 2013 UTC

radeon_hd: Missed a % for a B_PRI

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

diff --git a/src/add-ons/accelerants/radeon_hd/displayport.cpp 
b/src/add-ons/accelerants/radeon_hd/displayport.cpp
index 1bea9dd..4850fd9 100644
--- a/src/add-ons/accelerants/radeon_hd/displayport.cpp
+++ b/src/add-ons/accelerants/radeon_hd/displayport.cpp
@@ -921,7 +921,7 @@ ddc2_dp_read_edid1(uint32 connectorIndex, edid1_info* edid)
                status_t result = dp_aux_get_i2c_byte(dpInfo->auxPin, 0x50,
                        rdata++, false, false);
                if (result != B_OK) {
-                       TRACE("%s: error reading EDID data at index " B_PRIu32 
", "
+                       TRACE("%s: error reading EDID data at index %" B_PRIu32 
", "
                                "result = 0x%lX\n", __func__, i, result);
                        dp_aux_get_i2c_byte(dpInfo->auxPin, 0x50, &sdata, 
false, true);
                        return false;

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

Commit:      92f91bc8dab568d1039a7a9f54755887941ddc1c
URL:         http://cgit.haiku-os.org/haiku/commit/?id=92f91bc
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Wed Dec 18 23:43:26 2013 UTC

radeon_hd: Update DisplayPort aux for DCE6

* DCE6 requires a non-0 value for lpAuxRequest
  (0 is reserved)

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

diff --git a/src/add-ons/accelerants/radeon_hd/displayport.cpp 
b/src/add-ons/accelerants/radeon_hd/displayport.cpp
index 4850fd9..07cb91b 100644
--- a/src/add-ons/accelerants/radeon_hd/displayport.cpp
+++ b/src/add-ons/accelerants/radeon_hd/displayport.cpp
@@ -49,8 +49,8 @@ dp_aux_speak(uint32 hwPin, uint8* send, int sendBytes,
        union auxChannelTransaction args;
        memset(&args, 0, sizeof(args));
 
-       args.v1.lpAuxRequest = 0;
-       args.v1.lpDataOut = 16;
+       args.v1.lpAuxRequest = B_HOST_TO_LENDIAN_INT16(0 + 4);
+       args.v1.lpDataOut = B_HOST_TO_LENDIAN_INT16(16 + 4);
        args.v1.ucDataOutLen = 0;
        args.v1.ucChannelID = hwPin;
        args.v1.ucDelay = delay / 10;
@@ -58,7 +58,10 @@ dp_aux_speak(uint32 hwPin, uint8* send, int sendBytes,
        //if (ASIC_IS_DCE4(rdev))
        //      args.v2.ucHPD_ID = chan->rec.hpd;
 
-       unsigned char* base = (unsigned char*)gAtomContext->scratch;
+       unsigned char* base = (unsigned char*)(gAtomContext->scratch + 1);
+
+       // TODO: This isn't correct for big endian systems!
+       // send needs to be swapped on big endian.
        memcpy(base, send, sendBytes);
 
        atom_execute_table(gAtomContext, index, (uint32*)&args);
@@ -81,6 +84,8 @@ dp_aux_speak(uint32 hwPin, uint8* send, int sendBytes,
        if (recvLength > recvBytes)
                recvLength = recvBytes;
 
+       // TODO: This isn't correct for big endian systems!
+       // recv needs to be swapped on big endian.
        if (recv && recvBytes)
                memcpy(recv, base + 16, recvLength);
 
@@ -151,7 +156,7 @@ dp_aux_read(uint32 hwPin, uint16 address,
                        return result;
 
                if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
-                       return B_OK; 
+                       return B_OK;
                else if ((ack & AUX_NATIVE_REPLY_MASK) == 
AUX_NATIVE_REPLY_DEFER)
                        snooze(400);
                else

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

Revision:    hrev46563
Commit:      1665250fa7176841286f57f7589b7a1710885498
URL:         http://cgit.haiku-os.org/haiku/commit/?id=1665250
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Thu Dec 19 02:00:11 2013 UTC

radeon_hd: crtc_memreq only on DCE 3 - 5

* Prevent some atombios missing table errors
  on DCE 6 and later

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

diff --git a/src/add-ons/accelerants/radeon_hd/display.cpp 
b/src/add-ons/accelerants/radeon_hd/display.cpp
index 932bf34..d81ab77 100644
--- a/src/add-ons/accelerants/radeon_hd/display.cpp
+++ b/src/add-ons/accelerants/radeon_hd/display.cpp
@@ -577,7 +577,7 @@ display_crtc_dpms(uint8 crtcID, int mode)
                                return;
                        display_crtc_power(crtcID, ATOM_ENABLE);
                        gDisplay[crtcID]->powered = true;
-                       if (info.dceMajor >= 3)
+                       if (info.dceMajor >= 3 && info.dceMajor < 6)
                                display_crtc_memreq(crtcID, ATOM_ENABLE);
                        display_crtc_blank(crtcID, ATOM_BLANKING_OFF);
                        break;
@@ -589,7 +589,7 @@ display_crtc_dpms(uint8 crtcID, int mode)
                                return;
                        if (gDisplay[crtcID]->powered == true)
                                display_crtc_blank(crtcID, ATOM_BLANKING);
-                       if (info.dceMajor >= 3)
+                       if (info.dceMajor >= 3 && info.dceMajor < 6)
                                display_crtc_memreq(crtcID, ATOM_DISABLE);
                        display_crtc_power(crtcID, ATOM_DISABLE);
                        gDisplay[crtcID]->powered = false;


Other related posts:

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