Now also implements B_GET_PREFERRED_DISPLAY_MODE for panels that don't use
EDID (like obviously on my laptop). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22588 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b62085b975
commit
b24bb37c3b
@ -61,6 +61,8 @@ initialization process.
|
||||
HOOK(SET_INDEXED_COLORS);
|
||||
//HOOK(GET_TIMING_CONSTRAINTS);
|
||||
#ifdef __HAIKU__
|
||||
case B_GET_PREFERRED_DISPLAY_MODE:
|
||||
return (void*)radeon_get_preferred_display_mode;
|
||||
case B_GET_EDID_INFO:
|
||||
return (void*)radeon_get_edid_info;
|
||||
#endif
|
||||
|
@ -65,6 +65,37 @@ GET_PIXEL_CLOCK_LIMITS(display_mode *dm, uint32 *low, uint32 *high)
|
||||
|
||||
#ifdef __HAIKU__
|
||||
|
||||
status_t
|
||||
radeon_get_preferred_display_mode(display_mode* mode)
|
||||
{
|
||||
fp_info *fpInfo = &ai->si->flatpanels[0];
|
||||
disp_entity* routes = &ai->si->routing;
|
||||
uint32 i;
|
||||
|
||||
if (routes->port_info[0].edid_valid || routes->port_info[1].edid_valid) {
|
||||
// prefer EDID data in this case
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
if ((ai->vc->connected_displays & (dd_dvi | dd_dvi_ext | dd_lvds)) == 0)
|
||||
return B_NOT_SUPPORTED;
|
||||
|
||||
// Mode has already been added by addFPMode(), just return it
|
||||
|
||||
for (i = 0; i < ai->si->mode_count; ++i) {
|
||||
if (ai->mode_list[i].timing.h_display == fpInfo->panel_xres
|
||||
&& ai->mode_list[i].timing.v_display == fpInfo->panel_yres
|
||||
&& ai->mode_list[i].virtual_width == fpInfo->panel_xres
|
||||
&& ai->mode_list[i].virtual_height == fpInfo->panel_yres) {
|
||||
memcpy(mode, &ai->mode_list[i], sizeof(display_mode));
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
radeon_get_edid_info(void* info, size_t size, uint32* _version)
|
||||
{
|
||||
|
@ -27,6 +27,7 @@ status_t GET_PIXEL_CLOCK_LIMITS(display_mode *dm, uint32 *low, uint32 *high);
|
||||
status_t MOVE_DISPLAY(uint16 h_display_start, uint16 v_display_start);
|
||||
status_t GET_TIMING_CONSTRAINTS(display_timing_constraints *dtc);
|
||||
void SET_INDEXED_COLORS(uint count, uint8 first, uint8 *color_data, uint32 flags);
|
||||
status_t radeon_get_preferred_display_mode(display_mode *mode);
|
||||
status_t radeon_get_edid_info(void* info, size_t size, uint32* _version);
|
||||
|
||||
uint32 DPMS_CAPABILITIES(void);
|
||||
|
Loading…
Reference in New Issue
Block a user