• S
    drm/i915/skl: Assert the requirements to enter or exit DC5. · 5aefb239
    Suketu Shah 提交于
    Warn if the conditions to enter or exit DC5 are not satisfied such
    as support for runtime PM, state of power well, CSR loading etc.
    
    v2: Removed camelcase in functions and variables.
    
    v3: Do some minimal check to assert if CSR program is not loaded.
    
    v4:
    1] Used an appropriate function lookup_power_well() to identify power well,
    instead of using a magic number which can change in future.
    2] Split the conditions further in assert_can_enable_DC5() and added more checks.
    3] Removed all WARNs from assert_can_disable_DC5 as they were unnecessary and added two
       new ones.
    4] Changed variable names as updated in earlier patches.
    
    v5:
    1] Change lookup_power_well function to take an int power well id.
    2] Define a new intel_display_power_well_is_enabled helper function to check whether a
       particular power well is enabled.
    3] Use CSR-related mutex in assert_csr_loaded function.
    
    v6: Remove use of dc5_enabled variable as it's no longer needed.
    
    v7:
    1] Rebase to latest.
    2] Move all DC5-related functions from intel_display.c to intel_runtime_pm.c.
    
    v8: After adding dmc ver 1.0 support rebased on top of nightly. (Animesh)
    
    v9: Modified below changes based on review comments from Imre.
    - Moved intel_display_power_well_is_enabled() to intel_runtime_pm.c.
    - Removed mutex lock from assert_csr_loaded(). (Animesh)
    
    Issue: VIZ-2819
    Signed-off-by: NA.Sunil Kamath <sunil.kamath@intel.com>
    Signed-off-by: NSuketu Shah <suketu.j.shah@intel.com>
    Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
    Signed-off-by: NAnimesh Manna <animesh.manna@intel.com>
    Reviewed-by: NImre Deak <imre.deak@intel.com>
    Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
    5aefb239
intel_runtime_pm.c 53.5 KB