• Maarten Lankhorst's avatar
    drm/i915: Complete crtc hw/uapi split, v6. · 58d124ea
    Maarten Lankhorst authored
    Now that we separated everything into uapi and hw, it's
    time to make the split definitive. Remove the union and
    make a copy of the hw state on modeset and fastset.
    
    Color blobs are copied in crtc atomic_check(), right
    before color management is checked.
    
    Changes since v1:
    - Copy all blobs immediately after drm_atomic_helper_check_modeset().
    - Clear crtc_state->hw on disable, instead of using clear_intel_crtc_state().
    Changes since v2:
    - Use intel_crtc_free_hw_state + clear in intel_crtc_disable_noatomic().
    - Make a intel_crtc_prepare_state() function that clears the crtc_state
      and copies hw members.
    - Remove setting uapi.adjusted_mode, we now have a direct call to
      drm_calc_timestamping_constants().
    Changes since v3:
    - Rename prefix copy_hw_to_uapi_state() with intel_crtc.
    - Copy color blobs to uapi as well.
    - Add a intel_crtc_copy_uapi_to_hw_state_nomodeset() function for clarity.
    Changes since v4:
    - Copy hw.adjusted_mode back to uapi.adjusted_mode, to shut up
      the call to drm_calc_timestamping_constants() in
      drm_atomic_helper_update_legacy_modeset_state().
    - Use drm_property_replace_blob (Ville).
    Changes since v5:
    - Use hw->mode in intel_modeset_readout_hw_state(). (Ville)
    - Copy to uapi.mode using drm_atomic_set_mode_for_crtc(). (Ville)
    Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20191031112610.27608-6-maarten.lankhorst@linux.intel.comReviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    58d124ea
intel_atomic.h 1.84 KB