gfx: imgv: refactor the checking of buffer placement
authorImre Deak <imre.deak@intel.com>
Thu, 22 Dec 2011 20:48:29 +0000 (22:48 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:29:19 +0000 (12:29 +0300)
commitbf6d8d32ae28dca5fbdd6345e28c428009df04db
treece903680bddcccb189d5e7daaf3d909d604f6fa3
parentda9a9697df7d77841726b1b4987883ec222d931c
gfx: imgv: refactor the checking of buffer placement

The driver checks whether a client process has enough permission to
set/clear TTM_PL_FLAG_NO_EVICT. For busy placements we don't need to do
this every time a related IOCTL is called, since those placements never
change and they don't include this flag. So remove the check for busy
placements.

An addition in a later patch will want to check the final flags value
besides the set/clear values, so add support for it now.

While at it, also normalize the cacheability flags in
ttm_pl_setstatus_ioctl similarly to what the buffer creation IOCTLs do.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/staging/mrst/imgv/psb_ttm_placement_user.c
drivers/staging/mrst/imgv/psb_ttm_userobj_api.h