gfx: gtt: refcount gtt mappings
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Wed, 15 Feb 2012 13:02:16 +0000 (15:02 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:29:52 +0000 (12:29 +0300)
commitb91e3480d7aad17056f2571f84b92b66510c9de8
tree1f6e1a5a0ba29fe8bc24004384fe7964a95e2644
parent32634dda73b51d5dad38f9e57c71611f82fa9e6c
gfx: gtt: refcount gtt mappings

Currently psb_gtt_map_* can handle multiple calls with the same
handle but will remove the pages from gtt as soon as one call to
psb_gtt_unmap_* is made. Since multiple drm_fb's can be added with
the same handle and the driver will cal psb_gtt_map_meminfo for each
one of them, this could lead to unmapping memory that is still being
used.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/staging/mrst/drv/psb_gtt.c
drivers/staging/mrst/drv/psb_gtt.h