• Nicholas Kazlauskas's avatar
    drm/amd/display: Update plane tiling attributes for stream updates · 09e5665a
    Nicholas Kazlauskas authored
    [Why]
    Tiling and DCC attributes can change when swapping framebuffers but
    these will only ever get updated on full commits where
    state->allow_modeset is true. But for the page-flip IOCTL
    state->allow_modeset = false so these aren't updated and DCC changes
    aren't being programmed.
    
    [How]
    Split out updating the tiling and DCC attributes into its own function
    that's called when creating the plane for the first time but also
    called when switching framebuffers before commit stream updates.
    
    These functions also don't modify the plane state directly since the
    plane state being used as reference is often the current one
    being used by the hardware.
    
    DC needs to be able to compare plane_state to the stream update
    structures to determine if the hardware programming should happen. If
    it's modified in place then nothing will be programmed and we can run
    into concurrency issues.
    Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
    Reviewed-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
    Acked-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    09e5665a
amdgpu_dm.c 173 KB