• Sagar Arun Kamble's avatar
    drm/i915: Support for GuC interrupts · 26705e20
    Sagar Arun Kamble authored
    There are certain types of interrupts which Host can receive from GuC.
    GuC ukernel sends an interrupt to Host for certain events, like for
    example retrieve/consume the logs generated by ukernel.
    This patch adds support to receive interrupts from GuC but currently
    enables & partially handles only the interrupt sent by GuC ukernel.
    Future patches will add support for handling other interrupt types.
    
    v2:
    - Use common low level routines for PM IER/IIR programming (Chris)
    - Rename interrupt functions to gen9_xxx from gen8_xxx (Chris)
    - Replace disabling of wake ref asserts with rpm get/put (Chris)
    
    v3:
    - Update comments for more clarity. (Tvrtko)
    - Remove the masking of GuC interrupt, which was kept masked till the
      start of bottom half, its not really needed as there is only a
      single instance of work item & wq is ordered. (Tvrtko)
    
    v4:
    - Rebase.
    - Rename guc_events to pm_guc_events so as to be indicative of the
      register/control block it is associated with. (Chris)
    - Add handling for back to back log buffer flush interrupts.
    
    v5:
    - Move the read & clearing of register, containing Guc2Host message
      bits, outside the irq spinlock. (Tvrtko)
    
    v6:
    - Move the log buffer flush interrupt related stuff to the following
      patch so as to do only generic bits in this patch. (Tvrtko)
    - Rebase.
    
    v7:
    - Remove the interrupts_enabled check from gen9_guc_irq_handler, want to
      process that last interrupt also before disabling the interrupt, sync
      against the work queued by irq handler will be done by caller disabling
      the interrupt.
    Signed-off-by: default avatarSagar Arun Kamble <sagar.a.kamble@intel.com>
    Signed-off-by: default avatarAkash Goel <akash.goel@intel.com>
    Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    26705e20
i915_drv.h 119 KB