• Rodrigo Vivi's avatar
    drm/xe: Fix the runtime_idle call and d3cold.allowed decision. · bba2ec41
    Rodrigo Vivi authored
    According to Documentation/power/runtime_pm.txt:
    
    int pm_runtime_put(struct device *dev);
        - decrement the device's usage counter; if the result is 0 then run
          pm_request_idle(dev) and return its result
    
    int pm_runtime_put_autosuspend(struct device *dev);
        - decrement the device's usage counter; if the result is 0 then run
          pm_request_autosuspend(dev) and return its result
    
    We need to ensure that the idle function is called before suspending
    so we take the right d3cold.allowed decision and respect the values
    set on vram_d3cold_threshold sysfs. So we need pm_runtime_put()
    instead of pm_runtime_put_autosuspend().
    
    Cc: Anshuman Gupta <anshuman.gupta@intel.com>
    Reviewed-by: default avatarAnshuman Gupta <anshuman.gupta@intel.com>
    Tested-by: default avatarAnshuman Gupta <anshuman.gupta@intel.com>
    Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
    bba2ec41
xe_pm.c 8.39 KB