gfx: imgv: fix parameter checking for exec cmd IOCTL
authorImre Deak <imre.deak@intel.com>
Thu, 22 Dec 2011 20:48:28 +0000 (22:48 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:29:18 +0000 (12:29 +0300)
commitda9a9697df7d77841726b1b4987883ec222d931c
treef13a1aff5db4759667414880c34336ea8ad381b3
parent23b16b69d5a4aa9066617a49f3b0469ccf880668
gfx: imgv: fix parameter checking for exec cmd IOCTL

As the comment in code suggests the IOCTL accepts only flags specifying
a GPU read or write operation, for all other flags we should return
-EINVAL. The call to psb_ttm_bo_check_placement that would seemingly
check this is actually a no-op in this case. Replace it with an actual
check. While at it, also clean up the preceeding check.

This is also needed by an upcoming patch getting rid of
psb_ttm_bo_check_placement.

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/drv/psb_sgx.c