intel_extreme: implement get_preferred_mode for vbt on mobile
this avoids searching in edid information in this case. Change-Id: I330341f089f71cd5de657a6630b5414d02db771f Reviewed-on: https://review.haiku-os.org/c/haiku/+/4749 Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
parent
7a52a73261
commit
befbf01515
@ -33,6 +33,7 @@ uint32 intel_accelerant_mode_count(void);
|
||||
status_t intel_get_mode_list(display_mode* dm);
|
||||
status_t intel_propose_display_mode(display_mode* target,
|
||||
const display_mode* low, const display_mode* high);
|
||||
status_t intel_get_preferred_mode(display_mode* preferredMode);
|
||||
status_t intel_set_display_mode(display_mode* mode);
|
||||
status_t intel_get_display_mode(display_mode* currentMode);
|
||||
status_t intel_get_edid_info(void* info, size_t size, uint32* _version);
|
||||
|
@ -38,6 +38,8 @@ get_accelerant_hook(uint32 feature, void* data)
|
||||
return (void*)intel_get_mode_list;
|
||||
case B_PROPOSE_DISPLAY_MODE:
|
||||
return (void*)intel_propose_display_mode;
|
||||
case B_GET_PREFERRED_DISPLAY_MODE:
|
||||
return (void*)intel_get_preferred_mode;
|
||||
case B_SET_DISPLAY_MODE:
|
||||
return (void*)intel_set_display_mode;
|
||||
case B_GET_DISPLAY_MODE:
|
||||
|
@ -526,6 +526,29 @@ intel_get_display_mode(display_mode* _currentMode)
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
intel_get_preferred_mode(display_mode* preferredMode)
|
||||
{
|
||||
TRACE("%s\n", __func__);
|
||||
display_mode mode;
|
||||
|
||||
if (gInfo->has_edid || !gInfo->shared_info->got_vbt
|
||||
|| !gInfo->shared_info->device_type.IsMobile()) {
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
mode.timing = gInfo->shared_info->panel_timing;
|
||||
mode.space = B_RGB32;
|
||||
mode.virtual_width = mode.timing.h_display;
|
||||
mode.virtual_height = mode.timing.v_display;
|
||||
mode.h_display_start = 0;
|
||||
mode.v_display_start = 0;
|
||||
mode.flags = 0;
|
||||
memcpy(preferredMode, &mode, sizeof(mode));
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
intel_get_edid_info(void* info, size_t size, uint32* _version)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user