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

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 8 Mar 2012 20:19:11 +0100 (CET)

hrev43832 adds 3 changesets to branch 'master'
old head: 34f10aee4145ce12b4be86a43460c07965d2e521
new head: f070c3c3114d1fdb52fba2c56c2475391d5fab12

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

63d0b67: radeon_hd: Fill in a few analog encoder edge cases
  
  * If TV, NTSC hardcoded for now. I plan to address
    this with an accelerant config file at some point

0a92c1e: radeon_hd: White space / line length cleanup.
  
  * No functional change.

f070c3c: radeon_hd: Decode encoder flags in debug.
  
  * Should assist in troubleshooting.

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

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

2 files changed, 79 insertions(+), 9 deletions(-)
src/add-ons/accelerants/radeon_hd/connector.cpp |   68 +++++++++++++++++--
src/add-ons/accelerants/radeon_hd/encoder.cpp   |   20 +++++-

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

Commit:      63d0b67679e81983773b611297c04c024541687a
URL:         http://cgit.haiku-os.org/haiku/commit/?id=63d0b67
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Thu Mar  8 11:46:40 2012 UTC

radeon_hd: Fill in a few analog encoder edge cases

* If TV, NTSC hardcoded for now. I plan to address
  this with an accelerant config file at some point

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

diff --git a/src/add-ons/accelerants/radeon_hd/encoder.cpp 
b/src/add-ons/accelerants/radeon_hd/encoder.cpp
index 5ecd602..b72e85f 100644
--- a/src/add-ons/accelerants/radeon_hd/encoder.cpp
+++ b/src/add-ons/accelerants/radeon_hd/encoder.cpp
@@ -860,6 +860,8 @@ encoder_analog_setup(uint32 connectorIndex, uint32 
pixelClock, int command)
 {
        TRACE("%s\n", __func__);
 
+       uint32 encoderFlags = gConnector[connectorIndex]->encoder.flags;
+
        int index = 0;
        DAC_ENCODER_CONTROL_PS_ALLOCATION args;
        memset(&args, 0, sizeof(args));
@@ -876,9 +878,21 @@ encoder_analog_setup(uint32 connectorIndex, uint32 
pixelClock, int command)
        }
 
        args.ucAction = command;
-       args.ucDacStandard = ATOM_DAC1_PS2;
-               // TODO: or ATOM_DAC1_CV if ATOM_DEVICE_CV_SUPPORT
-               // TODO: or ATOM_DAC1_PAL or ATOM_DAC1_NTSC if else
+
+       if ((encoderFlags & ATOM_DEVICE_CRT_SUPPORT) != 0)
+               args.ucDacStandard = ATOM_DAC1_PS2;
+       else if ((encoderFlags & ATOM_DEVICE_CV_SUPPORT) != 0)
+               args.ucDacStandard = ATOM_DAC1_CV;
+       else {
+               TRACE("%s: TODO, hardcoded NTSC TV support\n", __func__);
+               if (1) {
+                       // NTSC, NTSC_J, PAL 60
+                       args.ucDacStandard = ATOM_DAC1_NTSC;
+               } else {
+                       // PAL, SCART. SECAM, PAL_CN
+                       args.ucDacStandard = ATOM_DAC1_PAL;
+               }
+       }
 
        args.usPixelClock = B_HOST_TO_LENDIAN_INT16(pixelClock / 10);
 

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

Commit:      0a92c1ea634b866d3f05cc249756687d4102b347
URL:         http://cgit.haiku-os.org/haiku/commit/?id=0a92c1e
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Thu Mar  8 11:52:57 2012 UTC

radeon_hd: White space / line length cleanup.

* No functional change.

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

diff --git a/src/add-ons/accelerants/radeon_hd/connector.cpp 
b/src/add-ons/accelerants/radeon_hd/connector.cpp
index 4ecf508..3047eaa 100644
--- a/src/add-ons/accelerants/radeon_hd/connector.cpp
+++ b/src/add-ons/accelerants/radeon_hd/connector.cpp
@@ -228,12 +228,13 @@ connector_read_mode_lvds(uint32 connectorIndex, 
display_mode* mode)
 
                // Assume 32-bit color
                mode->space = B_RGB32_LITTLE;
