[PATCH v3 01/14] drm/connector: Introduce drm_output_color_format enum
Dmitry Baryshkov
dmitry.baryshkov at oss.qualcomm.com
Sun Mar 22 21:07:13 PDT 2026
On Thu, Mar 05, 2026 at 10:04:53AM +0100, Maxime Ripard wrote:
> The EDID parsing code initially introduced the DRM_COLOR_FORMAT_*
> defines to represent the sink capabilities. Since a given sink could
> support multiple formats, it was first defined as a bitmask.
>
> However, the core and drivers have since leveraged those defines to
> represent both the supported formats but also the current format being
> used.
>
> Considering the latter case, the more natural, and consistent, thing to
> do would be to create an enum of all the possible formats, and then list
> the supported formats using a bitmask of the individual enum values.
>
> Let's create a new enum following that pattern, drm_output_color_format,
> while maintaining the DRM_COLOR_FORMAT_* compatibility to make the
> transition easier.
>
> Acked-by: Jani Nikula <jani.nikula at intel.com>
> Reviewed-by: Liviu Dudau <liviu.dudau at arm.com>
> Signed-off-by: Maxime Ripard <mripard at kernel.org>
> ---
> include/drm/drm_connector.h | 42 ++++++++++++++++++++++++++++++++++--------
> 1 file changed, 34 insertions(+), 8 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov at oss.qualcomm.com>
--
With best wishes
Dmitry
More information about the Linux-mediatek
mailing list