Lines Matching refs:pI830

61  * (pI830->pEnt->videoRam != 0), in which case allocations have to fit within
111 i830_get_fence_size(I830Ptr pI830, unsigned long size)
116 if (IS_I965G(pI830)) {
123 if (IS_I9XX(pI830))
140 i830_get_fence_pitch(I830Ptr pI830, unsigned long pitch, int format)
149 if (IS_I965G(pI830))
164 i830_get_fence_alignment(I830Ptr pI830, unsigned long size)
166 if (IS_I965G(pI830))
169 return i830_get_fence_size(pI830, size);
175 I830Ptr pI830 = I830PTR(pScrn);
180 if ((IS_845G(pI830) || IS_I85X(pI830)) && tiling)
183 if (IS_I915(pI830) && tiling)
186 if (IS_I965G(pI830) && tiling)
198 I830Ptr pI830 = I830PTR(pScrn);
200 if (mem == NULL || mem->bound || pI830->use_drm_mode)
203 if (pI830->have_gem && mem->bo != NULL) {
216 if (!pI830->gtt_acquired)
228 if (mem->tiling != TILE_NONE && !pI830->kernel_exec_fencing) {
239 I830Ptr pI830 = I830PTR(pScrn);
244 if (mem->tiling != TILE_NONE && !pI830->use_drm_mode &&
245 !pI830->kernel_exec_fencing)
248 if (mem->bo != NULL && !pI830->use_drm_mode) {
278 I830Ptr pI830 = I830PTR(pScrn);
280 if (pI830->bo_list == mem) {
281 pI830->bo_list = mem->next;
315 I830Ptr pI830 = I830PTR(pScrn);
319 while (pI830->memory_list->next->next != NULL) {
320 i830_memory *mem = pI830->memory_list->next;
323 if (pI830->memory_manager == mem) {
333 while (pI830->bo_list != NULL)
334 i830_free_memory(pScrn, pI830->bo_list);
339 pI830->cursor_mem = NULL;
341 pI830->cursor_mem_classic[p] = NULL;
342 pI830->cursor_mem_argb[p] = NULL;
344 pI830->front_buffer = NULL;
345 pI830->overlay_regs = NULL;
346 pI830->power_context = NULL;
347 pI830->ring.mem = NULL;
348 pI830->fake_bufmgr_mem = NULL;
363 I830Ptr pI830 = I830PTR(pScrn);
400 pI830->memory_list = start;
409 if (!pI830->use_drm_mode) {
420 if (!OVERLAY_NOPHYSICAL(pI830) && !OVERLAY_NOEXIST(pI830)) {
423 if (pI830->CursorNeedsPhysical) {
427 if (pI830->fb_compression)
431 mmsize -= pI830->stolen_size;
434 pI830->memory_manager =
440 if (pI830->memory_manager != NULL) {
447 ret = drmCommandWrite(pI830->drmSubFD, DRM_I915_SETPARAM,
450 pI830->kernel_exec_fencing = TRUE;
451 init.gtt_start = pI830->memory_manager->offset;
452 init.gtt_end = pI830->memory_manager->offset + pI830->memory_manager->size;
455 ret = ioctl(pI830->drmSubFD, DRM_IOCTL_I915_GEM_INIT, &init);
457 pI830->have_gem = TRUE;
462 i830_free_memory(pScrn, pI830->memory_manager);
463 pI830->memory_manager = NULL;
477 I830Ptr pI830 = I830PTR(pScrn);
483 if (pI830->memory_manager) {
484 i830_free_memory(pScrn, pI830->memory_manager);
485 pI830->memory_manager = NULL;
489 free(pI830->memory_list->next);
490 free(pI830->memory_list);
491 pI830->memory_list = NULL;
504 I830Ptr pI830 = I830PTR(pScrn);
508 if (pI830->GTTBase == NULL)
514 if (!IS_I9XX(pI830) || IS_I915G(pI830) || IS_I915GM(pI830) ||
515 IS_I945G(pI830) || IS_I945GM(pI830))
546 I830Ptr pI830 = I830PTR(pScrn);
551 if (offset + size >= pI830->stolen_size)
587 I830Ptr pI830 = I830PTR(pScrn);
614 for (scan = pI830->memory_list; scan->next != NULL; scan = scan->next) {
616 if ((flags & NEED_PHYSICAL_ADDR) && mem->offset < pI830->stolen_size) {
631 mem->offset = ROUND_TO(pI830->stolen_size, alignment);
634 if ((flags & NEED_NON_STOLEN) && mem->offset < pI830->stolen_size) {
635 mem->offset = ROUND_TO(pI830->stolen_size, alignment);
668 I830Ptr pI830 = I830PTR(pScrn);
674 if (mem->offset + mem->size <= pI830->stolen_size)
677 if (mem->offset < pI830->stolen_size)
678 mem->agp_offset = pI830->stolen_size;
707 I830Ptr pI830 = I830PTR(pScrn);
716 align = i830_get_fence_alignment(pI830, size);
728 mem->bo = dri_bo_alloc (pI830->bufmgr, name, size, align);
770 if (pScrn->vtSema || pI830->use_drm_mode) {
784 mem->next = pI830->bo_list;
785 if (pI830->bo_list != NULL)
786 pI830->bo_list->prev = mem;
787 pI830->bo_list = mem;
817 I830Ptr pI830 = I830PTR(pScrn);
825 if (IS_I9XX(pI830)) {
834 size = i830_get_fence_size(pI830, size);
835 alignment = i830_get_fence_alignment(pI830, size);
843 if (pI830->have_gem &&
844 (pI830->use_drm_mode ||
871 I830Ptr pI830 = I830PTR(pScrn);
874 if (pI830->memory_list == NULL) {
880 if (pI830->memory_list->next->next == NULL) {
889 for (mem = pI830->memory_list->next; mem->next != NULL; mem = mem->next) {
893 if (mem->offset >= pI830->stolen_size &&
894 mem->prev->offset < pI830->stolen_size)
898 prefix, pI830->stolen_size);
916 prefix, pI830->FbMapSize);
920 if (pI830->memory_manager) {
923 prefix, pI830->memory_manager->offset);
925 for (mem = pI830->bo_list; mem != NULL; mem = mem->next) {
944 if (pI830->memory_manager) {
947 prefix, pI830->memory_manager->end);
954 I830Ptr pI830 = I830PTR(pScrn);
956 if (pI830->have_gem || pI830->ring.mem != NULL)
962 pI830->ring.mem = i830_allocate_memory(pScrn, "ring buffer",
966 if (pI830->ring.mem == NULL) {
972 pI830->ring.tail_mask = pI830->ring.mem->size - 1;
973 pI830->ring.virtual_start = pI830->FbBase + pI830->ring.mem->offset;
983 I830Ptr pI830 = I830PTR(pScrn);
987 if (!pI830->XvEnabled)
990 if (OVERLAY_NOEXIST(pI830))
993 if (!OVERLAY_NOPHYSICAL(pI830)) {
994 if (pI830->use_drm_mode)
999 pI830->overlay_regs = i830_allocate_memory(pScrn, "overlay registers",
1002 if (pI830->overlay_regs == NULL) {
1009 if (pI830->use_drm_mode)
1018 I830Ptr pI830 = I830PTR(pScrn);
1020 if (IS_I965G(pI830)) {
1034 if (IS_I945G(pI830) || IS_I945GM(pI830) || IS_G33CLASS(pI830))
1058 I830Ptr pI830 = I830PTR(pScrn);
1059 unsigned int pitch = pScrn->displayWidth * pI830->cpp;
1082 if (pI830->tiling)
1097 if (IS_I9XX(pI830))
1113 if (pI830->FbBase && front_buffer->bound)
1114 memset (pI830->FbBase + front_buffer->offset, 0, size);
1124 I830Ptr pI830 = I830PTR(pScrn);
1130 if (pI830->use_drm_mode)
1131 pI830->CursorNeedsPhysical = FALSE;
1133 flags = pI830->CursorNeedsPhysical ? NEED_PHYSICAL_ADDR : 0;
1137 if (!pI830->use_drm_mode) {
1145 pI830->cursor_mem = i830_allocate_memory(pScrn, "HW cursors",
1148 if (pI830->cursor_mem != NULL)
1159 if (!pI830->use_drm_mode) {
1160 pI830->cursor_mem_classic[i] = i830_allocate_memory (pScrn,
1167 if (!pI830->cursor_mem_classic[i])
1170 pI830->cursor_mem_argb[i] = i830_allocate_memory (pScrn, "ARGB cursor",
1176 if (!pI830->cursor_mem_argb[i])
1185 I830Ptr pI830 = I830PTR(pScrn);
1195 if (!IS_MOBILE(pI830)) {
1196 pI830->fb_compression = FALSE;
1200 if (IS_GM45(pI830)) {
1218 pI830->compressed_front_buffer =
1224 if (!pI830->compressed_front_buffer) {
1225 pI830->fb_compression = FALSE;
1229 if (!IS_GM45(pI830)) {
1230 pI830->compressed_ll_buffer =
1236 if (!pI830->compressed_ll_buffer) {
1237 i830_free_memory(pScrn, pI830->compressed_front_buffer);
1238 pI830->fb_compression = FALSE;
1244 if (!pI830->fb_compression)
1257 I830Ptr pI830 = I830PTR(pScrn);
1259 if (!pI830->use_drm_mode) {
1274 if (pI830->fb_compression)
1284 if (!pI830->have_gem) {
1285 pI830->fake_bufmgr_mem = i830_allocate_memory(pScrn, "fake bufmgr",
1288 if (pI830->fake_bufmgr_mem == NULL) {
1296 if (!pI830->use_drm_mode)
1299 pI830->front_buffer = i830_allocate_framebuffer(pScrn);
1300 if (pI830->front_buffer == NULL)
1309 I830Ptr pI830 = I830PTR(pScrn);
1311 if (pI830->use_drm_mode)
1314 pI830->power_context = i830_allocate_memory(pScrn, "power context",
1319 if (!pI830->power_context) {
1339 I830Ptr pI830 = I830PTR(pScrn);
1353 if (IS_I965G(pI830))
1359 if (!pI830->fence_used[fence_nr])
1365 pI830->fence_used[fence_nr] = TRUE;
1367 if (IS_I965G(pI830)) {
1392 if (IS_I9XX(pI830))
1400 fence_nr, offset, (IS_I9XX(pI830)) ? "1MB" : "512k");
1428 if (IS_I9XX(pI830)) {
1487 if ((IS_I945G(pI830) || IS_I945GM(pI830) || IS_G33CLASS(pI830)) &&
1490 else if (IS_I9XX(pI830))
1531 I830Ptr pI830 = I830PTR(pScrn);
1533 if (IS_I965G(pI830)) {
1539 pI830->fence_used[fence_nr] = FALSE;
1546 * pI830 points to the same allocation list, but the bind_memory will just
1552 I830Ptr pI830 = I830PTR(pScrn);
1554 if (pI830->memory_list == NULL)
1557 if (pI830->use_drm_mode || (xf86AgpGARTSupported() &&
1558 !pI830->gtt_acquired)) {
1561 if (!pI830->use_drm_mode) {
1564 pI830->gtt_acquired = TRUE;
1567 for (mem = pI830->memory_list->next; mem->next != NULL;
1575 for (mem = pI830->bo_list; mem != NULL; mem = mem->next) {
1582 if (pI830->use_drm_mode) {
1586 drmmode_crtc_set_cursor_bo(xf86_config->crtc[i], pI830->cursor_mem_argb[i]->bo);
1591 if (pI830->front_buffer)
1592 pScrn->fbOffset = pI830->front_buffer->offset;
1601 I830Ptr pI830 = I830PTR(pScrn);
1603 if (pI830->use_drm_mode || (xf86AgpGARTSupported() &&
1604 pI830->gtt_acquired)) {
1607 for (mem = pI830->memory_list->next; mem->next != NULL;
1612 for (mem = pI830->bo_list; mem != NULL; mem = mem->next) {
1620 if (!pI830->use_drm_mode) {
1621 pI830->gtt_acquired = FALSE;
1662 I830Ptr pI830 = I830PTR(pScrn);
1673 if (pI830->use_drm_mode && (*buffer)->bo) {
1690 I830Ptr pI830 = I830PTR(pScrn);
1692 if (pI830->use_drm_mode && buffer->bo)
1703 I830Ptr pI830 = I830PTR(pScrn);
1708 pI830->max_gtt_map_size = 16 * 1024 * 1024;
1710 if (!pI830->have_gem)
1713 ret = ioctl(pI830->drmSubFD, DRM_IOCTL_I915_GEM_GET_APERTURE, &aperture);
1719 pI830->max_gtt_map_size = aperture.aper_available_size * 3 / 4 / 2;