• Nicholas Kazlauskas's avatar
    drm/amd/display: Split out DC programming for CRC capture · 57638021
    Nicholas Kazlauskas authored
    [Why]
    Calling amdgpu_dm_crtc_set_crc_source in amdgpu_dm directly has the
    consequence of adding additional vblank references or starting DPRX
    CRC capture more than once without calling stop first.
    
    Vblank references for CRC capture should be managed entirely by opening
    and closing the CRC file from userspace.
    
    Stream state also shouldn't be required on the CRC so we can close the
    file after the CRTC has been disabled.
    
    [How]
    Do DC programming required for configuring CRC capture separately from
    setting the source. Whenever we re-enable or reset a CRC this
    programming should be reapplied.
    
    CRC vblank reference handling in amdgpu_dm can be entirely dropped after
    this.
    
    Stream state also no longer needs to be required since we can just defer
    the programming to when the stream is actually enabled.
    Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
    Reviewed-by: default avatarDavid Francis <David.Francis@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    57638021
amdgpu_dm.c 207 KB