Hello,

I'm looking into the management of DMA buffers in the Savage driver now.
I took a look at the Radeon and MGA drivers. They take very different
approaches to the problem. Radeon searches all buffers to find one that
is free while MGA has its own list of free buffers from which it always
takes the first (oldest) one.

A problem I see with the MGA driver is that when a client dies its DMA
buffer(s) are not returned to the freelist. At least I couldn't see
where that would happen. It looks like there is a driver callback 
"reclaim_buffers" that is supposed to do this. However, all drivers use
the default implementation "drm_core_reclaim_buffers" here. I suppose
the MGA driver should supply its own function that calls
"drm_core_reclaim_buffers" and puts all reclaimed buffers back on its
freelist.

The use of the "buf->list" looks a bit fishy to me. Grep shows that the
only place where it is ever set is in "drm_core_reclaim_buffers". Is
this still used or is it just bit rot? What about buf->next. This seems
to be unused too, at least in the common code. Maybe some drivers use
it?

Regards,
  Felix

-- 
| Felix Kühling <[EMAIL PROTECTED]>                     http://fxk.de.vu |
| PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3  B152 151C 5CC1 D888 E595 |



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to