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>