From 878a8d3fdd615281c5d74cba6cc798469f1c3c6a Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Sun, 29 Sep 2013 00:04:24 -0500 Subject: [PATCH] radeon_hd: Move to using the first found monitor's EDID * This has positive and negitive effects. Using the first monitor's EDID vs the VESA EDID means DisplayPort monitors and adaptors function. I think the benefits outweigh the risks at this point. * Haiku will use the native display mode of the first monitor and set it across all attached displays. * Please open bug reports if you notice and regressions. --- src/add-ons/accelerants/radeon_hd/mode.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/add-ons/accelerants/radeon_hd/mode.cpp b/src/add-ons/accelerants/radeon_hd/mode.cpp index 815d52f42f..e09b6e5967 100644 --- a/src/add-ons/accelerants/radeon_hd/mode.cpp +++ b/src/add-ons/accelerants/radeon_hd/mode.cpp @@ -44,13 +44,13 @@ status_t create_mode_list(void) { // TODO: multi-monitor? for now we use VESA and not gDisplay edid + uint8 crtcID = 0; const color_space kRadeonHDSpaces[] = {B_RGB32_LITTLE, B_RGB24_LITTLE, B_RGB16_LITTLE, B_RGB15_LITTLE, B_CMAP8}; gInfo->mode_list_area = create_display_modes("radeon HD modes", - gInfo->shared_info->has_edid ? &gInfo->shared_info->edid_info : NULL, - NULL, 0, kRadeonHDSpaces, + &gDisplay[crtcID]->edidData, NULL, 0, kRadeonHDSpaces, sizeof(kRadeonHDSpaces) / sizeof(kRadeonHDSpaces[0]), is_mode_supported, &gInfo->mode_list, &gInfo->shared_info->mode_count); if (gInfo->mode_list_area < B_OK) @@ -111,6 +111,7 @@ status_t radeon_get_edid_info(void* info, size_t size, uint32* edid_version) { // TODO: multi-monitor? for now we use VESA edid + uint8 crtcID = 0; TRACE("%s\n", __func__); if (!gInfo->shared_info->has_edid) @@ -118,9 +119,9 @@ radeon_get_edid_info(void* info, size_t size, uint32* edid_version) if (size < sizeof(struct edid1_info)) return B_BUFFER_OVERFLOW; - memcpy(info, &gInfo->shared_info->edid_info, sizeof(struct edid1_info)); + //memcpy(info, &gInfo->shared_info->edid_info, sizeof(struct edid1_info)); // VESA - //memcpy(info, &gDisplay[0]->edidData, sizeof(struct edid1_info)); + memcpy(info, &gDisplay[crtcID]->edidData, sizeof(struct edid1_info)); // Display 0 *edid_version = EDID_VERSION_1;