]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
video: tegra: host: fix setclass order in gather submit
authorDeepak Nibade <dnibade@nvidia.com>
Mon, 16 Jun 2014 10:25:43 +0000 (15:55 +0530)
committerTodd Poynter <tpoynter@nvidia.com>
Thu, 19 Jun 2014 15:42:19 +0000 (08:42 -0700)
commit3ed00eda552966f427aab123ae30e117478cebc1
tree415f8c1342a0858a8deba24706dd8b24c8d48cc1
parent10093e4f538fbfbbd81318d9d8fa288c0e1df66a
video: tegra: host: fix setclass order in gather submit

We submit gathers in submit_gathers() as below :
1) set class to class id sent from user space
2) call add_sync_waits() which sets class to HOST1X
   and adds host waits
3) and then we proceed to insert gathers sent from user space
   (which now see wrong class id set i.e. HOST1X)

This results in setting wrong class ids and causes
abnormal behaviour

To fix this, rewrite this sequnce as below :
1) call add_sync_waits() which sets class to HOST1X
   and adds host waits
2) set class to class id sent from user space
3) and then we proceed to insert gathers sent from user space
   (and now we have correct class id set for this gather)

Bug 1521367

Change-Id: Ifef00ae8b4431ea440ac6f9048111a3136e3bb3e
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
(cherry picked from commit 83d938ee3ad390298768b2267fb157799cee610b)
Reviewed-on: http://git-master/r/426077
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Tested-by: Todd Poynter <tpoynter@nvidia.com>
drivers/video/tegra/host/host1x/host1x_channel.c