• Gwan-gyeong Mun's avatar
    drm/i915/dp: Program an Infoframe SDP Header and DB for HDR Static Metadata · b246cf21
    Gwan-gyeong Mun authored
    Function intel_dp_setup_hdr_metadata_infoframe_sdp handles Infoframe SDP
    header and data block setup for HDR Static Metadata. It enables writing of
    HDR metadata infoframe SDP to panel. Support for HDR video was introduced
    in DisplayPort 1.4. It implements the CTA-861-G standard for transport of
    static HDR metadata. The HDR Metadata will be provided by userspace
    compositors, based on blending policies and passed to the driver through
    a blob property.
    
    Because each of GEN11 and prior GEN11 have different register size for
    HDR Metadata Infoframe SDP packet, it adds and uses different register
    size.
    
    Setup Infoframe SDP header and data block in function
    intel_dp_setup_hdr_metadata_infoframe_sdp for HDR Static Metadata as per
    dp 1.4 spec and CTA-861-F spec.
    As per DP 1.4 spec, 2.2.2.5 SDP Formats. It enables Dynamic Range and
    Mastering Infoframe for HDR content, which is defined in CTA-861-F spec.
    According to DP 1.4 spec and CEA-861-F spec Table 5, in order to transmit
    static HDR metadata, we have to use Non-audio INFOFRAME SDP v1.3.
    
    +--------------------------------+-------------------------------+
    |      [ Packet Type Value ]     |       [ Packet Type ]         |
    +--------------------------------+-------------------------------+
    | 80h + Non-audio INFOFRAME Type | CEA-861-F Non-audio INFOFRAME |
    +--------------------------------+-------------------------------+
    |      [Transmission Timing]                                     |
    +----------------------------------------------------------------+
    | As per CEA-861-F for INFOFRAME, including CEA-861.3 within     |
    | which Dynamic Range and Mastering INFOFRAME are defined        |
    +----------------------------------------------------------------+
    
    v2: Add a missed blank line after function declaration.
    v3: Remove not handled return values from
        intel_dp_setup_hdr_metadata_infoframe_sdp(). [Uma]
    v9: Addressed review comments from Ville.
        - Add BUILD_BUG_ON to check a changing of struct dp_sdp size.
        - Change a passed size toward write_infoframe() for DP infoframe sdp
          packet for HDR static metadata.
    Signed-off-by: default avatarGwan-gyeong Mun <gwan-gyeong.mun@intel.com>
    Reviewed-by: default avatarUma Shankar <uma.shankar@intel.com>
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20190919195311.13972-8-gwan-gyeong.mun@intel.com
    b246cf21
intel_ddi.c 145 KB