• Melissa Wen's avatar
    drm/amd/display: add plane shaper LUT and TF driver-specific properties · f545d824
    Melissa Wen authored
    On AMD HW, 3D LUT always assumes a preceding shaper 1D LUT used for
    delinearizing and/or normalizing the color space before applying a 3D
    LUT. Add pre-defined transfer function to enable delinearizing content
    with or without shaper LUT, where AMD color module calculates the
    resulted shaper curve. We apply an inverse EOTF to go from linear
    values to encoded values. If we are already in a non-linear space and/or
    don't need to normalize values, we can bypass shaper LUT with a linear
    transfer function that is also the default TF value.
    
    There is no shaper ROM. When setting shaper TF (!= Identity) and LUT at
    the same time, the color module will combine the pre-defined TF and the
    custom LUT values into the LUT that's actually programmed.
    
    v2:
    - squash commits for shaper LUT and shaper TF
    - define inverse EOTF as supported shaper TFs
    
    v3:
    - spell out TF+LUT behavior in the commit and comments (Harry)
    - replace BT709 EOTF by inv OETF
    
    v5:
    - get shaper blob correctly (Joshua)
    Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
    Signed-off-by: default avatarMelissa Wen <mwen@igalia.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    f545d824
amdgpu_dm.h 24 KB