• Shashank Sharma's avatar
    drm/i915: prepare pipe for YCBCR420 output · b22ca995
    Shashank Sharma authored
    To get HDMI YCBCR420 output, the PIPEMISC register should be
    programmed to:
    - Generate YCBCR output (bit 11)
    - In case of YCBCR420 outputs, it should be programmed in full
      blend mode to use the scaler in 5x3 ratio (bits 26 and 27)
    
    This patch:
    - Adds definition of these bits.
    - Programs PIPEMISC for YCBCR420 outputs.
    - Adds readouts to compare HW and SW states.
    
    V2: rebase
    V3: rebase
    V4: rebase
    V5: added r-b from Ander
    V6: Handle only YCBCR420 outputs (ville)
    V7: rebase
    V8: Addressed review comments from Ville
        - Add readouts for state->ycbcr420 and 420 pixel_clock.
        - Handle warning due to mismatch in clock for ycbcr420 clock.
        - Rename PIPEMISC macros to match the Bspec.
        - Add a debug print stating if YCBCR 4:2:0 output enabled.
        Added r-b from Ville
    V9: Addressed review comments from Imre:
        - Add 420 mode clock adjustment in intel_hdmi_mode_valid to
          prevent 420_only modes getting rejected for high clock.
        - Add port clock adjustment for ycbcr420 modes in ddi_get_clock
        - Rename macros as per Ville's suggestion.
        - Remove unnecessary wl changes.
    V10: Added r-b from Imre
    V11: Fixed faulty dotclock handling, and addressed missing comment
         from previous set of review comments (Imre)
    V12: Fixed dotclock for 12bpc too, removed 420 check for GEN < 10
    
    Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
    Cc: Ander Conselvan de Oliveira <conselvan2@gmail.com>
    Cc: Daniel Vetter <daniel.vetter@intel.com>
    Cc: Imre Deak <imre.deak@intel.com>
    Reviewed-by: default avatarAnder Conselvan de Oliveira <conselvan2@gmail.com>
    Reviewed-by: default avatarVille Syrjala <ville.syrjala@linux.intel.com>
    Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
    Signed-off-by: default avatarShashank Sharma <shashank.sharma@intel.com>
    Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/1500904172-31717-1-git-send-email-shashank.sharma@intel.comSigned-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    b22ca995
intel_hdmi.c 61.1 KB