• Pradeep Bhat's avatar
    drm/i915: Add support for DRRS to switch RR · 439d7ac0
    Pradeep Bhat authored
    This patch computes and stored 2nd M/N/TU for switching to different
    refresh rate dynamically. PIPECONF_EDP_RR_MODE_SWITCH bit helps toggle
    between alternate refresh rates programmed in 2nd M/N/TU registers.
    
    v2: Daniel's review comments
    Computing M2/N2 in compute_config and storing it in crtc_config
    
    v3: Modified reference to edp_downclock and edp_downclock_avail based on the
    changes made to move them from dev_private to intel_panel.
    
    v4: Modified references to is_drrs_supported based on the changes made to
    rename it to drrs_support.
    
    v5: Jani's review comments
    Removed superfluous return statements. Changed support for Gen 7 and above.
    Corrected indentation. Re-structured the code which finds crtc and connector
    from encoder. Changed some logs to be less verbose.
    
    v6: Modifying i915_drrs to include only intel connector as intel_dp can be
    derived from intel connector when required.
    
    v7: As per internal review comments, acquiring mutex just before accessing
    drrs RR. As per Chris's review comments, added documentation about the use
    of locking in the function.
    
    v8: Incorporated Jani's review comments.
    Removed reference to edp_downclock.
    
    v9: Jani's review comments. Modified comment in set_drrs. Changed index to
    type edp_drrs_refresh_rate_type. Check if PSR is enabled before setting
    registers fo DRRS.
    Signed-off-by: default avatarPradeep Bhat <pradeep.bhat@intel.com>
    Signed-off-by: default avatarVandana Kannan <vandana.kannan@intel.com>
    Cc: Jani Nikula <jani.nikula@linux.intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    439d7ac0
i915_reg.h 228 KB