-               
-               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);
+
+               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;
        }

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

Revision:    hrev43832
Commit:      f070c3c3114d1fdb52fba2c56c2475391d5fab12
URL:         http://cgit.haiku-os.org/haiku/commit/?id=f070c3c
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Thu Mar  8 13:13:17 2012 UTC

radeon_hd: Decode encoder flags in debug.

* Should assist in troubleshooting.

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

diff --git a/src/add-ons/accelerants/radeon_hd/connector.cpp 
b/src/add-ons/accelerants/radeon_hd/connector.cpp
index 3047eaa..f01f5ac 100644
--- a/src/add-ons/accelerants/radeon_hd/connector.cpp
+++ b/src/add-ons/accelerants/radeon_hd/connector.cpp
@@ -748,7 +748,9 @@ debug_connectors()
                        uint32 connectorType = gConnector[id]->type;
                        uint32 encoderType = gConnector[id]->encoder.type;
                        uint16 encoderID = gConnector[id]->encoder.objectID;
+                       uint32 encoderFlags = gConnector[id]->encoder.flags;
                        uint16 gpioID = gConnector[id]->gpioID;
+
                        ERROR("Connector #%" B_PRIu32 ")\n", id);
                        ERROR(" + connector:      %s\n", 
get_connector_name(connectorType));
                        ERROR(" + gpio table id:  %" B_PRIu16 "\n", gpioID);
@@ -783,6 +785,59 @@ debug_connectors()
                        }
                        if (attribute == false)
                                ERROR("     * no extra attributes\n");
+
+                       bool flags = false;
+                       ERROR("   - flags:\n");
+                       if ((encoderFlags & ATOM_DEVICE_CRT1_SUPPORT) != 0) {
+                               ERROR("     * device CRT1 support\n");
+                               flags = true;
+                       }
+                       if ((encoderFlags & ATOM_DEVICE_CRT2_SUPPORT) != 0) {
+                               ERROR("     * device CRT2 support\n");
+                               flags = true;
+                       }
+                       if ((encoderFlags & ATOM_DEVICE_LCD1_SUPPORT) != 0) {
+                               ERROR("     * device LCD1 support\n");
+                               flags = true;
+                       }
+                       if ((encoderFlags & ATOM_DEVICE_LCD2_SUPPORT) != 0) {
+                               ERROR("     * device LCD2 support\n");
+                               flags = true;
+                       }
+                       if ((encoderFlags & ATOM_DEVICE_TV1_SUPPORT) != 0) {
+                               ERROR("     * device TV1 support\n");
+                               flags = true;
+                       }
+                       if ((encoderFlags & ATOM_DEVICE_CV_SUPPORT) != 0) {
+                               ERROR("     * device CV support\n");
+                               flags = true;
+                       }
+                       if ((encoderFlags & ATOM_DEVICE_DFP1_SUPPORT) != 0) {
+                               ERROR("     * device DFP1 support\n");
+                               flags = true;
+                       }
+                       if ((encoderFlags & ATOM_DEVICE_DFP2_SUPPORT) != 0) {
+                               ERROR("     * device DFP2 support\n");
+                               flags = true;
+                       }
+                       if ((encoderFlags & ATOM_DEVICE_DFP3_SUPPORT) != 0) {
+                               ERROR("     * device DFP3 support\n");
+                               flags = true;
+                       }
+                       if ((encoderFlags & ATOM_DEVICE_DFP4_SUPPORT) != 0) {
+                               ERROR("     * device DFP4 support\n");
+                               flags = true;
+                       }
+                       if ((encoderFlags & ATOM_DEVICE_DFP5_SUPPORT) != 0) {
+                               ERROR("     * device DFP5 support\n");
+                               flags = true;
+                       }
+                       if ((encoderFlags & ATOM_DEVICE_DFP6_SUPPORT) != 0) {
+                               ERROR("     * device DFP6 support\n");
+                               flags = true;
+                       }
+                       if (flags == false)
+                               ERROR("     * no known flags\n");
                }
        }
        ERROR("==========================================\n");


Other related posts:

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