• Amber Lin's avatar
    drm/amdkfd: Provide SMI events watch · 938a0650
    Amber Lin authored
    When the compute is malfunctioning or performance drops, the system admin
    will use SMI (System Management Interface) tool to monitor/diagnostic what
    went wrong. This patch provides an event watch interface for the user
    space to register devices and subscribe events they are interested. After
    registered, the user can use annoymous file descriptor's poll function
    with wait-time specified and wait for events to happen. Once an event
    happens, the user can use read() to retrieve information related to the
    event.
    
    VM fault event is done in this patch.
    
    v2: - remove UNREGISTER and add event ENABLE/DISABLE
        - correct kfifo usage
        - move event message API to kfd_ioctl.h
    v3: send the event msg in text than in binary
    v4: support multiple clients
    v5: move events enablement from ioctl to fd write
    v6: sparse fix
    Signed-off-by: default avatarAmber Lin <Amber.Lin@amd.com>
    Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    938a0650
kfd_priv.h 33.3 KB