• Paulo Zanoni's avatar
    drm/i915: add initial Runtime PM functions · 8a187455
    Paulo Zanoni authored
    This patch adds the initial infrastructure to allow a Runtime PM
    implementation that sets the device to its D3 state. The patch just
    adds the necessary callbacks and the initial infrastructure.
    
    We still don't have any platform that actually uses this
    infrastructure, we still don't call get/put in all the places we need
    to, and we don't have any function to save/restore the state of the
    registers. This is not a problem since no platform uses the code added
    by this patch. We have a few people simultaneously working on runtime
    PM, so this initial code could help everybody make their plans.
    
    V2: - Move some functions to intel_pm.c
        - Remove useless pm_runtime_allow() call at init
        - Remove useless pm_runtime_mark_last_busy() call at get
        - Use pm_runtime_get_sync() instead of 2 calls
        - Add a WARN to check if we're really awake
    
    V3: - Rebase.
    
    V4: - Don't need to call pci_{save,restore}_state and
          pci_set_power_sate, since they're already called by the PCI
          layer
        - Remove wrong pm_runtime_enable() call at init_runtime_pm
    Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
    Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@gmail.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    8a187455
intel_pm.c 174 KB