[haiku-commits] r42465 - haiku/trunk/src/add-ons/accelerants/radeon_hd

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 23 Jul 2011 03:27:59 +0200 (CEST)

Author: kallisti5
Date: 2011-07-23 03:27:59 +0200 (Sat, 23 Jul 2011)
New Revision: 42465
Changeset: https://dev.haiku-os.org/changeset/42465

Modified:
   haiku/trunk/src/add-ons/accelerants/radeon_hd/accelerant.cpp
   haiku/trunk/src/add-ons/accelerants/radeon_hd/dac.cpp
   haiku/trunk/src/add-ons/accelerants/radeon_hd/display.cpp
   haiku/trunk/src/add-ons/accelerants/radeon_hd/display.h
   haiku/trunk/src/add-ons/accelerants/radeon_hd/tmds.cpp
Log:
* Add fancy detected monitors debug function

Modified: haiku/trunk/src/add-ons/accelerants/radeon_hd/accelerant.cpp
===================================================================
--- haiku/trunk/src/add-ons/accelerants/radeon_hd/accelerant.cpp        
2011-07-22 19:40:14 UTC (rev 42464)
+++ haiku/trunk/src/add-ons/accelerants/radeon_hd/accelerant.cpp        
2011-07-23 01:27:59 UTC (rev 42465)
@@ -210,6 +210,8 @@
        if (status != B_OK)
                return status;
 
+       debug_displays();
+
        status = create_mode_list();
        if (status != B_OK) {
                uninit_common();

Modified: haiku/trunk/src/add-ons/accelerants/radeon_hd/dac.cpp
===================================================================
--- haiku/trunk/src/add-ons/accelerants/radeon_hd/dac.cpp       2011-07-22 
19:40:14 UTC (rev 42464)
+++ haiku/trunk/src/add-ons/accelerants/radeon_hd/dac.cpp       2011-07-23 
01:27:59 UTC (rev 42465)
@@ -85,13 +85,7 @@
                detectControl, 0x000000FF);
        Write32Mask(OUT, dacOffset + DACA_ENABLE, enable, 0x000000FF);
 
-       if (out == 0x7) {
-               TRACE("%s: DAC%d : Display device attached\n", __func__, 
dacIndex);
-               return true;
-       } else {
-               TRACE("%s: DAC%d : No display device attached\n", __func__, 
dacIndex);
-               return false;
-       }
+       return (out == 0x7);
 }
 
 

Modified: haiku/trunk/src/add-ons/accelerants/radeon_hd/display.cpp
===================================================================
--- haiku/trunk/src/add-ons/accelerants/radeon_hd/display.cpp   2011-07-22 
19:40:14 UTC (rev 42464)
+++ haiku/trunk/src/add-ons/accelerants/radeon_hd/display.cpp   2011-07-23 
01:27:59 UTC (rev 42465)
@@ -204,12 +204,8 @@
                        gDisplay[crtid]->vfreq_max = range.max_v;
                        gDisplay[crtid]->hfreq_min = range.min_h;   /* in kHz */
                        gDisplay[crtid]->hfreq_max = range.max_h;
-                       TRACE("CRT %d : v_min %d : v_max %d : h_min %d : h_max 
%d\n",
-                               crtid, gDisplay[crtid]->vfreq_min, 
gDisplay[crtid]->vfreq_max,
-                               gDisplay[crtid]->hfreq_min, 
gDisplay[crtid]->hfreq_max);
                        return B_OK;
                }
-
        }
 
        return B_ERROR;
@@ -259,3 +255,34 @@
 }
 
 
+void
+debug_displays()
+{
+       TRACE("Currently detected monitors===============\n");
+       for (uint32 id = 0; id < MAX_DISPLAY; id++) {
+               TRACE("Display #%" B_PRIu32 " active = %s\n",
+                       id, gDisplay[id]->active ? "true" : "false");
+
+               if (gDisplay[id]->active) {
+                       if (gDisplay[id]->connection_type == CONNECTION_DAC)
+                               TRACE(" + connection: DAC\n");
+                       else if (gDisplay[id]->connection_type == 
CONNECTION_TMDS)
+                               TRACE(" + connection: TMDS\n");
+                       else if (gDisplay[id]->connection_type == 
CONNECTION_LVDS)
+                               TRACE(" + connection: LVDS\n");
+                       else
+                               TRACE(" + connection: UNKNOWN\n");
+
+                               TRACE(" + connection index: % " B_PRIu8 "\n",
+                                       gDisplay[id]->connection_id);
+
+                               TRACE(" + limits: Vert Min/Max: %" B_PRIu32 
"/%" B_PRIu32"\n",
+                                       gDisplay[id]->vfreq_min, 
gDisplay[id]->vfreq_max);
+                               TRACE(" + limits: Horz Min/Max: %" B_PRIu32 
"/%" B_PRIu32"\n",
+                                       gDisplay[id]->hfreq_min, 
gDisplay[id]->hfreq_max);
+               }
+       }
+       TRACE("==========================================\n");
+
+}
+

Modified: haiku/trunk/src/add-ons/accelerants/radeon_hd/display.h
===================================================================
--- haiku/trunk/src/add-ons/accelerants/radeon_hd/display.h     2011-07-22 
19:40:14 UTC (rev 42464)
+++ haiku/trunk/src/add-ons/accelerants/radeon_hd/display.h     2011-07-23 
01:27:59 UTC (rev 42465)
@@ -12,6 +12,7 @@
 status_t init_registers(register_info* reg, uint8 crtid);
 status_t detect_crt_ranges(uint32 crtid);
 status_t detect_displays();
+void debug_displays();
 
 
 #endif /* RADEON_HD_DISPLAY_H */

Modified: haiku/trunk/src/add-ons/accelerants/radeon_hd/tmds.cpp
===================================================================
--- haiku/trunk/src/add-ons/accelerants/radeon_hd/tmds.cpp      2011-07-22 
19:40:14 UTC (rev 42464)
+++ haiku/trunk/src/add-ons/accelerants/radeon_hd/tmds.cpp      2011-07-23 
01:27:59 UTC (rev 42465)
@@ -40,12 +40,6 @@
        // Restore saved value
        Write32Mask(OUT, TMDSA_LOAD_DETECT, loadDetect, 0x00000001);
 
-       if (result) {
-               TRACE("%s: TMDS%d: Display device attached\n", __func__, 
tmdsIndex);
-       } else {
-               TRACE("%s: TMDS%d: No display device attached\n", __func__, 
tmdsIndex);
-       }
-
        return result;
 }
 


Other related posts:

  • » [haiku-commits] r42465 - haiku/trunk/src/add-ons/accelerants/radeon_hd - kallisti5