• Nicholas Kazlauskas's avatar
    drm/amd/display: Fix multi-display support for idle opt workqueue · 09a5df6c
    Nicholas Kazlauskas authored
    [Why]
    The current implementation for idle optimization support only has a
    single work item that gets reshuffled into the system workqueue
    whenever we receive an enable or disable event.
    
    We can have mismatched events if the work hasn't been processed or if
    we're getting control events from multiple displays at once.
    
    This fixes this issue and also makes the implementation usable for
    PSR control - which will be addressed in another patch.
    
    [How]
    We need to be able to flush remaining work out on demand for driver stop
    and psr disable so create a driver specific workqueue instead of using
    the system one. The workqueue will be single threaded to guarantee the
    ordering of enable/disable events.
    
    Refactor the queue to allocate the control work and deallocate it
    after processing it.
    
    Pass the acrtc directly to make it easier to handle psr enable/disable
    in a later patch.
    
    Rename things to indicate that it's not just MALL specific.
    Reviewed-by: default avatarRoman Li <Roman.Li@amd.com>
    Acked-by: default avatarWayne Lin <wayne.lin@amd.com>
    Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
    Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    09a5df6c
amdgpu_dm.h 15.9 KB