* Add fancy detected monitors debug function
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42465 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -210,6 +210,8 @@ radeon_init_accelerant(int device)
|
|||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
|
debug_displays();
|
||||||
|
|
||||||
status = create_mode_list();
|
status = create_mode_list();
|
||||||
if (status != B_OK) {
|
if (status != B_OK) {
|
||||||
uninit_common();
|
uninit_common();
|
||||||
|
|||||||
@@ -85,13 +85,7 @@ DACSense(uint8 dacIndex)
|
|||||||
detectControl, 0x000000FF);
|
detectControl, 0x000000FF);
|
||||||
Write32Mask(OUT, dacOffset + DACA_ENABLE, enable, 0x000000FF);
|
Write32Mask(OUT, dacOffset + DACA_ENABLE, enable, 0x000000FF);
|
||||||
|
|
||||||
if (out == 0x7) {
|
return (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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -204,12 +204,8 @@ detect_crt_ranges(uint32 crtid)
|
|||||||
gDisplay[crtid]->vfreq_max = range.max_v;
|
gDisplay[crtid]->vfreq_max = range.max_v;
|
||||||
gDisplay[crtid]->hfreq_min = range.min_h; /* in kHz */
|
gDisplay[crtid]->hfreq_min = range.min_h; /* in kHz */
|
||||||
gDisplay[crtid]->hfreq_max = range.max_h;
|
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_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
@@ -259,3 +255,34 @@ detect_displays()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
status_t init_registers(register_info* reg, uint8 crtid);
|
status_t init_registers(register_info* reg, uint8 crtid);
|
||||||
status_t detect_crt_ranges(uint32 crtid);
|
status_t detect_crt_ranges(uint32 crtid);
|
||||||
status_t detect_displays();
|
status_t detect_displays();
|
||||||
|
void debug_displays();
|
||||||
|
|
||||||
|
|
||||||
#endif /* RADEON_HD_DISPLAY_H */
|
#endif /* RADEON_HD_DISPLAY_H */
|
||||||
|
|||||||
@@ -40,12 +40,6 @@ TMDSSense(uint8 tmdsIndex)
|
|||||||
// Restore saved value
|
// Restore saved value
|
||||||
Write32Mask(OUT, TMDSA_LOAD_DETECT, loadDetect, 0x00000001);
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user