msm: kgsl: Add a file count to struct kgsl_process_private
Some process specific resources need to be released when all of the
open files for a process are closed including memory objects,
syncsources and the sysfs/debugfs entries. Currently these
resources are released when the first file is closed which causes
obvious problems for processes with multiple open file descriptors.
Use a file descriptor count to keep track of how many files are
open for the process and release the resources when the last one
goes away.
Note that struct kgsl_process_private does double duty - it also
contains the memory space information for the process (including
the pagetable) and that might have a longer lifespan beyond
the life of the file descriptors. In an ideal world we would seperate
out all of the other stuff into a different container but that
would involve a LOT of struct renaming and other sundry code
editing. For now this should give us the stability we crave.
CRs-Fixed: 740433
Change-Id: Ic0dedbadb09ecb4ff70777377544ddef256576dd
Signed-off-by:
Jordan Crouse <jcrouse@codeaurora.org>
Loading
Please register or sign in to comment