mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-25 06:00:11 +01:00
Call preallocated space VRAM instead of PRIV0 to be more consistent with
other drivers.
This commit is contained in:
parent
a4929b921e
commit
e918d2b781
4 changed files with 11 additions and 8 deletions
|
|
@ -86,7 +86,7 @@ int i915_init_mem_type(drm_device_t * dev, uint32_t type,
|
|||
_DRM_FLAG_MEMTYPE_CSELECT | _DRM_FLAG_NEEDS_IOREMAP;
|
||||
man->drm_bus_maptype = _DRM_AGP;
|
||||
break;
|
||||
case DRM_BO_MEM_PRIV0:
|
||||
case DRM_BO_MEM_VRAM:
|
||||
if (!(drm_core_has_AGP(dev) && dev->agp)) {
|
||||
DRM_ERROR("AGP is not enabled for memory type %u\n",
|
||||
(unsigned)type);
|
||||
|
|
@ -99,6 +99,9 @@ int i915_init_mem_type(drm_device_t * dev, uint32_t type,
|
|||
_DRM_FLAG_MEMTYPE_FIXED | _DRM_FLAG_NEEDS_IOREMAP;
|
||||
man->drm_bus_maptype = _DRM_AGP;
|
||||
break;
|
||||
case DRM_BO_MEM_PRIV0: /* for OS preallocated space */
|
||||
DRM_ERROR("PRIV0 not used yet.\n");
|
||||
break;
|
||||
default:
|
||||
DRM_ERROR("Unsupported memory type %u\n", (unsigned)type);
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ static drm_fence_driver_t i915_fence_driver = {
|
|||
#endif
|
||||
#ifdef I915_HAVE_BUFFER
|
||||
|
||||
static uint32_t i915_mem_prios[] = {DRM_BO_MEM_PRIV0, DRM_BO_MEM_TT, DRM_BO_MEM_LOCAL};
|
||||
static uint32_t i915_busy_prios[] = {DRM_BO_MEM_TT, DRM_BO_MEM_PRIV0, DRM_BO_MEM_LOCAL};
|
||||
static uint32_t i915_mem_prios[] = {DRM_BO_MEM_VRAM, DRM_BO_MEM_PRIV0, DRM_BO_MEM_TT, DRM_BO_MEM_LOCAL};
|
||||
static uint32_t i915_busy_prios[] = {DRM_BO_MEM_TT, DRM_BO_MEM_PRIV0, DRM_BO_MEM_VRAM, DRM_BO_MEM_LOCAL};
|
||||
|
||||
static drm_bo_driver_t i915_bo_driver = {
|
||||
.mem_type_prio = i915_mem_prios,
|
||||
|
|
|
|||
|
|
@ -473,7 +473,7 @@ int intelfb_probe(struct drm_device *dev, struct drm_crtc *crtc)
|
|||
drm_bo_type_kernel,
|
||||
DRM_BO_FLAG_READ |
|
||||
DRM_BO_FLAG_WRITE |
|
||||
DRM_BO_FLAG_MEM_PRIV0 | /* FIXME! */
|
||||
DRM_BO_FLAG_MEM_VRAM | /* FIXME! */
|
||||
DRM_BO_FLAG_NO_MOVE,
|
||||
0, 0, 0,
|
||||
&fbo);
|
||||
|
|
|
|||
|
|
@ -175,8 +175,8 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags)
|
|||
drm_bo_driver_init(dev);
|
||||
|
||||
i915_probe_agp(dev->pdev, &agp_size, &prealloc_size);
|
||||
DRM_DEBUG("setting up %ld bytes of PRIV0 space\n", prealloc_size);
|
||||
drm_bo_init_mm(dev, DRM_BO_MEM_PRIV0, 0, prealloc_size >> PAGE_SHIFT);
|
||||
DRM_DEBUG("setting up %ld bytes of VRAM space\n", prealloc_size);
|
||||
drm_bo_init_mm(dev, DRM_BO_MEM_VRAM, 0, prealloc_size >> PAGE_SHIFT);
|
||||
|
||||
I915_WRITE(LP_RING + RING_LEN, 0);
|
||||
I915_WRITE(LP_RING + RING_HEAD, 0);
|
||||
|
|
@ -185,7 +185,7 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags)
|
|||
size = PRIMARY_RINGBUFFER_SIZE;
|
||||
ret = drm_buffer_object_create(dev, size, drm_bo_type_kernel,
|
||||
DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE |
|
||||
DRM_BO_FLAG_MEM_PRIV0 |
|
||||
DRM_BO_FLAG_MEM_VRAM |
|
||||
DRM_BO_FLAG_NO_EVICT,
|
||||
DRM_BO_HINT_DONT_FENCE, 0x1, 0,
|
||||
&dev_priv->ring_buffer);
|
||||
|
|
@ -277,7 +277,7 @@ int i915_driver_unload(drm_device_t *dev)
|
|||
drm_bo_usage_deref_locked(dev_priv->ring_buffer);
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
|
||||
if (drm_bo_clean_mm(dev, DRM_BO_MEM_PRIV0)) {
|
||||
if (drm_bo_clean_mm(dev, DRM_BO_MEM_VRAM)) {
|
||||
DRM_ERROR("Memory manager type 3 not clean. "
|
||||
"Delaying takedown\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue