drm_edid.c (cc9263874b42bf98209dce0afe698b550648e770) drm_edid.c (b3c6c8bfe378309f8185d591579a3cb3aa2fe2e8)
1/*
2 * Copyright (c) 2006 Luc Verhaegen (quirks list)
3 * Copyright (c) 2007-2008 Intel Corporation
4 * Jesse Barnes <jesse.barnes@intel.com>
5 * Copyright 2010 Red Hat, Inc.
6 *
7 * DDC probing routines (drm_ddc_read & drm_do_probe_ddc_edid) originally from
8 * FB layer.

--- 3707 unchanged lines hidden (view full) ---

3716 return edid_ext[i + 2] & EDID_CEA_VCDB_QS;
3717 }
3718 }
3719
3720 return false;
3721}
3722EXPORT_SYMBOL(drm_rgb_quant_range_selectable);
3723
1/*
2 * Copyright (c) 2006 Luc Verhaegen (quirks list)
3 * Copyright (c) 2007-2008 Intel Corporation
4 * Jesse Barnes <jesse.barnes@intel.com>
5 * Copyright 2010 Red Hat, Inc.
6 *
7 * DDC probing routines (drm_ddc_read & drm_do_probe_ddc_edid) originally from
8 * FB layer.

--- 3707 unchanged lines hidden (view full) ---

3716 return edid_ext[i + 2] & EDID_CEA_VCDB_QS;
3717 }
3718 }
3719
3720 return false;
3721}
3722EXPORT_SYMBOL(drm_rgb_quant_range_selectable);
3723
3724/**
3725 * drm_assign_hdmi_deep_color_info - detect whether monitor supports
3726 * hdmi deep color modes and update drm_display_info if so.
3727 * @edid: monitor EDID information
3728 * @info: Updated with maximum supported deep color bpc and color format
3729 * if deep color supported.
3730 * @connector: DRM connector, used only for debug output
3731 *
3724/*
3732 * Parse the CEA extension according to CEA-861-B.
3733 * Return true if HDMI deep color supported, false if not or unknown.
3734 */
3735static bool drm_assign_hdmi_deep_color_info(struct edid *edid,
3736 struct drm_display_info *info,
3737 struct drm_connector *connector)
3738{
3739 u8 *edid_ext, *hdmi;

--- 77 unchanged lines hidden (view full) ---

3817 connector->name);
3818 }
3819 }
3820 }
3821
3822 return false;
3823}
3824
3725 * Parse the CEA extension according to CEA-861-B.
3726 * Return true if HDMI deep color supported, false if not or unknown.
3727 */
3728static bool drm_assign_hdmi_deep_color_info(struct edid *edid,
3729 struct drm_display_info *info,
3730 struct drm_connector *connector)
3731{
3732 u8 *edid_ext, *hdmi;

--- 77 unchanged lines hidden (view full) ---

3810 connector->name);
3811 }
3812 }
3813 }
3814
3815 return false;
3816}
3817
3825/**
3826 * drm_add_display_info - pull display info out if present
3827 * @edid: EDID data
3828 * @info: display info (attached to connector)
3829 * @connector: connector whose edid is used to build display info
3830 *
3831 * Grab any available display info and stuff it into the drm_display_info
3832 * structure that's part of the connector. Useful for tracking bpp and
3833 * color spaces.
3834 */
3835static void drm_add_display_info(struct edid *edid,
3836 struct drm_display_info *info,
3837 struct drm_connector *connector)
3838{
3839 u8 *edid_ext;
3840
3841 info->width_mm = edid->width_cm * 10;
3842 info->height_mm = edid->height_cm * 10;

--- 204 unchanged lines hidden (view full) ---

4047 return num_modes;
4048}
4049
4050/**
4051 * drm_add_edid_modes - add modes from EDID data, if available
4052 * @connector: connector we're probing
4053 * @edid: EDID data
4054 *
3818static void drm_add_display_info(struct edid *edid,
3819 struct drm_display_info *info,
3820 struct drm_connector *connector)
3821{
3822 u8 *edid_ext;
3823
3824 info->width_mm = edid->width_cm * 10;
3825 info->height_mm = edid->height_cm * 10;

--- 204 unchanged lines hidden (view full) ---

4030 return num_modes;
4031}
4032
4033/**
4034 * drm_add_edid_modes - add modes from EDID data, if available
4035 * @connector: connector we're probing
4036 * @edid: EDID data
4037 *
4055 * Add the specified modes to the connector's mode list.
4038 * Add the specified modes to the connector's mode list. Also fills out the
4039 * &drm_display_info structure in @connector with any information which can be
4040 * derived from the edid.
4056 *
4057 * Return: The number of modes added or 0 if we couldn't find any.
4058 */
4059int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
4060{
4061 int num_modes = 0;
4062 u32 quirks;
4063

--- 362 unchanged lines hidden ---
4041 *
4042 * Return: The number of modes added or 0 if we couldn't find any.
4043 */
4044int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
4045{
4046 int num_modes = 0;
4047 u32 quirks;
4048

--- 362 unchanged lines hidden ---