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>