• David Zhang's avatar
    drm/amd/display: add shared helpers to update psr config fields to power module · 65e7a174
    David Zhang authored
    [why]
    Currently the amdgpu DM psr configuration parameters are hardcoded
    before feeding into the DC helper to setup PSR. We would define a
    helper which is to calculate parts of the psr config fields to
    avoid hard-coding.
    
    [how]
    To make helper shareable, declare and define the helper in the
    module_helper, to set/update below fields:
    - psr remote buffer setup time
    - sdp tx line number deadline
    - line time in us
    - su_y_granularity
    - su_granularity_required
    - psr_frame_capture_indication_req
    - psr_exit_link_training_required
    
    add another helper to check given the stream context, if there is
    only one stream and the output is eDP panel connected.
    
    changes in v2:
    ------------------
    - add detailed comment for how psr setup time is calculated as per
      eDP 1.5 spec
    
    Cc: Chandan Vurdigerenataraj <chandan.vurdigerenataraj@amd.com>
    Signed-off-by: default avatarDavid Zhang <dingchen.zhang@amd.com>
    Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
    Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    65e7a174
power_helpers.h 2.17 KB