habanalabs: Avoid running restore chunks if no execute chunks
authorTomer Tayar <ttayar@habana.ai>
Sun, 5 Jan 2020 15:11:22 +0000 (15:11 +0000)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 24 Mar 2020 08:54:16 +0000 (10:54 +0200)
commit1718a45b284d274ebb57ee3998bd535fb9d6c03b
tree2ceac1c7baec10f8ca5425e39c7064f882227375
parentf3a838c0c72ca09dd153ff29096410ea220660f6
habanalabs: Avoid running restore chunks if no execute chunks

CS with no chunks for execute phase is invalid, so its
context_switch/restore phase should not be run.
Hence, move the check of the execute chunks number to the beginning of
hl_cs_ioctl().

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/command_submission.c