On Thu, 2009-04-23 at 14:29 +0200, Thomas Hellstrom wrote:
> Jerome Glisse wrote:
> > On Thu, 2009-04-23 at 13:51 +0200, Thomas Hellstrom wrote:
> >   
> >> Jerome Glisse wrote:
> >>     
> >>> Hi Thomas,
> >>>
> >>> It seems my path for bo move from system to vram is completely
> >>> wrong, i really have hard time to understand this bo move it
> >>> looks way more complicated than it should be. Here is what i
> >>> do.
> >>>
> >>> tmp_mem = *old_mem;
> >>> tmp_mem.mm_node = NULL;
> >>> tmp_mem.proposed_flags = TTM_PL_FLAG_TT | TTM_PL_MASK_CACHING;
> >>> r = ttm_bo_mem_space(bo, &tmp_mem, interruptible, no_wait);
> >>> r = ttm_bo_move_ttm(bo, true, no_wait, &tmp_mem);
> >>> r = radeon_move_blit(bo, true, no_wait, new_mem, old_mem);
> >>> accel_cleanup
> >>>
> >>> So now on resume i get a bind of 0 pages because
> >>> bo->ttm.state != unpopulated. Before resume this path seems
> >>> to work fine.
> >>>
> >>> Am i doing somethings wrong ?
> >>>
> >>>   
> >>>       
> >> The question is then how you get an unpopulated ttm without any pages in 
> >> it?
> >> If it's swapped, then the state should indeed be unpopulated.
> >>
> >> Also, why do you pass old_mem to radeon_move_blit, as that should point 
> >> to a system region that
> >> is no longer valid?
> >>
> >> /Thomas
> >>     
> >
> > bo->ttm exist and seems to have pages in it. in ttm_bo_move_ttm
> > *old_mem = tmp_mem so when i do move_blit with old_mem it's in
> > fact using the tmp mem allocated.
> >   
> 
> Hmm. That's a bit confusing to me. Can't radeon_blit just use bo->mem?
> Anyway, you say you get a bind operation of 0 pages?  Why is the ttm_tt 
> code not doing the bind?
> 
> /Thomas
> 

It's confusing for me too, radeon_blit is just a blit function don't
do anythings beside emitting blit gpu command and a fence. It's the
ttm_tt code which calls bind.

So ttm_tt_bind is called by ttm_bo_move_ttm, ttm_tt_bind call populate
but state != unpopulated thus populate return right away, then
ttm_tt_bind call driver callback bind but what i have in the ttm_backend
object is 0 pages so i am asked to bind 0 pages.

I can't make sense of the call chain, i will dump the whole object
before and after suspend.

Cheers,
Jerome


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to