summaryrefslogtreecommitdiff
path: root/shared-core/savage_bci.c
AgeCommit message (Expand)Author
2007-11-22drm: major whitespace/coding style realignment with kernelDave Airlie
2007-11-05drm: remove lots of spurious whitespace.Dave Airlie
2007-07-20Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.Eric Anholt
2007-07-20Replace filp in ioctl arguments with drm_file *file_priv.Eric Anholt
2007-07-20Remove DRM_ERR OS macro.Eric Anholt
2007-07-16drm: remove drm_buf_tDave Airlie
2007-07-16drm: remove drmP.h internal typedefsDave Airlie
2007-07-16drm: detypedef drm.h and fixup all problemsDave Airlie
2007-04-28remove DRM_GETSAREA and replace with drm_getsarea functionDave Airlie
2006-12-19make a savage function static from kernelDave Airlie
2006-10-16dev->agp_buffer_map is not initialized for AGP DMA on savagesMichael Karcher
2006-04-09Revert a change that accidentally went in with whitespace changes fromEric Anholt
2006-01-02whitespace cleanup/aligment with kernelDave Airlie
2005-11-08Initial port of savage to FreeBSD for the AGP and !ShadowStatus case. AddsEric Anholt
2005-09-03convert ioctl flags to use flags instead of separate intsDave Airlie
2005-08-09Make sure savage has 3rd ioctl parameterJon Smirl
2005-08-07make some functions static in the savage drm driverDave Airlie
2005-08-05Rename the driver hooks in the DRM to something a little moreEric Anholt
2005-06-28- Remove drm_initmap and replace its usage with drm_addmap. This reducesEric Anholt
2005-06-21Change initialization of savage register access to _DRM_READ_ONLY. Flags ofJon Smirl
2005-06-04Remove warnings about code mixed with declerations..Dave Airlie
2005-03-13Command DMA optimizations:Felix Kuehling
2005-03-07Tracked down random lockups related to command DMA that occurred in Quake3Felix Kuehling
2005-03-06Added support for command DMA on Savage4-based hardware. UnfortunatelyFelix Kuehling
2005-02-23Use wrap counter to extend 16-bit hardware event tags to 32-bit logicalFelix Kuehling
2005-02-05- Implement drm_initmap, and extend it with the resource number to helpEric Anholt
2005-01-15Setup MTRRs for frame buffer and aperture manually on Savage3D andFelix Kuehling
2005-01-10Only try to find the agp_buffer_map if dma_type is AGP. This is all that'sFelix Kuehling
2005-01-08Fixed off-by-one error in savage_bci_wait_fifo_shadow.Felix Kuehling
2005-01-053D scissor regs are now managed by the DRM to iterate over clip rectsFelix Kuehling
2005-01-01Completeley rewritten Savage DRM which can be considered secure (moduloFelix Kuehling
/span>r->flags & NOUVEAU_GEM_RELOC_OR) { if (pbbo->presumed.domain & NOUVEAU_GEM_DOMAIN_VRAM) push |= r->vor; else push |= r->tor; } return push; } int nouveau_reloc_emit(struct nouveau_channel *chan, struct nouveau_bo *reloc_bo, uint32_t reloc_offset, uint32_t *reloc_ptr, struct nouveau_bo *bo, uint32_t data, uint32_t data2, uint32_t flags, uint32_t vor, uint32_t tor) { struct nouveau_pushbuf_priv *nvpb = &nouveau_channel(chan)->pb; struct nouveau_bo_priv *nvbo = nouveau_bo(bo); struct drm_nouveau_gem_pushbuf_reloc *r; struct drm_nouveau_gem_pushbuf_bo *pbbo, *rpbbo; uint32_t domains = 0; if (nvpb->nr_relocs >= NOUVEAU_GEM_MAX_RELOCS) { fprintf(stderr, "too many relocs!!\n"); return -ENOMEM; } if (nvbo->user && (flags & NOUVEAU_BO_WR)) { fprintf(stderr, "write to user buffer!!\n"); return -EINVAL; } /* We're about to reloc a user buffer, better make sure we don't cause * a double migration. */ if (!(nvbo->flags & (NOUVEAU_BO_GART | NOUVEAU_BO_VRAM))) nvbo->flags |= (flags & (NOUVEAU_BO_GART | NOUVEAU_BO_VRAM)); /* add buffer to validation list */ pbbo = nouveau_bo_emit_buffer(chan, bo); if (!pbbo) { fprintf(stderr, "buffer emit fail :(\n"); return -ENOMEM; } nouveau_bo(bo)->pending_refcnt++; if (flags & (NOUVEAU_BO_VRAM | NOUVEAU_BO_GART)) { if (flags & NOUVEAU_BO_VRAM) domains |= NOUVEAU_GEM_DOMAIN_VRAM; if (flags & NOUVEAU_BO_GART) domains |= NOUVEAU_GEM_DOMAIN_GART; } else domains |= nvbo->domain; if (!(pbbo->valid_domains & domains)) { fprintf(stderr, "no valid domains remain!\n"); return -EINVAL; } pbbo->valid_domains &= domains; assert(flags & NOUVEAU_BO_RDWR); if (flags & NOUVEAU_BO_RD) { pbbo->read_domains |= domains; } if (flags & NOUVEAU_BO_WR) { pbbo->write_domains |= domains; nvbo->write_marker = 1; } /* nvc0 gallium driver uses reloc_emit() with NULL target buffer * to inform bufmgr of a buffer's use - however, we need something * to track, so create a reloc for now, and hope it never triggers * (it shouldn't, constant virtual address..).. */ if (!reloc_bo) { reloc_bo = nvpb->buffer[nvpb->current]; reloc_offset = 0; reloc_ptr = NULL; } /* add reloc target bo to validation list, and create the reloc */ rpbbo = nouveau_bo_emit_buffer(chan, reloc_bo); if (!rpbbo) return -ENOMEM; nouveau_bo(reloc_bo)->pending_refcnt++; r = nvpb->relocs + nvpb->nr_relocs++; r->reloc_bo_index = rpbbo - nvpb->buffers; r->reloc_bo_offset = reloc_offset; r->bo_index = pbbo - nvpb->buffers; r->flags = 0; if (flags & NOUVEAU_BO_LOW) r->flags |= NOUVEAU_GEM_RELOC_LOW; if (flags & NOUVEAU_BO_HIGH) r->flags |= NOUVEAU_GEM_RELOC_HIGH; if (flags & NOUVEAU_BO_OR) r->flags |= NOUVEAU_GEM_RELOC_OR; r->data = data; r->vor = vor; r->tor = tor; if (reloc_ptr) { if (flags & NOUVEAU_BO_DUMMY) *reloc_ptr = 0; else *reloc_ptr = nouveau_reloc_calc(pbbo, r); } return 0; }