From c627087cb164d1675323c7942fa29bded4263dfc Mon Sep 17 00:00:00 2001 From: Harry Wentland Date: Tue, 29 Nov 2022 15:16:31 -0500 Subject: drm/connector: Use common colorspace_names array MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We an use bitfields to track the support ones for HDMI and DP. This allows us to print colorspaces in a consistent manner without needing to know whether we're dealing with DP or HDMI. v4: - Rename _MAX to _COUNT and leave comment to indicate it's not a valid value - Fix misplaced function doc v6: - Drop magic in drm_mode_create_colorspace_property for dealing with "0" supported_colorspaces. Expect the caller to always provide a non-zero supported_colorspaces. - Improve error checking and logging Signed-off-by: Harry Wentland Reviewed-by: Sebastian Wick Reviewed-by: Joshua Ashton Reviewed-by: Simon Ser Cc: Pekka Paalanen Cc: Sebastian Wick Cc: Vitaly.Prosyak@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: Jani Nikula Cc: Simon Ser Cc: Melissa Wen Cc: dri-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Alex Deucher --- include/drm/drm_connector.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/drm/drm_connector.h') diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index e338432580e0..6eb8e2d5d20f 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -516,6 +516,8 @@ enum drm_colorspace { DRM_MODE_COLORIMETRY_RGB_WIDE_FIXED = 13, DRM_MODE_COLORIMETRY_RGB_WIDE_FLOAT = 14, DRM_MODE_COLORIMETRY_BT601_YCC = 15, + /* not a valid value; merely used for counting */ + DRM_MODE_COLORIMETRY_COUNT }; /** -- cgit v1.2.3