* Added i830 as supported chipset - doesn't work perfectly, though. But Kyan reports

that at least 8 bit modes seems to work (but overlay only partially)
* Added "hardware_cursor" option to the settings file - when set to "false", you should
  have a cursor in the second output now as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17498 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-05-17 17:30:23 +00:00
parent b0cdd6481d
commit 7902c46c3e
4 changed files with 31 additions and 16 deletions

View File

@ -53,7 +53,6 @@ struct ring_buffer {
struct overlay_registers;
struct intel_shared_info {
int32 type;
area_id mode_list_area; // area containing display mode list
uint32 mode_count;
@ -83,6 +82,7 @@ struct intel_shared_info {
uint32 overlay_token;
uint8* physical_overlay_registers;
bool hardware_cursor_enabled;
sem_id vblank_sem;
uint32 cursor_buffer_offset;

View File

@ -137,7 +137,9 @@ init_common(int device, bool isClone)
gInfo->overlay_registers = (struct overlay_registers *)((uint8 *)gInfo->shared_info
+ ROUND_TO_PAGE_SIZE(sizeof(intel_shared_info)));
gInfo->status = (hardware_status *)((uint8 *)gInfo->overlay_registers + B_PAGE_SIZE);
gInfo->cursor_memory = (uint8 *)gInfo->overlay_registers + 2 * B_PAGE_SIZE;
if (gInfo->shared_info->hardware_cursor_enabled)
gInfo->cursor_memory = (uint8 *)gInfo->overlay_registers + 2 * B_PAGE_SIZE;
return B_OK;
}

View File

@ -36,6 +36,8 @@ const struct supported_device {
int32 type;
const char *name;
} kSupportedDevices[] = {
{0x3577, INTEL_TYPE_8xx | INTEL_TYPE_83x, "i830GM"},
{0x2572, INTEL_TYPE_8xx | INTEL_TYPE_85x, "i865G"},
{0x3582, INTEL_TYPE_8xx | INTEL_TYPE_85x, "i855G"},
};

View File

@ -92,10 +92,11 @@ init_overlay_registers(overlay_registers *registers)
}
static size_t
determine_desired_memory_size()
static void
read_settings(size_t &memorySize, bool &hardwareCursor)
{
size_t size = 8; // 8 MB
hardwareCursor = true;
void *settings = load_driver_settings("intel_extreme");
if (settings != NULL) {
@ -104,6 +105,9 @@ determine_desired_memory_size()
if (string != NULL)
specified = atoi(string);
hardwareCursor = get_driver_boolean_parameter(settings, "hardware_cursor",
true, true);
unload_driver_settings(settings);
if (specified != 0) {
@ -118,7 +122,7 @@ determine_desired_memory_size()
}
}
return size << 20;
memorySize = size << 20;
}
@ -287,12 +291,16 @@ intel_extreme_init(intel_info &info)
memset((void *)info.shared_info, 0, sizeof(intel_shared_info));
// evaluate driver settings, if any
bool hardwareCursor;
size_t totalSize;
read_settings(totalSize, hardwareCursor);
// Determine the amount of "stolen" (ie. reserved by the BIOS) graphics memory
// and see if we need to allocate some more.
// TODO: make it allocate the memory on demand!
size_t totalSize = determine_desired_memory_size();
size_t stolenSize = determine_stolen_memory_size(info);
totalSize = max_c(totalSize, stolenSize);
@ -438,15 +446,18 @@ intel_extreme_init(intel_info &info)
// We also need to map the cursor memory into the GTT
// This could also be part of the usual graphics memory, but since we
// need to make sure it's not in the graphics local memory (and I don't
// even know yet how to determine that a chip has local memory...), we
// keep the current strategy and put it into the shared area.
// Unfortunately, the GTT is not readable until it has been written into
// the double buffered register set; we cannot get its original contents.
set_gtt_entry(info, totalSize, info.shared_info->physical_cursor_memory);
info.shared_info->cursor_buffer_offset = totalSize;
info.shared_info->hardware_cursor_enabled = hardwareCursor;
if (hardwareCursor) {
// This could also be part of the usual graphics memory, but since we
// need to make sure it's not in the graphics local memory (and I don't
// even know yet how to determine that a chip has local memory...), we
// keep the current strategy and put it into the shared area.
// Unfortunately, the GTT is not readable until it has been written into
// the double buffered register set; we cannot get its original contents.
set_gtt_entry(info, totalSize, info.shared_info->physical_cursor_memory);
info.shared_info->cursor_buffer_offset = totalSize;
}
init_interrupt_handler(info);