intel_extreme: don't expose overlay in accelerant when not allocated

... in the driver.
This commit is contained in:
Jerome Duval
2013-09-16 15:07:58 +02:00
parent 1410faca6c
commit e968e4b090
2 changed files with 9 additions and 4 deletions
@@ -141,9 +141,11 @@ init_common(int device, bool isClone)
// The overlay registers, hardware status, and cursor memory share // The overlay registers, hardware status, and cursor memory share
// a single area with the shared_info // a single area with the shared_info
gInfo->overlay_registers = (struct overlay_registers*) if (gInfo->shared_info->overlay_offset != 0) {
(gInfo->shared_info->graphics_memory gInfo->overlay_registers = (struct overlay_registers*)
+ gInfo->shared_info->overlay_offset); (gInfo->shared_info->graphics_memory
+ gInfo->shared_info->overlay_offset);
}
if (gInfo->shared_info->device_type.InGroup(INTEL_TYPE_96x)) { if (gInfo->shared_info->device_type.InGroup(INTEL_TYPE_96x)) {
// allocate some extra memory for the 3D context // allocate some extra memory for the 3D context
@@ -431,7 +431,10 @@ retrieve_current_mode(display_mode& mode, uint32 pllRegister)
mode.h_display_start = 0; mode.h_display_start = 0;
mode.v_display_start = 0; mode.v_display_start = 0;
mode.flags = B_8_BIT_DAC | B_HARDWARE_CURSOR | B_PARALLEL_ACCESS mode.flags = B_8_BIT_DAC | B_HARDWARE_CURSOR | B_PARALLEL_ACCESS
| B_DPMS | B_SUPPORTS_OVERLAYS; | B_DPMS;
if (gInfo->overlay_registers != NULL) {
mode.flags |= B_SUPPORTS_OVERLAYS;
}
} }