Hi Thomas,

I am in a situation where i need to allocate vram for the gart table ie 
i can't (in fact i can
if i avoid using the memory manager and don't let the manager handle 
this part of stolen
vram but i prefer to go throught the allocator if possible) initialize 
ttm until i allocated this
vram. I have been looking through call chains in drm_ttm.c and drm_bo.c 
and it seems to
me that drm_ttm_init might not be call until ttm is firstly used so i 
think i am fine but as
i might have miss some calls i would like your expert stance on this :)

So does this looks good for initialization:
drm_bo_driver_init(dev);
drm_bo_init_mm(dev, DRM_BO_MEM_VRAM, 0, vramsize);
ret = drm_buffer_object_create(dev, gart_table_size, drm_bo_type_kernel,
                                                   DRM_BO_FLAG_READ | 
DRM_BO_FLAG_WRITE |
                                                   DRM_BO_FLAG_MEM_VRAM |
                                                   DRM_BO_FLAG_NO_EVICT |
                                                   
DRM_BO_HINT_DONT_FENCE, 0, 0x1, 0,
                                                   &dev_priv->gart_table);
/* now and only now create_ttm_backend_entry can be called */
drm_bo_init_mm(dev, DRM_BO_MEM_TT, 0, numpages);

Cheers,
Jerome Glisse

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to