• Shashank Sharma's avatar
    drm: add helper to validate YCBCR420 modes · d8523153
    Shashank Sharma authored
    YCBCR420 modes are supported only on HDMI 2.0 capable sources.
    This patch adds:
    - A drm helper to validate YCBCR420-only mode on a particular
      connector. This function will help pruning the YCBCR420-only
      modes from the connector's modelist.
    - A bool variable (ycbcr_420_allowed) in the drm connector structure.
      While handling the EDID from HDMI 2.0 sinks, its important to know
      if the source is capable of handling YCBCR420 output, so that no
      YCBCR 420 modes will be listed for sources which can't handle it.
      A driver should set this variable if it wants to see YCBCR420 modes
      in the modedb.
    
    V5: Introduced the patch in series.
    V6: Squashed two patches (validate YCBCR420 and add YCBCR420
    	   identifier)
    V7: Addressed review comments from Vile:
        - Move this patch before we add 420 modes from EDID.
        - No need for drm_valid_cea_vic() check, function back to non-static.
        - Update MODE_STATUS with NO_420 condition.
        - Introduce y420_vdb_modes variable in this patch
    
    Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
    Signed-off-by: default avatarShashank Sharma <shashank.sharma@intel.com>
    Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-6-git-send-email-shashank.sharma@intel.com
    [vsyrjala: Drop the now bogus EXPORT_SYMBOL(drm_valid_cea_vic)]
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    d8523153
drm_modes.h 17.5 KB