• farah kassabri's avatar
    habanalabs: add validity check for signal cs · 3817b352
    farah kassabri authored
    In preparation for a new feature that allows the user to reserve
    signals ahead of submissions, we need to change a current assumption
    in the code.
    
    Currently, the driver uses 2 SOBs to support signal CS. When the first
    SOB reaches max value, the driver switches to the other one and assumes
    that when it will need to switch back to the first one, all of the
    signals have already been handled.
    
    This assumption won't hold when the new feature will be added, because
    using signal reservation, the driver can reach the max SOB value very
    fast.
    
    The change is to add a validity check when submitting a signal CS, to
    make sure the previous SOB is available (all the signals attached to
    it indeed finished).
    Signed-off-by: default avatarfarah kassabri <fkassabri@habana.ai>
    Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
    Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
    3817b352
command_submission.c 55.5 KB