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>
Reviewed-on: http://git-master/r/423707
Tested-by: Antoine Chauveau <achauveau@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>