gpu: pvr: improve per process procfs entry/dir handling
authorLuc Verhaegen <libv@codethink.co.uk>
Mon, 21 Feb 2011 12:07:26 +0000 (13:07 +0100)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 20 May 2012 18:43:03 +0000 (21:43 +0300)
commit0a51de5410431611bd55602dc3494830e46be32e
tree9e6d7ee8e63e75436bcf276a024e9d6c99a01e84
parent81cab0d19b790f5d1a7115a91bc5547f854a7fd3
gpu: pvr: improve per process procfs entry/dir handling

When building with full debug, a lot of "Resource Arena" (ra) data is
being made available in the rather painful procfs, including per process
ra info, kept in process specific subdirectories.

Adding and removing process specific entries from procfs took the PID of
the currently running process; which sometimes failed during cleanup,
when the current process might no longer be anything tracked by the
driver. This then resulted in some strange behaviour, where it was
impossible to cleanup a process specific procfs directory, resulting
in an endless loop.

Since process specific procfs entries are only created in the RA code,
we now track the pid in the RA struct. When we pass this pid to
both the procfs entry creation and removal functions, we now do
reliably clean up the procfs entries.

Signed-off-by: Luc Verhaegen <libv@codethink.co.uk>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
pvr/proc.c
pvr/proc.h
pvr/ra.c