mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 13:34:10 +08:00
drm: Rename HDMI colorspace property creation function
As between HDMI and DP have different colorspaces, in order to distinguish colorspace of DP and HDMI, it renames drm_mode_create_colorspace_property() function to drm_mode_create_hdmi_colorspace_property() function for HDMI connector. In order to apply changed drm api, i915 driver has channged. It addresses review comments from Ville. - Split hunk into renaming and adding of code. Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190919195311.13972-4-gwan-gyeong.mun@intel.com
This commit is contained in:
parent
455d56ce80
commit
8806cd3aa0
@ -1667,7 +1667,6 @@ EXPORT_SYMBOL(drm_mode_create_aspect_ratio_property);
|
||||
* DOC: standard connector properties
|
||||
*
|
||||
* Colorspace:
|
||||
* drm_mode_create_colorspace_property - create colorspace property
|
||||
* This property helps select a suitable colorspace based on the sink
|
||||
* capability. Modern sink devices support wider gamut like BT2020.
|
||||
* This helps switch to BT2020 mode if the BT2020 encoded video stream
|
||||
@ -1687,32 +1686,38 @@ EXPORT_SYMBOL(drm_mode_create_aspect_ratio_property);
|
||||
* - This property is just to inform sink what colorspace
|
||||
* source is trying to drive.
|
||||
*
|
||||
* Called by a driver the first time it's needed, must be attached to desired
|
||||
* connectors.
|
||||
* Because between HDMI and DP have different colorspaces,
|
||||
* drm_mode_create_hdmi_colorspace_property() is used for HDMI connector.
|
||||
*/
|
||||
int drm_mode_create_colorspace_property(struct drm_connector *connector)
|
||||
|
||||
/**
|
||||
* drm_mode_create_hdmi_colorspace_property - create hdmi colorspace property
|
||||
* @connector: connector to create the Colorspace property on.
|
||||
*
|
||||
* Called by a driver the first time it's needed, must be attached to desired
|
||||
* HDMI connectors.
|
||||
*
|
||||
* Returns:
|
||||
* Zero on success, negative errono on failure.
|
||||
*/
|
||||
int drm_mode_create_hdmi_colorspace_property(struct drm_connector *connector)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
struct drm_property *prop;
|
||||
|
||||
if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
|
||||
connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) {
|
||||
prop = drm_property_create_enum(dev, DRM_MODE_PROP_ENUM,
|
||||
"Colorspace",
|
||||
hdmi_colorspaces,
|
||||
ARRAY_SIZE(hdmi_colorspaces));
|
||||
if (!prop)
|
||||
return -ENOMEM;
|
||||
} else {
|
||||
DRM_DEBUG_KMS("Colorspace property not supported\n");
|
||||
if (connector->colorspace_property)
|
||||
return 0;
|
||||
}
|
||||
|
||||
connector->colorspace_property = prop;
|
||||
connector->colorspace_property =
|
||||
drm_property_create_enum(dev, DRM_MODE_PROP_ENUM, "Colorspace",
|
||||
hdmi_colorspaces,
|
||||
ARRAY_SIZE(hdmi_colorspaces));
|
||||
|
||||
if (!connector->colorspace_property)
|
||||
return -ENOMEM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_mode_create_colorspace_property);
|
||||
EXPORT_SYMBOL(drm_mode_create_hdmi_colorspace_property);
|
||||
|
||||
/**
|
||||
* drm_mode_create_content_type_property - create content type property
|
||||
|
@ -277,7 +277,7 @@ intel_attach_aspect_ratio_property(struct drm_connector *connector)
|
||||
void
|
||||
intel_attach_colorspace_property(struct drm_connector *connector)
|
||||
{
|
||||
if (!drm_mode_create_colorspace_property(connector))
|
||||
if (!drm_mode_create_hdmi_colorspace_property(connector))
|
||||
drm_object_attach_property(&connector->base,
|
||||
connector->colorspace_property, 0);
|
||||
}
|
||||
|
@ -1523,7 +1523,7 @@ int drm_connector_attach_scaling_mode_property(struct drm_connector *connector,
|
||||
int drm_connector_attach_vrr_capable_property(
|
||||
struct drm_connector *connector);
|
||||
int drm_mode_create_aspect_ratio_property(struct drm_device *dev);
|
||||
int drm_mode_create_colorspace_property(struct drm_connector *connector);
|
||||
int drm_mode_create_hdmi_colorspace_property(struct drm_connector *connector);
|
||||
int drm_mode_create_content_type_property(struct drm_device *dev);
|
||||
void drm_hdmi_avi_infoframe_content_type(struct hdmi_avi_infoframe *frame,
|
||||
const struct drm_connector_state *conn_state);
|
||||
|
Loading…
Reference in New Issue
Block a user