• Omer Shpigelman's avatar
    uapi: habanalabs: add signal/wait operations · f9e5f295
    Omer Shpigelman authored
    This is a pre-requisite to upstreaming GAUDI support.
    
    Signal/wait operations are done by the user to perform sync between two
    Primary Queues (PQs). The sync is done using the sync manager and it is
    usually resolved inside the device, but sometimes it can be resolved in the
    host, i.e. the user should be able to wait in the host until a signal has
    been completed.
    
    The mechanism to define signal and wait operations is done by the driver
    because it needs atomicity and serialization, which is already done in the
    driver when submitting work to the different queues.
    
    To implement this feature, the driver "takes" a couple of h/w resources,
    and this is reflected by the defines added to the uapi file.
    
    The signal/wait operations are done via the existing CS IOCTL, and they use
    the same data structure. There is a difference in the meaning of some of
    the parameters, and for that we added unions to make the code more
    readable.
    Signed-off-by: default avatarOmer Shpigelman <oshpigelman@habana.ai>
    Reviewed-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
    Signed-off-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
    f9e5f295
habanalabs.h 62 KB