• Harry Wentland's avatar
    drm/connector: Allow drivers to pass list of supported colorspaces · c265f340
    Harry Wentland authored
    Drivers might not support all colorspaces defined in
    dp_colorspaces and hdmi_colorspaces. This results in
    undefined behavior when userspace is setting an
    unsupported colorspace.
    
    Allow drivers to pass the list of supported colorspaces
    when creating the colorspace property.
    
    v2:
     - Use 0 to indicate support for all colorspaces (Jani)
     - Print drm_dbg_kms message when drivers pass 0
       to signal that drivers should specify supported
       colorspaecs explicity (Jani)
    
    v3:
     - Move changes to create a common colorspace_names array
       to separate patch
    
    v6:
    - Avoid magic when passing 0 for supported_colorspaces;
      be explicit in treating it as "all DP/HDMI"
    Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
    Reviewed-by: default avatarSebastian Wick <sebastian.wick@redhat.com>
    Reviewed-by: default avatarJoshua Ashton <joshua@froggi.es>
    Reviewed-by: default avatarSimon Ser <contact@emersion.fr>
    
    Cc: Pekka Paalanen <ppaalanen@gmail.com>
    Cc: Sebastian Wick <sebastian.wick@redhat.com>
    Cc: Vitaly.Prosyak@amd.com
    Cc: Uma Shankar <uma.shankar@intel.com>
    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Cc: Joshua Ashton <joshua@froggi.es>
    Cc: Jani Nikula <jani.nikula@linux.intel.com>
    Cc: Simon Ser <contact@emersion.fr>
    Cc: Melissa Wen <mwen@igalia.com>
    Cc: dri-devel@lists.freedesktop.org
    Cc: amd-gfx@lists.freedesktop.org
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    c265f340
drm_connector.h 64.4 KB