Lines Matching defs:gDeviceInfo

139 static DeviceInfo gDeviceInfo;
140 static char *gDeviceNames[2] = { gDeviceInfo.name, NULL };
187 while (gPCI->get_nth_pci_info(pciIndex, &gDeviceInfo.pciInfo) == B_OK)
189 if (gDeviceInfo.pciInfo.vendor_id == VENDOR_ID && gDeviceInfo.pciInfo.device_id == DEVICE_ID)
191 sprintf(gDeviceInfo.name, "graphics/" DEVICE_FORMAT,
192 gDeviceInfo.pciInfo.vendor_id, gDeviceInfo.pciInfo.device_id,
193 gDeviceInfo.pciInfo.bus, gDeviceInfo.pciInfo.device, gDeviceInfo.pciInfo.function);
194 TRACE("found device %s\n", gDeviceInfo.name);
197 gDeviceInfo.openCount = 0;
200 gDeviceInfo.sharedArea = create_area("vboxvideo shared info",
201 (void **)&gDeviceInfo.sharedInfo, B_ANY_KERNEL_ADDRESS,
208 gDeviceInfo.sharedInfo->currentMode.space = get_color_space_for_depth(bpp);
209 gDeviceInfo.sharedInfo->currentMode.virtual_width = width;
210 gDeviceInfo.sharedInfo->currentMode.virtual_height = height;
211 gDeviceInfo.sharedInfo->currentMode.h_display_start = 0;
212 gDeviceInfo.sharedInfo->currentMode.v_display_start = 0;
213 gDeviceInfo.sharedInfo->currentMode.flags = 0;
214 gDeviceInfo.sharedInfo->currentMode.timing.h_display = width;
215 gDeviceInfo.sharedInfo->currentMode.timing.v_display = height;
217 gDeviceInfo.sharedInfo->currentMode.timing.h_total = 1000;
218 gDeviceInfo.sharedInfo->currentMode.timing.v_total = 1;
219 gDeviceInfo.sharedInfo->currentMode.timing.pixel_clock = 850;
222 uint32 command_reg = gPCI->read_pci_config(gDeviceInfo.pciInfo.bus,
223 gDeviceInfo.pciInfo.device, gDeviceInfo.pciInfo.function, PCI_command, 2);
225 gPCI->write_pci_config(gDeviceInfo.pciInfo.bus, gDeviceInfo.pciInfo.device,
226 gDeviceInfo.pciInfo.function, PCI_command, 2, command_reg);
228 gDeviceInfo.sharedInfo->framebufferArea = map_physical_memory("vboxvideo framebuffer",
229 (phys_addr_t)gDeviceInfo.pciInfo.u.h0.base_registers[0],
230 gDeviceInfo.pciInfo.u.h0.base_register_sizes[0], B_ANY_KERNEL_BLOCK_ADDRESS,
231 B_READ_AREA | B_WRITE_AREA, &(gDeviceInfo.sharedInfo->framebuffer));
232 vm_set_area_memory_type(gDeviceInfo.sharedInfo->framebufferArea,
233 (phys_addr_t)gDeviceInfo.pciInfo.u.h0.base_registers[0], B_MTR_WC);
256 if (gCanHasDevice && strcmp(name, gDeviceInfo.name) == 0)
274 if (!gCanHasDevice || strcmp(name, gDeviceInfo.name) != 0)
279 *cookie = (void *)&gDeviceInfo;
352 if (user_strlcpy((char *)buf, gDeviceInfo.name, len) < B_OK)
362 gDeviceInfo.sharedInfo->currentMode = *mode;