From 6fca1a84fcc67f1fcc59e8d466c3638adde01d5c Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Tue, 20 Sep 2011 12:47:47 +0000 Subject: [PATCH] * fix header function define * while doing our last-resort fallback, skip TV DAC encoders as it is likely that is not what the user wants. This may need to change as the driver matures. (ex: only a tv is connected, no edid) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42760 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/accelerants/radeon_hd/display.cpp | 16 +++++++++++----- src/add-ons/accelerants/radeon_hd/gpu.h | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/add-ons/accelerants/radeon_hd/display.cpp b/src/add-ons/accelerants/radeon_hd/display.cpp index 5e1a11ac11..54daf7fbc9 100644 --- a/src/add-ons/accelerants/radeon_hd/display.cpp +++ b/src/add-ons/accelerants/radeon_hd/display.cpp @@ -648,11 +648,17 @@ detect_displays() if (displayIndex == 0) { ERROR("%s: ERROR: 0 attached monitors were found on display connectors." " Injecting first connector as a last resort.\n", __func__); - gDisplay[displayIndex]->active = true; - gDisplay[displayIndex]->connector_index = 0; - init_registers(gDisplay[displayIndex]->regs, displayIndex); - if (detect_crt_ranges(displayIndex) == B_OK) - gDisplay[displayIndex]->found_ranges = true; + for (uint32 id = 0; id < ATOM_MAX_SUPPORTED_DEVICE; id++) { + // skip TV DAC connectors as likely fallback isn't for TV + if (gConnector[id]->encoder_type == VIDEO_ENCODER_TVDAC) + continue; + gDisplay[0]->active = true; + gDisplay[0]->connector_index = id; + init_registers(gDisplay[0]->regs, 0); + if (detect_crt_ranges(0) == B_OK) + gDisplay[0]->found_ranges = true; + break; + } } diff --git a/src/add-ons/accelerants/radeon_hd/gpu.h b/src/add-ons/accelerants/radeon_hd/gpu.h index e79ee9fe55..d79eeae5bd 100644 --- a/src/add-ons/accelerants/radeon_hd/gpu.h +++ b/src/add-ons/accelerants/radeon_hd/gpu.h @@ -169,7 +169,7 @@ uint32 radeon_gpu_mc_idlecheck(); status_t radeon_gpu_mc_setup(); status_t radeon_gpu_irq_setup(); bool radeon_gpu_read_edid(uint32 connector, edid1_info *edid); -status_t radeon_gpu_i2c_setup(uint32 id, uint8 gpio_id); +status_t radeon_gpu_i2c_setup(uint32 id, uint8 gpio_pin); #endif